diff --git a/CHANGELOG.markdown b/CHANGELOG.markdown index 2b452a20c253ae10af60fc3205f02b41450b919f..257cc4ed0f62fedeefb700ee523caa08fddc9ca0 100644 --- a/CHANGELOG.markdown +++ b/CHANGELOG.markdown @@ -1,3 +1,32 @@ +2.0.0.0-dev31 +============= +* Themes: + * Eliminated "skins" as a concept. Skins and themes are consolidated into one entity and now called just "themes" + * New themes out of the box are named by their distinctive characteristic (thus, "default" is renamed to "demo") + * Revised logic of handling "virtual" (which are present in database registry only, but not in the file system) VS "physical" themes +* Dependency injection: + * Reduced memory leaks of integration tests caused by introduction of object manager + * Added compiler for dependency injection definitions and ability to run Magento application with the compiled definitions +* `Mage_Adminhtml` breakdown: + * Implemented XML-schema for system configuration form declaration files (`etc/system.xml` in each module), refactored them to comply with schema and relocated to `etc/adminhtml/system.xml` + * Removed remnants of `Mage_Admin` module (replaced with `Mage_Backend` and others) + * Removed multiple obsolete models in `Mage_Adminhtml` module -- replaced with more generic classes in `Mage_Backend` (less classes overall) +* Replaced `Magento_Test_TestCase_ObjectManagerAbstract` in unit testing framework by a helper in test suite +* Made the PHP coding standard test (`Php_LiveCodeTest`) treat white/black lists as `glob()` patterns and verify correctness of the actual patterns +* Consolidated `upload_max_filesize` logic into one helper +* Bug fixes: + * Fatal error on Product Tags and Customers Tagged Product (on product editing page in backend) + * Trailing space in date caused by new "date picker" JavaScript component + * Impossibility to add product to an order in backend in IE8 + * Not picking a template on customer "Shopping Cart" page at the backend + * "Use Default" checkbox is checked again after saving multiselect attribute config if option does not contain value + * "Single Store Mode" UI fixes + * Runtime error when previewing transactional email template + * Incorrect redirect after applying filter in grids + * Various asynchronous placement of profiler keys + * Various fixes in Taxes backend UI + * Various fixes in translation literals + 2.0.0.0-dev30 ============= * Framework changes diff --git a/app/Mage.php b/app/Mage.php index a4825eb48a8fcb7cad551604ab0a233b81770a7c..166c83887b5d1514f0e275eeb71427a2ed10ef4a 100644 --- a/app/Mage.php +++ b/app/Mage.php @@ -170,7 +170,7 @@ final class Mage 'revision' => '0', 'patch' => '0', 'stability' => 'dev', - 'number' => '30', + 'number' => '31', ); } diff --git a/app/code/community/Phoenix/Moneybookers/Block/Form.php b/app/code/community/Phoenix/Moneybookers/Block/Form.php index 12e2ea41bac2121fc5e6d8d33bcdaf550312136a..b018adbdb4287ef7410a40e4064c9b3dfd133f1b 100644 --- a/app/code/community/Phoenix/Moneybookers/Block/Form.php +++ b/app/code/community/Phoenix/Moneybookers/Block/Form.php @@ -59,8 +59,8 @@ class Phoenix_Moneybookers_Block_Form extends Mage_Payment_Block_Form 'Phoenix_Moneybookers::images/' . $payment . '.gif' ); foreach ($images as $image) { - if (file_exists($design->getSkinFile($image))) { - return $design->getSkinUrl($image); + if (file_exists($design->getViewFile($image))) { + return $design->getViewFileUrl($image); } } return false; diff --git a/app/code/community/Phoenix/Moneybookers/Block/Payment.php b/app/code/community/Phoenix/Moneybookers/Block/Payment.php index 870db6ad7f0f19090bc5819f47761a2f66ae7adb..11d44ea7bdc7577e6ff6c899a24328d321284e28 100644 --- a/app/code/community/Phoenix/Moneybookers/Block/Payment.php +++ b/app/code/community/Phoenix/Moneybookers/Block/Payment.php @@ -34,10 +34,10 @@ class Phoenix_Moneybookers_Block_Payment extends Mage_Core_Block_Template { $locale = Mage::getModel('Phoenix_Moneybookers_Model_Acc')->getLocale(); $file = "Phoenix_Moneybookers::images/banner_120_{$locale}.png"; - if (file_exists(Mage::getDesign()->getSkinFile($file))) { - return Mage::getDesign()->getSkinUrl($file); + if (file_exists(Mage::getDesign()->getViewFile($file))) { + return Mage::getDesign()->getViewFileUrl($file); } - return $this->getSkinUrl('Phoenix_Moneybookers::images/banner_120_int.gif'); + return $this->getViewFileUrl('Phoenix_Moneybookers::images/banner_120_int.gif'); } } diff --git a/app/code/community/Phoenix/Moneybookers/etc/adminhtml/system.xml b/app/code/community/Phoenix/Moneybookers/etc/adminhtml/system.xml new file mode 100644 index 0000000000000000000000000000000000000000..181554ef9c5eb02b113facc1708aabc2543de7dd --- /dev/null +++ b/app/code/community/Phoenix/Moneybookers/etc/adminhtml/system.xml @@ -0,0 +1,568 @@ +<?xml version="1.0"?> +<!-- +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Phoenix + * @package Phoenix_Moneybookers + * @copyright Copyright (c) 2012 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +--> +<config> + <system> + <section id="moneybookers" translate="label" module="Phoenix_Moneybookers" type="text" sortOrder="990" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Moneybookers</label> + <tab>sales</tab> + <resource>Phoenix_Moneybookers::moneybookers</resource> + <group id="settings" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Moneybookers Settings</label> + <field id="moneybookers_email" translate="label,comment" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Email Address of Your Moneybookers Account</label> + <comment> + <![CDATA[To have access to the international payment network of Moneybookers please register <a href="http://www.moneybookers.com/partners/magento/" target="_blank">here</a> for a free account if you don't have one yet.]]> +</comment> + </field> + <field id="customer_id" translate="label" type="text" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Customer ID</label> + </field> + <field id="secret_key" translate="label,comment" type="text" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Secret Word</label> + <comment>Pre-shared secret key to secure the transaction. After activation Moneybookers will give you access to a new section in your Moneybookers account called "Merchant tools". Please choose a secret word (do not use your password for this) and provide it in your Moneybookers admin area and above.</comment> + </field> + <field id="activationstatus" type="text" sortOrder="4" showInDefault="1" showInWebsite="1" showInStore="1"> + <comment></comment> + </field> + </group> + <group id="moneybookers_acc" translate="label" module="Phoenix_Moneybookers" type="text" sortOrder="201" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>All Credit Cards / Visa, Mastercard, AMEX, JCB, Diners (powered by Moneybookers) - International</label> + <field id="active" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Enabled</label> + <config_path>payment/moneybookers_acc/active</config_path> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="sort_order" translate="label" type="text" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Sort Order</label> + <config_path>payment/moneybookers_acc/sort_order</config_path> + </field> + <field id="title" translate="label" type="text" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Title</label> + <config_path>payment/moneybookers_acc/title</config_path> + </field> + <field id="allowspecific" translate="label" type="allowspecific" sortOrder="6" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Payment from Applicable Countries</label> + <config_path>payment/moneybookers_acc/allowspecific</config_path> + <source_model>Mage_Payment_Model_Config_Source_Allspecificcountries</source_model> + </field> + <field id="specificcountry" translate="label" type="multiselect" sortOrder="7" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Payment from Specific Countries</label> + <config_path>payment/moneybookers_acc/specificcountry</config_path> + <source_model>Mage_Directory_Model_Config_Source_Country</source_model> + <can_be_empty>1</can_be_empty> + </field> + </group> + <group id="moneybookers_csi" translate="label" module="Phoenix_Moneybookers" type="text" sortOrder="252" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>CartaSi (powered by Moneybookers) - Italy</label> + <field id="active" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Enabled</label> + <config_path>payment/moneybookers_csi/active</config_path> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="sort_order" translate="label" type="text" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Sort Order</label> + <config_path>payment/moneybookers_csi/sort_order</config_path> + </field> + <field id="title" translate="label" type="text" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Title</label> + <config_path>payment/moneybookers_csi/title</config_path> + </field> + <field id="allowspecific" translate="label" type="allowspecific" sortOrder="6" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Payment from Applicable Countries</label> + <config_path>payment/moneybookers_csi/allowspecific</config_path> + <source_model>Mage_Payment_Model_Config_Source_Allspecificcountries</source_model> + </field> + <field id="specificcountry" translate="label" type="multiselect" sortOrder="7" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Payment from Specific Countries</label> + <config_path>payment/moneybookers_csi/specificcountry</config_path> + <source_model>Mage_Directory_Model_Config_Source_Country</source_model> + <can_be_empty>1</can_be_empty> + </field> + </group> + <group id="moneybookers_did" translate="label" module="Phoenix_Moneybookers" type="text" sortOrder="211" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Lastschrift (ELV) (powered by Moneybookers) - Germany</label> + <field id="active" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Enabled</label> + <config_path>payment/moneybookers_did/active</config_path> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="sort_order" translate="label" type="text" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Sort Order</label> + <config_path>payment/moneybookers_did/sort_order</config_path> + </field> + <field id="title" translate="label" type="text" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Title</label> + <config_path>payment/moneybookers_did/title</config_path> + </field> + <field id="allowspecific" translate="label" type="allowspecific" sortOrder="6" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Payment from Applicable Countries</label> + <config_path>payment/moneybookers_did/allowspecific</config_path> + <source_model>Mage_Payment_Model_Config_Source_Allspecificcountries</source_model> + </field> + <field id="specificcountry" translate="label" type="multiselect" sortOrder="7" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Payment from Specific Countries</label> + <config_path>payment/moneybookers_did/specificcountry</config_path> + <source_model>Mage_Directory_Model_Config_Source_Country</source_model> + <can_be_empty>1</can_be_empty> + </field> + </group> + <group id="moneybookers_dnk" translate="label" module="Phoenix_Moneybookers" type="text" sortOrder="241" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Dankort (powered by Moneybookers) - Denmark</label> + <field id="active" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Enabled</label> + <config_path>payment/moneybookers_dnk/active</config_path> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="sort_order" translate="label" type="text" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Sort Order</label> + <config_path>payment/moneybookers_dnk/sort_order</config_path> + </field> + <field id="title" translate="label" type="text" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Title</label> + <config_path>payment/moneybookers_dnk/title</config_path> + </field> + <field id="allowspecific" translate="label" type="allowspecific" sortOrder="6" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Payment from Applicable Countries</label> + <config_path>payment/moneybookers_dnk/allowspecific</config_path> + <source_model>Mage_Payment_Model_Config_Source_Allspecificcountries</source_model> + </field> + <field id="specificcountry" translate="label" type="multiselect" sortOrder="7" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Payment from Specific Countries</label> + <config_path>payment/moneybookers_dnk/specificcountry</config_path> + <source_model>Mage_Directory_Model_Config_Source_Country</source_model> + <can_be_empty>1</can_be_empty> + </field> + </group> + <group id="moneybookers_ebt" translate="label" module="Phoenix_Moneybookers" type="text" sortOrder="271" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Nordea Solo (powered by Moneybookers) - Sweden</label> + <field id="active" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Enabled</label> + <config_path>payment/moneybookers_ebt/active</config_path> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="sort_order" translate="label" type="text" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Sort Order</label> + <config_path>payment/moneybookers_ebt/sort_order</config_path> + </field> + <field id="title" translate="label" type="text" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Title</label> + <config_path>payment/moneybookers_ebt/title</config_path> + </field> + <field id="allowspecific" translate="label" type="allowspecific" sortOrder="6" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Payment from Applicable Countries</label> + <config_path>payment/moneybookers_ebt/allowspecific</config_path> + <source_model>Mage_Payment_Model_Config_Source_Allspecificcountries</source_model> + </field> + <field id="specificcountry" translate="label" type="multiselect" sortOrder="7" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Payment from Specific Countries</label> + <config_path>payment/moneybookers_ebt/specificcountry</config_path> + <source_model>Mage_Directory_Model_Config_Source_Country</source_model> + <can_be_empty>1</can_be_empty> + </field> + </group> + <group id="moneybookers_ent" translate="label" module="Phoenix_Moneybookers" type="text" sortOrder="261" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>eNETS (powered by Moneybookers) - Singapore</label> + <field id="active" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Enabled</label> + <config_path>payment/moneybookers_ent/active</config_path> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="sort_order" translate="label" type="text" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Sort Order</label> + <config_path>payment/moneybookers_ent/sort_order</config_path> + </field> + <field id="title" translate="label" type="text" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Title</label> + <config_path>payment/moneybookers_ent/title</config_path> + </field> + <field id="allowspecific" translate="label" type="allowspecific" sortOrder="6" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Payment from Applicable Countries</label> + <config_path>payment/moneybookers_ent/allowspecific</config_path> + <source_model>Mage_Payment_Model_Config_Source_Allspecificcountries</source_model> + </field> + <field id="specificcountry" translate="label" type="multiselect" sortOrder="7" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Payment from Specific Countries</label> + <config_path>payment/moneybookers_ent/specificcountry</config_path> + <source_model>Mage_Directory_Model_Config_Source_Country</source_model> + <can_be_empty>1</can_be_empty> + </field> + </group> + <group id="moneybookers_gcb" translate="label" module="Phoenix_Moneybookers" type="text" sortOrder="231" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Carte Bleue (powered by Moneybookers) - France</label> + <field id="active" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Enabled</label> + <config_path>payment/moneybookers_gcb/active</config_path> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="sort_order" translate="label" type="text" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Sort Order</label> + <config_path>payment/moneybookers_gcb/sort_order</config_path> + </field> + <field id="title" translate="label" type="text" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Title</label> + <config_path>payment/moneybookers_gcb/title</config_path> + </field> + <field id="allowspecific" translate="label" type="allowspecific" sortOrder="6" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Payment from Applicable Countries</label> + <config_path>payment/moneybookers_gcb/allowspecific</config_path> + <source_model>Mage_Payment_Model_Config_Source_Allspecificcountries</source_model> + </field> + <field id="specificcountry" translate="label" type="multiselect" sortOrder="7" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Payment from Specific Countries</label> + <config_path>payment/moneybookers_gcb/specificcountry</config_path> + <source_model>Mage_Directory_Model_Config_Source_Country</source_model> + <can_be_empty>1</can_be_empty> + </field> + </group> + <group id="moneybookers_gir" translate="label" module="Phoenix_Moneybookers" type="text" sortOrder="212" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Giropay (powered by Moneybookers) - Germany</label> + <field id="active" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Enabled</label> + <config_path>payment/moneybookers_gir/active</config_path> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="sort_order" translate="label" type="text" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Sort Order</label> + <config_path>payment/moneybookers_gir/sort_order</config_path> + </field> + <field id="title" translate="label" type="text" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Title</label> + <config_path>payment/moneybookers_gir/title</config_path> + </field> + <field id="allowspecific" translate="label" type="allowspecific" sortOrder="6" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Payment from Applicable Countries</label> + <config_path>payment/moneybookers_gir/allowspecific</config_path> + <source_model>Mage_Payment_Model_Config_Source_Allspecificcountries</source_model> + </field> + <field id="specificcountry" translate="label" type="multiselect" sortOrder="7" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Payment from Specific Countries</label> + <config_path>payment/moneybookers_gir/specificcountry</config_path> + <source_model>Mage_Directory_Model_Config_Source_Country</source_model> + <can_be_empty>1</can_be_empty> + </field> + </group> + <group id="moneybookers_idl" translate="label" module="Phoenix_Moneybookers" type="text" sortOrder="291" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>iDeal (powered by Moneybookers) - Netherlands</label> + <field id="active" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Enabled</label> + <config_path>payment/moneybookers_idl/active</config_path> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="sort_order" translate="label" type="text" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Sort Order</label> + <config_path>payment/moneybookers_idl/sort_order</config_path> + </field> + <field id="title" translate="label" type="text" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Title</label> + <config_path>payment/moneybookers_idl/title</config_path> + </field> + <field id="allowspecific" translate="label" type="allowspecific" sortOrder="6" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Payment from Applicable Countries</label> + <config_path>payment/moneybookers_idl/allowspecific</config_path> + <source_model>Mage_Payment_Model_Config_Source_Allspecificcountries</source_model> + </field> + <field id="specificcountry" translate="label" type="multiselect" sortOrder="7" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Payment from Specific Countries</label> + <config_path>payment/moneybookers_idl/specificcountry</config_path> + <source_model>Mage_Directory_Model_Config_Source_Country</source_model> + <can_be_empty>1</can_be_empty> + </field> + </group> + <group id="moneybookers_lsr" translate="label" module="Phoenix_Moneybookers" type="text" sortOrder="221" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Laser (powered by Moneybookers) - Ireland</label> + <field id="active" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Enabled</label> + <config_path>payment/moneybookers_lsr/active</config_path> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="sort_order" translate="label" type="text" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Sort Order</label> + <config_path>payment/moneybookers_lsr/sort_order</config_path> + </field> + <field id="title" translate="label" type="text" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Title</label> + <config_path>payment/moneybookers_lsr/title</config_path> + </field> + <field id="allowspecific" translate="label" type="allowspecific" sortOrder="6" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Payment from Applicable Countries</label> + <config_path>payment/moneybookers_lsr/allowspecific</config_path> + <source_model>Mage_Payment_Model_Config_Source_Allspecificcountries</source_model> + </field> + <field id="specificcountry" translate="label" type="multiselect" sortOrder="7" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Payment from Specific Countries</label> + <config_path>payment/moneybookers_lsr/specificcountry</config_path> + <source_model>Mage_Directory_Model_Config_Source_Country</source_model> + <can_be_empty>1</can_be_empty> + </field> + </group> + <group id="moneybookers_mae" translate="label" module="Phoenix_Moneybookers" type="text" sortOrder="231" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Maestro (powered by Moneybookers) - United Kingdom, Austria, Spain</label> + <field id="active" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Enabled</label> + <config_path>payment/moneybookers_mae/active</config_path> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="sort_order" translate="label" type="text" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Sort Order</label> + <config_path>payment/moneybookers_mae/sort_order</config_path> + </field> + <field id="title" translate="label" type="text" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Title</label> + <config_path>payment/moneybookers_mae/title</config_path> + </field> + <field id="allowspecific" translate="label" type="allowspecific" sortOrder="6" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Payment from Applicable Countries</label> + <config_path>payment/moneybookers_mae/allowspecific</config_path> + <source_model>Mage_Payment_Model_Config_Source_Allspecificcountries</source_model> + </field> + <field id="specificcountry" translate="label" type="multiselect" sortOrder="7" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Payment from Specific Countries</label> + <config_path>payment/moneybookers_mae/specificcountry</config_path> + <source_model>Mage_Directory_Model_Config_Source_Country</source_model> + <can_be_empty>1</can_be_empty> + </field> + </group> + <group id="moneybookers_npy" translate="label" module="Phoenix_Moneybookers" type="text" sortOrder="301" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>EPS Online-uberweisung (powered by Moneybookers) - Austria</label> + <field id="active" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Enabled</label> + <config_path>payment/moneybookers_npy/active</config_path> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="sort_order" translate="label" type="text" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Sort Order</label> + <config_path>payment/moneybookers_npy/sort_order</config_path> + </field> + <field id="title" translate="label" type="text" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Title</label> + <config_path>payment/moneybookers_npy/title</config_path> + </field> + <field id="allowspecific" translate="label" type="allowspecific" sortOrder="6" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Payment from Applicable Countries</label> + <config_path>payment/moneybookers_npy/allowspecific</config_path> + <source_model>Mage_Payment_Model_Config_Source_Allspecificcountries</source_model> + </field> + <field id="specificcountry" translate="label" type="multiselect" sortOrder="7" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Payment from Specific Countries</label> + <config_path>payment/moneybookers_npy/specificcountry</config_path> + <source_model>Mage_Directory_Model_Config_Source_Country</source_model> + <can_be_empty>1</can_be_empty> + </field> + </group> + <group id="moneybookers_pli" translate="label" module="Phoenix_Moneybookers" type="text" sortOrder="311" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>POLi (powered by Moneybookers) - Australia</label> + <field id="active" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Enabled</label> + <config_path>payment/moneybookers_pli/active</config_path> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="sort_order" translate="label" type="text" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Sort Order</label> + <config_path>payment/moneybookers_pli/sort_order</config_path> + </field> + <field id="title" translate="label" type="text" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Title</label> + <config_path>payment/moneybookers_pli/title</config_path> + </field> + <field id="allowspecific" translate="label" type="allowspecific" sortOrder="6" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Payment from Applicable Countries</label> + <config_path>payment/moneybookers_pli/allowspecific</config_path> + <source_model>Mage_Payment_Model_Config_Source_Allspecificcountries</source_model> + </field> + <field id="specificcountry" translate="label" type="multiselect" sortOrder="7" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Payment from Specific Countries</label> + <config_path>payment/moneybookers_pli/specificcountry</config_path> + <source_model>Mage_Directory_Model_Config_Source_Country</source_model> + <can_be_empty>1</can_be_empty> + </field> + </group> + <group id="moneybookers_psp" translate="label" module="Phoenix_Moneybookers" type="text" sortOrder="251" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Postepay (powered by Moneybookers) - Italy</label> + <field id="active" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Enabled</label> + <config_path>payment/moneybookers_psp/active</config_path> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="sort_order" translate="label" type="text" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Sort Order</label> + <config_path>payment/moneybookers_psp/sort_order</config_path> + </field> + <field id="title" translate="label" type="text" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Title</label> + <config_path>payment/moneybookers_psp/title</config_path> + </field> + <field id="allowspecific" translate="label" type="allowspecific" sortOrder="6" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Payment from Applicable Countries</label> + <config_path>payment/moneybookers_psp/allowspecific</config_path> + <source_model>Mage_Payment_Model_Config_Source_Allspecificcountries</source_model> + </field> + <field id="specificcountry" translate="label" type="multiselect" sortOrder="7" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Payment from Specific Countries</label> + <config_path>payment/moneybookers_psp/specificcountry</config_path> + <source_model>Mage_Directory_Model_Config_Source_Country</source_model> + <can_be_empty>1</can_be_empty> + </field> + </group> + <group id="moneybookers_pwy" translate="label" module="Phoenix_Moneybookers" type="text" sortOrder="321" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Przelewy24 (powered by Moneybookers) - Poland</label> + <field id="active" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Enabled</label> + <config_path>payment/moneybookers_pwy/active</config_path> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="sort_order" translate="label" type="text" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Sort Order</label> + <config_path>payment/moneybookers_pwy/sort_order</config_path> + </field> + <field id="title" translate="label" type="text" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Title</label> + <config_path>payment/moneybookers_pwy/title</config_path> + </field> + <field id="allowspecific" translate="label" type="allowspecific" sortOrder="6" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Payment from Applicable Countries</label> + <config_path>payment/moneybookers_pwy/allowspecific</config_path> + <source_model>Mage_Payment_Model_Config_Source_Allspecificcountries</source_model> + </field> + <field id="specificcountry" translate="label" type="multiselect" sortOrder="7" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Payment from Specific Countries</label> + <config_path>payment/moneybookers_pwy/specificcountry</config_path> + <source_model>Mage_Directory_Model_Config_Source_Country</source_model> + <can_be_empty>1</can_be_empty> + </field> + </group> + <group id="moneybookers_sft" translate="label" module="Phoenix_Moneybookers" type="text" sortOrder="213" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Sofortuberweisung (powered by Moneybookers) - Germany</label> + <field id="active" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Enabled</label> + <config_path>payment/moneybookers_sft/active</config_path> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="sort_order" translate="label" type="text" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Sort Order</label> + <config_path>payment/moneybookers_sft/sort_order</config_path> + </field> + <field id="title" translate="label" type="text" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Title</label> + <config_path>payment/moneybookers_sft/title</config_path> + </field> + <field id="allowspecific" translate="label" type="allowspecific" sortOrder="6" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Payment from Applicable Countries</label> + <config_path>payment/moneybookers_sft/allowspecific</config_path> + <source_model>Mage_Payment_Model_Config_Source_Allspecificcountries</source_model> + </field> + <field id="specificcountry" translate="label" type="multiselect" sortOrder="7" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Payment from Specific Countries</label> + <config_path>payment/moneybookers_sft/specificcountry</config_path> + <source_model>Mage_Directory_Model_Config_Source_Country</source_model> + <can_be_empty>1</can_be_empty> + </field> + </group> + <group id="moneybookers_so2" translate="label" module="Phoenix_Moneybookers" type="text" sortOrder="281" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Nordea Solo (powered by Moneybookers) - Finland</label> + <field id="active" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Enabled</label> + <config_path>payment/moneybookers_so2/active</config_path> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="sort_order" translate="label" type="text" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Sort Order</label> + <config_path>payment/moneybookers_so2/sort_order</config_path> + </field> + <field id="title" translate="label" type="text" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Title</label> + <config_path>payment/moneybookers_so2/title</config_path> + </field> + <field id="allowspecific" translate="label" type="allowspecific" sortOrder="6" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Payment from Applicable Countries</label> + <config_path>payment/moneybookers_so2/allowspecific</config_path> + <source_model>Mage_Payment_Model_Config_Source_Allspecificcountries</source_model> + </field> + <field id="specificcountry" translate="label" type="multiselect" sortOrder="7" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Payment from Specific Countries</label> + <config_path>payment/moneybookers_so2/specificcountry</config_path> + <source_model>Mage_Directory_Model_Config_Source_Country</source_model> + <can_be_empty>1</can_be_empty> + </field> + </group> + <group id="moneybookers_wlt" translate="label" module="Phoenix_Moneybookers" type="text" sortOrder="331" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Moneybookers eWallet</label> + <field id="active" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Enabled</label> + <config_path>payment/moneybookers_wlt/active</config_path> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="sort_order" translate="label" type="text" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Sort Order</label> + <config_path>payment/moneybookers_wlt/sort_order</config_path> + </field> + <field id="title" translate="label" type="text" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Title</label> + <config_path>payment/moneybookers_wlt/title</config_path> + </field> + <field id="allowspecific" translate="label" type="allowspecific" sortOrder="6" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Payment from Applicable Countries</label> + <config_path>payment/moneybookers_wlt/allowspecific</config_path> + <source_model>Mage_Payment_Model_Config_Source_Allspecificcountries</source_model> + </field> + <field id="specificcountry" translate="label" type="multiselect" sortOrder="7" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Payment from Specific Countries</label> + <config_path>payment/moneybookers_wlt/specificcountry</config_path> + <source_model>Mage_Directory_Model_Config_Source_Country</source_model> + <can_be_empty>1</can_be_empty> + </field> + </group> + <group id="moneybookers_obt" translate="label" module="Phoenix_Moneybookers" type="text" sortOrder="381" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Online Bank Transfer (powered by Moneybookers)</label> + <field id="active" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Enabled</label> + <config_path>payment/moneybookers_obt/active</config_path> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="sort_order" translate="label" type="text" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Sort Order</label> + <config_path>payment/moneybookers_obt/sort_order</config_path> + </field> + <field id="title" translate="label" type="text" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Title</label> + <config_path>payment/moneybookers_obt/title</config_path> + </field> + <field id="allowspecific" translate="label" type="allowspecific" sortOrder="6" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Payment from Applicable Countries</label> + <config_path>payment/moneybookers_obt/allowspecific</config_path> + <source_model>Mage_Payment_Model_Config_Source_Allspecificcountries</source_model> + </field> + <field id="specificcountry" translate="label" type="multiselect" sortOrder="7" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Payment from Specific Countries</label> + <config_path>payment/moneybookers_obt/specificcountry</config_path> + <source_model>Mage_Directory_Model_Config_Source_Country</source_model> + <can_be_empty>1</can_be_empty> + </field> + </group> + </section> + </system> +</config> diff --git a/app/code/community/Phoenix/Moneybookers/etc/system.xml b/app/code/community/Phoenix/Moneybookers/etc/system.xml deleted file mode 100644 index 1c8305512547dca3e53c4a6d2bfdf2ba989863f6..0000000000000000000000000000000000000000 --- a/app/code/community/Phoenix/Moneybookers/etc/system.xml +++ /dev/null @@ -1,1208 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-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 Phoenix - * @package Phoenix_Moneybookers - * @copyright Copyright (c) 2012 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ ---> -<config> - <sections> - <moneybookers translate="label" module="Phoenix_Moneybookers"> - <label>Moneybookers</label> - <tab>sales</tab> - <frontend_type>text</frontend_type> - <sort_order>990</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <resource>Phoenix_Moneybookers::moneybookers</resource> - <groups> - <settings translate="label"> - <label>Moneybookers Settings</label> - <frontend_type>text</frontend_type> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <moneybookers_email translate="label,comment"> - <label>Email Address of Your Moneybookers Account</label> - <comment><![CDATA[To have access to the international payment network of Moneybookers please register <a href="http://www.moneybookers.com/partners/magento/" target="_blank">here</a> for a free account if you don’t have one yet.]]></comment> - <frontend_type>text</frontend_type> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </moneybookers_email> - <customer_id translate="label"> - <label>Customer ID</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> - </customer_id> - <secret_key translate="label,comment"> - <label>Secret Word</label> - <comment>Pre-shared secret key to secure the transaction. After activation Moneybookers will give you access to a new section in your Moneybookers account called "Merchant tools". Please choose a secret word (do not use your password for this) and provide it in your Moneybookers admin area and above.</comment> - <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> - </secret_key> - <activationstatus> - <comment></comment> - <frontend_type>text</frontend_type> - <sort_order>4</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </activationstatus> - </fields> - </settings> - <moneybookers_acc translate="label" module="Phoenix_Moneybookers"> - <label>All Credit Cards / Visa, Mastercard, AMEX, JCB, Diners (powered by Moneybookers) - International</label> - <frontend_type>text</frontend_type> - <sort_order>201</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <active translate="label"> - <label>Enabled</label> - <frontend_type>select</frontend_type> - <config_path>payment/moneybookers_acc/active</config_path> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </active> - <sort_order translate="label"> - <label>Sort Order</label> - <frontend_type>text</frontend_type> - <config_path>payment/moneybookers_acc/sort_order</config_path> - <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> - </sort_order> - <title translate="label"> - <label>Title</label> - <frontend_type>text</frontend_type> - <config_path>payment/moneybookers_acc/title</config_path> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </title> - <allowspecific translate="label"> - <label>Payment from Applicable Countries</label> - <frontend_type>allowspecific</frontend_type> - <config_path>payment/moneybookers_acc/allowspecific</config_path> - <sort_order>6</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Payment_Allspecificcountries</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </allowspecific> - <specificcountry translate="label"> - <label>Payment from Specific Countries</label> - <frontend_type>multiselect</frontend_type> - <config_path>payment/moneybookers_acc/specificcountry</config_path> - <sort_order>7</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Country</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <can_be_empty>1</can_be_empty> - </specificcountry> - </fields> - </moneybookers_acc> - <moneybookers_csi translate="label" module="Phoenix_Moneybookers"> - <label>CartaSi (powered by Moneybookers) - Italy</label> - <frontend_type>text</frontend_type> - <sort_order>252</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <active translate="label"> - <label>Enabled</label> - <frontend_type>select</frontend_type> - <config_path>payment/moneybookers_csi/active</config_path> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </active> - <sort_order translate="label"> - <label>Sort Order</label> - <frontend_type>text</frontend_type> - <config_path>payment/moneybookers_csi/sort_order</config_path> - <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> - </sort_order> - <title translate="label"> - <label>Title</label> - <frontend_type>text</frontend_type> - <config_path>payment/moneybookers_csi/title</config_path> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </title> - <allowspecific translate="label"> - <label>Payment from Applicable Countries</label> - <frontend_type>allowspecific</frontend_type> - <config_path>payment/moneybookers_csi/allowspecific</config_path> - <sort_order>6</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Payment_Allspecificcountries</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </allowspecific> - <specificcountry translate="label"> - <label>Payment from Specific Countries</label> - <frontend_type>multiselect</frontend_type> - <config_path>payment/moneybookers_csi/specificcountry</config_path> - <sort_order>7</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Country</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <can_be_empty>1</can_be_empty> - </specificcountry> - </fields> - </moneybookers_csi> - <moneybookers_did translate="label" module="Phoenix_Moneybookers"> - <label>Lastschrift (ELV) (powered by Moneybookers) - Germany</label> - <frontend_type>text</frontend_type> - <sort_order>211</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <active translate="label"> - <label>Enabled</label> - <frontend_type>select</frontend_type> - <config_path>payment/moneybookers_did/active</config_path> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </active> - <sort_order translate="label"> - <label>Sort Order</label> - <frontend_type>text</frontend_type> - <config_path>payment/moneybookers_did/sort_order</config_path> - <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> - </sort_order> - <title translate="label"> - <label>Title</label> - <frontend_type>text</frontend_type> - <config_path>payment/moneybookers_did/title</config_path> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </title> - <allowspecific translate="label"> - <label>Payment from Applicable Countries</label> - <frontend_type>allowspecific</frontend_type> - <config_path>payment/moneybookers_did/allowspecific</config_path> - <sort_order>6</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Payment_Allspecificcountries</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </allowspecific> - <specificcountry translate="label"> - <label>Payment from Specific Countries</label> - <frontend_type>multiselect</frontend_type> - <config_path>payment/moneybookers_did/specificcountry</config_path> - <sort_order>7</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Country</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <can_be_empty>1</can_be_empty> - </specificcountry> - </fields> - </moneybookers_did> - <moneybookers_dnk translate="label" module="Phoenix_Moneybookers"> - <label>Dankort (powered by Moneybookers) - Denmark</label> - <frontend_type>text</frontend_type> - <sort_order>241</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <active translate="label"> - <label>Enabled</label> - <frontend_type>select</frontend_type> - <config_path>payment/moneybookers_dnk/active</config_path> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </active> - <sort_order translate="label"> - <label>Sort Order</label> - <frontend_type>text</frontend_type> - <config_path>payment/moneybookers_dnk/sort_order</config_path> - <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> - </sort_order> - <title translate="label"> - <label>Title</label> - <frontend_type>text</frontend_type> - <config_path>payment/moneybookers_dnk/title</config_path> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </title> - <allowspecific translate="label"> - <label>Payment from Applicable Countries</label> - <frontend_type>allowspecific</frontend_type> - <config_path>payment/moneybookers_dnk/allowspecific</config_path> - <sort_order>6</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Payment_Allspecificcountries</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </allowspecific> - <specificcountry translate="label"> - <label>Payment from Specific Countries</label> - <frontend_type>multiselect</frontend_type> - <config_path>payment/moneybookers_dnk/specificcountry</config_path> - <sort_order>7</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Country</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <can_be_empty>1</can_be_empty> - </specificcountry> - </fields> - </moneybookers_dnk> - <moneybookers_ebt translate="label" module="Phoenix_Moneybookers"> - <label>Nordea Solo (powered by Moneybookers) - Sweden</label> - <frontend_type>text</frontend_type> - <sort_order>271</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <active translate="label"> - <label>Enabled</label> - <frontend_type>select</frontend_type> - <config_path>payment/moneybookers_ebt/active</config_path> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </active> - <sort_order translate="label"> - <label>Sort Order</label> - <frontend_type>text</frontend_type> - <config_path>payment/moneybookers_ebt/sort_order</config_path> - <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> - </sort_order> - <title translate="label"> - <label>Title</label> - <frontend_type>text</frontend_type> - <config_path>payment/moneybookers_ebt/title</config_path> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </title> - <allowspecific translate="label"> - <label>Payment from Applicable Countries</label> - <config_path>payment/moneybookers_ebt/allowspecific</config_path> - <frontend_type>allowspecific</frontend_type> - <sort_order>6</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Payment_Allspecificcountries</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </allowspecific> - <specificcountry translate="label"> - <label>Payment from Specific Countries</label> - <frontend_type>multiselect</frontend_type> - <config_path>payment/moneybookers_ebt/specificcountry</config_path> - <sort_order>7</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Country</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <can_be_empty>1</can_be_empty> - </specificcountry> - </fields> - </moneybookers_ebt> - <moneybookers_ent translate="label" module="Phoenix_Moneybookers"> - <label>eNETS (powered by Moneybookers) - Singapore</label> - <frontend_type>text</frontend_type> - <sort_order>261</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <active translate="label"> - <label>Enabled</label> - <frontend_type>select</frontend_type> - <config_path>payment/moneybookers_ent/active</config_path> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </active> - <sort_order translate="label"> - <label>Sort Order</label> - <frontend_type>text</frontend_type> - <config_path>payment/moneybookers_ent/sort_order</config_path> - <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> - </sort_order> - <title translate="label"> - <label>Title</label> - <frontend_type>text</frontend_type> - <config_path>payment/moneybookers_ent/title</config_path> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </title> - <allowspecific translate="label"> - <label>Payment from Applicable Countries</label> - <frontend_type>allowspecific</frontend_type> - <config_path>payment/moneybookers_ent/allowspecific</config_path> - <sort_order>6</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Payment_Allspecificcountries</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </allowspecific> - <specificcountry translate="label"> - <label>Payment from Specific Countries</label> - <frontend_type>multiselect</frontend_type> - <config_path>payment/moneybookers_ent/specificcountry</config_path> - <sort_order>7</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Country</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <can_be_empty>1</can_be_empty> - </specificcountry> - </fields> - </moneybookers_ent> - <moneybookers_gcb translate="label" module="Phoenix_Moneybookers"> - <label>Carte Bleue (powered by Moneybookers) - France</label> - <frontend_type>text</frontend_type> - <sort_order>231</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <active translate="label"> - <label>Enabled</label> - <frontend_type>select</frontend_type> - <config_path>payment/moneybookers_gcb/active</config_path> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </active> - <sort_order translate="label"> - <label>Sort Order</label> - <frontend_type>text</frontend_type> - <config_path>payment/moneybookers_gcb/sort_order</config_path> - <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> - </sort_order> - <title translate="label"> - <label>Title</label> - <frontend_type>text</frontend_type> - <config_path>payment/moneybookers_gcb/title</config_path> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </title> - <allowspecific translate="label"> - <label>Payment from Applicable Countries</label> - <frontend_type>allowspecific</frontend_type> - <config_path>payment/moneybookers_gcb/allowspecific</config_path> - <sort_order>6</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Payment_Allspecificcountries</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </allowspecific> - <specificcountry translate="label"> - <label>Payment from Specific Countries</label> - <frontend_type>multiselect</frontend_type> - <config_path>payment/moneybookers_gcb/specificcountry</config_path> - <sort_order>7</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Country</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <can_be_empty>1</can_be_empty> - </specificcountry> - </fields> - </moneybookers_gcb> - <moneybookers_gir translate="label" module="Phoenix_Moneybookers"> - <label>Giropay (powered by Moneybookers) - Germany</label> - <frontend_type>text</frontend_type> - <sort_order>212</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <active translate="label"> - <label>Enabled</label> - <frontend_type>select</frontend_type> - <config_path>payment/moneybookers_gir/active</config_path> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </active> - <sort_order translate="label"> - <label>Sort Order</label> - <frontend_type>text</frontend_type> - <config_path>payment/moneybookers_gir/sort_order</config_path> - <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> - </sort_order> - <title translate="label"> - <label>Title</label> - <frontend_type>text</frontend_type> - <config_path>payment/moneybookers_gir/title</config_path> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </title> - <allowspecific translate="label"> - <label>Payment from Applicable Countries</label> - <frontend_type>allowspecific</frontend_type> - <config_path>payment/moneybookers_gir/allowspecific</config_path> - <sort_order>6</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Payment_Allspecificcountries</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </allowspecific> - <specificcountry translate="label"> - <label>Payment from Specific Countries</label> - <frontend_type>multiselect</frontend_type> - <config_path>payment/moneybookers_gir/specificcountry</config_path> - <sort_order>7</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Country</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <can_be_empty>1</can_be_empty> - </specificcountry> - </fields> - </moneybookers_gir> - <moneybookers_idl translate="label" module="Phoenix_Moneybookers"> - <label>iDeal (powered by Moneybookers) - Netherlands</label> - <frontend_type>text</frontend_type> - <sort_order>291</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <active translate="label"> - <label>Enabled</label> - <frontend_type>select</frontend_type> - <config_path>payment/moneybookers_idl/active</config_path> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </active> - <sort_order translate="label"> - <label>Sort Order</label> - <frontend_type>text</frontend_type> - <config_path>payment/moneybookers_idl/sort_order</config_path> - <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> - </sort_order> - <title translate="label"> - <label>Title</label> - <frontend_type>text</frontend_type> - <config_path>payment/moneybookers_idl/title</config_path> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </title> - <allowspecific translate="label"> - <label>Payment from Applicable Countries</label> - <frontend_type>allowspecific</frontend_type> - <config_path>payment/moneybookers_idl/allowspecific</config_path> - <sort_order>6</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Payment_Allspecificcountries</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </allowspecific> - <specificcountry translate="label"> - <label>Payment from Specific Countries</label> - <frontend_type>multiselect</frontend_type> - <config_path>payment/moneybookers_idl/specificcountry</config_path> - <sort_order>7</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Country</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <can_be_empty>1</can_be_empty> - </specificcountry> - </fields> - </moneybookers_idl> - <moneybookers_lsr translate="label" module="Phoenix_Moneybookers"> - <label>Laser (powered by Moneybookers) - Ireland</label> - <frontend_type>text</frontend_type> - <sort_order>221</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <active translate="label"> - <label>Enabled</label> - <frontend_type>select</frontend_type> - <config_path>payment/moneybookers_lsr/active</config_path> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </active> - <sort_order translate="label"> - <label>Sort Order</label> - <frontend_type>text</frontend_type> - <config_path>payment/moneybookers_lsr/sort_order</config_path> - <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> - </sort_order> - <title translate="label"> - <label>Title</label> - <frontend_type>text</frontend_type> - <config_path>payment/moneybookers_lsr/title</config_path> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </title> - <allowspecific translate="label"> - <label>Payment from Applicable Countries</label> - <frontend_type>allowspecific</frontend_type> - <config_path>payment/moneybookers_lsr/allowspecific</config_path> - <sort_order>6</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Payment_Allspecificcountries</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </allowspecific> - <specificcountry translate="label"> - <label>Payment from Specific Countries</label> - <frontend_type>multiselect</frontend_type> - <config_path>payment/moneybookers_lsr/specificcountry</config_path> - <sort_order>7</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Country</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <can_be_empty>1</can_be_empty> - </specificcountry> - </fields> - </moneybookers_lsr> - <moneybookers_mae translate="label" module="Phoenix_Moneybookers"> - <label>Maestro (powered by Moneybookers) - United Kingdom, Austria, Spain</label> - <frontend_type>text</frontend_type> - <sort_order>231</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <active translate="label"> - <label>Enabled</label> - <frontend_type>select</frontend_type> - <config_path>payment/moneybookers_mae/active</config_path> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </active> - <sort_order translate="label"> - <label>Sort Order</label> - <frontend_type>text</frontend_type> - <config_path>payment/moneybookers_mae/sort_order</config_path> - <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> - </sort_order> - <title translate="label"> - <label>Title</label> - <frontend_type>text</frontend_type> - <config_path>payment/moneybookers_mae/title</config_path> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </title> - <allowspecific translate="label"> - <label>Payment from Applicable Countries</label> - <frontend_type>allowspecific</frontend_type> - <config_path>payment/moneybookers_mae/allowspecific</config_path> - <sort_order>6</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Payment_Allspecificcountries</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </allowspecific> - <specificcountry translate="label"> - <label>Payment from Specific Countries</label> - <frontend_type>multiselect</frontend_type> - <config_path>payment/moneybookers_mae/specificcountry</config_path> - <sort_order>7</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Country</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <can_be_empty>1</can_be_empty> - </specificcountry> - </fields> - </moneybookers_mae> - <moneybookers_npy translate="label" module="Phoenix_Moneybookers"> - <label>EPS Online-Überweisung (powered by Moneybookers) - Austria</label> - <frontend_type>text</frontend_type> - <sort_order>301</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <active translate="label"> - <label>Enabled</label> - <frontend_type>select</frontend_type> - <config_path>payment/moneybookers_npy/active</config_path> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </active> - <sort_order translate="label"> - <label>Sort Order</label> - <frontend_type>text</frontend_type> - <config_path>payment/moneybookers_npy/sort_order</config_path> - <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> - </sort_order> - <title translate="label"> - <label>Title</label> - <frontend_type>text</frontend_type> - <config_path>payment/moneybookers_npy/title</config_path> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </title> - <allowspecific translate="label"> - <label>Payment from Applicable Countries</label> - <frontend_type>allowspecific</frontend_type> - <config_path>payment/moneybookers_npy/allowspecific</config_path> - <sort_order>6</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Payment_Allspecificcountries</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </allowspecific> - <specificcountry translate="label"> - <label>Payment from Specific Countries</label> - <frontend_type>multiselect</frontend_type> - <config_path>payment/moneybookers_npy/specificcountry</config_path> - <sort_order>7</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Country</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <can_be_empty>1</can_be_empty> - </specificcountry> - </fields> - </moneybookers_npy> - <moneybookers_pli translate="label" module="Phoenix_Moneybookers"> - <label>POLi (powered by Moneybookers) - Australia</label> - <frontend_type>text</frontend_type> - <sort_order>311</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <active translate="label"> - <label>Enabled</label> - <frontend_type>select</frontend_type> - <config_path>payment/moneybookers_pli/active</config_path> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </active> - <sort_order translate="label"> - <label>Sort Order</label> - <frontend_type>text</frontend_type> - <config_path>payment/moneybookers_pli/sort_order</config_path> - <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> - </sort_order> - <title translate="label"> - <label>Title</label> - <frontend_type>text</frontend_type> - <config_path>payment/moneybookers_pli/title</config_path> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </title> - <allowspecific translate="label"> - <label>Payment from Applicable Countries</label> - <frontend_type>allowspecific</frontend_type> - <config_path>payment/moneybookers_pli/allowspecific</config_path> - <sort_order>6</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Payment_Allspecificcountries</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </allowspecific> - <specificcountry translate="label"> - <label>Payment from Specific Countries</label> - <frontend_type>multiselect</frontend_type> - <config_path>payment/moneybookers_pli/specificcountry</config_path> - <sort_order>7</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Country</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <can_be_empty>1</can_be_empty> - </specificcountry> - </fields> - </moneybookers_pli> - <moneybookers_psp translate="label" module="Phoenix_Moneybookers"> - <label>Postepay (powered by Moneybookers) - Italy</label> - <frontend_type>text</frontend_type> - <sort_order>251</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <active translate="label"> - <label>Enabled</label> - <frontend_type>select</frontend_type> - <config_path>payment/moneybookers_psp/active</config_path> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </active> - <sort_order translate="label"> - <label>Sort Order</label> - <frontend_type>text</frontend_type> - <config_path>payment/moneybookers_psp/sort_order</config_path> - <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> - </sort_order> - <title translate="label"> - <label>Title</label> - <frontend_type>text</frontend_type> - <config_path>payment/moneybookers_psp/title</config_path> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </title> - <allowspecific translate="label"> - <label>Payment from Applicable Countries</label> - <frontend_type>allowspecific</frontend_type> - <config_path>payment/moneybookers_psp/allowspecific</config_path> - <sort_order>6</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Payment_Allspecificcountries</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </allowspecific> - <specificcountry translate="label"> - <label>Payment from Specific Countries</label> - <frontend_type>multiselect</frontend_type> - <config_path>payment/moneybookers_psp/specificcountry</config_path> - <sort_order>7</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Country</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <can_be_empty>1</can_be_empty> - </specificcountry> - </fields> - </moneybookers_psp> - <moneybookers_pwy translate="label" module="Phoenix_Moneybookers"> - <label>Przelewy24 (powered by Moneybookers) - Poland</label> - <frontend_type>text</frontend_type> - <sort_order>321</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <active translate="label"> - <label>Enabled</label> - <frontend_type>select</frontend_type> - <config_path>payment/moneybookers_pwy/active</config_path> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </active> - <sort_order translate="label"> - <label>Sort Order</label> - <frontend_type>text</frontend_type> - <config_path>payment/moneybookers_pwy/sort_order</config_path> - <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> - </sort_order> - <title translate="label"> - <label>Title</label> - <frontend_type>text</frontend_type> - <config_path>payment/moneybookers_pwy/title</config_path> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </title> - <allowspecific translate="label"> - <label>Payment from Applicable Countries</label> - <frontend_type>allowspecific</frontend_type> - <config_path>payment/moneybookers_pwy/allowspecific</config_path> - <sort_order>6</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Payment_Allspecificcountries</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </allowspecific> - <specificcountry translate="label"> - <label>Payment from Specific Countries</label> - <frontend_type>multiselect</frontend_type> - <config_path>payment/moneybookers_pwy/specificcountry</config_path> - <sort_order>7</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Country</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <can_be_empty>1</can_be_empty> - </specificcountry> - </fields> - </moneybookers_pwy> - <moneybookers_sft translate="label" module="Phoenix_Moneybookers"> - <label>Sofortüberweisung (powered by Moneybookers) - Germany</label> - <frontend_type>text</frontend_type> - <sort_order>213</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <active translate="label"> - <label>Enabled</label> - <frontend_type>select</frontend_type> - <config_path>payment/moneybookers_sft/active</config_path> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </active> - <sort_order translate="label"> - <label>Sort Order</label> - <frontend_type>text</frontend_type> - <config_path>payment/moneybookers_sft/sort_order</config_path> - <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> - </sort_order> - <title translate="label"> - <label>Title</label> - <frontend_type>text</frontend_type> - <config_path>payment/moneybookers_sft/title</config_path> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </title> - <allowspecific translate="label"> - <label>Payment from Applicable Countries</label> - <frontend_type>allowspecific</frontend_type> - <config_path>payment/moneybookers_sft/allowspecific</config_path> - <sort_order>6</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Payment_Allspecificcountries</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </allowspecific> - <specificcountry translate="label"> - <label>Payment from Specific Countries</label> - <frontend_type>multiselect</frontend_type> - <config_path>payment/moneybookers_sft/specificcountry</config_path> - <sort_order>7</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Country</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <can_be_empty>1</can_be_empty> - </specificcountry> - </fields> - </moneybookers_sft> - <moneybookers_so2 translate="label" module="Phoenix_Moneybookers"> - <label>Nordea Solo (powered by Moneybookers) - Finland</label> - <frontend_type>text</frontend_type> - <sort_order>281</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <active translate="label"> - <label>Enabled</label> - <frontend_type>select</frontend_type> - <config_path>payment/moneybookers_so2/active</config_path> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </active> - <sort_order translate="label"> - <label>Sort Order</label> - <frontend_type>text</frontend_type> - <config_path>payment/moneybookers_so2/sort_order</config_path> - <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> - </sort_order> - <title translate="label"> - <label>Title</label> - <frontend_type>text</frontend_type> - <config_path>payment/moneybookers_so2/title</config_path> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </title> - <allowspecific translate="label"> - <label>Payment from Applicable Countries</label> - <frontend_type>allowspecific</frontend_type> - <config_path>payment/moneybookers_so2/allowspecific</config_path> - <sort_order>6</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Payment_Allspecificcountries</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </allowspecific> - <specificcountry translate="label"> - <label>Payment from Specific Countries</label> - <frontend_type>multiselect</frontend_type> - <config_path>payment/moneybookers_so2/specificcountry</config_path> - <sort_order>7</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Country</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <can_be_empty>1</can_be_empty> - </specificcountry> - </fields> - </moneybookers_so2> - <moneybookers_wlt translate="label" module="Phoenix_Moneybookers"> - <label>Moneybookers eWallet</label> - <frontend_type>text</frontend_type> - <sort_order>331</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <active translate="label"> - <label>Enabled</label> - <frontend_type>select</frontend_type> - <config_path>payment/moneybookers_wlt/active</config_path> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </active> - <sort_order translate="label"> - <label>Sort Order</label> - <frontend_type>text</frontend_type> - <config_path>payment/moneybookers_wlt/sort_order</config_path> - <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> - </sort_order> - <title translate="label"> - <label>Title</label> - <frontend_type>text</frontend_type> - <config_path>payment/moneybookers_wlt/title</config_path> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </title> - <allowspecific translate="label"> - <label>Payment from Applicable Countries</label> - <frontend_type>allowspecific</frontend_type> - <config_path>payment/moneybookers_wlt/allowspecific</config_path> - <sort_order>6</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Payment_Allspecificcountries</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </allowspecific> - <specificcountry translate="label"> - <label>Payment from Specific Countries</label> - <frontend_type>multiselect</frontend_type> - <config_path>payment/moneybookers_wlt/specificcountry</config_path> - <sort_order>7</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Country</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <can_be_empty>1</can_be_empty> - </specificcountry> - </fields> - </moneybookers_wlt> - <moneybookers_obt translate="label" module="Phoenix_Moneybookers"> - <label>Online Bank Transfer (powered by Moneybookers)</label> - <frontend_type>text</frontend_type> - <sort_order>381</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <active translate="label"> - <label>Enabled</label> - <frontend_type>select</frontend_type> - <config_path>payment/moneybookers_obt/active</config_path> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </active> - <sort_order translate="label"> - <label>Sort Order</label> - <frontend_type>text</frontend_type> - <config_path>payment/moneybookers_obt/sort_order</config_path> - <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> - </sort_order> - <title translate="label"> - <label>Title</label> - <frontend_type>text</frontend_type> - <config_path>payment/moneybookers_obt/title</config_path> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </title> - <allowspecific translate="label"> - <label>Payment from Applicable Countries</label> - <frontend_type>allowspecific</frontend_type> - <config_path>payment/moneybookers_obt/allowspecific</config_path> - <sort_order>6</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Payment_Allspecificcountries</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </allowspecific> - <specificcountry translate="label"> - <label>Payment from Specific Countries</label> - <frontend_type>multiselect</frontend_type> - <config_path>payment/moneybookers_obt/specificcountry</config_path> - <sort_order>7</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Country</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <can_be_empty>1</can_be_empty> - </specificcountry> - </fields> - </moneybookers_obt> - </groups> - </moneybookers> - </sections> -</config> diff --git a/app/code/community/Phoenix/Moneybookers/view/adminhtml/jsinit.phtml b/app/code/community/Phoenix/Moneybookers/view/adminhtml/jsinit.phtml index 80a78fcfbb9f94d2f27261c333c0fb49a9473728..3f87a65329c6585ccb5fab02f8f2d18752dac68d 100644 --- a/app/code/community/Phoenix/Moneybookers/view/adminhtml/jsinit.phtml +++ b/app/code/community/Phoenix/Moneybookers/view/adminhtml/jsinit.phtml @@ -36,7 +36,7 @@ $('moneybookers_settings_activationstatus').up().insert('<button type="button" id="moneybookers_multifuncbutton" onclick="moneybookers.button()" style="display: none; margin-top: 1em;"><span id="moneybookers_multifuncbutton_label" style="display:block; margin-top:1em;"></span></button>'); $('moneybookers_settings_activationstatus').up().insert('<span id="moneybookers_inf_div" style="display:block; margin-top:1em;"></span>'); $('moneybookers_settings_activationstatus').up().insert('<input id="moneybookers_settings_customer_id_hidden" type="hidden"/>'); - moneybookers = new Moneybookers('<?php echo $this->getSkinUrl('Phoenix_Moneybookers::banner.jpg'); ?>', '<?php echo $this->getUrl('*/moneybookers/activateemail'); ?>', '<?php echo $this->getUrl('*/moneybookers/checksecret'); ?>', '<?php echo $this->getUrl('*/moneybookers/checkemail');?>'); + moneybookers = new Moneybookers('<?php echo $this->getViewFileUrl('Phoenix_Moneybookers::banner.jpg'); ?>', '<?php echo $this->getUrl('*/moneybookers/activateemail'); ?>', '<?php echo $this->getUrl('*/moneybookers/checksecret'); ?>', '<?php echo $this->getUrl('*/moneybookers/checkemail');?>'); } //]]> </script> diff --git a/app/code/core/Mage/Admin/Model/Config.php b/app/code/core/Mage/Admin/Model/Config.php deleted file mode 100644 index 0420cdef7721f112c35438ff627f62ba6e6d33a0..0000000000000000000000000000000000000000 --- a/app/code/core/Mage/Admin/Model/Config.php +++ /dev/null @@ -1,121 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-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 Mage_Admin - * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ - - -/** - * Configuration for Admin model - * - * @category Mage - * @package Mage_Admin - * @author Magento Core Team <core@magentocommerce.com> - */ -class Mage_Admin_Model_Config extends Varien_Simplexml_Config -{ - /** - * adminhtml.xml merged config - * - * @var Varien_Simplexml_Config - */ - protected $_adminhtmlConfig; - - /** - * Main Application object - * - * @var Mage_Core_Model_App - */ - protected $_app; - - /** - * Main Application config - * - * @var Mage_Core_Model_Config - */ - protected $_appConfig; - - /** - * List of helpers by module - * - * @var array - */ - protected $_helpers = array(); - - /** - * Load config from merged adminhtml.xml files - * @param array $data - */ - public function __construct(array $data = array()) - { - $this->_app = isset($data['app']) ? $data['app'] : Mage::app(); - $this->_appConfig = isset($data['appConfig']) ? $data['appConfig'] : Mage::getConfig(); - if (isset($data['helpers'])) { - $this->_helpers = $data['helpers']; - } - - - parent::__construct(); - $this->setCacheId('adminhtml_acl_menu_config'); - - /* @var $adminhtmlConfig Varien_Simplexml_Config */ - $adminhtmlConfig = $this->_app->loadCache($this->getCacheId()); - if ($adminhtmlConfig) { - $this->_adminhtmlConfig = new Varien_Simplexml_Config($adminhtmlConfig); - } else { - $adminhtmlConfig = new Varien_Simplexml_Config; - $adminhtmlConfig->loadString('<?xml version="1.0"?><config></config>'); - $this->_appConfig->loadModulesConfiguration('adminhtml.xml', $adminhtmlConfig); - $this->_adminhtmlConfig = $adminhtmlConfig; - - if ($this->_app->useCache('config')) { - $this->_app->saveCache($adminhtmlConfig->getXmlString(), $this->getCacheId(), - array(Mage_Core_Model_Config::CACHE_TAG)); - } - } - } - - /** - * Retrieve base helper by module - * - * @param string $module - * @return Mage_Core_Helper_Abstract - */ - protected function _getHelper($module) - { - if (isset($this->_helpers[$module])) { - return $this->_helpers[$module]; - } - return Mage::helper($module); - } - - /** - * Retrieve xml config - * - * @return Varien_Simplexml_Config - */ - public function getAdminhtmlConfig() - { - return $this->_adminhtmlConfig; - } -} diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Notification/Frequency.php b/app/code/core/Mage/AdminNotification/Model/Config/Source/Frequency.php similarity index 65% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Notification/Frequency.php rename to app/code/core/Mage/AdminNotification/Model/Config/Source/Frequency.php index 6811eb8d969e3be59a0a42ee47440b86704a6f3a..2866f7989e9fd48659b8e3811742960465b9a0c4 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Notification/Frequency.php +++ b/app/code/core/Mage/AdminNotification/Model/Config/Source/Frequency.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_AdminNotification * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -29,19 +29,19 @@ * AdminNotification update frequency source * * @category Mage - * @package Mage_Adminhtml + * @package Mage_AdminNotification * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Model_System_Config_Source_Notification_Frequency +class Mage_AdminNotification_Model_Config_Source_Frequency implements Mage_Core_Model_Option_ArrayInterface { public function toOptionArray() { return array( - 1 => Mage::helper('Mage_Adminhtml_Helper_Data')->__('1 Hour'), - 2 => Mage::helper('Mage_Adminhtml_Helper_Data')->__('2 Hours'), - 6 => Mage::helper('Mage_Adminhtml_Helper_Data')->__('6 Hours'), - 12 => Mage::helper('Mage_Adminhtml_Helper_Data')->__('12 Hours'), - 24 => Mage::helper('Mage_Adminhtml_Helper_Data')->__('24 Hours') + 1 => Mage::helper('Mage_AdminNotification_Helper_Data')->__('1 Hour'), + 2 => Mage::helper('Mage_AdminNotification_Helper_Data')->__('2 Hours'), + 6 => Mage::helper('Mage_AdminNotification_Helper_Data')->__('6 Hours'), + 12 => Mage::helper('Mage_AdminNotification_Helper_Data')->__('12 Hours'), + 24 => Mage::helper('Mage_AdminNotification_Helper_Data')->__('24 Hours') ); } } diff --git a/app/code/core/Mage/AdminNotification/etc/adminhtml/system.xml b/app/code/core/Mage/AdminNotification/etc/adminhtml/system.xml new file mode 100644 index 0000000000000000000000000000000000000000..fb4b1408b4345cd4a3797d019eefc98a15cce60e --- /dev/null +++ b/app/code/core/Mage/AdminNotification/etc/adminhtml/system.xml @@ -0,0 +1,48 @@ +<?xml version="1.0"?> +<!-- +/** + * 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 Mage_AdminNotification + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> + <system> + <section id="system"> + <group id="adminnotification" translate="label" module="Mage_AdminNotification" type="text" sortOrder="250" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Notifications</label> + <field id="use_https" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Use HTTPS to Get Feed</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="frequency" translate="label" type="select" sortOrder="2" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Update Frequency</label> + <source_model>Mage_AdminNotification_Model_Config_Source_Frequency</source_model> + </field> + <field id="last_update" translate="label" type="label" sortOrder="3" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Last Update</label> + <frontend_model>Mage_Backend_Block_System_Config_Form_Field_Notification</frontend_model> + </field> + </group> + </section> + </system> +</config> diff --git a/app/code/core/Mage/AdminNotification/etc/system.xml b/app/code/core/Mage/AdminNotification/etc/system.xml deleted file mode 100644 index 25c3d665814b6a9fdec12ec22550087c1c85f8e9..0000000000000000000000000000000000000000 --- a/app/code/core/Mage/AdminNotification/etc/system.xml +++ /dev/null @@ -1,72 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * 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 Mage_AdminNotification - * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<config> - <sections> - <system> - <groups> - <adminnotification translate="label" module="Mage_AdminNotification"> - <label>Notifications</label> - <frontend_type>text</frontend_type> - <sort_order>250</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - <fields> - <use_https translate="label"> - <label>Use HTTPS to Get Feed</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </use_https> - <frequency translate="label"> - <label>Update Frequency</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Notification_Frequency</source_model> - <sort_order>2</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </frequency> - <last_update translate="label"> - <label>Last Update</label> - <frontend_type>label</frontend_type> - <frontend_model>Mage_Adminhtml_Block_System_Config_Form_Field_Notification</frontend_model> - <sort_order>3</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </last_update> - </fields> - </adminnotification> - </groups> - </system> - </sections> -</config> diff --git a/app/code/core/Mage/Adminhtml/Block/Cache/Grid.php b/app/code/core/Mage/Adminhtml/Block/Cache/Grid.php index d7cfbe751667109d66d8620e306f18f0f0ef8ea7..6c25e761c4c286e0870eb546477c6c1c24eaceff 100644 --- a/app/code/core/Mage/Adminhtml/Block/Cache/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Cache/Grid.php @@ -34,8 +34,8 @@ class Mage_Adminhtml_Block_Cache_Grid extends Mage_Adminhtml_Block_Widget_Grid { parent::_construct(); $this->setId('cache_grid'); - $this->_filterVisibility = false; - $this->_pagerVisibility = false; + $this->setFilterVisibility(false); + $this->setPagerVisibility(false); $this->_invalidatedTypes = Mage::app()->getCacheInstance()->getInvalidatedTypes(); } diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tree.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tree.php index 0b22819175bc7a19ec406963b60837bf01c94cd1..b9e4fb7f9db3b1670d2dbff6593df4aa8d56001a 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tree.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tree.php @@ -73,7 +73,7 @@ class Mage_Adminhtml_Block_Catalog_Category_Tree extends Mage_Adminhtml_Block_Ca } $this->setChild('store_switcher', - $this->getLayout()->createBlock('Mage_Adminhtml_Block_Store_Switcher') + $this->getLayout()->createBlock('Mage_Backend_Block_Store_Switcher') ->setSwitchUrl($this->getUrl('*/*/*', array('_current'=>true, '_query'=>false, 'store'=>null))) ->setTemplate('store/switcher/enhanced.phtml') ); diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Form/Renderer/Config/DateFieldsOrder.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Form/Renderer/Config/DateFieldsOrder.php index 1c3f91607f8d28e7c32a310bc5ff9e5ce8cdad25..1dfe7673ba9259b45d5fc2c0c58b1fedc0ea4d83 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Form/Renderer/Config/DateFieldsOrder.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Form/Renderer/Config/DateFieldsOrder.php @@ -32,7 +32,7 @@ * @author Magento Core Team <core@magentocommerce.com> */ class Mage_Adminhtml_Block_Catalog_Form_Renderer_Config_DateFieldsOrder - extends Mage_Adminhtml_Block_System_Config_Form_Field + extends Mage_Backend_Block_System_Config_Form_Field { protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Form/Renderer/Config/YearRange.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Form/Renderer/Config/YearRange.php index 1cb3b55ec428d69b117b9ca6844e88ac407ce253..f8b19bd98d5878172871b83b88ce6b0aa466a818 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Form/Renderer/Config/YearRange.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Form/Renderer/Config/YearRange.php @@ -31,7 +31,7 @@ * @package Mage_Adminhtml * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Block_Catalog_Form_Renderer_Config_YearRange extends Mage_Adminhtml_Block_System_Config_Form_Field +class Mage_Adminhtml_Block_Catalog_Form_Renderer_Config_YearRange extends Mage_Backend_Block_System_Config_Form_Field { protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) 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 2ef8b05f4e167bca29a990729c517490f20dae8b..b3b9a1fa626aaf2dd46dc4109f66efe64addf443 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 @@ -86,7 +86,7 @@ class Mage_Adminhtml_Block_Catalog_Product_Attribute_Edit_Tab_Main extends Mage_ $frontendInputValues = array_merge($frontendInputElm->getValues(), $additionalTypes); $frontendInputElm->setValues($frontendInputValues); - $yesnoSource = Mage::getModel('Mage_Adminhtml_Model_System_Config_Source_Yesno')->toOptionArray(); + $yesnoSource = Mage::getModel('Mage_Backend_Model_Config_Source_Yesno')->toOptionArray(); $scopes = array( Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE =>Mage::helper('Mage_Catalog_Helper_Data')->__('Store View'), diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Option.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Option.php index 5e4717872e898904230940c0acd1d2da66dbb9e9..9ef2dc2b1afd1b71970fbe14626680b382bd33bf 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Option.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Option.php @@ -160,7 +160,7 @@ class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Options_Option extends Mage_ 'class' => 'select select-product-option-type required-option-select' )) ->setName($this->getFieldName().'[{{id}}][type]') - ->setOptions(Mage::getSingleton('Mage_Adminhtml_Model_System_Config_Source_Product_Options_Type')->toOptionArray()); + ->setOptions(Mage::getSingleton('Mage_Catalog_Model_Config_Source_Product_Options_Type')->toOptionArray()); return $select->getHtml(); } @@ -173,7 +173,7 @@ class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Options_Option extends Mage_ 'class' => 'select' )) ->setName($this->getFieldName().'[{{id}}][is_require]') - ->setOptions(Mage::getSingleton('Mage_Adminhtml_Model_System_Config_Source_Yesno')->toOptionArray()); + ->setOptions(Mage::getSingleton('Mage_Backend_Model_Config_Source_Yesno')->toOptionArray()); return $select->getHtml(); } diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/Abstract.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/Abstract.php index 24b12fa8e14b1219bd86c2e0b1e051c5fe435054..6c1212b04dae0c6ec0b238e4d7f5f00b02d69b2c 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/Abstract.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/Abstract.php @@ -47,7 +47,7 @@ class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Options_Type_Abstract extend ); $this->getChildBlock('option_price_type')->setName('product[options][{{option_id}}][price_type]') - ->setOptions(Mage::getSingleton('Mage_Adminhtml_Model_System_Config_Source_Product_Options_Price') + ->setOptions(Mage::getSingleton('Mage_Catalog_Model_Config_Source_Product_Options_Price') ->toOptionArray()); return parent::_prepareLayout(); diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Websites.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Websites.php index b33c38202c9af5a61a9ac41dca3f5f9178b077c1..24e3893d6330bb8b49808c977933c4022a3fd14e 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Websites.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Websites.php @@ -31,7 +31,7 @@ * @package Mage_Adminhtml * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Websites extends Mage_Adminhtml_Block_Store_Switcher +class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Websites extends Mage_Backend_Block_Store_Switcher { protected $_storeFromHtml; diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Frontend/Product/Watermark.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Frontend/Product/Watermark.php index 03219a6c5ccef2fb1fffbe295726f76869631e5b..851fe53d071647cfb95afbfa1ed9d4e639c2310a 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Frontend/Product/Watermark.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Frontend/Product/Watermark.php @@ -38,7 +38,7 @@ class Mage_Adminhtml_Block_Catalog_Product_Frontend_Product_Watermark extends Ma public function render(Varien_Data_Form_Element_Abstract $element) { $html = $this->_getHeaderHtml($element); - $renderer = Mage::getBlockSingleton('Mage_Adminhtml_Block_System_Config_Form_Field'); + $renderer = Mage::getBlockSingleton('Mage_Backend_Block_System_Config_Form_Field'); $attributes = Mage::getConfig()->getNode(self::XML_PATH_IMAGE_TYPES)->asArray(); @@ -71,7 +71,7 @@ class Mage_Adminhtml_Block_Catalog_Product_Frontend_Product_Watermark extends Ma ->setForm( $this->getForm() ) ->setLabel(Mage::helper('Mage_Adminhtml_Helper_Data')->__('Position of Watermark for %s', $attribute['title'])) ->setRenderer($renderer) - ->setValues(Mage::getSingleton('Mage_Adminhtml_Model_System_Config_Source_Watermark_Position')->toOptionArray()); + ->setValues(Mage::getSingleton('Mage_Catalog_Model_Config_Source_Watermark_Position')->toOptionArray()); $html.= $field->toHtml(); } diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Gallery/Content.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Gallery/Content.php index bfd423319d238a6b0071f775b9f1260a5cc71cb2..bd006ad65f9b32ab300ca05297577b4f00456221 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Gallery/Content.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Gallery/Content.php @@ -41,7 +41,11 @@ class Mage_Adminhtml_Block_Catalog_Product_Helper_Form_Gallery_Content extends M $this->addChild('uploader', 'Mage_Adminhtml_Block_Media_Uploader'); $this->getUploader()->getConfig() - ->setUrl(Mage::getModel('Mage_Adminhtml_Model_Url')->addSessionParam()->getUrl('*/catalog_product_gallery/upload')) + ->setUrl( + Mage::getModel('Mage_Backend_Model_Url') + ->addSessionParam() + ->getUrl('*/catalog_product_gallery/upload') + ) ->setFileField('image') ->setFilters(array( 'images' => array( diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Search/Edit/Form.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Search/Edit/Form.php index 484e9dac7534d8338432ed1d9d1e721a1484ed2f..aab0797ecd2036a69fcf83c7888315a4a4539798 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Search/Edit/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Search/Edit/Form.php @@ -94,7 +94,7 @@ class Mage_Adminhtml_Block_Catalog_Search_Edit_Form extends Mage_Adminhtml_Block 'values' => Mage::getSingleton('Mage_Core_Model_System_Store')->getStoreValuesForForm(true, false), 'required' => true, )); - $renderer = $this->getLayout()->createBlock('Mage_Adminhtml_Block_Store_Switcher_Form_Renderer_Fieldset_Element'); + $renderer = $this->getLayout()->createBlock('Mage_Backend_Block_Store_Switcher_Form_Renderer_Fieldset_Element'); $field->setRenderer($renderer); } else { diff --git a/app/code/core/Mage/Adminhtml/Block/Checkout/Agreement/Edit/Form.php b/app/code/core/Mage/Adminhtml/Block/Checkout/Agreement/Edit/Form.php index ec57fe49561b79f57b7527e5501b010bb5007999..648763fc60af07a2a84552e1c8f26835fef5cbbb 100644 --- a/app/code/core/Mage/Adminhtml/Block/Checkout/Agreement/Edit/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Checkout/Agreement/Edit/Form.php @@ -106,7 +106,7 @@ class Mage_Adminhtml_Block_Checkout_Agreement_Edit_Form extends Mage_Adminhtml_B 'required' => true, 'values' => Mage::getSingleton('Mage_Core_Model_System_Store')->getStoreValuesForForm(false, true), )); - $renderer = $this->getLayout()->createBlock('Mage_Adminhtml_Block_Store_Switcher_Form_Renderer_Fieldset_Element'); + $renderer = $this->getLayout()->createBlock('Mage_Backend_Block_Store_Switcher_Form_Renderer_Fieldset_Element'); $field->setRenderer($renderer); } else { diff --git a/app/code/core/Mage/Adminhtml/Block/Cms/Block/Edit/Form.php b/app/code/core/Mage/Adminhtml/Block/Cms/Block/Edit/Form.php index 72a09c8fa5bd08d2beb296ab5c8c5cb4bcb2c19e..826c911b00e3aded7cbf64eb53e850ed913d35b4 100644 --- a/app/code/core/Mage/Adminhtml/Block/Cms/Block/Edit/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Cms/Block/Edit/Form.php @@ -100,7 +100,7 @@ class Mage_Adminhtml_Block_Cms_Block_Edit_Form extends Mage_Adminhtml_Block_Widg 'required' => true, 'values' => Mage::getSingleton('Mage_Core_Model_System_Store')->getStoreValuesForForm(false, true), )); - $renderer = $this->getLayout()->createBlock('Mage_Adminhtml_Block_Store_Switcher_Form_Renderer_Fieldset_Element'); + $renderer = $this->getLayout()->createBlock('Mage_Backend_Block_Store_Switcher_Form_Renderer_Fieldset_Element'); $field->setRenderer($renderer); } else { diff --git a/app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Design.php b/app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Design.php index 24fcc1ced1b14c6c3a598c39cc79842ffd02b593..d923985601d615d0e876d7a5c91181a70c41730c 100644 --- a/app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Design.php +++ b/app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Design.php @@ -85,7 +85,7 @@ class Mage_Adminhtml_Block_Cms_Page_Edit_Tab_Design $designFieldset->addField('custom_theme_from', 'date', array( 'name' => 'custom_theme_from', 'label' => Mage::helper('Mage_Cms_Helper_Data')->__('Custom Design From'), - 'image' => $this->getSkinUrl('images/grid-cal.gif'), + 'image' => $this->getViewFileUrl('images/grid-cal.gif'), 'date_format' => $dateFormat, 'disabled' => $isElementDisabled, 'class' => 'validate-date validate-date-range date-range-custom_theme-from' @@ -94,7 +94,7 @@ class Mage_Adminhtml_Block_Cms_Page_Edit_Tab_Design $designFieldset->addField('custom_theme_to', 'date', array( 'name' => 'custom_theme_to', 'label' => Mage::helper('Mage_Cms_Helper_Data')->__('Custom Design To'), - 'image' => $this->getSkinUrl('images/grid-cal.gif'), + 'image' => $this->getViewFileUrl('images/grid-cal.gif'), 'date_format' => $dateFormat, 'disabled' => $isElementDisabled, 'class' => 'validate-date validate-date-range date-range-custom_theme-to' diff --git a/app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Main.php b/app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Main.php index a484591bb72ef40900e0c9746c316823a147345b..ed28362ca1e9134c34ac05eda35171ca8c2c5973 100644 --- a/app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Main.php +++ b/app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Main.php @@ -93,7 +93,7 @@ class Mage_Adminhtml_Block_Cms_Page_Edit_Tab_Main 'values' => Mage::getSingleton('Mage_Core_Model_System_Store')->getStoreValuesForForm(false, true), 'disabled' => $isElementDisabled, )); - $renderer = $this->getLayout()->createBlock('Mage_Adminhtml_Block_Store_Switcher_Form_Renderer_Fieldset_Element'); + $renderer = $this->getLayout()->createBlock('Mage_Backend_Block_Store_Switcher_Form_Renderer_Fieldset_Element'); $field->setRenderer($renderer); } else { diff --git a/app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Content/Uploader.php b/app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Content/Uploader.php index c989c783d5b1db8ca44935d58eb82fd7285cdd10..3c9042334842eebba29f3c0c1b76a8a4a5e63916 100644 --- a/app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Content/Uploader.php +++ b/app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Content/Uploader.php @@ -46,8 +46,12 @@ class Mage_Adminhtml_Block_Cms_Wysiwyg_Images_Content_Uploader extends Mage_Admi $files[] = '*.' . $ext; } $this->getConfig() - ->setUrl(Mage::getModel('Mage_Adminhtml_Model_Url')->addSessionParam()->getUrl('*/*/upload', array('type' => $type))) - ->setParams($params) + ->setUrl( + Mage::getModel('Mage_Backend_Model_Url') + ->addSessionParam() + ->getUrl('*/*/upload', array('type' => $type) + ) + )->setParams($params) ->setFileField('image') ->setFilters(array( 'images' => array( diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Account.php b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Account.php index dbc8a1d0d374100409bebfac52a024027ff26e0c..56eba05978c1dde6d29633b659684af8e3817ff7 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Account.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Account.php @@ -264,7 +264,7 @@ class Mage_Adminhtml_Block_Customer_Edit_Tab_Account extends Mage_Adminhtml_Bloc . '</script>' ); $renderer = $this->getLayout() - ->createBlock('Mage_Adminhtml_Block_Store_Switcher_Form_Renderer_Fieldset_Element'); + ->createBlock('Mage_Backend_Block_Store_Switcher_Form_Renderer_Fieldset_Element'); $form->getElement('website_id')->setRenderer($renderer); $fieldset->addField('sendemail_store_id', 'select', array( @@ -293,7 +293,7 @@ class Mage_Adminhtml_Block_Customer_Edit_Tab_Account extends Mage_Adminhtml_Bloc if (!Mage::app()->isSingleStoreMode()) { $form->getElement('website_id')->setDisabled('disabled'); $renderer = $this->getLayout() - ->createBlock('Mage_Adminhtml_Block_Store_Switcher_Form_Renderer_Fieldset_Element'); + ->createBlock('Mage_Backend_Block_Store_Switcher_Form_Renderer_Fieldset_Element'); $form->getElement('website_id')->setRenderer($renderer); } else { $fieldset->removeField('website_id'); diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Cart.php b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Cart.php index c9ca66512a0c60072f62a2d34e5fd9e0ef65c06d..3a8bf4f2e517ee847ac23ca7ccbe2bb7b23ee99d 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Cart.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Cart.php @@ -34,14 +34,12 @@ */ class Mage_Adminhtml_Block_Customer_Edit_Tab_Cart extends Mage_Adminhtml_Block_Widget_Grid { - protected $_template = 'customer/tab/cart.phtml'; - protected function _construct() { parent::_construct(); $this->setUseAjax(true); $this->_parentTemplate = $this->getTemplate(); - + $this->setTemplate('customer/tab/cart.phtml'); } /** diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tabs.php b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tabs.php index 84fe24682cd3fc9a858c88c450e69290f9418ac3..9d0563e3b70503344218ad5185e6d167a7a7f2d3 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tabs.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tabs.php @@ -124,4 +124,16 @@ class Mage_Adminhtml_Block_Customer_Edit_Tabs extends Mage_Adminhtml_Block_Widge } } } + + /** + * Processing block html after rendering + * + * @param string $html + * @return string + */ + protected function _afterToHtml($html) + { + Magento_Profiler::stop('customer/tabs'); + return parent::_afterToHtml($html); + } } diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Form/Element/File.php b/app/code/core/Mage/Adminhtml/Block/Customer/Form/Element/File.php index 312bca2e0767b8761134f92d63b9cab8b10fffef..56787ab16d4291e8ab502e08f757d0455a9de534 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Form/Element/File.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Form/Element/File.php @@ -133,7 +133,7 @@ class Mage_Adminhtml_Block_Customer_Form_Element_File extends Varien_Data_Form_E $image = array( 'alt' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Download'), 'title' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Download'), - 'src' => Mage::getDesign()->getSkinUrl('images/fam_bullet_disk.gif'), + 'src' => Mage::getDesign()->getViewFileUrl('images/fam_bullet_disk.gif'), 'class' => 'v-middle' ); $url = $this->_getPreviewUrl(); diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Sales/Order/Address/Form/Renderer/Vat.php b/app/code/core/Mage/Adminhtml/Block/Customer/Sales/Order/Address/Form/Renderer/Vat.php index a94f1a16fbdc4aa84336b2be667a9b7434b539ff..d482a087e0fd9b9c279a00f49ab9eb65b64aaa80 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Sales/Order/Address/Form/Renderer/Vat.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Sales/Order/Address/Form/Renderer/Vat.php @@ -57,7 +57,7 @@ class Mage_Adminhtml_Block_Customer_Sales_Order_Address_Form_Renderer_Vat $vatElementId = $this->_element->getHtmlId(); $countryElementId = $form->getElement('country_id')->getHtmlId(); - $validateUrl = Mage::getSingleton('Mage_Adminhtml_Model_Url') + $validateUrl = Mage::getSingleton('Mage_Backend_Model_Url') ->getUrl('*/customer_system_config_validatevat/validateAdvanced'); $groupSuggestionMessage = Mage::helper('Mage_Customer_Helper_Data')->__('The customer is currently assigned to Customer Group %s.') diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/System/Config/Validatevat.php b/app/code/core/Mage/Adminhtml/Block/Customer/System/Config/Validatevat.php index 215fec693317cb9118bfc1be15c2802acf2dcd2d..720574a7317e19ae65a686a9e3d42a30382cd1fc 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/System/Config/Validatevat.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/System/Config/Validatevat.php @@ -31,7 +31,7 @@ * @package Mage_Adminhtml * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Block_Customer_System_Config_Validatevat extends Mage_Adminhtml_Block_System_Config_Form_Field +class Mage_Adminhtml_Block_Customer_System_Config_Validatevat extends Mage_Backend_Block_System_Config_Form_Field { /** * Set template to itself @@ -71,7 +71,8 @@ class Mage_Adminhtml_Block_Customer_System_Config_Validatevat extends Mage_Admin $this->addData(array( 'button_label' => Mage::helper('Mage_Customer_Helper_Data')->__($originalData['button_label']), 'html_id' => $element->getHtmlId(), - 'ajax_url' => Mage::getSingleton('Mage_Adminhtml_Model_Url')->getUrl('*/customer_system_config_validatevat/validate') + 'ajax_url' => Mage::getSingleton('Mage_Backend_Model_Url') + ->getUrl('*/customer_system_config_validatevat/validate') )); return $this->_toHtml(); diff --git a/app/code/core/Mage/Adminhtml/Block/Html/Date.php b/app/code/core/Mage/Adminhtml/Block/Html/Date.php index f946792abc7dd9c45f3df8607f899c2491a8f60c..f04ff4dafab8b678439eefe52b57bc216e31f310 100644 --- a/app/code/core/Mage/Adminhtml/Block/Html/Date.php +++ b/app/code/core/Mage/Adminhtml/Block/Html/Date.php @@ -36,13 +36,37 @@ class Mage_Adminhtml_Block_Html_Date extends Mage_Core_Block_Html_Date { /** - * Enter description here... + * @param Mage_Core_Controller_Request_Http $request + * @param Mage_Core_Model_Layout $layout + * @param Mage_Core_Model_Event_Manager $eventManager + * @param Mage_Backend_Model_Url $urlBuilder + * @param Mage_Core_Model_Translate $translator + * @param Mage_Core_Model_Cache $cache + * @param Mage_Core_Model_Design_Package $designPackage + * @param Mage_Core_Model_Session $session + * @param Mage_Core_Model_Store_Config $storeConfig + * @param Mage_Core_Controller_Varien_Front $frontController + * @param Mage_Core_Model_Factory_Helper $helperFactory + * @param array $data * - * @return string + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ - protected function _getUrlModelClass() - { - return 'Mage_Adminhtml_Model_Url'; + public function __construct( + Mage_Core_Controller_Request_Http $request, + Mage_Core_Model_Layout $layout, + Mage_Core_Model_Event_Manager $eventManager, + Mage_Backend_Model_Url $urlBuilder, + Mage_Core_Model_Translate $translator, + Mage_Core_Model_Cache $cache, + Mage_Core_Model_Design_Package $designPackage, + Mage_Core_Model_Session $session, + Mage_Core_Model_Store_Config $storeConfig, + Mage_Core_Controller_Varien_Front $frontController, + Mage_Core_Model_Factory_Helper $helperFactory, + array $data = array() + ) { + parent::__construct($request, $layout, $eventManager, $urlBuilder, $translator, $cache, $designPackage, + $session, $storeConfig, $frontController, $helperFactory, $data + ); } - } diff --git a/app/code/core/Mage/Adminhtml/Block/Html/Select.php b/app/code/core/Mage/Adminhtml/Block/Html/Select.php index 6ab1974691d228d8b6d628b03da620b4c09e4ade..1039ec6c131a6eef2a33506ba26f77df682b864d 100644 --- a/app/code/core/Mage/Adminhtml/Block/Html/Select.php +++ b/app/code/core/Mage/Adminhtml/Block/Html/Select.php @@ -33,15 +33,38 @@ */ class Mage_Adminhtml_Block_Html_Select extends Mage_Core_Block_Html_Select { - /** - * Enter description here... + * @param Mage_Core_Controller_Request_Http $request + * @param Mage_Core_Model_Layout $layout + * @param Mage_Core_Model_Event_Manager $eventManager + * @param Mage_Backend_Model_Url $urlBuilder + * @param Mage_Core_Model_Translate $translator + * @param Mage_Core_Model_Cache $cache + * @param Mage_Core_Model_Design_Package $designPackage + * @param Mage_Core_Model_Session $session + * @param Mage_Core_Model_Store_Config $storeConfig + * @param Mage_Core_Controller_Varien_Front $frontController + * @param Mage_Core_Model_Factory_Helper $helperFactory + * @param array $data * - * @return string + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ - protected function _getUrlModelClass() - { - return 'Mage_Adminhtml_Model_Url'; + public function __construct( + Mage_Core_Controller_Request_Http $request, + Mage_Core_Model_Layout $layout, + Mage_Core_Model_Event_Manager $eventManager, + Mage_Backend_Model_Url $urlBuilder, + Mage_Core_Model_Translate $translator, + Mage_Core_Model_Cache $cache, + Mage_Core_Model_Design_Package $designPackage, + Mage_Core_Model_Session $session, + Mage_Core_Model_Store_Config $storeConfig, + Mage_Core_Controller_Varien_Front $frontController, + Mage_Core_Model_Factory_Helper $helperFactory, + array $data = array() + ) { + parent::__construct($request, $layout, $eventManager, $urlBuilder, $translator, $cache, $designPackage, + $session, $storeConfig, $frontController, $helperFactory, $data + ); } - } diff --git a/app/code/core/Mage/Adminhtml/Block/Media/Uploader.php b/app/code/core/Mage/Adminhtml/Block/Media/Uploader.php index 45b41388563b67120ff85a7e0cf3d0f5881ba083..d420b114d6274b40e5e1bda771b826f4fb841059 100644 --- a/app/code/core/Mage/Adminhtml/Block/Media/Uploader.php +++ b/app/code/core/Mage/Adminhtml/Block/Media/Uploader.php @@ -43,7 +43,7 @@ class Mage_Adminhtml_Block_Media_Uploader extends Mage_Adminhtml_Block_Widget parent::_construct(); $this->setId($this->getId() . '_Uploader'); - $this->getConfig()->setUrl(Mage::getModel('Mage_Adminhtml_Model_Url')->addSessionParam()->getUrl('*/*/upload')); + $this->getConfig()->setUrl(Mage::getModel('Mage_Backend_Model_Url')->addSessionParam()->getUrl('*/*/upload')); $this->getConfig()->setParams(array('form_key' => $this->getFormKey())); $this->getConfig()->setFileField('file'); $this->getConfig()->setFilters(array( @@ -110,47 +110,6 @@ class Mage_Adminhtml_Block_Media_Uploader extends Mage_Adminhtml_Block_Widget return $this->_config; } - public function getPostMaxSize() - { - return ini_get('post_max_size'); - } - - public function getUploadMaxSize() - { - return ini_get('upload_max_filesize'); - } - - public function getDataMaxSize() - { - return min($this->getPostMaxSize(), $this->getUploadMaxSize()); - } - - public function getDataMaxSizeInBytes() - { - $iniSize = $this->getDataMaxSize(); - $size = substr($iniSize, 0, strlen($iniSize)-1); - $parsedSize = 0; - switch (strtolower(substr($iniSize, strlen($iniSize)-1))) { - case 't': - $parsedSize = $size*(1024*1024*1024*1024); - break; - case 'g': - $parsedSize = $size*(1024*1024*1024); - break; - case 'm': - $parsedSize = $size*(1024*1024); - break; - case 'k': - $parsedSize = $size*1024; - break; - case 'b': - default: - $parsedSize = $size; - break; - } - return $parsedSize; - } - /** * Retrieve full uploader SWF's file URL * Implemented to solve problem with cross domain SWFs @@ -162,6 +121,6 @@ class Mage_Adminhtml_Block_Media_Uploader extends Mage_Adminhtml_Block_Widget */ public function getUploaderUrl($url) { - return Mage::getDesign()->getSkinUrl($url); + return Mage::getDesign()->getViewFileUrl($url); } } diff --git a/app/code/core/Mage/Adminhtml/Block/Messages.php b/app/code/core/Mage/Adminhtml/Block/Messages.php index 0ff5da661b8054c4b2bb1ca907596e34927b1229..20a3556a60afc51ae0e8375e47eeb26f1fcccb54 100644 --- a/app/code/core/Mage/Adminhtml/Block/Messages.php +++ b/app/code/core/Mage/Adminhtml/Block/Messages.php @@ -34,15 +34,38 @@ */ class Mage_Adminhtml_Block_Messages extends Mage_Core_Block_Messages { - /** - * Enter description here... + * @param Mage_Core_Controller_Request_Http $request + * @param Mage_Core_Model_Layout $layout + * @param Mage_Core_Model_Event_Manager $eventManager + * @param Mage_Backend_Model_Url $urlBuilder + * @param Mage_Core_Model_Translate $translator + * @param Mage_Core_Model_Cache $cache + * @param Mage_Core_Model_Design_Package $designPackage + * @param Mage_Core_Model_Session $session + * @param Mage_Core_Model_Store_Config $storeConfig + * @param Mage_Core_Controller_Varien_Front $frontController + * @param Mage_Core_Model_Factory_Helper $helperFactory + * @param array $data * - * @return string + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ - protected function _getUrlModelClass() - { - return 'Mage_Adminhtml_Model_Url'; + public function __construct( + Mage_Core_Controller_Request_Http $request, + Mage_Core_Model_Layout $layout, + Mage_Core_Model_Event_Manager $eventManager, + Mage_Backend_Model_Url $urlBuilder, + Mage_Core_Model_Translate $translator, + Mage_Core_Model_Cache $cache, + Mage_Core_Model_Design_Package $designPackage, + Mage_Core_Model_Session $session, + Mage_Core_Model_Store_Config $storeConfig, + Mage_Core_Controller_Varien_Front $frontController, + Mage_Core_Model_Factory_Helper $helperFactory, + array $data = array() + ) { + parent::__construct($request, $layout, $eventManager, $urlBuilder, $translator, $cache, $designPackage, + $session, $storeConfig, $frontController, $helperFactory, $data + ); } - } diff --git a/app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Edit/Form.php b/app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Edit/Form.php index 78e6037d01367772d689b8394733aa4bc3b5ac93..19d9c75ebf7fbc02ce4dc9a43cb3af227fa5dcb3 100644 --- a/app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Edit/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Edit/Form.php @@ -63,14 +63,14 @@ class Mage_Adminhtml_Block_Newsletter_Queue_Edit_Form extends Mage_Adminhtml_Blo 'date_format' => $dateFormat, 'time_format' => $timeFormat, 'label' => Mage::helper('Mage_Newsletter_Helper_Data')->__('Queue Date Start'), - 'image' => $this->getSkinUrl('images/grid-cal.gif') + 'image' => $this->getViewFileUrl('images/grid-cal.gif') )); if (!Mage::app()->hasSingleStore()) { $fieldset->addField('stores','multiselect',array( 'name' => 'stores[]', 'label' => Mage::helper('Mage_Newsletter_Helper_Data')->__('Subscribers From'), - 'image' => $this->getSkinUrl('images/grid-cal.gif'), + 'image' => $this->getViewFileUrl('images/grid-cal.gif'), 'values' => Mage::getSingleton('Mage_Core_Model_System_Store')->getStoreValuesForForm(), 'value' => $queue->getStores() )); @@ -89,14 +89,14 @@ class Mage_Adminhtml_Block_Newsletter_Queue_Edit_Form extends Mage_Adminhtml_Blo 'date_format' => $dateFormat, 'time_format' => $timeFormat, 'label' => Mage::helper('Mage_Newsletter_Helper_Data')->__('Queue Date Start'), - 'image' => $this->getSkinUrl('images/grid-cal.gif') + 'image' => $this->getViewFileUrl('images/grid-cal.gif') )); if (!Mage::app()->hasSingleStore()) { $fieldset->addField('stores','multiselect',array( 'name' => 'stores[]', 'label' => Mage::helper('Mage_Newsletter_Helper_Data')->__('Subscribers From'), - 'image' => $this->getSkinUrl('images/grid-cal.gif'), + 'image' => $this->getViewFileUrl('images/grid-cal.gif'), 'required' => true, 'values' => Mage::getSingleton('Mage_Core_Model_System_Store')->getStoreValuesForForm(), 'value' => $queue->getStores() diff --git a/app/code/core/Mage/Adminhtml/Block/Notification/Grid.php b/app/code/core/Mage/Adminhtml/Block/Notification/Grid.php index eccb17d690e69d544a4d37d8a0abaa109f88db92..5e8dc4d5603c7e9b52988fe27e0b055789d7e27d 100644 --- a/app/code/core/Mage/Adminhtml/Block/Notification/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Notification/Grid.php @@ -36,6 +36,7 @@ class Mage_Adminhtml_Block_Notification_Grid extends Mage_Adminhtml_Block_Widget { protected function _construct() { + parent::_construct(); $this->setSaveParametersInSession(true); $this->setId('notificationGrid'); $this->setIdFieldName('notification_id'); diff --git a/app/code/core/Mage/Adminhtml/Block/Page/Head.php b/app/code/core/Mage/Adminhtml/Block/Page/Head.php index e964a36dbe28673d9ac35ea7818cfeaa1af3d398..1b2cfb77c973eaf40a7e79a767e8535d2d8c7908 100644 --- a/app/code/core/Mage/Adminhtml/Block/Page/Head.php +++ b/app/code/core/Mage/Adminhtml/Block/Page/Head.php @@ -36,13 +36,38 @@ class Mage_Adminhtml_Block_Page_Head extends Mage_Page_Block_Html_Head protected $_template = 'page/head.phtml'; /** - * Enter description here... + * @param Mage_Core_Controller_Request_Http $request + * @param Mage_Core_Model_Layout $layout + * @param Mage_Core_Model_Event_Manager $eventManager + * @param Mage_Backend_Model_Url $urlBuilder + * @param Mage_Core_Model_Translate $translator + * @param Mage_Core_Model_Cache $cache + * @param Mage_Core_Model_Design_Package $designPackage + * @param Mage_Core_Model_Session $session + * @param Mage_Core_Model_Store_Config $storeConfig + * @param Mage_Core_Controller_Varien_Front $frontController + * @param Mage_Core_Model_Factory_Helper $helperFactory + * @param array $data * - * @return string + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ - protected function _getUrlModelClass() - { - return 'Mage_Adminhtml_Model_Url'; + public function __construct( + Mage_Core_Controller_Request_Http $request, + Mage_Core_Model_Layout $layout, + Mage_Core_Model_Event_Manager $eventManager, + Mage_Backend_Model_Url $urlBuilder, + Mage_Core_Model_Translate $translator, + Mage_Core_Model_Cache $cache, + Mage_Core_Model_Design_Package $designPackage, + Mage_Core_Model_Session $session, + Mage_Core_Model_Store_Config $storeConfig, + Mage_Core_Controller_Varien_Front $frontController, + Mage_Core_Model_Factory_Helper $helperFactory, + array $data = array() + ) { + parent::__construct($request, $layout, $eventManager, $urlBuilder, $translator, $cache, $designPackage, + $session, $storeConfig, $frontController, $helperFactory, $data + ); } /** diff --git a/app/code/core/Mage/Adminhtml/Block/Page/System/Config/Robots/Reset.php b/app/code/core/Mage/Adminhtml/Block/Page/System/Config/Robots/Reset.php index edb12d4bca64ea4594338466965a4d463deb103a..b9cd51656a42e150fb6e3e78cf0ae15136d40d3b 100644 --- a/app/code/core/Mage/Adminhtml/Block/Page/System/Config/Robots/Reset.php +++ b/app/code/core/Mage/Adminhtml/Block/Page/System/Config/Robots/Reset.php @@ -31,7 +31,7 @@ * @package Mage_Adminhtml * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Block_Page_System_Config_Robots_Reset extends Mage_Adminhtml_Block_System_Config_Form_Field +class Mage_Adminhtml_Block_Page_System_Config_Robots_Reset extends Mage_Backend_Block_System_Config_Form_Field { /* * Set template diff --git a/app/code/core/Mage/Adminhtml/Block/Poll/Edit/Tab/Form.php b/app/code/core/Mage/Adminhtml/Block/Poll/Edit/Tab/Form.php index 30c8e15df93441d3dbc157c8911cec04d9c7dd03..e4c8609191b59b3f22c98e830a5cd5b1bca99458 100644 --- a/app/code/core/Mage/Adminhtml/Block/Poll/Edit/Tab/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Poll/Edit/Tab/Form.php @@ -69,7 +69,7 @@ class Mage_Adminhtml_Block_Poll_Edit_Tab_Form extends Mage_Adminhtml_Block_Widge 'name' => 'store_ids[]', 'values' => Mage::getSingleton('Mage_Core_Model_System_Store')->getStoreValuesForForm(), 'value' => Mage::registry('poll_data')->getStoreIds(), - 'after_element_html' => Mage::getBlockSingleton('Mage_Adminhtml_Block_Store_Switcher')->getHintHtml() + 'after_element_html' => Mage::getBlockSingleton('Mage_Backend_Block_Store_Switcher')->getHintHtml() )); } else { diff --git a/app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Edit/Tab/Main.php b/app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Edit/Tab/Main.php index 462ea022a85cca2571fc27c244d5be0c35d57c1a..adf0d598f6a2b19b4f44bd61f52952ca787a067c 100644 --- a/app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Edit/Tab/Main.php +++ b/app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Edit/Tab/Main.php @@ -137,7 +137,7 @@ class Mage_Adminhtml_Block_Promo_Catalog_Edit_Tab_Main 'required' => true, 'values' => Mage::getSingleton('Mage_Core_Model_System_Store')->getWebsiteValuesForForm(), )); - $renderer = $this->getLayout()->createBlock('Mage_Adminhtml_Block_Store_Switcher_Form_Renderer_Fieldset_Element'); + $renderer = $this->getLayout()->createBlock('Mage_Backend_Block_Store_Switcher_Form_Renderer_Fieldset_Element'); $field->setRenderer($renderer); } @@ -154,7 +154,7 @@ class Mage_Adminhtml_Block_Promo_Catalog_Edit_Tab_Main 'name' => 'from_date', 'label' => Mage::helper('Mage_CatalogRule_Helper_Data')->__('From Date'), 'title' => Mage::helper('Mage_CatalogRule_Helper_Data')->__('From Date'), - 'image' => $this->getSkinUrl('images/grid-cal.gif'), + 'image' => $this->getViewFileUrl('images/grid-cal.gif'), 'input_format' => Varien_Date::DATE_INTERNAL_FORMAT, 'date_format' => $dateFormat )); @@ -162,7 +162,7 @@ class Mage_Adminhtml_Block_Promo_Catalog_Edit_Tab_Main 'name' => 'to_date', 'label' => Mage::helper('Mage_CatalogRule_Helper_Data')->__('To Date'), 'title' => Mage::helper('Mage_CatalogRule_Helper_Data')->__('To Date'), - 'image' => $this->getSkinUrl('images/grid-cal.gif'), + 'image' => $this->getViewFileUrl('images/grid-cal.gif'), 'input_format' => Varien_Date::DATE_INTERNAL_FORMAT, 'date_format' => $dateFormat )); 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 44139c3263c063f07aabac08cdad91f22a1649e5..17b5e4cc1f8a3c7eed0c0e54a32bff96677484d4 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 @@ -120,7 +120,7 @@ class Mage_Adminhtml_Block_Promo_Quote_Edit_Tab_Actions 'label' => Mage::helper('Mage_SalesRule_Helper_Data')->__('Apply to Shipping Amount'), 'title' => Mage::helper('Mage_SalesRule_Helper_Data')->__('Apply to Shipping Amount'), 'name' => 'apply_to_shipping', - 'values' => Mage::getSingleton('Mage_Adminhtml_Model_System_Config_Source_Yesno')->toOptionArray(), + 'values' => Mage::getSingleton('Mage_Backend_Model_Config_Source_Yesno')->toOptionArray(), )); $fieldset->addField('simple_free_shipping', 'select', array( diff --git a/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Labels.php b/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Labels.php index 7658e2325dc2340e90507a712a99ca6f8c7b9d90..162119ebed3e1d8dd3c3aa2308e79402f6d36454 100644 --- a/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Labels.php +++ b/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Labels.php @@ -36,38 +36,44 @@ class Mage_Adminhtml_Block_Promo_Quote_Edit_Tab_Labels protected $_app; /** - * Class constructor - * * @param Mage_Core_Controller_Request_Http $request * @param Mage_Core_Model_Layout $layout * @param Mage_Core_Model_Event_Manager $eventManager + * @param Mage_Backend_Model_Url $urlBuilder * @param Mage_Core_Model_Translate $translator * @param Mage_Core_Model_Cache $cache * @param Mage_Core_Model_Design_Package $designPackage * @param Mage_Core_Model_Session $session * @param Mage_Core_Model_Store_Config $storeConfig * @param Mage_Core_Controller_Varien_Front $frontController + * @param Mage_Core_Model_Factory_Helper $helperFactory * @param Mage_Core_Model_App $app * @param array $data + * + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ - public function __construct(Mage_Core_Controller_Request_Http $request, + public function __construct( + Mage_Core_Controller_Request_Http $request, Mage_Core_Model_Layout $layout, Mage_Core_Model_Event_Manager $eventManager, + Mage_Backend_Model_Url $urlBuilder, Mage_Core_Model_Translate $translator, Mage_Core_Model_Cache $cache, Mage_Core_Model_Design_Package $designPackage, Mage_Core_Model_Session $session, Mage_Core_Model_Store_Config $storeConfig, Mage_Core_Controller_Varien_Front $frontController, + Mage_Core_Model_Factory_Helper $helperFactory, Mage_Core_Model_App $app, array $data = array() ) { $this->_app = $app; - parent::__construct($request, $layout, $eventManager, $translator, $cache, $designPackage, $session, - $storeConfig, $frontController, $data + parent::__construct($request, $layout, $eventManager, $urlBuilder, $translator, $cache, $designPackage, + $session, $storeConfig, $frontController, $helperFactory, $data ); } + /** * Prepare content for tab * @@ -153,7 +159,7 @@ class Mage_Adminhtml_Block_Promo_Quote_Edit_Tab_Labels 'legend' => Mage::helper('Mage_SalesRule_Helper_Data')->__('Store View Specific Labels'), 'table_class' => 'form-list stores-tree', )); - $renderer = $this->getLayout()->createBlock('Mage_Adminhtml_Block_Store_Switcher_Form_Renderer_Fieldset'); + $renderer = $this->getLayout()->createBlock('Mage_Backend_Block_Store_Switcher_Form_Renderer_Fieldset'); $fieldset->setRenderer($renderer); foreach (Mage::app()->getWebsites() as $website) { diff --git a/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Main.php b/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Main.php index cc4b83323cd8e1b076caa8f17d4e59216859bf5c..3e18a358d875e1c84bb6f8960392fb9dbf5d7a83 100644 --- a/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Main.php +++ b/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Main.php @@ -140,7 +140,7 @@ class Mage_Adminhtml_Block_Promo_Quote_Edit_Tab_Main 'required' => true, 'values' => Mage::getSingleton('Mage_Core_Model_System_Store')->getWebsiteValuesForForm(), )); - $renderer = $this->getLayout()->createBlock('Mage_Adminhtml_Block_Store_Switcher_Form_Renderer_Fieldset_Element'); + $renderer = $this->getLayout()->createBlock('Mage_Backend_Block_Store_Switcher_Form_Renderer_Fieldset_Element'); $field->setRenderer($renderer); } @@ -207,7 +207,7 @@ class Mage_Adminhtml_Block_Promo_Quote_Edit_Tab_Main 'name' => 'from_date', 'label' => Mage::helper('Mage_SalesRule_Helper_Data')->__('From Date'), 'title' => Mage::helper('Mage_SalesRule_Helper_Data')->__('From Date'), - 'image' => $this->getSkinUrl('images/grid-cal.gif'), + 'image' => $this->getViewFileUrl('images/grid-cal.gif'), 'input_format' => Varien_Date::DATE_INTERNAL_FORMAT, 'date_format' => $dateFormat )); @@ -215,7 +215,7 @@ class Mage_Adminhtml_Block_Promo_Quote_Edit_Tab_Main 'name' => 'to_date', 'label' => Mage::helper('Mage_SalesRule_Helper_Data')->__('To Date'), 'title' => Mage::helper('Mage_SalesRule_Helper_Data')->__('To Date'), - 'image' => $this->getSkinUrl('images/grid-cal.gif'), + 'image' => $this->getViewFileUrl('images/grid-cal.gif'), 'input_format' => Varien_Date::DATE_INTERNAL_FORMAT, 'date_format' => $dateFormat )); diff --git a/app/code/core/Mage/Adminhtml/Block/Promo/Widget/Chooser/Daterange.php b/app/code/core/Mage/Adminhtml/Block/Promo/Widget/Chooser/Daterange.php index 609dab77415a7f0a5ccf1509a16d316dd315b4ee..f7fd31e46f9d780b1c84630df8d9a823f07ca72c 100644 --- a/app/code/core/Mage/Adminhtml/Block/Promo/Widget/Chooser/Daterange.php +++ b/app/code/core/Mage/Adminhtml/Block/Promo/Widget/Chooser/Daterange.php @@ -72,7 +72,7 @@ class Mage_Adminhtml_Block_Promo_Widget_Chooser_Daterange extends Mage_Adminhtml $element = new Varien_Data_Form_Element_Date(array( 'format' => Varien_Date::DATE_INTERNAL_FORMAT, // hardcode because hardcoded values delimiter 'label' => $label, - 'image' => $this->getSkinUrl('images/grid-cal.gif'), + 'image' => $this->getViewFileUrl('images/grid-cal.gif'), 'onchange' => "dateTimeChoose_{$idSuffix}()", // won't work through Event.observe() 'value' => $this->_rangeValues[$key], )); diff --git a/app/code/core/Mage/Adminhtml/Block/Rating/Edit/Tab/Form.php b/app/code/core/Mage/Adminhtml/Block/Rating/Edit/Tab/Form.php index 69553ed5d9aeca28b47997cdb6f17996671b68ce..b725e9ffa737c64b992a9ee18a2828b23bf59df1 100644 --- a/app/code/core/Mage/Adminhtml/Block/Rating/Edit/Tab/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Rating/Edit/Tab/Form.php @@ -42,38 +42,44 @@ class Mage_Adminhtml_Block_Rating_Edit_Tab_Form extends Mage_Backend_Block_Widge protected $_app; /** - * Class constructor - * * @param Mage_Core_Controller_Request_Http $request * @param Mage_Core_Model_Layout $layout * @param Mage_Core_Model_Event_Manager $eventManager + * @param Mage_Backend_Model_Url $urlBuilder * @param Mage_Core_Model_Translate $translator * @param Mage_Core_Model_Cache $cache * @param Mage_Core_Model_Design_Package $designPackage * @param Mage_Core_Model_Session $session * @param Mage_Core_Model_Store_Config $storeConfig * @param Mage_Core_Controller_Varien_Front $frontController + * @param Mage_Core_Model_Factory_Helper $helperFactory * @param Mage_Core_Model_App $app * @param array $data + * + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( Mage_Core_Controller_Request_Http $request, Mage_Core_Model_Layout $layout, Mage_Core_Model_Event_Manager $eventManager, + Mage_Backend_Model_Url $urlBuilder, Mage_Core_Model_Translate $translator, Mage_Core_Model_Cache $cache, Mage_Core_Model_Design_Package $designPackage, Mage_Core_Model_Session $session, Mage_Core_Model_Store_Config $storeConfig, Mage_Core_Controller_Varien_Front $frontController, + Mage_Core_Model_Factory_Helper $helperFactory, Mage_Core_Model_App $app, array $data = array() ) { $this->_app = $app; - parent::__construct($request, $layout, $eventManager, $translator, $cache, $designPackage, $session, - $storeConfig, $frontController, $data); + parent::__construct($request, $layout, $eventManager, $urlBuilder, $translator, $cache, $designPackage, + $session, $storeConfig, $frontController, $helperFactory, $data + ); } + /** * Prepare rating edit form * @@ -151,7 +157,7 @@ class Mage_Adminhtml_Block_Rating_Edit_Tab_Form extends Mage_Backend_Block_Widge 'name' => 'stores[]', 'values' => Mage::getSingleton('Mage_Core_Model_System_Store')->getStoreValuesForForm(), )); - $renderer = $this->getLayout()->createBlock('Mage_Adminhtml_Block_Store_Switcher_Form_Renderer_Fieldset_Element'); + $renderer = $this->getLayout()->createBlock('Mage_Backend_Block_Store_Switcher_Form_Renderer_Fieldset_Element'); $field->setRenderer($renderer); if (Mage::registry('rating_data')) { diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Config/Form/Field/MtdStart.php b/app/code/core/Mage/Adminhtml/Block/Report/Config/Form/Field/MtdStart.php index a1f5160b8d5078489d232487b8f48c3a6a584e49..2cad96e295b124d5a942920fa12dad1d99652e45 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Config/Form/Field/MtdStart.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Config/Form/Field/MtdStart.php @@ -31,7 +31,7 @@ * @package Mage_Adminhtml * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Block_Report_Config_Form_Field_MtdStart extends Mage_Adminhtml_Block_System_Config_Form_Field +class Mage_Adminhtml_Block_Report_Config_Form_Field_MtdStart extends Mage_Backend_Block_System_Config_Form_Field { protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Config/Form/Field/YtdStart.php b/app/code/core/Mage/Adminhtml/Block/Report/Config/Form/Field/YtdStart.php index b29e6afc11da13392dcdca3ec51ad84f9c0b73a3..1c29d7c92c7db3b3eec4709c8c1ed97942c2e44d 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Config/Form/Field/YtdStart.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Config/Form/Field/YtdStart.php @@ -31,7 +31,7 @@ * @package Mage_Adminhtml * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Block_Report_Config_Form_Field_YtdStart extends Mage_Adminhtml_Block_System_Config_Form_Field +class Mage_Adminhtml_Block_Report_Config_Form_Field_YtdStart extends Mage_Backend_Block_System_Config_Form_Field { protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) 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 8f38170a01ad1ef62313df80e258b0d2288b937b..0207048f0933c4560205afd9ed38faa71b83d0c8 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Filter/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Filter/Form.php @@ -150,7 +150,7 @@ class Mage_Adminhtml_Block_Report_Filter_Form extends Mage_Adminhtml_Block_Widge $fieldset->addField('from', 'date', array( 'name' => 'from', 'date_format' => $dateFormat, - 'image' => $this->getSkinUrl('images/grid-cal.gif'), + 'image' => $this->getViewFileUrl('images/grid-cal.gif'), 'label' => Mage::helper('Mage_Reports_Helper_Data')->__('From'), 'title' => Mage::helper('Mage_Reports_Helper_Data')->__('From'), 'required' => true @@ -159,7 +159,7 @@ class Mage_Adminhtml_Block_Report_Filter_Form extends Mage_Adminhtml_Block_Widge $fieldset->addField('to', 'date', array( 'name' => 'to', 'date_format' => $dateFormat, - 'image' => $this->getSkinUrl('images/grid-cal.gif'), + 'image' => $this->getViewFileUrl('images/grid-cal.gif'), 'label' => Mage::helper('Mage_Reports_Helper_Data')->__('To'), 'title' => Mage::helper('Mage_Reports_Helper_Data')->__('To'), 'required' => true diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Grid.php b/app/code/core/Mage/Adminhtml/Block/Report/Grid.php index 61b485a3b0d3c6f970827adc1b12c484d91c998c..8a702ecc5a7c9bdf958d5c0d602344a17e4251f2 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Grid.php @@ -89,10 +89,10 @@ class Mage_Adminhtml_Block_Report_Grid extends Mage_Adminhtml_Block_Widget_Grid protected function _prepareLayout() { $this->setChild('store_switcher', - $this->getLayout()->createBlock('Mage_Adminhtml_Block_Store_Switcher') + $this->getLayout()->createBlock('Mage_Backend_Block_Store_Switcher') ->setUseConfirm(false) ->setSwitchUrl($this->getUrl('*/*/*', array('store'=>null))) - ->setTemplate('report/store/switcher.phtml') + ->setTemplate('Mage_Adminhtml::report/store/switcher.phtml') ); $this->addChild('refresh_button', 'Mage_Adminhtml_Block_Widget_Button', array( diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Product/Downloads.php b/app/code/core/Mage/Adminhtml/Block/Report/Product/Downloads.php index 5b1da85698465c732dfda76fd5f96c547d851d13..ee2fbf5a62afdb49bc5d69d22b6b3fb32399694f 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Product/Downloads.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Product/Downloads.php @@ -45,10 +45,10 @@ class Mage_Adminhtml_Block_Report_Product_Downloads extends Mage_Adminhtml_Block protected function _prepareLayout() { $this->setChild('store_switcher', - $this->getLayout()->createBlock('Mage_Adminhtml_Block_Store_Switcher') + $this->getLayout()->createBlock('Mage_Backend_Block_Store_Switcher') ->setUseConfirm(false) ->setSwitchUrl($this->getUrl('*/*/*', array('store'=>null))) - ->setTemplate('report/store/switcher.phtml') + ->setTemplate('Mage_Adminhtml::report/store/switcher.phtml') ); return parent::_prepareLayout(); } diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Product/Lowstock.php b/app/code/core/Mage/Adminhtml/Block/Report/Product/Lowstock.php index 96ef4e5bae842d71b089b62e0aeaf83e38ca51e8..f9883b318348aacfe752f72bd11030233c3836e4 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Product/Lowstock.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Product/Lowstock.php @@ -45,10 +45,10 @@ class Mage_Adminhtml_Block_Report_Product_Lowstock extends Mage_Adminhtml_Block_ protected function _prepareLayout() { $this->setChild('store_switcher', - $this->getLayout()->createBlock('Mage_Adminhtml_Block_Store_Switcher') + $this->getLayout()->createBlock('Mage_Backend_Block_Store_Switcher') ->setUseConfirm(false) ->setSwitchUrl($this->getUrl('*/*/*', array('store'=>null))) - ->setTemplate('report/store/switcher.phtml') + ->setTemplate('Mage_Adminhtml::report/store/switcher.phtml') ); return parent::_prepareLayout(); diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Shopcart/Abandoned.php b/app/code/core/Mage/Adminhtml/Block/Report/Shopcart/Abandoned.php index 67945630c805c515f784c236d3114ede809af7d6..044686eaa4e55b9386bc205181b74f975658b709 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Shopcart/Abandoned.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Shopcart/Abandoned.php @@ -45,10 +45,10 @@ class Mage_Adminhtml_Block_Report_Shopcart_Abandoned extends Mage_Adminhtml_Bloc protected function _prepareLayout() { $this->setChild('store_switcher', - $this->getLayout()->createBlock('Mage_Adminhtml_Block_Store_Switcher') + $this->getLayout()->createBlock('Mage_Backend_Block_Store_Switcher') ->setUseConfirm(false) ->setSwitchUrl($this->getUrl('*/*/*', array('store'=>null))) - ->setTemplate('report/store/switcher.phtml') + ->setTemplate('Mage_Adminhtml::report/store/switcher.phtml') ); return parent::_prepareLayout(); diff --git a/app/code/core/Mage/Adminhtml/Block/Review/Add/Form.php b/app/code/core/Mage/Adminhtml/Block/Review/Add/Form.php index d73adf1bf1b69cc4f877d394105677ec4e6c7b4b..f2134ce34af9f61663872629bdf79dd3ae19b521 100644 --- a/app/code/core/Mage/Adminhtml/Block/Review/Add/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Review/Add/Form.php @@ -69,7 +69,7 @@ class Mage_Adminhtml_Block_Review_Add_Form extends Mage_Adminhtml_Block_Widget_F 'name' => 'select_stores[]', 'values' => Mage::getSingleton('Mage_Core_Model_System_Store')->getStoreValuesForForm(), )); - $renderer = $this->getLayout()->createBlock('Mage_Adminhtml_Block_Store_Switcher_Form_Renderer_Fieldset_Element'); + $renderer = $this->getLayout()->createBlock('Mage_Backend_Block_Store_Switcher_Form_Renderer_Fieldset_Element'); $field->setRenderer($renderer); } diff --git a/app/code/core/Mage/Adminhtml/Block/Review/Edit/Form.php b/app/code/core/Mage/Adminhtml/Block/Review/Edit/Form.php index 7da5bbcd2b88b483445952936525a757a9854cef..e2cd8ed9a2e9a51f1bb3fce23bc69e0f1a91abec 100644 --- a/app/code/core/Mage/Adminhtml/Block/Review/Edit/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Review/Edit/Form.php @@ -98,7 +98,7 @@ class Mage_Adminhtml_Block_Review_Edit_Form extends Mage_Adminhtml_Block_Widget_ 'name' => 'stores[]', 'values' => Mage::getSingleton('Mage_Core_Model_System_Store')->getStoreValuesForForm(), )); - $renderer = $this->getLayout()->createBlock('Mage_Adminhtml_Block_Store_Switcher_Form_Renderer_Fieldset_Element'); + $renderer = $this->getLayout()->createBlock('Mage_Backend_Block_Store_Switcher_Form_Renderer_Fieldset_Element'); $field->setRenderer($renderer); $review->setSelectStores($review->getStores()); } diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Form/Abstract.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Form/Abstract.php index a54edce001a0b34b6dc2cc95895935c43949d339..611bd0c3113aa9d87a76742e5f3ab0938eb299cc 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Form/Abstract.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Form/Abstract.php @@ -175,7 +175,7 @@ abstract class Mage_Adminhtml_Block_Sales_Order_Create_Form_Abstract $element->setValues($attribute->getFrontend()->getSelectOptions()); } else if ($inputType == 'date') { $format = Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT); - $element->setImage($this->getSkinUrl('images/grid-cal.gif')); + $element->setImage($this->getViewFileUrl('images/grid-cal.gif')); $element->setDateFormat($format); } } diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Store/Select.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Store/Select.php index c78c65b76f1129e9c72cd01a685d475c52d82011..a951160edfa5bffc5555b258a799b364ec386d35 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Store/Select.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Store/Select.php @@ -30,7 +30,7 @@ * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Block_Sales_Order_Create_Store_Select extends Mage_Adminhtml_Block_Store_Switcher +class Mage_Adminhtml_Block_Sales_Order_Create_Store_Select extends Mage_Backend_Block_Store_Switcher { protected function _construct() { diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Status/New/Form.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Status/New/Form.php index 0f5e93fdfbffa73ac5e5397016d4daf5030d261b..d9b4abe0d76788ef3a400141e374b59e5167d8c5 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Status/New/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Status/New/Form.php @@ -101,7 +101,7 @@ class Mage_Adminhtml_Block_Sales_Order_Status_New_Form extends Mage_Adminhtml_Bl 'legend' => Mage::helper('Mage_Sales_Helper_Data')->__('Store View Specific Labels'), 'table_class' => 'form-list stores-tree', )); - $renderer = $this->getLayout()->createBlock('Mage_Adminhtml_Block_Store_Switcher_Form_Renderer_Fieldset'); + $renderer = $this->getLayout()->createBlock('Mage_Backend_Block_Store_Switcher_Form_Renderer_Fieldset'); $fieldset->setRenderer($renderer); foreach (Mage::app()->getWebsites() as $website) { diff --git a/app/code/core/Mage/Adminhtml/Block/Sitemap/Edit/Form.php b/app/code/core/Mage/Adminhtml/Block/Sitemap/Edit/Form.php index 1246299348131b9b378a2ce3292a43f6532e2461..5a4a8b2b2c293bbdc2ad2c35dc5a6f56c2e53788 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sitemap/Edit/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Sitemap/Edit/Form.php @@ -89,7 +89,7 @@ class Mage_Adminhtml_Block_Sitemap_Edit_Form extends Mage_Adminhtml_Block_Widget 'value' => $model->getStoreId(), 'values' => Mage::getSingleton('Mage_Core_Model_System_Store')->getStoreValuesForForm(), )); - $renderer = $this->getLayout()->createBlock('Mage_Adminhtml_Block_Store_Switcher_Form_Renderer_Fieldset_Element'); + $renderer = $this->getLayout()->createBlock('Mage_Backend_Block_Store_Switcher_Form_Renderer_Fieldset_Element'); $field->setRenderer($renderer); } else { diff --git a/app/code/core/Mage/Adminhtml/Block/System/Config/Edit.php b/app/code/core/Mage/Adminhtml/Block/System/Config/Edit.php deleted file mode 100644 index d0f44ddc946d921b718f9946a86d63bfe1435374..0000000000000000000000000000000000000000 --- a/app/code/core/Mage/Adminhtml/Block/System/Config/Edit.php +++ /dev/null @@ -1,97 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-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 Mage_Adminhtml - * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ - -/** - * Config edit page - * - * @category Mage - * @package Mage_Adminhtml - * @author Magento Core Team <core@magentocommerce.com> - */ -class Mage_Adminhtml_Block_System_Config_Edit extends Mage_Adminhtml_Block_Widget -{ - const DEFAULT_SECTION_BLOCK = 'Mage_Adminhtml_Block_System_Config_Form'; - - protected $_section; - - protected $_template = 'system/config/edit.phtml'; - - - protected function _construct() - { - parent::_construct(); - - $sectionCode = $this->getRequest()->getParam('section'); - $sections = Mage::getSingleton('Mage_Adminhtml_Model_Config')->getSections(); - - $this->_section = $sections->$sectionCode; - - $this->setTitle((string)$this->_section->label); - $this->setHeaderCss((string)$this->_section->header_css); - } - - protected function _prepareLayout() - { - $this->addChild('save_button', 'Mage_Adminhtml_Block_Widget_Button', array( - 'label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Save Config'), - 'onclick' => 'configForm.submit()', - 'class' => 'save', - )); - return parent::_prepareLayout(); - } - - public function getSaveButtonHtml() - { - return $this->getChildHtml('save_button'); - } - - public function getSaveUrl() - { - return $this->getUrl('*/*/save', array('_current'=>true)); - } - - public function initForm() - { - /* - $this->setChild('dwstree', - $this->getLayout()->createBlock('Mage_Adminhtml_Block_System_Config_Dwstree') - ->initTabs() - ); - */ - - $blockName = (string)$this->_section->frontend_model; - if (empty($blockName)) { - $blockName = self::DEFAULT_SECTION_BLOCK; - } - $this->setChild('form', - $this->getLayout()->createBlock($blockName) - ->initForm() - ); - return $this; - } - - -} diff --git a/app/code/core/Mage/Adminhtml/Block/System/Config/Tabs.php b/app/code/core/Mage/Adminhtml/Block/System/Config/Tabs.php deleted file mode 100644 index 0d460a17f53b260a680f7d547b8fb5d269a99ce9..0000000000000000000000000000000000000000 --- a/app/code/core/Mage/Adminhtml/Block/System/Config/Tabs.php +++ /dev/null @@ -1,337 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-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 Mage_Adminhtml - * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ - - -/** - * System configuration tabs block - * - * @category Mage - * @package Mage_Adminhtml - * @author Magento Core Team <core@magentocommerce.com> - */ -class Mage_Adminhtml_Block_System_Config_Tabs extends Mage_Adminhtml_Block_Widget -{ - - /** - * Tabs - * - * @var array - */ - protected $_tabs; - - protected $_template = 'system/config/tabs.phtml'; - - protected function _construct() - { - $this->setId('system_config_tabs'); - $this->setTitle(Mage::helper('Mage_Adminhtml_Helper_Data')->__('Configuration')); - } - - /** - * Enter description here... - * - * @param unknown_type $a - * @param unknown_type $b - * @return int - */ - protected function _sort($a, $b) - { - return (int)$a->sort_order < (int)$b->sort_order ? -1 : ((int)$a->sort_order > (int)$b->sort_order ? 1 : 0); - } - - /** - * Enter description here... - * - */ - public function initTabs() - { - $current = $this->getRequest()->getParam('section'); - $websiteCode = $this->getRequest()->getParam('website'); - $storeCode = $this->getRequest()->getParam('store'); - - $url = Mage::getModel('Mage_Adminhtml_Model_Url'); - - $configFields = Mage::getSingleton('Mage_Adminhtml_Model_Config'); - $sections = $configFields->getSections($current); - $tabs = (array)$configFields->getTabs()->children(); - - - $sections = (array)$sections; - - usort($sections, array($this, '_sort')); - usort($tabs, array($this, '_sort')); - - foreach ($tabs as $tab) { - $helperName = $configFields->getAttributeModule($tab); - $label = Mage::helper($helperName)->__((string)$tab->label); - - $this->addTab($tab->getName(), array( - 'label' => $label, - 'class' => (string) $tab->class - )); - } - - - foreach ($sections as $section) { - Mage::dispatchEvent('adminhtml_block_system_config_init_tab_sections_before', array('section' => $section)); - $hasChildren = $configFields->hasChildren($section, $websiteCode, $storeCode); - - $code = $section->getName(); - $sectionAllowed = $this->checkSectionPermissions($section->resource); - if ((empty($current) && $sectionAllowed)) { - - $current = $code; - $this->getRequest()->setParam('section', $current); - } - - $helperName = $configFields->getAttributeModule($section); - - $label = Mage::helper($helperName)->__((string)$section->label); - - if ($code == $current) { - if (!$this->getRequest()->getParam('website') && !$this->getRequest()->getParam('store')) { - $this->_addBreadcrumb($label); - } else { - $this->_addBreadcrumb($label, '', $url->getUrl('*/*/*', array('section'=>$code))); - } - } - if ( $sectionAllowed && $hasChildren) { - $this->addSection($code, (string)$section->tab, array( - 'class' => (string)$section->class, - 'label' => $label, - 'url' => $url->getUrl('*/*/*', array('_current'=>true, 'section'=>$code)), - )); - } - - if ($code == $current) { - $this->setActiveTab($section->tab); - $this->setActiveSection($code); - } - } - - /* - * Set last sections - */ - foreach ($this->getTabs() as $tab) { - $sections = $tab->getSections(); - if ($sections) { - $sections->getLastItem()->setIsLast(true); - } - } - - Mage::helper('Mage_Adminhtml_Helper_Data')->addPageHelpUrl($current.'/'); - - return $this; - } - - public function addTab($code, $config) - { - $tab = new Varien_Object($config); - $tab->setId($code); - $this->_tabs[$code] = $tab; - return $this; - } - - /** - * Retrive tab - * - * @param string $code - * @return Varien_Object - */ - public function getTab($code) - { - if(isset($this->_tabs[$code])) { - return $this->_tabs[$code]; - } - - return null; - } - - public function addSection($code, $tabCode, $config) - { - if($tab = $this->getTab($tabCode)) { - if(!$tab->getSections()) { - $tab->setSections(new Varien_Data_Collection()); - } - $section = new Varien_Object($config); - $section->setId($code); - $tab->getSections()->addItem($section); - } - return $this; - } - - public function getTabs() - { - return $this->_tabs; - } - - /** - * Enter description here... - * - * @return array - */ - public function getStoreSelectOptions() - { - $section = $this->getRequest()->getParam('section'); - - $curWebsite = $this->getRequest()->getParam('website'); - $curStore = $this->getRequest()->getParam('store'); - - $storeModel = Mage::getSingleton('Mage_Core_Model_System_Store'); - /* @var $storeModel Mage_Core_Model_System_Store */ - - $url = Mage::getModel('Mage_Adminhtml_Model_Url'); - - $options = array(); - $options['default'] = array( - 'label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Default Config'), - 'url' => $url->getUrl('*/*/*', array('section'=>$section)), - 'selected' => !$curWebsite && !$curStore, - 'style' => 'background:#ccc; font-weight:bold;', - ); - - foreach ($storeModel->getWebsiteCollection() as $website) { - $websiteShow = false; - foreach ($storeModel->getGroupCollection() as $group) { - if ($group->getWebsiteId() != $website->getId()) { - continue; - } - $groupShow = false; - foreach ($storeModel->getStoreCollection() as $store) { - if ($store->getGroupId() != $group->getId()) { - continue; - } - if (!$websiteShow) { - $websiteShow = true; - $options['website_' . $website->getCode()] = array( - 'label' => $website->getName(), - 'url' => $url->getUrl('*/*/*', array('section'=>$section, 'website'=>$website->getCode())), - 'selected' => !$curStore && $curWebsite == $website->getCode(), - 'style' => 'padding-left:16px; background:#DDD; font-weight:bold;', - ); - } - if (!$groupShow) { - $groupShow = true; - $options['group_' . $group->getId() . '_open'] = array( - 'is_group' => true, - 'is_close' => false, - 'label' => $group->getName(), - 'style' => 'padding-left:32px;' - ); - } - $options['store_' . $store->getCode()] = array( - 'label' => $store->getName(), - 'url' => $url->getUrl('*/*/*', array('section'=>$section, 'website'=>$website->getCode(), 'store'=>$store->getCode())), - 'selected' => $curStore == $store->getCode(), - 'style' => '', - ); - } - if ($groupShow) { - $options['group_' . $group->getId() . '_close'] = array( - 'is_group' => true, - 'is_close' => true, - ); - } - } - } - - return $options; - } - - /** - * Enter description here... - * - * @return string - */ - public function getStoreButtonsHtml() - { - $curWebsite = $this->getRequest()->getParam('website'); - $curStore = $this->getRequest()->getParam('store'); - - $html = ''; - - if (!$curWebsite && !$curStore) { - $html .= $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')->setData(array( - 'label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('New Website'), - 'onclick' => "location.href='".$this->getUrl('*/system_website/new')."'", - 'class' => 'add', - ))->toHtml(); - } elseif (!$curStore) { - $html .= $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')->setData(array( - 'label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Edit Website'), - 'onclick' => "location.href='".$this->getUrl('*/system_website/edit', array('website'=>$curWebsite))."'", - ))->toHtml(); - $html .= $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')->setData(array( - 'label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('New Store View'), - 'onclick' => "location.href='".$this->getUrl('*/system_store/new', array('website'=>$curWebsite))."'", - 'class' => 'add', - ))->toHtml(); - $html .= $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')->setData(array( - 'label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Delete Website'), - 'onclick' => "location.href='".$this->getUrl('*/system_website/delete', array('website'=>$curWebsite))."'", - 'class' => 'delete', - ))->toHtml(); - } else { - $html .= $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')->setData(array( - 'label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Edit Store View'), - 'onclick' => "location.href='".$this->getUrl('*/system_store/edit', array('store'=>$curStore))."'", - ))->toHtml(); - $html .= $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')->setData(array( - 'label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Delete Store View'), - 'onclick' => "location.href='".$this->getUrl('*/system_store/delete', array('store'=>$curStore))."'", - 'class' => 'delete', - ))->toHtml(); - } - - return $html; - } - - /** - * Enter description here... - * - * @param string $aclResourceId - * @return boolean - */ - public function checkSectionPermissions($aclResourceId=null) - { - static $permissions; - - if (!$aclResourceId or trim($aclResourceId) == "") { - return false; - } - - if (!$permissions) { - $permissions = Mage::getSingleton('Mage_Core_Model_Authorization'); - } - - $showTab = false; - if ( $permissions->isAllowed($aclResourceId) ) { - $showTab = true; - } - return $showTab; - } - -} diff --git a/app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Edit/Tab/Upload.php b/app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Edit/Tab/Upload.php deleted file mode 100755 index 5482a988fc8bd3c039abb4f80bea65945d755fd1..0000000000000000000000000000000000000000 --- a/app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Edit/Tab/Upload.php +++ /dev/null @@ -1,54 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-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 Mage_Adminhtml - * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ - -/** - * Convert profile edit tab - * - * @category Mage - * @package Mage_Adminhtml - * @author Magento Core Team <core@magentocommerce.com> - */ -class Mage_Adminhtml_Block_System_Convert_Gui_Edit_Tab_Upload extends Mage_Adminhtml_Block_Widget_Form -{ - - protected $_template = 'system/convert/profile/upload.phtml'; - - public function getPostMaxSize() - { - return ini_get('post_max_size'); - } - - public function getUploadMaxSize() - { - return ini_get('upload_max_filesize'); - } - - public function getDataMaxSize() - { - return min($this->getPostMaxSize(), $this->getUploadMaxSize()); - } -} - diff --git a/app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Edit/Tabs.php b/app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Edit/Tabs.php index a00891011c61b5edec895c6d3da58a3eedd23fcc..4b71dc926441705370838da3a0fc94a996bfa19f 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Edit/Tabs.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Edit/Tabs.php @@ -57,11 +57,11 @@ class Mage_Adminhtml_Block_System_Convert_Gui_Edit_Tabs extends Mage_Adminhtml_B )); if (!$new) { - if ($profile->getDirection()!='export') { + if ($profile->getDirection() != 'export') { $this->addTab('upload', array( 'label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Upload File'), - 'content' => $this->getLayout() - ->createBlock('Mage_Adminhtml_Block_System_Convert_Gui_Edit_Tab_Upload')->toHtml(), + 'content' => $this->getLayout()->createBlock('Mage_Backend_Block_Widget_Form') + ->setTemplate('system/convert/profile/upload.phtml')->toHtml(), )); } 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 a33ae4f516d46f5e77f6f4ea4a99f3db362cbd68..be9517f472e4570ead0afb3d9c0007516ad7b512 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 @@ -72,14 +72,14 @@ class Mage_Adminhtml_Block_System_Convert_Profile_Run extends Mage_Adminhtml_Blo array( 'styles' => array( 'error' => array( - 'icon' => Mage::getDesign()->getSkinUrl('Mage_Adminhtml::images/error_msg_icon.gif'), + 'icon' => Mage::getDesign()->getViewFileUrl('Mage_Adminhtml::images/error_msg_icon.gif'), 'bg' => '#FDD' ), 'message' => array( - 'icon' => Mage::getDesign()->getSkinUrl('Mage_Adminhtml::images/fam_bullet_success.gif'), + 'icon' => Mage::getDesign()->getViewFileUrl('Mage_Adminhtml::images/fam_bullet_success.gif'), 'bg' => '#DDF' ), - 'loader' => Mage::getDesign()->getSkinUrl('images/ajax-loader.gif') + 'loader' => Mage::getDesign()->getViewFileUrl('images/ajax-loader.gif') ), 'template' => '<li style="#{style}" id="#{id}">' . '<img id="#{id}_img" src="#{image}" class="v-middle" style="margin-right:5px"/>' @@ -189,7 +189,7 @@ class Mage_Adminhtml_Block_System_Convert_Profile_Run extends Mage_Adminhtml_Blo } $exceptions[] = array( "style" => $liStyle, - "src" => Mage::getDesign()->getSkinUrl('Mage_Adminhtml::images/'.$img), + "src" => Mage::getDesign()->getViewFileUrl('Mage_Adminhtml::images/'.$img), "message" => $e->getMessage(), "position" => $e->getPosition() ); diff --git a/app/code/core/Mage/Adminhtml/Block/System/Currency/Rate/Services.php b/app/code/core/Mage/Adminhtml/Block/System/Currency/Rate/Services.php index bba83cf6b82dd9c2b1f358ebe9002afb389dd031..4dbe9ae685d120d17afd00b7dc91738a8a95f68c 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Currency/Rate/Services.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Currency/Rate/Services.php @@ -45,7 +45,7 @@ class Mage_Adminhtml_Block_System_Currency_Rate_Services extends Mage_Adminhtml_ { $this->setChild('import_services', $this->getLayout()->createBlock('Mage_Adminhtml_Block_Html_Select') - ->setOptions(Mage::getModel('Mage_Adminhtml_Model_System_Config_Source_Currency_Service')->toOptionArray(0)) + ->setOptions(Mage::getModel('Mage_Backend_Model_Config_Source_Currency_Service')->toOptionArray(0)) ->setId('rate_services') ->setName('rate_services') ->setValue(Mage::getSingleton('Mage_Adminhtml_Model_Session')->getCurrencyRateService(true)) diff --git a/app/code/core/Mage/Adminhtml/Block/System/Design/Edit/Tab/General.php b/app/code/core/Mage/Adminhtml/Block/System/Design/Edit/Tab/General.php index e74ba34a1dbf8a15f324a60d1f87319ea9710bbf..8e0164be8d5d45c9c42a3f0b9ee337faa433b07d 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Design/Edit/Tab/General.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Design/Edit/Tab/General.php @@ -40,7 +40,7 @@ class Mage_Adminhtml_Block_System_Design_Edit_Tab_General extends Mage_Adminhtml 'name' => 'store_id', 'required' => true, )); - $renderer = $this->getLayout()->createBlock('Mage_Adminhtml_Block_Store_Switcher_Form_Renderer_Fieldset_Element'); + $renderer = $this->getLayout()->createBlock('Mage_Backend_Block_Store_Switcher_Form_Renderer_Fieldset_Element'); $field->setRenderer($renderer); } else { $fieldset->addField('store_id', 'hidden', array( @@ -62,7 +62,7 @@ class Mage_Adminhtml_Block_System_Design_Edit_Tab_General extends Mage_Adminhtml 'label' => Mage::helper('Mage_Core_Helper_Data')->__('Date From'), 'title' => Mage::helper('Mage_Core_Helper_Data')->__('Date From'), 'name' => 'date_from', - 'image' => $this->getSkinUrl('images/grid-cal.gif'), + 'image' => $this->getViewFileUrl('images/grid-cal.gif'), 'date_format' => $dateFormat, //'required' => true, )); @@ -70,7 +70,7 @@ class Mage_Adminhtml_Block_System_Design_Edit_Tab_General extends Mage_Adminhtml 'label' => Mage::helper('Mage_Core_Helper_Data')->__('Date To'), 'title' => Mage::helper('Mage_Core_Helper_Data')->__('Date To'), 'name' => 'date_to', - 'image' => $this->getSkinUrl('images/grid-cal.gif'), + 'image' => $this->getViewFileUrl('images/grid-cal.gif'), 'date_format' => $dateFormat, //'required' => true, )); diff --git a/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Edit.php b/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Edit.php index f316a1f98bf138be06c9a6881c770de0304437c9..35a9ee9987a15906721f3b3b0f9ca8c4a91ad725 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Edit.php @@ -382,14 +382,20 @@ class Mage_Adminhtml_Block_System_Email_Template_Edit extends Mage_Adminhtml_Blo } } $pathParts[] = array( - 'title' => Mage::getSingleton('Mage_Adminhtml_Model_Config')->getSystemConfigNodeLabel($sectionName), + 'title' => Mage::getSingleton('Mage_Backend_Model_Config_Structure_Reader') + ->getConfiguration() + ->getSystemConfigNodeLabel($sectionName), 'url' => $this->getUrl('adminhtml/system_config/edit', $urlParams), ); $pathParts[] = array( - 'title' => Mage::getSingleton('Mage_Adminhtml_Model_Config')->getSystemConfigNodeLabel($sectionName, $groupName) + 'title' => Mage::getSingleton('Mage_Backend_Model_Config_Structure_Reader') + ->getConfiguration() + ->getSystemConfigNodeLabel($sectionName, $groupName) ); $pathParts[] = array( - 'title' => Mage::getSingleton('Mage_Adminhtml_Model_Config')->getSystemConfigNodeLabel($sectionName, $groupName, $fieldName), + 'title' => Mage::getSingleton('Mage_Backend_Model_Config_Structure_Reader') + ->getConfiguration() + ->getSystemConfigNodeLabel($sectionName, $groupName, $fieldName), 'scope' => $scopeLabel ); $result[] = $pathParts; diff --git a/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Grid.php b/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Grid.php index cb49590a0c2514f7870f88191cae4c05441b0b30..38fc883671628efa0ab1500e17049c02ebf56bff 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Grid.php @@ -36,6 +36,7 @@ class Mage_Adminhtml_Block_System_Email_Template_Grid extends Mage_Adminhtml_Blo protected function _construct() { + parent::_construct(); $this->setEmptyText(Mage::helper('Mage_Adminhtml_Helper_Data')->__('No Templates Found')); $this->setId('systemEmailTemplateGrid'); $this->setUseAjax(true); diff --git a/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Preview.php b/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Preview.php index 3a4e919106fabe7f7862c0c983a397fece8d41a1..1ba71d6981d915516baed166645d7380bbc70eac 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Preview.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Preview.php @@ -41,7 +41,8 @@ class Mage_Adminhtml_Block_System_Email_Template_Preview extends Mage_Adminhtml_ protected function _toHtml() { /** @var $template Mage_Core_Model_Email_Template */ - $template = Mage::getModel('Mage_Core_Model_Email_Template'); + $template = Mage::getModel('Mage_Core_Model_Email_Template', + array('area' => Mage_Core_Model_App_Area::AREA_FRONTEND)); $id = (int)$this->getRequest()->getParam('id'); if ($id) { $template->load($id); diff --git a/app/code/core/Mage/Adminhtml/Block/System/Store/Delete.php b/app/code/core/Mage/Adminhtml/Block/System/Store/Delete.php index 6df208a543b650529737fad8b2efc41af60c1739..674e79e2d1f3dc1706685607a34fb22d6e1064fe 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Store/Delete.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Store/Delete.php @@ -50,7 +50,7 @@ class Mage_Adminhtml_Block_System_Store_Delete extends Mage_Adminhtml_Block_Widg $this->_removeButton('save'); $this->_removeButton('reset'); - $this->_updateButton('delete', 'area', 'footer'); + $this->_updateButton('delete', 'region', 'footer'); $this->_updateButton('delete', 'onclick', 'editForm.submit();'); $this->_addButton('cancel', array( diff --git a/app/code/core/Mage/Adminhtml/Block/System/Store/Edit/Form/Group.php b/app/code/core/Mage/Adminhtml/Block/System/Store/Edit/Form/Group.php index 478afad94f60eeaee772f43af203c2d3bbe24588..bc2e798572f6a87370ec3f276939342b589dc182 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Store/Edit/Form/Group.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Store/Edit/Form/Group.php @@ -87,7 +87,7 @@ class Mage_Adminhtml_Block_System_Store_Edit_Form_Group extends Mage_Adminhtml_B 'disabled' => $groupModel->isReadOnly(), )); - $categories = Mage::getModel('Mage_Adminhtml_Model_System_Config_Source_Category')->toOptionArray(); + $categories = Mage::getModel('Mage_Catalog_Model_Config_Source_Category')->toOptionArray(); $fieldset->addField('group_root_category_id', 'select', array( 'name' => 'group[root_category_id]', diff --git a/app/code/core/Mage/Adminhtml/Block/System/Variable/Edit.php b/app/code/core/Mage/Adminhtml/Block/System/Variable/Edit.php index cdb509e268ab67e057f8c9ab64b0e7316d2c12fc..16d5bd92f7601b13cbd42cdabcbed4028d579af6 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Variable/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Variable/Edit.php @@ -84,7 +84,7 @@ class Mage_Adminhtml_Block_System_Variable_Edit extends Mage_Adminhtml_Block_Wid $formHtml = parent::getFormHtml(); if (!Mage::app()->isSingleStoreMode() && $this->getVariable()->getId()) { $storeSwitcher = $this->getLayout() - ->createBlock('Mage_Adminhtml_Block_Store_Switcher')->toHtml(); + ->createBlock('Mage_Backend_Block_Store_Switcher')->toHtml(); $formHtml = $storeSwitcher.$formHtml; } return $formHtml; 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 a50c8cf585928f76c87a0c8434e840edf2078308..2ea30559dde410ce5c1bcab6f67f7c9234c00dfc 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Form.php @@ -51,7 +51,7 @@ class Mage_Adminhtml_Block_Tax_Rate_Form extends Mage_Adminhtml_Block_Widget_For $rateObject = new Varien_Object(Mage::getSingleton('Mage_Tax_Model_Calculation_Rate')->getData()); $form = new Varien_Data_Form(); - $countries = Mage::getModel('Mage_Adminhtml_Model_System_Config_Source_Country')->toOptionArray(); + $countries = Mage::getModel('Mage_Directory_Model_Config_Source_Country')->toOptionArray(); unset($countries[0]); if (!$rateObject->hasTaxCountryId()) { diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Price/Scope.php b/app/code/core/Mage/Adminhtml/Block/Tax/Rate/ImportExportHeader.php similarity index 72% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Price/Scope.php rename to app/code/core/Mage/Adminhtml/Block/Tax/Rate/ImportExportHeader.php index 3c22b87e9256509960bc2613c65ee7086c8e3ba3..22c9d03e04981e4a87e680d2ea495d0f99e19e0e 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Price/Scope.php +++ b/app/code/core/Mage/Adminhtml/Block/Tax/Rate/ImportExportHeader.php @@ -25,12 +25,18 @@ */ /** - * Price scope configuration option backend model + * Adminhtml import/export header block * - * @author Magento Core Team <core@magentocommerce.com> + * @category Mage + * @package Mage_Adminhtml + * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Model_System_Config_Backend_Price_Scope extends Mage_Core_Model_Config_Data +class Mage_Adminhtml_Block_Tax_Rate_ImportExportHeader extends Mage_Adminhtml_Block_Widget { -// protected $_eventPrefix = 'system_config_price_scope'; -// protected $_eventObject = 'option'; + /** + * Block's template + * + * @var string + */ + protected $_template = 'tax/importExportHeader.phtml'; } diff --git a/app/code/core/Mage/Adminhtml/Block/Text/List.php b/app/code/core/Mage/Adminhtml/Block/Text/List.php index 80dd06a882a0a65362ac1c7f78ae3a70fe0b51f7..afb86c3686e4c6f24870f8dac66c14c7ac358d80 100644 --- a/app/code/core/Mage/Adminhtml/Block/Text/List.php +++ b/app/code/core/Mage/Adminhtml/Block/Text/List.php @@ -34,15 +34,38 @@ */ class Mage_Adminhtml_Block_Text_List extends Mage_Core_Block_Text_List { - /** - * Enter description here... + * @param Mage_Core_Controller_Request_Http $request + * @param Mage_Core_Model_Layout $layout + * @param Mage_Core_Model_Event_Manager $eventManager + * @param Mage_Backend_Model_Url $urlBuilder + * @param Mage_Core_Model_Translate $translator + * @param Mage_Core_Model_Cache $cache + * @param Mage_Core_Model_Design_Package $designPackage + * @param Mage_Core_Model_Session $session + * @param Mage_Core_Model_Store_Config $storeConfig + * @param Mage_Core_Controller_Varien_Front $frontController + * @param Mage_Core_Model_Factory_Helper $helperFactory + * @param array $data * - * @return string + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ - protected function _getUrlModelClass() - { - return 'Mage_Adminhtml_Model_Url'; + public function __construct( + Mage_Core_Controller_Request_Http $request, + Mage_Core_Model_Layout $layout, + Mage_Core_Model_Event_Manager $eventManager, + Mage_Backend_Model_Url $urlBuilder, + Mage_Core_Model_Translate $translator, + Mage_Core_Model_Cache $cache, + Mage_Core_Model_Design_Package $designPackage, + Mage_Core_Model_Session $session, + Mage_Core_Model_Store_Config $storeConfig, + Mage_Core_Controller_Varien_Front $frontController, + Mage_Core_Model_Factory_Helper $helperFactory, + array $data = array() + ) { + parent::__construct($request, $layout, $eventManager, $urlBuilder, $translator, $cache, $designPackage, + $session, $storeConfig, $frontController, $helperFactory, $data + ); } - } diff --git a/app/code/core/Mage/Adminhtml/Block/Urlrewrite/Edit/Form.php b/app/code/core/Mage/Adminhtml/Block/Urlrewrite/Edit/Form.php index 00dd305a55f6149a30ae0b0fc4d7dcd624148143..9b7a79724b726592db2ebe1c6b5af10419daff89 100644 --- a/app/code/core/Mage/Adminhtml/Block/Urlrewrite/Edit/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Urlrewrite/Edit/Form.php @@ -197,9 +197,9 @@ class Mage_Adminhtml_Block_Urlrewrite_Edit_Form extends Mage_Adminhtml_Block_Wid 'value' => Mage::app()->getStore(true)->getId() ), 'id_path'); } else { - /** @var $renderer Mage_Adminhtml_Block_Store_Switcher_Form_Renderer_Fieldset_Element */ + /** @var $renderer Mage_Backend_Block_Store_Switcher_Form_Renderer_Fieldset_Element */ $renderer = $this->getLayout() - ->createBlock('Mage_Adminhtml_Block_Store_Switcher_Form_Renderer_Fieldset_Element'); + ->createBlock('Mage_Backend_Block_Store_Switcher_Form_Renderer_Fieldset_Element'); $storeElement = $fieldset->addField('store_id', 'select', array( 'label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Store'), diff --git a/app/code/core/Mage/Adminhtml/Model/Config.php b/app/code/core/Mage/Adminhtml/Model/Config.php deleted file mode 100644 index 14d6489512a97e6ea5f7bf1ab713dc34323a1527..0000000000000000000000000000000000000000 --- a/app/code/core/Mage/Adminhtml/Model/Config.php +++ /dev/null @@ -1,277 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-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 Mage_Adminhtml - * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ - - -/** - * Admin configuration model - * - * @category Mage - * @package Mage_Adminhtml - * @author Magento Core Team <core@magentocommerce.com> - */ -class Mage_Adminhtml_Model_Config extends Varien_Simplexml_Config -{ - - /** - * Enter description here... - * - * @var Varien_Simplexml_Element - */ - protected $_sections; - - /** - * Tabs - * - * @var Varien_Simplexml_Element - */ - protected $_tabs; - - /** - * Main Application object - * - * @var Mage_Core_Model_App - */ - protected $_app; - - /** - * Initializes XML for this configuration - * - * @param array $arguments - */ - public function __construct(array $arguments = array()) - { - $this->_app = isset($arguments['app']) ? $arguments['app'] : Mage::app(); - $sourceData = isset($arguments['data']) ? $arguments['data'] : array(); - return parent::__construct($sourceData); - } - - /** - * Enter description here... - * - * @param string $sectionCode - * @param string $websiteCode - * @param string $storeCode - * @return Varien_Simplexml_Element - */ - public function getSections($sectionCode=null, $websiteCode=null, $storeCode=null) - { - if (empty($this->_sections)) { - $this->_initSectionsAndTabs(); - } - - return $this->_sections; - } - - /** - * Retrive tabs - * - * @return Varien_Simplexml_Element - */ - public function getTabs() - { - if (empty($this->_tabs)) { - $this->_initSectionsAndTabs(); - } - - return $this->_tabs; - } - - protected function _initSectionsAndTabs() - { - $mergeConfig = Mage::getModel('Mage_Core_Model_Config_Base'); - - $config = Mage::getConfig()->loadModulesConfiguration('system.xml'); - - $this->_sections = $config->getNode('sections'); - - $this->_tabs = $config->getNode('tabs'); - } - - - - /** - * Enter description here... - * - * @param string $sectionCode - * @param string $websiteCode - * @param string $storeCode - * @return Varien_Simplexml_Element - */ - public function getSection($sectionCode=null, $websiteCode=null, $storeCode=null) - { - - if ($sectionCode){ - return $this->getSections()->$sectionCode; - } elseif ($websiteCode) { - return $this->getSections()->$websiteCode; - } elseif ($storeCode) { - return $this->getSections()->$storeCode; - } - } - - /** - * Check whether node has child node that can be shown - * - * @param Varien_Simplexml_Element $node - * @param string $websiteCode - * @param string $storeCode - * @return boolean - */ - public function hasChildren($node, $websiteCode = null, $storeCode = null) - { - if (!$this->_canShowNode($node, $websiteCode, $storeCode)) { - return false; - } - - if (isset($node->groups)) { - $children = $node->groups->children(); - } elseif (isset($node->fields)) { - $children = $node->fields->children(); - } else { - return true; - } - - foreach ($children as $child) { - if ($this->hasChildren($child, $websiteCode, $storeCode)) { - return true; - } - } - return false; - } - - /** - * Checks whether it is possible to show the node - * - * @param Varien_Simplexml_Element $node - * @param string $websiteCode - * @param string $storeCode - * @return boolean - */ - protected function _canShowNode($node, $websiteCode = null, $storeCode = null) - { - $showTab = false; - if ($storeCode) { - $showTab = (int)$node->show_in_store; - } elseif ($websiteCode) { - $showTab = (int)$node->show_in_website; - } elseif (!empty($node->show_in_default)) { - $showTab = true; - } - - $showTab = $showTab || $this->_app->isSingleStoreMode(); - $showTab = $showTab && !($this->_app->isSingleStoreMode() && (int)$node->hide_in_single_store_mode); - return $showTab; - } - - /** - * Get translate module name - * - * @param Varien_Simplexml_Element $sectionNode - * @param Varien_Simplexml_Element $groupNode - * @param Varien_Simplexml_Element $fieldNode - * @return string - */ - function getAttributeModule($sectionNode = null, $groupNode = null, $fieldNode = null) - { - $moduleName = 'Mage_Adminhtml'; - if (is_object($sectionNode) && method_exists($sectionNode, 'attributes')) { - $sectionAttributes = $sectionNode->attributes(); - $moduleName = isset($sectionAttributes['module']) ? (string)$sectionAttributes['module'] : $moduleName; - } - if (is_object($groupNode) && method_exists($groupNode, 'attributes')) { - $groupAttributes = $groupNode->attributes(); - $moduleName = isset($groupAttributes['module']) ? (string)$groupAttributes['module'] : $moduleName; - } - if (is_object($fieldNode) && method_exists($fieldNode, 'attributes')) { - $fieldAttributes = $fieldNode->attributes(); - $moduleName = isset($fieldAttributes['module']) ? (string)$fieldAttributes['module'] : $moduleName; - } - - return $moduleName; - } - - /** - * System configuration section, fieldset or field label getter - * - * @param string $sectionName - * @param string $groupName - * @param string $fieldName - * @return string - */ - public function getSystemConfigNodeLabel($sectionName, $groupName = null, $fieldName = null) - { - $sectionName = trim($sectionName, '/'); - $path = '//sections/' . $sectionName; - $groupNode = $fieldNode = null; - $sectionNode = $this->_sections->xpath($path); - if (!empty($groupName)) { - $path .= '/groups/' . trim($groupName, '/'); - $groupNode = $this->_sections->xpath($path); - } - if (!empty($fieldName)) { - if (!empty($groupName)) { - $path .= '/fields/' . trim($fieldName, '/'); - $fieldNode = $this->_sections->xpath($path); - } - else { - Mage::throwException(Mage::helper('Mage_Adminhtml_Helper_Data')->__('The group node name must be specified with field node name.')); - } - } - $moduleName = $this->getAttributeModule($sectionNode, $groupNode, $fieldNode); - $systemNode = $this->_sections->xpath($path); - foreach ($systemNode as $node) { - return Mage::helper($moduleName)->__((string)$node->label); - } - return ''; - } - - /** - * Look for encrypted node entries in all system.xml files and return them - * - * @return array $paths - */ - public function getEncryptedNodeEntriesPaths($explodePathToEntities = false) - { - $paths = array(); - $configSections = $this->getSections(); - if ($configSections) { - foreach ($configSections->xpath('//sections/*/groups/*/fields/*/backend_model') as $node) { - if ('adminhtml/system_config_backend_encrypted' === (string)$node) { - $section = $node->getParent()->getParent()->getParent()->getParent()->getParent()->getName(); - $group = $node->getParent()->getParent()->getParent()->getName(); - $field = $node->getParent()->getName(); - if ($explodePathToEntities) { - $paths[] = array('section' => $section, 'group' => $group, 'field' => $field); - } - else { - $paths[] = $section . '/' . $group . '/' . $field; - } - } - } - } - return $paths; - } -} diff --git a/app/code/core/Mage/Adminhtml/Model/Email/Template.php b/app/code/core/Mage/Adminhtml/Model/Email/Template.php index 2d0cdbfcf483b680df8c308cd89bf1f2cfb4d9ee..91b9d38f98641df23aee2569287afad8e377aa17 100644 --- a/app/code/core/Mage/Adminhtml/Model/Email/Template.php +++ b/app/code/core/Mage/Adminhtml/Model/Email/Template.php @@ -34,12 +34,6 @@ class Mage_Adminhtml_Model_Email_Template extends Mage_Core_Model_Email_Template { - /** - * Xml path to email template nodes - * - */ - const XML_PATH_TEMPLATE_EMAIL = '//sections/*/groups/*/fields/*[source_model="Mage_Adminhtml_Model_System_Config_Source_Email_Template"]'; - /** * Collect all system config pathes where current template is used as default * @@ -53,7 +47,9 @@ class Mage_Adminhtml_Model_Email_Template extends Mage_Core_Model_Email_Template } $paths = array(); - $configSections = Mage::getSingleton('Mage_Adminhtml_Model_Config')->getSections(); + $configSections = Mage::getSingleton('Mage_Backend_Model_Config_Structure_Reader') + ->getConfiguration() + ->getSections(); // find nodes which are using $templateCode value $defaultCfgNodes = Mage::getConfig()->getXpath('default/*/*[*="' . $templateCode . '"]'); @@ -82,31 +78,16 @@ class Mage_Adminhtml_Model_Email_Template extends Mage_Core_Model_Email_Template if (!$templateId) { return array(); } - $paths = array(); - $configSections = Mage::getSingleton('Mage_Adminhtml_Model_Config')->getSections(); + $templatePaths = Mage::getSingleton('Mage_Backend_Model_Config_Structure_Reader') + ->getConfiguration() + ->getFieldsByAttribute('source_model', 'Mage_Backend_Model_Config_Source_Email_Template'); - // look for node entries in all system.xml that use source_model=adminhtml/system_config_source_email_template - // they are will be templates, what we try find - $sysCfgNodes = $configSections->xpath(self::XML_PATH_TEMPLATE_EMAIL); - if (!is_array($sysCfgNodes)) { + if (!count($templatePaths)) { return array(); } - foreach ($sysCfgNodes as $fieldNode) { - - $groupNode = $fieldNode->getParent()->getParent(); - $sectionNode = $groupNode->getParent()->getParent(); - - // create email template path in system.xml - $sectionName = $sectionNode->getName(); - $groupName = $groupNode->getName(); - $fieldName = $fieldNode->getName(); - - $paths[] = implode('/', array($sectionName, $groupName, $fieldName)); - } - - $configData = $this->_getResource()->getSystemConfigByPathsAndTemplateId($paths, $templateId); + $configData = $this->_getResource()->getSystemConfigByPathsAndTemplateId($templatePaths, $templateId); if (!$configData) { return array(); } diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Seo/Product.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Seo/Product.php deleted file mode 100644 index 64a0632c3f77e6bdb41a8f8f5f029d5dabfd643a..0000000000000000000000000000000000000000 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Seo/Product.php +++ /dev/null @@ -1,45 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-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 Mage_Adminhtml - * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ - - -class Mage_Adminhtml_Model_System_Config_Backend_Seo_Product extends Mage_Core_Model_Config_Data -{ - /** - * Refresh category url rewrites if configuration was changed - * - * @return Mage_Adminhtml_Model_System_Config_Backend_Seo_Product - */ - protected function _afterSave() - { - /** - * Index model responsible for rewrites index - */ -// if ($this->isValueChanged()) { -// Mage::getSingleton('Mage_Catalog_Model_Url')->refreshRewrites(); -// } - return $this; - } -} diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Payment/Allowedmethods.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Payment/Allowedmethods.php deleted file mode 100644 index ad11e10bf7bf40d750f5d1c06fd78d8ca9ba398f..0000000000000000000000000000000000000000 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Payment/Allowedmethods.php +++ /dev/null @@ -1,49 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-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 Mage_Adminhtml - * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ - -class Mage_Adminhtml_Model_System_Config_Source_Payment_Allowedmethods - extends Mage_Adminhtml_Model_System_Config_Source_Payment_Allmethods -{ - protected function _getPaymentMethods() - { - return Mage::getSingleton('Mage_Payment_Model_Config')->getActiveMethods(); - } - -// public function toOptionArray() -// { -// $methods = array(array('value'=>'', 'label'=>'')); -// $payments = Mage::getSingleton('Mage_Payment_Model_Config')->getActiveMethods(); -// foreach ($payments as $paymentCode=>$paymentModel) { -// $paymentTitle = Mage::getStoreConfig('payment/'.$paymentCode.'/title'); -// $methods[$paymentCode] = array( -// 'label' => $paymentTitle, -// 'value' => $paymentCode, -// ); -// } -// -// return $methods; -// } -} diff --git a/app/code/core/Mage/Adminhtml/controllers/Tax/RateController.php b/app/code/core/Mage/Adminhtml/controllers/Tax/RateController.php index 31b07ea2dbc518c058e5fdff1109a49bfb9e8dde..8fed3bdd8eae21f1e1a221f711d6b352f457d0bb 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Tax/RateController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Tax/RateController.php @@ -337,6 +337,7 @@ class Mage_Adminhtml_Tax_RateController extends Mage_Adminhtml_Controller_Action $this->loadLayout() ->_setActiveMenu('Mage_Tax::sales_tax_import_export') + ->_addContent($this->getLayout()->createBlock('Mage_Adminhtml_Block_Tax_Rate_ImportExportHeader')) ->_addContent($this->getLayout()->createBlock('Mage_Adminhtml_Block_Tax_Rate_ImportExport')) ->renderLayout(); } diff --git a/app/code/core/Mage/Adminhtml/etc/config.xml b/app/code/core/Mage/Adminhtml/etc/config.xml index 1e490430708a26055572da2c7c4520850e5173a2..8a3b47528adf6201a8f5cca3782bd3be999e054d 100644 --- a/app/code/core/Mage/Adminhtml/etc/config.xml +++ b/app/code/core/Mage/Adminhtml/etc/config.xml @@ -31,9 +31,6 @@ <version>0.7.1</version> <active>true</active> <codePool>core</codePool> - <depends> - <Mage_Admin/> - </depends> </Mage_Adminhtml> </modules> <global> @@ -81,7 +78,7 @@ <admin_system_config_changed_section_admin> <observers> <bind_locale> - <class>Mage_Adminhtml_Model_System_Config_Backend_Admin_Observer</class> + <class>Mage_Backend_Model_Config_Backend_Admin_Observer</class> <method>afterCustomUrlChanged</method> </bind_locale> </observers> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/admin.xml b/app/code/core/Mage/Adminhtml/view/adminhtml/admin.xml index fe51c8b285ec9e96f38b2bc84ac3d8f1370a5b10..6a16be983af58e0d5711396208bb4764528d35bc 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/admin.xml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/admin.xml @@ -27,15 +27,10 @@ --> <layout> - <adminhtml_system_config_edit> - <reference name="left"> - <block type="Mage_Adminhtml_Block_System_Config_Switcher" name="adminhtml.system.config.switcher" before="-"/> - </reference> - </adminhtml_system_config_edit> <adminhtml_dashboard_index> <reference name="content"> <block type="Mage_Adminhtml_Block_Dashboard" name="dashboard"> - <block type="Mage_Adminhtml_Block_Store_Switcher" name="store_switcher" as="store_switcher" template="store/switcher.phtml"> + <block type="Mage_Backend_Block_Store_Switcher" name="store_switcher" as="store_switcher" template="store/switcher.phtml"> <action method="setUseConfirm"><params>0</params></action> </block> </block> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/admin/page.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/admin/page.phtml index 021c45ac96226000c1e4ef9a71a43722415edce5..00b7a6942c067d1f7da4bba9e82e49ffd15bdcba 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/admin/page.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/admin/page.phtml @@ -81,7 +81,7 @@ </div> <?php echo $this->getChildHtml('js') ?> <div id="loading-mask" style="display:none"> - <p class="loader" id="loading_mask_loader"><img src="<?php echo $this->getSkinUrl('images/ajax-loader-tr.gif') ?>" alt="<?php echo Mage::helper('Mage_Adminhtml_Helper_Data')->__('Loading...') ?>"/><br/><?php echo Mage::helper('Mage_Adminhtml_Helper_Data')->__('Please wait...') ?></p> + <p class="loader" id="loading_mask_loader"><img src="<?php echo $this->getViewFileUrl('images/ajax-loader-tr.gif') ?>" alt="<?php echo Mage::helper('Mage_Adminhtml_Helper_Data')->__('Loading...') ?>"/><br/><?php echo Mage::helper('Mage_Adminhtml_Helper_Data')->__('Please wait...') ?></p> </div> <?php echo $this->getChildHtml('before_body_end') ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/admin/popup.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/admin/popup.phtml index a6f78781e9f3dd303e752c233b2878d7dcdf614d..2d27499fcecb98f3d3184f5d994e13ace21e6bae 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/admin/popup.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/admin/popup.phtml @@ -71,7 +71,7 @@ <?php endif; ?> <?php echo $this->getChildHtml('js') ?> <div id="loading-mask" style="display:none;"> - <p class="loader" id="loading_mask_loader"><img src="<?php echo $this->getSkinUrl('images/ajax-loader-tr.gif') ?>" alt="<?php echo Mage::helper('Mage_Adminhtml_Helper_Data')->__('Loading...') ?>" /><br /><?php echo Mage::helper('Mage_Adminhtml_Helper_Data')->__('Please wait...') ?></p> + <p class="loader" id="loading_mask_loader"><img src="<?php echo $this->getViewFileUrl('images/ajax-loader-tr.gif') ?>" alt="<?php echo Mage::helper('Mage_Adminhtml_Helper_Data')->__('Loading...') ?>" /><br /><?php echo Mage::helper('Mage_Adminhtml_Helper_Data')->__('Please wait...') ?></p> </div> </div> <?php echo $this->getChildHtml('before_body_end') ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog.xml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog.xml index c8db174ca0101925f040b328cf908feb2cc96f4f..2c333c9b25ecc0f33fea1bcdf19ef9ee4ff85d41 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog.xml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog.xml @@ -37,7 +37,7 @@ </reference> <reference name="content"> <block type="Mage_Adminhtml_Block_Catalog_Product" name="products_list"> - <block type="Mage_Adminhtml_Block_Store_Switcher" name="store_switcher" as="store_switcher"> + <block type="Mage_Backend_Block_Store_Switcher" name="store_switcher" as="store_switcher"> <action method="setUseConfirm"><params>0</params></action> </block> </block> @@ -95,7 +95,7 @@ <block type="Mage_Adminhtml_Block_Catalog_Product_Edit_AttributeSet" name="attribute-set-info" template="Mage_Adminhtml::catalog/product/edit/attribute_set.phtml"></block> </reference> <reference name="left"> - <block type="Mage_Adminhtml_Block_Store_Switcher" name="store_switcher" before="-"></block> + <block type="Mage_Backend_Block_Store_Switcher" name="store_switcher" before="-"></block> <block type="Mage_Adminhtml_Block_Catalog_Product_Edit_Tabs" name="product_tabs"></block> </reference> <reference name="js"> @@ -276,7 +276,7 @@ Layout handle for configurable products <adminhtml_catalog_product_action_attribute_edit> <reference name="left"> - <block type="Mage_Adminhtml_Block_Store_Switcher" name="store_switcher" template="store/switcher.phtml" /> + <block type="Mage_Backend_Block_Store_Switcher" name="store_switcher" template="store/switcher.phtml" /> <block type="Mage_Adminhtml_Block_Catalog_Product_Edit_Action_Attribute_Tabs" name="attributes_tabs"> <block type="Mage_Adminhtml_Block_Catalog_Product_Edit_Action_Attribute_Tab_Attributes" name="tab_attributes"/> <block type="Mage_Adminhtml_Block_Catalog_Product_Edit_Action_Attribute_Tab_Inventory" name="tab_inventory" template="catalog/product/edit/action/inventory.phtml" /> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/category/edit/form.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/category/edit/form.phtml index c3f11437f27fa33d6e880fae3e0f1aa52b938a59..10df18a74ae7ed4e0986d403cbfe9b02b932e514 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/category/edit/form.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/category/edit/form.phtml @@ -43,7 +43,7 @@ <?php echo Mage::helper('Mage_Catalog_Helper_Data')->__('Set root category for this store in the <a href="%s">configuration</a>', $this->getStoreConfigurationUrl()) ?> </div> <?php endif; ?> -<iframe name="iframeSave" style="display:none; width:100%;" src="<?php echo $this->getSkinUrl('blank.html') ?>"></iframe> +<iframe name="iframeSave" style="display:none; width:100%;" src="<?php echo $this->getViewFileUrl('blank.html') ?>"></iframe> <form target="iframeSave" id="category_edit_form" action="<?php echo $this->getSaveUrl() ?>" method="post" enctype="multipart/form-data"> <div class="no-display"> <input type="hidden" name="isIframe" value="1" /> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/composite/configure.js b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/composite/configure.js index 9491b2e0ee00ea419ca7d5f67fbfd209c6e5c0e9..3c8503cce6f757764baa829f2a60b9c46ef22a72 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/composite/configure.js +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/composite/configure.js @@ -760,6 +760,6 @@ ProductConfigure.prototype = { } }; -Event.observe(window, 'load', function() { +jQuery(document).ready(function(){ productConfigure = new ProductConfigure(); }); diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/helper/gallery.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/helper/gallery.phtml index 80b647f2fa4f95c5eedcb4fcc954241b947f6f3e..e73af27caab01ffa74385c18412315a87e198505 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/helper/gallery.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/helper/gallery.phtml @@ -67,7 +67,7 @@ $_block = $this; </thead> <tbody id="<?php echo $_block->getHtmlId() ?>_list"> <tr id="<?php echo $_block->getHtmlId() ?>_template" class="template no-display"> - <td class="cell-image"><div class="place-holder" onmouseover="<?php echo $_block->getJsObjectName(); ?>.loadImage('__file__')"><span><?php echo Mage::helper('Mage_Catalog_Helper_Data')->__('Roll Over for preview') ?></span></div><img src="<?php echo $this->getSkinUrl('images/spacer.gif')?>" width="100" style="display:none;" alt="" /></td> + <td class="cell-image"><div class="place-holder" onmouseover="<?php echo $_block->getJsObjectName(); ?>.loadImage('__file__')"><span><?php echo Mage::helper('Mage_Catalog_Helper_Data')->__('Roll Over for preview') ?></span></div><img src="<?php echo $this->getViewFileUrl('images/spacer.gif')?>" width="100" style="display:none;" alt="" /></td> <td class="cell-label"><input type="text" <?php if($_block->getElement()->getReadonly()):?> disabled="disabled"<?php endif;?> class="input-text" onkeyup="<?php echo $_block->getJsObjectName(); ?>.updateImage('__file__')" onchange="<?php echo $_block->getJsObjectName(); ?>.updateImage('__file__')" /></td> <td class="cell-position"><input type="text" <?php if($_block->getElement()->getReadonly()):?> disabled="disabled"<?php endif;?> class="input-text validate-number" onkeyup="<?php echo $_block->getJsObjectName(); ?>.updateImage('__file__')" onchange="<?php echo $_block->getJsObjectName(); ?>.updateImage('__file__')" /></td> <?php foreach ($_block->getImageTypes() as $typeId=>$type): ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/tab/inventory.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/tab/inventory.phtml index b9f88069b80a07efecec12d716a4c09d651723f6..142cc1be5118701093ef477d1356375777e9b1f6 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/tab/inventory.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/tab/inventory.phtml @@ -49,7 +49,9 @@ <input type="checkbox" id="inventory_use_config_manage_stock" name="<?php echo $this->getFieldSuffix() ?>[stock_data][use_config_manage_stock]" value="1" <?php echo $_checked ?> onclick="toggleValueElements(this, this.parentNode);" class="checkbox" <?php echo $_readonly;?>/> <label for="inventory_use_config_manage_stock" class="normal"><?php echo Mage::helper('Mage_Catalog_Helper_Data')->__('Use Config Settings') ?></label> <?php if (!$this->isReadonly()):?><script type="text/javascript">toggleValueElements($('inventory_use_config_manage_stock'), $('inventory_use_config_manage_stock').parentNode);</script><?php endif; ?></td> + <?php if (!Mage::app()->isSingleStoreMode()): ?> <td class="value scope-label"><?php echo Mage::helper('Mage_Adminhtml_Helper_Data')->__('[GLOBAL]') ?></td> + <?php endif; ?> </tr> <?php if(!$this->getProduct()->isComposite()): ?> @@ -61,7 +63,9 @@ <?php endif;?> <input type="text" class="input-text required-entry validate-number" id="inventory_qty" name="<?php echo $this->getFieldSuffix() ?>[stock_data][qty]" value="<?php echo $this->getFieldValue('qty')*1 ?>" <?php echo $_readonly;?>/> </td> + <?php if (!Mage::app()->isSingleStoreMode()): ?> <td class="value scope-label"><?php echo Mage::helper('Mage_Adminhtml_Helper_Data')->__('[GLOBAL]') ?></td> + <?php endif; ?> </tr> <tr> @@ -72,7 +76,9 @@ <input type="checkbox" id="inventory_use_config_min_qty" name="<?php echo $this->getFieldSuffix() ?>[stock_data][use_config_min_qty]" value="1" <?php echo $_checked ?> onclick="toggleValueElements(this, this.parentNode);" <?php echo $_readonly;?> /> <label for="inventory_use_config_min_qty" class="normal"><?php echo Mage::helper('Mage_Catalog_Helper_Data')->__('Use Config Settings') ?></label> <?php if (!$this->isReadonly()):?><script type="text/javascript">toggleValueElements($('inventory_use_config_min_qty'), $('inventory_use_config_min_qty').parentNode);</script><?php endif; ?></td> + <?php if (!Mage::app()->isSingleStoreMode()): ?> <td class="value scope-label"><?php echo Mage::helper('Mage_Adminhtml_Helper_Data')->__('[GLOBAL]') ?></td> + <?php endif; ?> </tr> <tr> @@ -83,7 +89,9 @@ <input type="checkbox" id="inventory_use_config_min_sale_qty" name="<?php echo $this->getFieldSuffix() ?>[stock_data][use_config_min_sale_qty]" value="1" <?php echo $_checked ?> onclick="toggleValueElements(this, this.parentNode);" class="checkbox" <?php echo $_readonly;?> /> <label for="inventory_use_config_min_sale_qty" class="normal"><?php echo Mage::helper('Mage_Catalog_Helper_Data')->__('Use Config Settings') ?></label> <?php if (!$this->isReadonly()):?><script type="text/javascript">toggleValueElements($('inventory_use_config_min_sale_qty'), $('inventory_use_config_min_sale_qty').parentNode);</script><?php endif; ?></td> + <?php if (!Mage::app()->isSingleStoreMode()): ?> <td class="value scope-label"><?php echo Mage::helper('Mage_Adminhtml_Helper_Data')->__('[GLOBAL]') ?></td> + <?php endif; ?> </tr> <tr> @@ -94,7 +102,9 @@ <input type="checkbox" id="inventory_use_config_max_sale_qty" name="<?php echo $this->getFieldSuffix() ?>[stock_data][use_config_max_sale_qty]" value="1" <?php echo $_checked ?> onclick="toggleValueElements(this, this.parentNode);" class="checkbox" <?php echo $_readonly;?> /> <label for="inventory_use_config_max_sale_qty" class="normal"><?php echo Mage::helper('Mage_Catalog_Helper_Data')->__('Use Config Settings') ?></label> <?php if (!$this->isReadonly()):?><script type="text/javascript">toggleValueElements($('inventory_use_config_max_sale_qty'), $('inventory_use_config_max_sale_qty').parentNode);</script><?php endif; ?></td> + <?php if (!Mage::app()->isSingleStoreMode()): ?> <td class="value scope-label"><?php echo Mage::helper('Mage_Adminhtml_Helper_Data')->__('[GLOBAL]') ?></td> + <?php endif; ?> </tr> <?php if($this->canUseQtyDecimals()): ?> @@ -105,7 +115,9 @@ <option value="1"<?php if($this->getFieldValue('is_qty_decimal')==1): ?> selected="selected"<?php endif; ?>><?php echo Mage::helper('Mage_Catalog_Helper_Data')->__('Yes') ?></option> </select> </td> + <?php if (!Mage::app()->isSingleStoreMode()): ?> <td class="value scope-label"><?php echo Mage::helper('Mage_Adminhtml_Helper_Data')->__('[GLOBAL]') ?></td> + <?php endif; ?> </tr> <?php if (!$this->isVirtual()) : ?> @@ -116,7 +128,9 @@ <option value="1"<?php if($this->getFieldValue('is_decimal_divided') == 1): ?> selected="selected"<?php endif; ?>><?php echo Mage::helper('Mage_Catalog_Helper_Data')->__('Yes') ?></option> </select> </td> + <?php if (!Mage::app()->isSingleStoreMode()): ?> <td class="value scope-label"><?php echo Mage::helper('Mage_Adminhtml_Helper_Data')->__('[GLOBAL]') ?></td> + <?php endif; ?> </tr> <?php endif; ?> @@ -135,7 +149,9 @@ <input type="checkbox" id="inventory_use_config_backorders" name="<?php echo $this->getFieldSuffix() ?>[stock_data][use_config_backorders]" value="1" <?php echo $_checked ?> onclick="toggleValueElements(this, this.parentNode);" class="checkbox" <?php echo $_readonly;?> /> <label for="inventory_use_config_backorders" class="normal"><?php echo Mage::helper('Mage_Catalog_Helper_Data')->__('Use Config Settings') ?></label> <?php if (!$this->isReadonly()):?><script type="text/javascript">toggleValueElements($('inventory_use_config_backorders'), $('inventory_use_config_backorders').parentNode);</script><?php endif; ?></td> + <?php if (!Mage::app()->isSingleStoreMode()): ?> <td class="value scope-label"><?php echo Mage::helper('Mage_Adminhtml_Helper_Data')->__('[GLOBAL]') ?></td> + <?php endif; ?> </tr> <tr> <td class="label"><label for="inventory_notify_stock_qty"><?php echo Mage::helper('Mage_Catalog_Helper_Data')->__('Notify for Quantity Below') ?></label></td> @@ -145,7 +161,9 @@ <input type="checkbox" id="inventory_use_config_notify_stock_qty" name="<?php echo $this->getFieldSuffix() ?>[stock_data][use_config_notify_stock_qty]" value="1" <?php echo $_checked ?> onclick="toggleValueElements(this, this.parentNode);" class="checkbox" <?php echo $_readonly;?>/> <label for="inventory_use_config_notify_stock_qty" class="normal"><?php echo Mage::helper('Mage_Catalog_Helper_Data')->__('Use Config Settings') ?></label> <?php if (!$this->isReadonly()):?><script type="text/javascript">toggleValueElements($('inventory_use_config_notify_stock_qty'), $('inventory_use_config_notify_stock_qty').parentNode);</script><?php endif; ?></td> + <?php if (!Mage::app()->isSingleStoreMode()): ?> <td class="value scope-label"><?php echo Mage::helper('Mage_Adminhtml_Helper_Data')->__('[GLOBAL]') ?></td> + <?php endif; ?> </tr> <?php endif; ?> <tr> @@ -160,7 +178,9 @@ <input type="checkbox" id="inventory_use_config_enable_qty_increments" name="<?php echo $this->getFieldSuffix() ?>[stock_data][use_config_enable_qty_increments]" value="1" <?php echo $_checked ?> onclick="toggleValueElements(this, this.parentNode);" class="checkbox" <?php echo $_readonly;?>/> <label for="inventory_use_config_enable_qty_increments" class="normal"><?php echo Mage::helper('Mage_Catalog_Helper_Data')->__('Use Config Settings') ?></label> <?php if (!$this->isReadonly()):?><script type="text/javascript">toggleValueElements($('inventory_use_config_enable_qty_increments'), $('inventory_use_config_enable_qty_increments').parentNode);</script><?php endif; ?></td> + <?php if (!Mage::app()->isSingleStoreMode()): ?> <td class="value scope-label"><?php echo Mage::helper('Mage_Adminhtml_Helper_Data')->__('[GLOBAL]') ?></td> + <?php endif; ?> </tr> <tr> <td class="label"><label for="inventory_qty_increments"><?php echo Mage::helper('Mage_Catalog_Helper_Data')->__('Qty Increments') ?></label></td> @@ -170,7 +190,9 @@ <input type="checkbox" id="inventory_use_config_qty_increments" name="<?php echo $this->getFieldSuffix() ?>[stock_data][use_config_qty_increments]" value="1" <?php echo $_checked ?> onclick="toggleValueElements(this, this.parentNode);" class="checkbox" <?php echo $_readonly;?>/> <label for="inventory_use_config_qty_increments" class="normal"><?php echo Mage::helper('Mage_Catalog_Helper_Data')->__('Use Config Settings') ?></label> <?php if (!$this->isReadonly()):?><script type="text/javascript">toggleValueElements($('inventory_use_config_qty_increments'), $('inventory_use_config_qty_increments').parentNode);</script><?php endif; ?></td> + <?php if (!Mage::app()->isSingleStoreMode()): ?> <td class="value scope-label"><?php echo Mage::helper('Mage_Adminhtml_Helper_Data')->__('[GLOBAL]') ?></td> + <?php endif; ?> </tr> <tr> <td class="label"><label for="inventory_stock_availability"><?php echo Mage::helper('Mage_Catalog_Helper_Data')->__('Stock Availability') ?></label></td> @@ -181,7 +203,9 @@ <?php endforeach; ?> </select> </td> + <?php if (!Mage::app()->isSingleStoreMode()): ?> <td class="value scope-label"><?php echo Mage::helper('Mage_Adminhtml_Helper_Data')->__('[GLOBAL]') ?></td> + <?php endif; ?> </tr> </table> </fieldset> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/cms/browser/content/uploader.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/cms/browser/content/uploader.phtml index 8d08c857c61022294b0417c4f9df6431af63827d..40bcf66793778ae1565243da465a8d40fd0673ec 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/cms/browser/content/uploader.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/cms/browser/content/uploader.phtml @@ -61,7 +61,7 @@ }, sequentialUploads: true, acceptFileTypes: /(\.|\/)(gif|jpe?g|png)$/i, - maxFileSize: <?php echo $this->getDataMaxSizeInBytes() ?>, + maxFileSize: <?php echo Mage::helper('Mage_Core_Helper_File_Storage')->getMaxFileSize(); ?>, add: function(e, data) { $.each(data.files, function (index, file) { data.fileId = Math.random().toString(36).substr(2,9); @@ -104,7 +104,7 @@ { action: 'load', fileTypes: /^image\/(gif|jpeg|png)$/, - maxFileSize: <?php echo $this->getDataMaxSizeInBytes() ?> * 10 + maxFileSize: <?php echo Mage::helper('Mage_Core_Helper_File_Storage')->getMaxFileSize() ?> * 10 }, { action: 'resize', diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/customer/tab/addresses.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/customer/tab/addresses.phtml index 1510ac7b1625a0bc2bb173f5f2f1c2adf27295c4..58e2ef844e2fe2d58158049e706c01da9162d05b 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/customer/tab/addresses.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/customer/tab/addresses.phtml @@ -39,10 +39,10 @@ <li id="address_item_<?php echo $_address->getId() ?>"> <?php if (!$this->isReadonly()): ?> <a href="#" class="btn-remove-address"> - <img src="<?php echo $this->getSkinUrl('images/cancel_icon.gif') ?>" alt="Remove address" id="delete_button<?php echo ++$_iterator ?>" /> + <img src="<?php echo $this->getViewFileUrl('images/cancel_icon.gif') ?>" alt="Remove address" id="delete_button<?php echo ++$_iterator ?>" /> </a> <a href="#" id="select_button_<?php echo $_address->getId() ?>" class="select_button btn-edit-address"> - <img src="<?php echo $this->getSkinUrl('images/edit_icon.gif') ?>" alt="Edit address"/> + <img src="<?php echo $this->getViewFileUrl('images/edit_icon.gif') ?>" alt="Edit address"/> </a> <?php endif;?> <address> @@ -69,10 +69,10 @@ <div id="address_item_template" class="no-display template"> <?php if (!$this->isReadonly()): ?> <a href="#" class="btn-remove-address"> - <img src="<?php echo $this->getSkinUrl('images/cancel_icon.gif') ?>" alt="Remove address" id="delete_button<?php echo ++$_iterator ?>" /> + <img src="<?php echo $this->getViewFileUrl('images/cancel_icon.gif') ?>" alt="Remove address" id="delete_button<?php echo ++$_iterator ?>" /> </a> <a href="#" id="select_button_" class="select_button btn-edit-address"> - <img src="<?php echo $this->getSkinUrl('images/edit_icon.gif') ?>" alt="Edit address"/> + <img src="<?php echo $this->getViewFileUrl('images/edit_icon.gif') ?>" alt="Edit address"/> </a> <?php endif;?> <address><?php echo Mage::helper('Mage_Customer_Helper_Data')->__('New Customer Address') ?></address> @@ -224,10 +224,6 @@ addressesModel.prototype = { $('_item'+this.itemCount+'firstname').value = $('_accountfirstname').value; $('_item'+this.itemCount+'lastname').value = $('_accountlastname').value; - if ($('_accountwebsite_id').value !== '' && undefined !== this.defaultCountries[$('_accountwebsite_id').value]) { - $('_item'+this.itemCount+'country_id').value = this.defaultCountries[$('_accountwebsite_id').value]; - } - Element.hide(newForm); var template = '<li id="' + this.baseItemId+this.itemCount + '">'; deleteButtonId ++; @@ -246,6 +242,13 @@ addressesModel.prototype = { this.setActiveItem(newItem); this.bindCountryRegionRelation(newForm.id); + if ($('_accountwebsite_id').value !== '' + && undefined !== this.defaultCountries[$('_accountwebsite_id').value] + ) { + $('_item' + this.itemCount + 'country_id').value = this.defaultCountries[$('_accountwebsite_id').value]; + fireEvent($('_item' + this.itemCount + 'country_id'), 'change'); + } + if( $('_item'+this.itemCount+'firstname').value ) this.syncFormData($('_item'+this.itemCount+'firstname')); if( $('_item'+this.itemCount+'lastname').value ) this.syncFormData($('_item'+this.itemCount+'lastname')); } diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/dashboard/graph.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/dashboard/graph.phtml index aac9ce29fec4b19d97fe5b1226c7ae0cc2af3135..79888c0ebc8fbf3a3e452aeddb78b0ff26a09636 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/dashboard/graph.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/dashboard/graph.phtml @@ -27,7 +27,7 @@ ?> <div style="width:587px;margin:20px;position:relative;margin-left:-294px;left:50%"> <div style="position:absolute;right:1px;top:0px;left: expression(parentNode.offsetWidth - offsetWidth - 1 + 'px');"> - <div style="padding:5px;height:15px;width:15px;background-color:#F4F4F4" id="dashboard_<?php echo $this->getHtmlId() ?>_cal_div"><img src="<?php echo Mage::getDesign()->getSkinUrl('images/grid-cal.gif') ?>" onclick="toggleCal('<?php echo $this->getHtmlId() ?>')" /></div> + <div style="padding:5px;height:15px;width:15px;background-color:#F4F4F4" id="dashboard_<?php echo $this->getHtmlId() ?>_cal_div"><img src="<?php echo Mage::getDesign()->getViewFileUrl('images/grid-cal.gif') ?>" onclick="toggleCal('<?php echo $this->getHtmlId() ?>')" /></div> <div style="padding:5px;display:none;width:200px;" id="dashboard_<?php echo $this->getHtmlId() ?>_range_div" class="switcher"> <?php echo $this->__('Select Range') ?>: <select name="period" id="order_<?php echo $this->getHtmlId() ?>_period" onchange="changePeriod(this)"> @@ -36,7 +36,7 @@ <option value="<?php echo $_value ?>" <?php if($this->getRequest()->getParam('period')==$_value): ?> selected<?php endif; ?>><?php echo $_label ?></option> <?php endforeach; ?> </select> - <img src="<?php echo Mage::getDesign()->getSkinUrl('images/dashboard-close.gif') ?>" onclick="toggleCal('<?php echo $this->getHtmlId() ?>')" /> + <img src="<?php echo Mage::getDesign()->getViewFileUrl('images/dashboard-close.gif') ?>" onclick="toggleCal('<?php echo $this->getHtmlId() ?>')" /> </div> </div> <?php if($this->getCount()): ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/media/uploader.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/media/uploader.phtml index 186069b939fd14f3ff591cc5512b9abc3a1f42d5..81d87b8af48caa76462ad419f2fb35352596c346 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/media/uploader.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/media/uploader.phtml @@ -55,7 +55,7 @@ dataType: 'json', sequentialUploads: true, acceptFileTypes: /(\.|\/)(gif|jpe?g|png)$/i, - maxFileSize: <?php echo $this->getDataMaxSizeInBytes() ?>, + maxFileSize: <?php echo Mage::helper('Mage_Core_Helper_File_Storage')->getMaxFileSize() ?>, add: function(e, data) { $.each(data.files, function (index, file) { data.fileId = Math.random().toString(36).substr(2,9); @@ -97,7 +97,7 @@ { action: 'load', fileTypes: /^image\/(gif|jpeg|png)$/, - maxFileSize: <?php echo $this->getDataMaxSizeInBytes() ?> * 10 + maxFileSize: <?php echo Mage::helper('Mage_Core_Helper_File_Storage')->getMaxFileSize() ?> * 10 }, { action: 'resize', diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/newsletter.xml b/app/code/core/Mage/Adminhtml/view/adminhtml/newsletter.xml index d2754e32cff27b8f6a013a4817ceb8fa17513578..8511b6e142af68050668a26f9f6658399628b439 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/newsletter.xml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/newsletter.xml @@ -56,7 +56,7 @@ <reference name="root"> <action method="setTemplate"><template>newsletter/preview/iframeswitcher.phtml</template></action> <block type="Mage_Adminhtml_Block_Newsletter_Queue_Preview_Form" name="preview_form" /> - <block type="Mage_Adminhtml_Block_Store_Switcher" name="store_switcher" template="newsletter/preview/store.phtml" /> + <block type="Mage_Backend_Block_Store_Switcher" name="store_switcher" template="Mage_Adminhtml::newsletter/preview/store.phtml" /> </reference> </adminhtml_newsletter_queue_preview> @@ -64,7 +64,7 @@ <reference name="root"> <action method="setTemplate"><template>newsletter/preview/iframeswitcher.phtml</template></action> <block type="Mage_Adminhtml_Block_Newsletter_Template_Preview_Form" name="preview_form" /> - <block type="Mage_Adminhtml_Block_Store_Switcher" name="store_switcher" template="newsletter/preview/store.phtml" /> + <block type="Mage_Backend_Block_Store_Switcher" name="store_switcher" template="Mage_Adminhtml::newsletter/preview/store.phtml" /> </reference> </adminhtml_newsletter_template_preview> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/newsletter/preview/iframeswitcher.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/newsletter/preview/iframeswitcher.phtml index f9182aff4331c07ffe2b2b5f476e96496704037e..ad67118918e3d8e9c7aa4f43d89ff490d3ad7bda 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/newsletter/preview/iframeswitcher.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/newsletter/preview/iframeswitcher.phtml @@ -49,7 +49,7 @@ <?php echo $this->getChildHtml('preview_form'); ?> </div> <div id="loading-mask" style="display:none"> - <p class="loader" id="loading_mask_loader"><img src="<?php echo $this->getSkinUrl('images/ajax-loader-tr.gif') ?>" alt="<?php echo Mage::helper('Mage_Adminhtml_Helper_Data')->__('Loading...') ?>"/><br/><?php echo Mage::helper('Mage_Adminhtml_Helper_Data')->__('Please wait...') ?></p> + <p class="loader" id="loading_mask_loader"><img src="<?php echo $this->getViewFileUrl('images/ajax-loader-tr.gif') ?>" alt="<?php echo Mage::helper('Mage_Adminhtml_Helper_Data')->__('Loading...') ?>"/><br/><?php echo Mage::helper('Mage_Adminhtml_Helper_Data')->__('Please wait...') ?></p> </div> <script type="text/javascript"> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/page/footer.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/page/footer.phtml index 5a828b19d82c10650c1a2d6516759920ba68badc..754b8ba9cd19200fb39d71036eebd9558a753e2c 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/page/footer.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/page/footer.phtml @@ -30,7 +30,7 @@ </p> <p class="legality"> <a href="http://www.magentocommerce.com" id="footer_connect"><?php echo $this->__('Connect with the Magento Community') ?></a><br/> - <img src="<?php echo $this->getSkinUrl('images/varien_logo.gif') ?>" class="v-middle" alt="" /> + <img src="<?php echo $this->getViewFileUrl('images/varien_logo.gif') ?>" class="v-middle" alt="" /> <?php echo $this->__('Magento™ is a trademark of Magento Inc.<br/>Copyright © %s Magento Inc.', date('Y')) ?> </p> <?php echo $this->__('Magento ver. %s', Mage::getVersion()) ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/page/head.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/page/head.phtml index 4f1bc8bec20be733fd3de4b943f25e9de921fbf5..58bd3c7cdd549470591070627c184dbbae36a7ac 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/page/head.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/page/head.phtml @@ -26,12 +26,12 @@ ?> <meta http-equiv="Content-Type" content="<?php echo $this->getContentType() ?>"/> <title><?php echo htmlspecialchars(html_entity_decode($this->getTitle())) ?></title> -<link rel="icon" href="<?php echo $this->getSkinUrl('Mage_Page::favicon.ico') ?>" type="image/x-icon"/> -<link rel="shortcut icon" href="<?php echo $this->getSkinUrl('Mage_Page::favicon.ico') ?>" type="image/x-icon"/> +<link rel="icon" href="<?php echo $this->getViewFileUrl('Mage_Page::favicon.ico') ?>" type="image/x-icon"/> +<link rel="shortcut icon" href="<?php echo $this->getViewFileUrl('Mage_Page::favicon.ico') ?>" type="image/x-icon"/> <script type="text/javascript"> - var BLANK_URL = '<?php echo $this->getSkinUrl('blank.html') ?>'; - var BLANK_IMG = '<?php echo $this->getSkinUrl('spacer.gif') ?>'; + var BLANK_URL = '<?php echo $this->getViewFileUrl('blank.html') ?>'; + var BLANK_IMG = '<?php echo $this->getViewFileUrl('spacer.gif') ?>'; var BASE_URL = '<?php echo $this->getUrl('*') ?>'; var FORM_KEY = '<?php echo $this->getFormKey() ?>'; </script> @@ -47,7 +47,7 @@ <?php endif; ?> <?php if($this->getCanLoadTinyMce()): // TinyMCE is broken when loaded through index.php ?> -<script type="text/javascript" src="<?php echo $this->getSkinUrl('tiny_mce/tiny_mce.js') ?>"></script> +<script type="text/javascript" src="<?php echo $this->getViewFileUrl('tiny_mce/tiny_mce.js') ?>"></script> <?php endif; ?> <script type="text/javascript"> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/page/header.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/page/header.phtml index 274173a15c554c8be9165b33b025a33432f41c6b..626c3fbd2dc2f2b11ff499be8258fdbd3229fd5e 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/page/header.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/page/header.phtml @@ -27,7 +27,7 @@ /** @var $this Mage_Adminhtml_Block_Page_Header */ ?> <div class="header-top"> - <a href="<?php echo $this->getHomeLink() ?>"><img src="<?php echo $this->getSkinUrl('images/logo.gif') ?>" alt="<?php echo $this->__('Magento Logo') ?>" class="logo"/></a> + <a href="<?php echo $this->getHomeLink() ?>"><img src="<?php echo $this->getViewFileUrl('images/logo.gif') ?>" alt="<?php echo $this->__('Magento Logo') ?>" class="logo"/></a> <div class="header-right"> <p class="super"> <?php echo $this->__("Logged in as %s", $this->escapeHtml($this->getUser()->getUsername())) ?><span class="separator">|</span><?php echo $this->formatDate(null, 'full') ?><span class="separator">|</span><a href="http://golinks.magento.com/CE15" onclick="this.target='_blank'" class="go-try"><?php echo $this->__('Try Magento Go for Free') ?></a><span class="separator">|</span><a href="<?php echo $this->getLogoutLink() ?>" class="link-logout"><?php echo $this->__('Log Out') ?></a> @@ -36,7 +36,7 @@ <fieldset> <legend>Search</legend> <span id="global_search_indicator" class="autocomplete-indicator" style="display: none"> - <img src="<?php echo $this->getSkinUrl('images/ajax-loader.gif') ?>" alt="<?php echo $this->__('Loading...') ?>" class="v-middle"/> + <img src="<?php echo $this->getViewFileUrl('images/ajax-loader.gif') ?>" alt="<?php echo $this->__('Loading...') ?>" class="v-middle"/> </span> <?php $defSearch = $this->__('Global Record Search') ?> <input id="global_search" name="query" type="text" class="input-text" value="<?php if(!empty($query)): ?><?php echo $query ?><?php else: ?><?php echo $defSearch ?><?php endif ?>" onfocus="if(this.value=='<?php echo $defSearch ?>')this.value=''; " onblur="if(this.value=='')this.value='<?php echo $defSearch ?>';" /> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/report.xml b/app/code/core/Mage/Adminhtml/view/adminhtml/report.xml index d8ead1037286aa24a417e7f86c55df801835fcaf..e61447ae08988446685bc4ad158cbc123ec81f76 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/report.xml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/report.xml @@ -40,7 +40,7 @@ </reference> <reference name="content"> <block type="Mage_Adminhtml_Block_Report_Product_Viewed" template="report/grid/container.phtml" name="product.report.grid.container"> - <block type="Mage_Adminhtml_Block_Store_Switcher" template="report/store/switcher/enhanced.phtml" name="store.switcher"> + <block type="Mage_Backend_Block_Store_Switcher" template="Mage_Adminhtml::report/store/switcher/enhanced.phtml" name="store.switcher"> <action method="setStoreVarName"><var_name>store_ids</var_name></action> </block> <block type="Mage_Adminhtml_Block_Report_Filter_Form" name="grid.filter.form"> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/report/grid.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/report/grid.phtml index 2e51a119223b7d8c22cf7d91b0df0c12f5fe85e4..1ebb28ef94aad3f14f03606dc570f944d81ead49 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/report/grid.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/report/grid.phtml @@ -74,7 +74,7 @@ $numColumns = sizeof($this->getColumns()); (function( $ ) { $("#<?php echo $this->getSuffixId('period_date_range') ?>").dateRange({ dateFormat: "<?php echo $this->getDateFormat() ?>", - buttonImage: "<?php echo $this->getSkinUrl('images/grid-cal.gif') ?>", + buttonImage: "<?php echo $this->getViewFileUrl('images/grid-cal.gif') ?>", buttonText: "<?php echo $this->__('Select Date') ?>", from: { id: "<?php echo $this->getSuffixId('period_date_from')?>" @@ -89,7 +89,7 @@ $numColumns = sizeof($this->getColumns()); <?php endif; ?> <?php if($this->getExportVisibility()): ?> <td class="a-right"> - <img src="<?php echo $this->getSkinUrl('images/icon_export.gif') ?>" alt="" class="v-middle"/> <?php echo $this->__('Export to:') ?> + <img src="<?php echo $this->getViewFileUrl('images/icon_export.gif') ?>" alt="" class="v-middle"/> <?php echo $this->__('Export to:') ?> <select name="<?php echo $this->getSuffixId('export')?>" id="<?php echo $this->getSuffixId('export')?>" style="width:8em;"> <?php foreach ($this->getExportTypes() as $_type): ?> <option value="<?php echo $_type->getUrl() ?>"><?php echo $_type->getLabel() ?></option> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/report/store/switcher.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/report/store/switcher.phtml index 08ea6a430fbc33382d821086edfd6d149f97bfc1..99d832b2c4e237519cf5864bb0df643467db5169 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/report/store/switcher.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/report/store/switcher.phtml @@ -26,7 +26,7 @@ ?> <?php /** - * @see Mage_Adminhtml_Block_Store_Switcher + * @see Mage_Backend_Block_Store_Switcher */ ?> <?php if ($this->isShow()): ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/report/store/switcher/enhanced.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/report/store/switcher/enhanced.phtml index 05f9db477f537ef1e77cc1b2f0f568e7293dd053..f684870856b1bf03db21251449783ed2c62d5d08 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/report/store/switcher/enhanced.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/report/store/switcher/enhanced.phtml @@ -26,7 +26,7 @@ ?> <?php /** - * @see Mage_Adminhtml_Block_Store_Switcher + * @see Mage_Backend_Block_Store_Switcher */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/resetforgottenpassword.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/resetforgottenpassword.phtml index 54c0cc07b7da6afc9bcf9185d814753e96780794..0c9d3a06c987dab8ddac90b4d74dfc5b3192a390 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/resetforgottenpassword.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/resetforgottenpassword.phtml @@ -29,20 +29,20 @@ <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title><?php echo Mage::helper('Mage_Adminhtml_Helper_Data')->__('Reset a Password'); ?></title> - <link type="text/css" rel="stylesheet" href="<?php echo $this->getSkinUrl('reset.css'); ?>" media="all" /> - <link type="text/css" rel="stylesheet" href="<?php echo $this->getSkinUrl('boxes.css'); ?>" media="all" /> - <link rel="icon" href="<?php echo $this->getSkinUrl('Mage_Page::favicon.ico'); ?>" type="image/x-icon" /> - <link rel="shortcut icon" href="<?php echo $this->getSkinUrl('Mage_Page::favicon.ico'); ?>" type="image/x-icon" /> + <link type="text/css" rel="stylesheet" href="<?php echo $this->getViewFileUrl('reset.css'); ?>" media="all" /> + <link type="text/css" rel="stylesheet" href="<?php echo $this->getViewFileUrl('boxes.css'); ?>" media="all" /> + <link rel="icon" href="<?php echo $this->getViewFileUrl('Mage_Page::favicon.ico'); ?>" type="image/x-icon" /> + <link rel="shortcut icon" href="<?php echo $this->getViewFileUrl('Mage_Page::favicon.ico'); ?>" type="image/x-icon" /> - <script type="text/javascript" src="<?php echo $this->getSkinUrl('prototype/prototype.js'); ?>"></script> - <script type="text/javascript" src="<?php echo $this->getSkinUrl('prototype/validation.js'); ?>"></script> - <script type="text/javascript" src="<?php echo $this->getSkinUrl('mage/adminhtml/events.js'); ?>"></script> - <script type="text/javascript" src="<?php echo $this->getSkinUrl('mage/adminhtml/form.js'); ?>"></script> - <script type="text/javascript" src="<?php echo $this->getSkinUrl('scriptaculous/effects.js'); ?>"></script> + <script type="text/javascript" src="<?php echo $this->getViewFileUrl('prototype/prototype.js'); ?>"></script> + <script type="text/javascript" src="<?php echo $this->getViewFileUrl('prototype/validation.js'); ?>"></script> + <script type="text/javascript" src="<?php echo $this->getViewFileUrl('mage/adminhtml/events.js'); ?>"></script> + <script type="text/javascript" src="<?php echo $this->getViewFileUrl('mage/adminhtml/form.js'); ?>"></script> + <script type="text/javascript" src="<?php echo $this->getViewFileUrl('scriptaculous/effects.js'); ?>"></script> - <!--[if IE]> <link rel="stylesheet" href="<?php echo $this->getSkinUrl('iestyles.css'); ?>" type="text/css" media="all" /> <![endif]--> - <!--[if lt IE 7]> <link rel="stylesheet" href="<?php echo $this->getSkinUrl('below_ie7.css'); ?>" type="text/css" media="all" /> <![endif]--> - <!--[if IE 7]> <link rel="stylesheet" href="<?php echo $this->getSkinUrl('ie7.css'); ?>" type="text/css" media="all" /> <![endif]--> + <!--[if IE]> <link rel="stylesheet" href="<?php echo $this->getViewFileUrl('iestyles.css'); ?>" type="text/css" media="all" /> <![endif]--> + <!--[if lt IE 7]> <link rel="stylesheet" href="<?php echo $this->getViewFileUrl('below_ie7.css'); ?>" type="text/css" media="all" /> <![endif]--> + <!--[if IE 7]> <link rel="stylesheet" href="<?php echo $this->getViewFileUrl('ie7.css'); ?>" type="text/css" media="all" /> <![endif]--> </head> <body id="page-login"> <div class="login-container"> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales.xml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales.xml index a2b848af502d763bd56b7be7da2828949c635f30..bf652db3a59cb59569a5d63b5d596ffabe992e41 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales.xml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales.xml @@ -1029,7 +1029,7 @@ <update handle="report_sales"/> <reference name="content"> <block type="Mage_Adminhtml_Block_Report_Sales_Sales" template="report/grid/container.phtml" name="sales.report.grid.container"> - <block type="Mage_Adminhtml_Block_Store_Switcher" template="report/store/switcher/enhanced.phtml" name="store.switcher"> + <block type="Mage_Backend_Block_Store_Switcher" template="Mage_Adminhtml::report/store/switcher/enhanced.phtml" name="store.switcher"> <action method="setStoreVarName"><var_name>store_ids</var_name></action> </block> <block type="Mage_Sales_Block_Adminhtml_Report_Filter_Form_Order" name="grid.filter.form"> @@ -1055,7 +1055,7 @@ <update handle="report_sales"/> <reference name="content"> <block type="Mage_Adminhtml_Block_Report_Sales_Tax" template="report/grid/container.phtml" name="sales.report.grid.container"> - <block type="Mage_Adminhtml_Block_Store_Switcher" template="report/store/switcher/enhanced.phtml" name="store.switcher"> + <block type="Mage_Backend_Block_Store_Switcher" template="Mage_Adminhtml::report/store/switcher/enhanced.phtml" name="store.switcher"> <action method="setStoreVarName"><var_name>store_ids</var_name></action> </block> <block type="Mage_Sales_Block_Adminhtml_Report_Filter_Form" name="grid.filter.form"> @@ -1081,7 +1081,7 @@ <update handle="report_sales"/> <reference name="content"> <block type="Mage_Adminhtml_Block_Report_Sales_Shipping" template="report/grid/container.phtml" name="sales.report.grid.container"> - <block type="Mage_Adminhtml_Block_Store_Switcher" template="report/store/switcher/enhanced.phtml" name="store.switcher"> + <block type="Mage_Backend_Block_Store_Switcher" template="Mage_Adminhtml::report/store/switcher/enhanced.phtml" name="store.switcher"> <action method="setStoreVarName"><var_name>store_ids</var_name></action> </block> <block type="Mage_Sales_Block_Adminhtml_Report_Filter_Form" name="grid.filter.form"> @@ -1102,7 +1102,7 @@ <update handle="report_sales"/> <reference name="content"> <block type="Mage_Adminhtml_Block_Report_Sales_Invoiced" template="report/grid/container.phtml" name="sales.report.grid.container"> - <block type="Mage_Adminhtml_Block_Store_Switcher" template="report/store/switcher/enhanced.phtml" name="store.switcher"> + <block type="Mage_Backend_Block_Store_Switcher" template="Mage_Adminhtml::report/store/switcher/enhanced.phtml" name="store.switcher"> <action method="setStoreVarName"><var_name>store_ids</var_name></action> </block> <block type="Mage_Sales_Block_Adminhtml_Report_Filter_Form" name="grid.filter.form"> @@ -1123,7 +1123,7 @@ <update handle="report_sales"/> <reference name="content"> <block type="Mage_Adminhtml_Block_Report_Sales_Refunded" template="report/grid/container.phtml" name="sales.report.grid.container"> - <block type="Mage_Adminhtml_Block_Store_Switcher" template="report/store/switcher/enhanced.phtml" name="store.switcher"> + <block type="Mage_Backend_Block_Store_Switcher" template="Mage_Adminhtml::report/store/switcher/enhanced.phtml" name="store.switcher"> <action method="setStoreVarName"><var_name>store_ids</var_name></action> </block> <block type="Mage_Sales_Block_Adminhtml_Report_Filter_Form" name="grid.filter.form"> @@ -1144,7 +1144,7 @@ <update handle="report_sales"/> <reference name="content"> <block type="Mage_Adminhtml_Block_Report_Sales_Coupons" template="report/grid/container.phtml" name="sales.report.grid.container"> - <block type="Mage_Adminhtml_Block_Store_Switcher" template="report/store/switcher/enhanced.phtml" name="store.switcher"> + <block type="Mage_Backend_Block_Store_Switcher" template="Mage_Adminhtml::report/store/switcher/enhanced.phtml" name="store.switcher"> <action method="setStoreVarName"><var_name>store_ids</var_name></action> </block> <block type="Mage_Sales_Block_Adminhtml_Report_Filter_Form_Coupon" name="grid.filter.form"> @@ -1170,7 +1170,7 @@ <update handle="report_sales"/> <reference name="content"> <block type="Mage_Adminhtml_Block_Report_Sales_Bestsellers" template="report/grid/container.phtml" name="sales.report.grid.container"> - <block type="Mage_Adminhtml_Block_Store_Switcher" template="report/store/switcher/enhanced.phtml" name="store.switcher"> + <block type="Mage_Backend_Block_Store_Switcher" template="Mage_Adminhtml::report/store/switcher/enhanced.phtml" name="store.switcher"> <action method="setStoreVarName"><var_name>store_ids</var_name></action> </block> <block type="Mage_Sales_Block_Adminhtml_Report_Filter_Form" name="grid.filter.form"> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/comments/view.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/comments/view.phtml index 5abf4dd75b82935f8a7c49334d199f20ce6d1bf2..40e9da839fea9a425722a787afee103659ffd0bd 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/comments/view.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/comments/view.phtml @@ -49,7 +49,7 @@ <strong class="subdue"> <?php if ($_comment->getIsCustomerNotified()): ?> <?php echo $this->helper('Mage_Sales_Helper_Data')->__('Notified') ?> - <img src="<?php echo $this->getSkinUrl('images/ico_success.gif') ?>" width="16" height="16" alt="" /> + <img src="<?php echo $this->getViewFileUrl('images/ico_success.gif') ?>" width="16" height="16" alt="" /> <?php else: ?> <?php echo $this->helper('Mage_Sales_Helper_Data')->__('Not Notified') ?> <?php endif; ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/sidebar/items.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/sidebar/items.phtml index d524bb08db920da2efd5edeff81372c159dbbfa1..db74d6c45200ef8f69c833f9383cb228a5fe99ab 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/sidebar/items.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/sidebar/items.phtml @@ -29,7 +29,7 @@ <div class="head"> <h5><?php echo $this->getHeaderText() ?> <span class="normal">(<?php echo $this->getItemCount() ?>)</span></h5> <a href="#" title="<?php echo Mage::helper('Mage_Sales_Helper_Data')->__('Refresh') ?>" onclick="order.loadArea('sidebar_<?php echo $this->getDataId() ?>', 'sidebar_data_<?php echo $this->getDataId() ?>');return false;"> - <img src="<?php echo $this->getSkinUrl('images/fam_refresh.gif') ?>" alt="<?php echo Mage::helper('Mage_Sales_Helper_Data')->__('Refresh') ?>" width="16" height="16"/> + <img src="<?php echo $this->getViewFileUrl('images/fam_refresh.gif') ?>" alt="<?php echo Mage::helper('Mage_Sales_Helper_Data')->__('Refresh') ?>" width="16" height="16"/> </a> </div> <div class="content"> @@ -56,9 +56,9 @@ <th><?php echo Mage::helper('Mage_Sales_Helper_Data')->__('Price') ?></th> <?php endif; ?> <?php if($this->canRemoveItems()): ?> - <th class="a-center"><img src="<?php echo $this->getSkinUrl('images/fam_bin.gif') ?>" alt="<?php echo Mage::helper('Mage_Sales_Helper_Data')->__('Remove') ?>" title="<?php echo Mage::helper('Mage_Sales_Helper_Data')->__('Remove') ?>" width="16" height="16"/></th> + <th class="a-center"><img src="<?php echo $this->getViewFileUrl('images/fam_bin.gif') ?>" alt="<?php echo Mage::helper('Mage_Sales_Helper_Data')->__('Remove') ?>" title="<?php echo Mage::helper('Mage_Sales_Helper_Data')->__('Remove') ?>" width="16" height="16"/></th> <?php endif; ?> - <th class="a-center"><img src="<?php echo $this->getSkinUrl('images/fam_package_go.gif') ?>" alt="<?php echo Mage::helper('Mage_Sales_Helper_Data')->__('Add To Order') ?>" title="<?php echo Mage::helper('Mage_Sales_Helper_Data')->__('Add To Order') ?>" width="16" height="16"/></th> + <th class="a-center"><img src="<?php echo $this->getViewFileUrl('images/fam_package_go.gif') ?>" alt="<?php echo Mage::helper('Mage_Sales_Helper_Data')->__('Add To Order') ?>" title="<?php echo Mage::helper('Mage_Sales_Helper_Data')->__('Add To Order') ?>" width="16" height="16"/></th> </tr> <?php foreach ($this->getItems() as $_item): ?> <tr> @@ -78,9 +78,9 @@ <?php endif; ?> <td class="a-center"> <?php if ($_item->getTypeId() == Mage_Catalog_Model_Product_Type_Grouped::TYPE_CODE && $this->getDataId() == 'wishlist'): ?> - <a href="#" onclick="order.sidebarConfigureProduct('<?php echo 'sidebar_wishlist' ?>', <?php echo $this->getProductId($_item) ?>, <?php echo $this->getItemId($_item) ?>); return false;"><img src="<?php echo $this->getSkinUrl('images/grouped_to_order_icon.png') ?>" class="v-middle" alt="<?php echo Mage::helper('Mage_Sales_Helper_Data')->__('Configure and Add to Order') ?>" title="<?php echo Mage::helper('Mage_Sales_Helper_Data')->__('Configure and Add to Order') ?>" width="16" height="16"/></a> + <a href="#" onclick="order.sidebarConfigureProduct('<?php echo 'sidebar_wishlist' ?>', <?php echo $this->getProductId($_item) ?>, <?php echo $this->getItemId($_item) ?>); return false;"><img src="<?php echo $this->getViewFileUrl('images/grouped_to_order_icon.png') ?>" class="v-middle" alt="<?php echo Mage::helper('Mage_Sales_Helper_Data')->__('Configure and Add to Order') ?>" title="<?php echo Mage::helper('Mage_Sales_Helper_Data')->__('Configure and Add to Order') ?>" width="16" height="16"/></a> <?php elseif ($_item->getTypeId() == Mage_Catalog_Model_Product_Type_Grouped::TYPE_CODE): ?> - <a href="#" onclick="order.sidebarConfigureProduct('<?php echo 'sidebar' ?>', <?php echo $this->getProductId($_item) ?>); return false;"><img src="<?php echo $this->getSkinUrl('images/grouped_to_order_icon.png') ?>" class="v-middle" alt="<?php echo Mage::helper('Mage_Sales_Helper_Data')->__('Configure and Add to Order') ?>" title="<?php echo Mage::helper('Mage_Sales_Helper_Data')->__('Configure and Add to Order') ?>" width="16" height="16"/></a> + <a href="#" onclick="order.sidebarConfigureProduct('<?php echo 'sidebar' ?>', <?php echo $this->getProductId($_item) ?>); return false;"><img src="<?php echo $this->getViewFileUrl('images/grouped_to_order_icon.png') ?>" class="v-middle" alt="<?php echo Mage::helper('Mage_Sales_Helper_Data')->__('Configure and Add to Order') ?>" title="<?php echo Mage::helper('Mage_Sales_Helper_Data')->__('Configure and Add to Order') ?>" width="16" height="16"/></a> <?php else: ?> <input type="checkbox" name="sidebar[<?php echo $this->getSidebarStorageAction() ?>][<?php echo $this->getIdentifierId($_item) ?>]" value="<?php echo $this->canDisplayItemQty() ? $_item->getQty()*1 : 1 ?>" title="<?php echo Mage::helper('Mage_Sales_Helper_Data')->__('Add To Order') ?>"/> <?php endif; ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/view/history.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/view/history.phtml index f46dd2e20e62b7abb64dba98adb1f98757ed05ed..d04aad7b0af9025c85f884f2afbe1e5358d49754 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/view/history.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/view/history.phtml @@ -63,7 +63,7 @@ <?php echo $this->helper('Mage_Sales_Helper_Data')->__('Notification Not Applicable') ?> <?php elseif ($_item->getIsCustomerNotified()): ?> <?php echo $this->helper('Mage_Sales_Helper_Data')->__('Notified') ?> - <img src="<?php echo $this->getSkinUrl('images/ico_success.gif') ?>" width="16" height="16" alt="" /> + <img src="<?php echo $this->getViewFileUrl('images/ico_success.gif') ?>" width="16" height="16" alt="" /> <?php else: ?> <?php echo $this->helper('Mage_Sales_Helper_Data')->__('Not Notified') ?> <?php endif; ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/view/tab/history.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/view/tab/history.phtml index 46c5f57d2892ea1ba8991edc0db3f31f67907780..86bf1b72bb6cde69c3232e5e7cdd5c07bbcc264e 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/view/tab/history.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/view/tab/history.phtml @@ -39,7 +39,7 @@ <?php echo $this->helper('Mage_Sales_Helper_Data')->__('Notification Not Applicable') ?> <?php elseif ($this->isItemNotified($_item)): ?> <?php echo $this->helper('Mage_Sales_Helper_Data')->__('Notified') ?> - <img src="<?php echo $this->getSkinUrl('images/ico_success.gif') ?>" width="16px" height="16px" alt="" /> + <img src="<?php echo $this->getViewFileUrl('images/ico_success.gif') ?>" width="16px" height="16px" alt="" /> <?php else: ?> <?php echo $this->helper('Mage_Sales_Helper_Data')->__('Not Notified') ?> <?php endif; ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/system/convert/profile/process.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/system/convert/profile/process.phtml index 61527a1d8d266a5814c659997c8f955b018431e0..65b71df59b18f232bcf59727a2c1b5bab849b873 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/system/convert/profile/process.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/system/convert/profile/process.phtml @@ -35,14 +35,14 @@ <ul> <li> <?php if ($this->getProfile()->getId()):?> - <img src="<?php echo $this->getSkinUrl('Mage_Adminhtml::images/note_msg_icon.gif')?>" class="v-middle" style="margin-right:5px"/> + <img src="<?php echo $this->getViewFileUrl('Mage_Adminhtml::images/note_msg_icon.gif')?>" class="v-middle" style="margin-right:5px"/> <?php echo $this->__("Starting profile execution, please wait...");?> </li> <li style="background-color:#FFD;"> - <img src="<?php echo $this->getSkinUrl('Mage_Adminhtml::images/fam_bullet_error.gif');?>" class="v-middle" style="margin-right:5px"/> + <img src="<?php echo $this->getViewFileUrl('Mage_Adminhtml::images/fam_bullet_error.gif');?>" class="v-middle" style="margin-right:5px"/> <?php echo $this->__("Warning: Please do not close the window during importing/exporting data");?> <?php else:?> - <img src="<?php echo $this->getSkinUrl('Mage_Adminhtml::images/error_msg_icon.gif');?>" class="v-middle" style="margin-right:5px"/> + <img src="<?php echo $this->getViewFileUrl('Mage_Adminhtml::images/error_msg_icon.gif');?>" class="v-middle" style="margin-right:5px"/> <?php echo $this->__("No profile loaded...");?> <?php endif;?> </li> @@ -61,13 +61,13 @@ <?php endforeach;?> <?php if($this->getProfile()->getEntityType() == 'product' && $this->getProfile()->getDirection() == 'import'):?> <li id="liBeforeFinish" style="background-color:#FFD; display:none;"> - <img src="<?php echo $this->getSkinUrl('Mage_Adminhtml::images/fam_bullet_error.gif');?>" class="v-middle" style="margin-right:5px"/> + <img src="<?php echo $this->getViewFileUrl('Mage_Adminhtml::images/fam_bullet_error.gif');?>" class="v-middle" style="margin-right:5px"/> <?php echo $this->__("Please wait while the indexes are being refreshed.");?> - <img id="before-finish-wait-img" src="<?php echo $this->getSkinUrl('images/rule-ajax-loader.gif');?>" class="v-middle" style="margin-right:5px"/> + <img id="before-finish-wait-img" src="<?php echo $this->getViewFileUrl('images/rule-ajax-loader.gif');?>" class="v-middle" style="margin-right:5px"/> </li> <?php endif;?> <li id="liFinished" style="display:none;"> - <img src="<?php echo $this->getSkinUrl('Mage_Adminhtml::images/note_msg_icon.gif');?>" class="v-middle" style="margin-right:5px"/> + <img src="<?php echo $this->getViewFileUrl('Mage_Adminhtml::images/note_msg_icon.gif');?>" class="v-middle" style="margin-right:5px"/> <?php echo $this->__("Finished profile execution.");?> </li> </ul> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/system/convert/profile/run.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/system/convert/profile/run.phtml index a7cbf39e3b08230a9a6c528abd23bbfed25d6f90..c821661faa656c425811af07e72f04c65eb11fff 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/system/convert/profile/run.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/system/convert/profile/run.phtml @@ -83,4 +83,4 @@ function getTransferType() </div> <?php echo $this->getRunButtonHtml() ?><br/> -<iframe id="run_iframe" src="<?php echo $this->getSkinUrl('blank.html') ?>" frameborder=0 style="display:none; width:100%; height:400px;"></iframe> +<iframe id="run_iframe" src="<?php echo $this->getViewFileUrl('blank.html') ?>" frameborder=0 style="display:none; width:100%; height:400px;"></iframe> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/system/convert/profile/upload.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/system/convert/profile/upload.phtml index 986ab842fc7800e7953498ad0a6a616a698c9a2d..f70ff62988f9c0a8d23bf408ac240eff1f7ca327 100755 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/system/convert/profile/upload.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/system/convert/profile/upload.phtml @@ -24,12 +24,16 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> + +<?php +$fileHelper = Mage::helper('Mage_Core_Helper_File_Storage'); +?> <h4 class="icon-head head-edit-form fieldset-legend">Upload File</h4> <div id="messages"> <ul class="messages"> <li class="notice-msg"> <ul> - <li><?php echo $this->__('Your server PHP settings allow you to upload files not more than %s at a time. Please modify post_max_size (currently is %s) and upload_max_filesize (currently is %s) values in php.ini if you want to upload larger files.', $this->getDataMaxSize(), $this->getPostMaxSize(), $this->getUploadMaxSize())?></li> + <li><?php echo $this->__('Your server PHP settings allow you to upload files not more than %s at a time. Please modify post_max_size (currently is %s) and upload_max_filesize (currently is %s) values in php.ini if you want to upload larger files.', $fileHelper->getMaxFileSizeInMb(), $fileHelper->getPostMaxSize(), $fileHelper->getUploadMaxSize())?></li> </ul> </li> <li class="notice-msg"> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/system/convert/profile/wizard.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/system/convert/profile/wizard.phtml index 1dd684beda14891d079b9d2ee273a7707004f0f5..0592c849b81a7adb6f5172df2316eaae47d671f8 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/system/convert/profile/wizard.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/system/convert/profile/wizard.phtml @@ -525,7 +525,7 @@ Event.observe(window, 'load', function(){ (function( $ ) { $("#customer_filter_created_at_range").dateRange({ dateFormat: "<?php echo $this->getShortDateFormat() ?>", - buttonImage: "<?php echo $this->getSkinUrl('images/grid-cal.gif') ?>", + buttonImage: "<?php echo $this->getViewFileUrl('images/grid-cal.gif') ?>", buttonText: "<?php echo $this->__('Date selector') ?>", from: { id: "customer_filter_created_at_from" diff --git a/app/code/core/Mage/Admin/etc/config.xml b/app/code/core/Mage/Adminhtml/view/adminhtml/tax/importExportHeader.phtml similarity index 72% rename from app/code/core/Mage/Admin/etc/config.xml rename to app/code/core/Mage/Adminhtml/view/adminhtml/tax/importExportHeader.phtml index d1799bf75493a397adbe79c1f2c2d68129c70baa..e9d11b1413ffe45371dd24b4c03a194c1a6b6597 100644 --- a/app/code/core/Mage/Admin/etc/config.xml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/tax/importExportHeader.phtml @@ -1,5 +1,4 @@ -<?xml version="1.0"?> -<!-- +<?php /** * Magento * @@ -19,21 +18,16 @@ * 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_Admin + * @category design + * @package default_default * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ---> -<config> - <modules> - <Mage_Admin> - <version>1.6.1.0</version> - <active>true</active> - <codePool>core</codePool> - <depends> - <Mage_Core/> - </depends> - </Mage_Admin> - </modules> -</config> +?> +<div class="content-header"> + <table cellspacing="0"> + <tr> + <td><h3 class="icon-head head-tax-rate-importExport"><?php echo Mage::helper('Mage_Tax_Helper_Data')->__('Import/Export Tax Rates') ?></h3></td> + </tr> + </table> +</div> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/tax/rule/edit.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/tax/rule/edit.phtml index faa039ab60a543e0848035846b4f5b1acebd8fa7..7ca1c1735aca0eed1767059eaa92f4426bb9b1a2 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/tax/rule/edit.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/tax/rule/edit.phtml @@ -31,7 +31,8 @@ function toggleLoadingMask() { var loaderArea = $('#html-body .wrapper')[0], - loadingMask = $('#loading-mask'); + loadingMask = $('#loading-mask'), + flag = $('#loading-mask').is(':visible'); loadingMask.css({ top: 0, @@ -41,7 +42,7 @@ 'z-index':1005 }); loadingMask.toggle(); - toggleSelectsUnderBlock($('loading-mask'), false); + toggleSelectsUnderBlock($('loading-mask'), flag); } $.widget("adminhtml.dialogRates", $.ui.dialog, { @@ -90,6 +91,25 @@ this.settings = settings || {}; this.isEntityEditable = this.settings.is_entity_editable || false; + this.edit = function() { + var that = $(this), + index = that.parent().index(), + select = that.closest('.mselect-list').prev(), + id = select.find('option').eq(index).attr('value'), + item; + + for(var i = 0, c = taxRateCollection.length; i < c; i++) { + if (taxRateCollection[i].tax_calculation_rate_id == id) { + item = taxRateCollection[i]; + break; + } + } + item.itemElement = that.prev(); + $('#tax-rate-form') + .dialogRates({itemRate: item}) + .dialogRates('open'); + } + TaxRateEditableMultiselect.prototype.init = function () { var options = { toggleAddButton:false, @@ -110,7 +130,7 @@ ? itemsWrapper.children('.' + options.mselectListItemClass + ':last').after(mselectItemHtml) : itemsWrapper.prepend(mselectItemHtml); } - }; + }; var taxRateField = $('#tax_rate').parent(), taxRateForm = $('#tax-rate-form'); @@ -134,24 +154,7 @@ taxRateField.find('.mselect-button-add').off('click'); taxRateField.find('.mselect-list') - .on('click.mselect-edit', '.mselect-edit', function () { - var that = $(this), - index = that.parent().index(), - select = that.closest('.mselect-list').prev(), - id = select.find('option').eq(index).attr('value'), - item; - - for(var i = 0, c = taxRateCollection.length; i < c; i++) { - if (taxRateCollection[i].tax_calculation_rate_id == id) { - item = taxRateCollection[i]; - break; - } - } - item.itemElement = that.prev(); - taxRateForm - .dialogRates({itemRate: item}) - .dialogRates('open'); - }) + .on('click.mselect-edit', '.mselect-edit', this.edit) .on("click.mselect-delete", ".mselect-delete", function () { if (!confirm('<?php echo Mage::helper('Mage_Tax_Helper_Data')->__('Do you really want to delete this tax rate'); ?>')) { return; @@ -190,7 +193,8 @@ var el = $(this), checkedClassName = 'mselect-checked'; el[el.is(':checked') ? 'addClass' : 'removeClass'](checkedClassName); - }); + }) + .on('dblclick.mselect-list-item', '.mselect-list-item label span', this.edit); taxRateForm.dialogRates({ title: '<?php echo Mage::helper('Mage_Tax_Helper_Data')->__('Tax Rate'); ?>', diff --git a/app/code/core/Mage/Api/etc/adminhtml/system.xml b/app/code/core/Mage/Api/etc/adminhtml/system.xml new file mode 100644 index 0000000000000000000000000000000000000000..469c86a6a8f4749b3657383350a98efbcb11e4e0 --- /dev/null +++ b/app/code/core/Mage/Api/etc/adminhtml/system.xml @@ -0,0 +1,55 @@ +<?xml version="1.0"?> +<!-- +/** + * 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 Mage_Api + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> + <system> + <section id="api" translate="label" module="Mage_Api" type="text" sortOrder="101" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Magento Core API</label> + <tab>service</tab> + <resource>Mage_Api::config_api</resource> + <group id="config" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>General Settings</label> + <field id="charset" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Default Response Charset</label> + </field> + <field id="session_timeout" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Client Session Timeout (sec.)</label> + </field> + <field id="compliance_wsi" translate="label" type="select" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>WS-I Compliance</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + <backend_model>Mage_Backend_Model_Config_Backend_Store</backend_model> + </field> + <field id="wsdl_cache_enabled" translate="label" type="select" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Enable WSDL Cache</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + <backend_model>Mage_Backend_Model_Config_Backend_Store</backend_model> + </field> + </group> + </section> + </system> +</config> diff --git a/app/code/core/Mage/Api/etc/system.xml b/app/code/core/Mage/Api/etc/system.xml deleted file mode 100644 index de89fe4ed58156e971549c5d9b797c335bde3d09..0000000000000000000000000000000000000000 --- a/app/code/core/Mage/Api/etc/system.xml +++ /dev/null @@ -1,89 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * 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 Mage_Api - * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<config> - <sections> - <api translate="label" module="Mage_Api"> - <label>Magento Core API</label> - <tab>service</tab> - <frontend_type>text</frontend_type> - <sort_order>101</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <resource>Mage_Api::config_api</resource> - <groups> - <config translate="label"> - <label>General Settings</label> - <frontend_type>text</frontend_type> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <charset translate="label"> - <label>Default Response Charset</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> - </charset> - <session_timeout translate="label"> - <label>Client Session Timeout (sec.)</label> - <frontend_type>text</frontend_type> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </session_timeout> - <compliance_wsi translate="label"> - <label>WS-I Compliance</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Store</backend_model> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </compliance_wsi> - <wsdl_cache_enabled translate="label"> - <label>Enable WSDL Cache</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Store</backend_model> - <sort_order>40</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </wsdl_cache_enabled> - </fields> - </config> - </groups> - </api> - </sections> -</config> diff --git a/app/code/core/Mage/Authorizenet/Helper/Data.php b/app/code/core/Mage/Authorizenet/Helper/Data.php index a7298578ea93df47e5554233e39dc8807ae70248..21b9bada99ff0ee0dba6b5281c99e6985a8aa522 100755 --- a/app/code/core/Mage/Authorizenet/Helper/Data.php +++ b/app/code/core/Mage/Authorizenet/Helper/Data.php @@ -42,7 +42,7 @@ class Mage_Authorizenet_Helper_Data extends Mage_Core_Helper_Abstract */ public function getAdminUrl($route, $params) { - return Mage::getModel('Mage_Adminhtml_Model_Url')->getUrl($route, $params); + return Mage::getSingleton('Mage_Backend_Model_Url')->getUrl($route, $params); } /** diff --git a/app/code/core/Mage/Authorizenet/controllers/Adminhtml/Authorizenet/Directpost/PaymentController.php b/app/code/core/Mage/Authorizenet/controllers/Adminhtml/Authorizenet/Directpost/PaymentController.php index b99f49022289565e17d395e67bdecd10d28fc458..c799437da23178378cf1d1a74f72b7b382db189d 100644 --- a/app/code/core/Mage/Authorizenet/controllers/Adminhtml/Authorizenet/Directpost/PaymentController.php +++ b/app/code/core/Mage/Authorizenet/controllers/Adminhtml/Authorizenet/Directpost/PaymentController.php @@ -118,7 +118,7 @@ class Mage_Authorizenet_Adminhtml_Authorizenet_Directpost_PaymentController $requestToPaygate->setOrderSendConfirmation($sendConfirmationFlag); $requestToPaygate->setStoreId($this->_getOrderCreateModel()->getQuote()->getStoreId()); - $adminUrl = Mage::getSingleton('Mage_Adminhtml_Model_Url'); + $adminUrl = Mage::getSingleton('Mage_Backend_Model_Url'); if ($adminUrl->useSecretKey()) { $requestToPaygate->setKey( $adminUrl->getSecretKey('adminhtml', 'authorizenet_directpost_payment','redirect') @@ -145,7 +145,7 @@ class Mage_Authorizenet_Adminhtml_Authorizenet_Directpost_PaymentController if ($isError) { $result['success'] = 0; $result['error'] = 1; - $result['redirect'] = Mage::getSingleton('Mage_Adminhtml_Model_Url')->getUrl('*/sales_order_create/'); + $result['redirect'] = Mage::getSingleton('Mage_Backend_Model_Url')->getUrl('*/sales_order_create/'); } $this->getResponse()->setBody(Mage::helper('Mage_Core_Helper_Data')->jsonEncode($result)); diff --git a/app/code/core/Mage/Authorizenet/etc/adminhtml/system.xml b/app/code/core/Mage/Authorizenet/etc/adminhtml/system.xml new file mode 100644 index 0000000000000000000000000000000000000000..2a00c3592a4832bc50b32b2ae1f5ab8ae8b07598 --- /dev/null +++ b/app/code/core/Mage/Authorizenet/etc/adminhtml/system.xml @@ -0,0 +1,112 @@ +<?xml version="1.0"?> +<!-- +/** + * 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 Mage_Authorizenet + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> + <system> + <section id="payment"> + <group id="authorizenet_directpost" translate="label" module="Mage_Authorizenet" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Authorize.net Direct Post</label> + <field id="active" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Enabled</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="payment_action" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Payment Action</label> + <source_model>Mage_Paygate_Model_Authorizenet_Source_PaymentAction</source_model> + </field> + <field id="title" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Title</label> + </field> + <field id="login" translate="label" type="obscure" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>API Login ID</label> + <backend_model>Mage_Backend_Model_Config_Backend_Encrypted</backend_model> + </field> + <field id="trans_key" translate="label" type="obscure" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Transaction Key</label> + <backend_model>Mage_Backend_Model_Config_Backend_Encrypted</backend_model> + </field> + <field id="trans_md5" translate="label" type="obscure" sortOrder="60" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Merchant MD5</label> + <backend_model>Mage_Backend_Model_Config_Backend_Encrypted</backend_model> + </field> + <field id="order_status" translate="label" type="select" sortOrder="70" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>New Order Status</label> + <source_model>Mage_Sales_Model_Config_Source_Order_Status_Processing</source_model> + </field> + <field id="test" translate="label" type="select" sortOrder="80" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Test Mode</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="cgi_url" translate="label" type="text" sortOrder="90" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Gateway URL</label> + </field> + <field id="currency" translate="label" type="select" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Accepted Currency</label> + <source_model>Mage_Backend_Model_Config_Source_Currency</source_model> + </field> + <field id="debug" translate="label" type="select" sortOrder="110" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Debug</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="email_customer" translate="label" type="select" sortOrder="120" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Email Customer</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="merchant_email" translate="label" type="text" sortOrder="130" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Merchant's Email</label> + <validate>validate-email</validate> + </field> + <field id="cctypes" translate="label" type="multiselect" sortOrder="140" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Credit Card Types</label> + <source_model>Mage_Paygate_Model_Authorizenet_Source_Cctype</source_model> + </field> + <field id="useccv" translate="label" type="select" sortOrder="150" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Credit Card Verification</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="allowspecific" translate="label" type="allowspecific" sortOrder="160" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Payment from Applicable Countries</label> + <source_model>Mage_Payment_Model_Config_Source_Allspecificcountries</source_model> + </field> + <field id="specificcountry" translate="label" type="multiselect" sortOrder="170" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Payment from Specific Countries</label> + <source_model>Mage_Directory_Model_Config_Source_Country</source_model> + </field> + <field id="min_order_total" translate="label" type="text" sortOrder="180" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Minimum Order Total</label> + </field> + <field id="max_order_total" translate="label" type="text" sortOrder="190" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Maximum Order Total</label> + </field> + <field id="sort_order" translate="label" type="text" sortOrder="200" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Sort Order</label> + <frontend_class>validate-number</frontend_class> + </field> + </group> + </section> + </system> +</config> diff --git a/app/code/core/Mage/Authorizenet/etc/config.xml b/app/code/core/Mage/Authorizenet/etc/config.xml index 1c24d096edee91185900a7e60d76b8ccf0b4e69f..5c14bb482a71f131cebd983428fc6bff088ad610 100755 --- a/app/code/core/Mage/Authorizenet/etc/config.xml +++ b/app/code/core/Mage/Authorizenet/etc/config.xml @@ -130,15 +130,15 @@ <cgi_url>https://secure.authorize.net/gateway/transact.dll</cgi_url> <debug>0</debug> <email_customer>0</email_customer> - <login backend_model="Mage_Adminhtml_Model_System_Config_Backend_Encrypted"/> + <login backend_model="Mage_Backend_Model_Config_Backend_Encrypted"/> <merchant_email/> <model>Mage_Authorizenet_Model_Directpost</model> <order_status>processing</order_status> <payment_action>authorize</payment_action> <test>1</test> <title>Credit Card Direct Post (Authorize.net)</title> - <trans_key backend_model="Mage_Adminhtml_Model_System_Config_Backend_Encrypted"/> - <trans_md5 backend_model="Mage_Adminhtml_Model_System_Config_Backend_Encrypted"/> + <trans_key backend_model="Mage_Backend_Model_Config_Backend_Encrypted"/> + <trans_md5 backend_model="Mage_Backend_Model_Config_Backend_Encrypted"/> <allowspecific>0</allowspecific> <currency>USD</currency> <create_order_before>1</create_order_before> diff --git a/app/code/core/Mage/Authorizenet/etc/system.xml b/app/code/core/Mage/Authorizenet/etc/system.xml deleted file mode 100755 index a1b73b92b81c34b26cd1f00c9fedc99ddc034478..0000000000000000000000000000000000000000 --- a/app/code/core/Mage/Authorizenet/etc/system.xml +++ /dev/null @@ -1,221 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * 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 Mage_Authorizenet - * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<config> - <sections> - <payment> - <groups> - <authorizenet_directpost translate="label" module="Mage_Authorizenet"> - <label>Authorize.net Direct Post</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> - <fields> - <active translate="label"> - <label>Enabled</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>10</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </active> - <payment_action translate="label"> - <label>Payment Action</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Paygate_Model_Authorizenet_Source_PaymentAction</source_model> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </payment_action> - <title translate="label"> - <label>Title</label> - <frontend_type>text</frontend_type> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </title> - <login translate="label"> - <label>API Login ID</label> - <frontend_type>obscure</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Encrypted</backend_model> - <sort_order>40</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </login> - <trans_key translate="label"> - <label>Transaction Key</label> - <frontend_type>obscure</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Encrypted</backend_model> - <sort_order>50</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </trans_key> - <trans_md5 translate="label"> - <label>Merchant MD5</label> - <frontend_type>obscure</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Encrypted</backend_model> - <sort_order>60</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </trans_md5> - <order_status translate="label"> - <label>New Order Status</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Order_Status_Processing</source_model> - <sort_order>70</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </order_status> - <test translate="label"> - <label>Test Mode</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>80</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </test> - <cgi_url translate="label"> - <label>Gateway URL</label> - <frontend_type>text</frontend_type> - <sort_order>90</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </cgi_url> - <currency translate="label"> - <label>Accepted Currency</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Currency</source_model> - <sort_order>100</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </currency> - <debug translate="label"> - <label>Debug</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>110</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </debug> - <email_customer translate="label"> - <label>Email Customer</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>120</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </email_customer> - <merchant_email translate="label"> - <label>Merchant's Email</label> - <frontend_type>text</frontend_type> - <validate>validate-email</validate> - <sort_order>130</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </merchant_email> - <cctypes translate="label"> - <label>Credit Card Types</label> - <frontend_type>multiselect</frontend_type> - <source_model>Mage_Paygate_Model_Authorizenet_Source_Cctype</source_model> - <sort_order>140</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </cctypes> - <useccv translate="label"> - <label>Credit Card Verification</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>150</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </useccv> - <allowspecific translate="label"> - <label>Payment from Applicable Countries</label> - <frontend_type>allowspecific</frontend_type> - <sort_order>160</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Payment_Allspecificcountries</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </allowspecific> - <specificcountry translate="label"> - <label>Payment from Specific Countries</label> - <frontend_type>multiselect</frontend_type> - <sort_order>170</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Country</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </specificcountry> - <min_order_total translate="label"> - <label>Minimum Order Total</label> - <frontend_type>text</frontend_type> - <sort_order>180</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </min_order_total> - <max_order_total translate="label"> - <label>Maximum Order Total</label> - <frontend_type>text</frontend_type> - <sort_order>190</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </max_order_total> - <sort_order translate="label"> - <label>Sort Order</label> - <frontend_type>text</frontend_type> - <sort_order>200</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <frontend_class>validate-number</frontend_class> - </sort_order> - </fields> - </authorizenet_directpost> - </groups> - </payment> - </sections> -</config> diff --git a/app/code/core/Mage/Authorizenet/view/adminhtml/directpost/info.phtml b/app/code/core/Mage/Authorizenet/view/adminhtml/directpost/info.phtml index 419596204224439712629df6cd1e2fb885f3e8fd..f80aaa600206713ebec2f3b49f66c4f715e686aa 100644 --- a/app/code/core/Mage/Authorizenet/view/adminhtml/directpost/info.phtml +++ b/app/code/core/Mage/Authorizenet/view/adminhtml/directpost/info.phtml @@ -36,9 +36,9 @@ $_controller = $this->helper('Mage_Authorizenet_Helper_Data')->getControllerName $_orderUrl = $this->helper('Mage_Authorizenet_Helper_Data')->getPlaceOrderAdminUrl(); ?> <!-- IFRAME for request to our server --> -<iframe id="order-directpost-iframe" allowtransparency="true" frameborder="0" name="iframeSubmitOrder" style="display:none;width:100%;background-color:transparent" src="<?php echo $this->getSkinUrl('blank.html') ?>"></iframe> +<iframe id="order-directpost-iframe" allowtransparency="true" frameborder="0" name="iframeSubmitOrder" style="display:none;width:100%;background-color:transparent" src="<?php echo $this->getViewFileUrl('blank.html') ?>"></iframe> <!-- IFRAME for request to Authorize.net --> -<iframe id="directpost-iframe" allowtransparency="true" frameborder="0" name="iframeDirectPost" style="display:none;width:100%;background-color:transparent" src="<?php echo $this->getSkinUrl('blank.html') ?>"></iframe> +<iframe id="directpost-iframe" allowtransparency="true" frameborder="0" name="iframeDirectPost" style="display:none;width:100%;background-color:transparent" src="<?php echo $this->getViewFileUrl('blank.html') ?>"></iframe> <ul id="payment_form_<?php echo $_code ?>" style="display:none;"> <li> <div class="input-box"> diff --git a/app/code/core/Mage/Authorizenet/view/frontend/directpost/form.phtml b/app/code/core/Mage/Authorizenet/view/frontend/directpost/form.phtml index 2f979a708ed5f9c1f8bcfd583331be2880faecc7..8cbca2fbf9d0ea1989656e083fcc038f8d4b4585 100644 --- a/app/code/core/Mage/Authorizenet/view/frontend/directpost/form.phtml +++ b/app/code/core/Mage/Authorizenet/view/frontend/directpost/form.phtml @@ -37,7 +37,7 @@ $_orderUrl = $this->helper('Mage_Authorizenet_Helper_Data')->getPlaceOrderFrontU ?> <div class="buttons-set"> <!-- IFRAME for request to Authorize.net --> -<iframe id="directpost-iframe" allowtransparency="true" frameborder="0" name="iframeDirectPost" style="display:none;width:100%;background-color:transparent" src="<?php echo $this->getSkinUrl('blank.html') ?>"></iframe> +<iframe id="directpost-iframe" allowtransparency="true" frameborder="0" name="iframeDirectPost" style="display:none;width:100%;background-color:transparent" src="<?php echo $this->getViewFileUrl('blank.html') ?>"></iframe> <form id="co-directpost-form" action="#" method="post"> <fieldset> @@ -104,7 +104,7 @@ $_orderUrl = $this->helper('Mage_Authorizenet_Helper_Data')->getPlaceOrderFrontU </div> <div class="tool-tip" id="directpost-tool-tip" style="display:none;"> <div class="btn-close"><a href="#" id="directpost-tool-tip-close" title="<?php echo $this->__('Close') ?>"><?php echo $this->__('Close') ?></a></div> - <div class="tool-tip-content"><img src="<?php echo $this->getSkinUrl('Mage_Checkout::cvv.gif') ?>" alt="<?php echo $this->__('Card Verification Number Visual Reference') ?>" title="<?php echo $this->__('Card Verification Number Visual Reference') ?>" /></div> + <div class="tool-tip-content"><img src="<?php echo $this->getViewFileUrl('Mage_Checkout::cvv.gif') ?>" alt="<?php echo $this->__('Card Verification Number Visual Reference') ?>" title="<?php echo $this->__('Card Verification Number Visual Reference') ?>" /></div> </div> <script type="text/javascript"> //<![CDATA[ diff --git a/app/code/core/Mage/Backend/Block/Abstract.php b/app/code/core/Mage/Backend/Block/Abstract.php index 37bf4d68c413a16a41216840d5b2a1506b4e85ac..5ac6b3b0a8a2280a48a4c84f7e68dc5d2d549038 100644 --- a/app/code/core/Mage/Backend/Block/Abstract.php +++ b/app/code/core/Mage/Backend/Block/Abstract.php @@ -33,15 +33,38 @@ */ class Mage_Backend_Block_Abstract extends Mage_Core_Block_Template { - /** - * Enter description here... + * @param Mage_Core_Controller_Request_Http $request + * @param Mage_Core_Model_Layout $layout + * @param Mage_Core_Model_Event_Manager $eventManager + * @param Mage_Backend_Model_Url $urlBuilder + * @param Mage_Core_Model_Translate $translator + * @param Mage_Core_Model_Cache $cache + * @param Mage_Core_Model_Design_Package $designPackage + * @param Mage_Core_Model_Session $session + * @param Mage_Core_Model_Store_Config $storeConfig + * @param Mage_Core_Controller_Varien_Front $frontController + * @param Mage_Core_Model_Factory_Helper $helperFactory + * @param array $data * - * @return string + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ - protected function _getUrlModelClass() - { - return 'Mage_Backend_Model_Url'; + public function __construct( + Mage_Core_Controller_Request_Http $request, + Mage_Core_Model_Layout $layout, + Mage_Core_Model_Event_Manager $eventManager, + Mage_Backend_Model_Url $urlBuilder, + Mage_Core_Model_Translate $translator, + Mage_Core_Model_Cache $cache, + Mage_Core_Model_Design_Package $designPackage, + Mage_Core_Model_Session $session, + Mage_Core_Model_Store_Config $storeConfig, + Mage_Core_Controller_Varien_Front $frontController, + Mage_Core_Model_Factory_Helper $helperFactory, + array $data = array() + ) { + parent::__construct($request, $layout, $eventManager, $urlBuilder, $translator, $cache, $designPackage, + $session, $storeConfig, $frontController, $helperFactory, $data + ); } - } diff --git a/app/code/core/Mage/Backend/Block/Menu.php b/app/code/core/Mage/Backend/Block/Menu.php index fe0cc39d8d6cdfa6d4b54e4b8334fc9cc7f5a64f..55a7514b26d6a01d273e193d8708180bb427876c 100644 --- a/app/code/core/Mage/Backend/Block/Menu.php +++ b/app/code/core/Mage/Backend/Block/Menu.php @@ -70,7 +70,7 @@ class Mage_Backend_Block_Menu extends Mage_Backend_Block_Template protected function _construct() { parent::_construct(); - $this->_url = Mage::getModel('Mage_Backend_Model_Url'); + $this->_url = Mage::getSingleton('Mage_Backend_Model_Url'); $this->setCacheTags(array(self::CACHE_TAGS)); } diff --git a/app/code/core/Mage/Adminhtml/Block/Store/Switcher.php b/app/code/core/Mage/Backend/Block/Store/Switcher.php similarity index 66% rename from app/code/core/Mage/Adminhtml/Block/Store/Switcher.php rename to app/code/core/Mage/Backend/Block/Store/Switcher.php index 8ba2115b8434689e5805391dcf267009ede0a8d8..37287274f27a0c9e31759e4f7cdbe31233ab6540 100644 --- a/app/code/core/Mage/Adminhtml/Block/Store/Switcher.php +++ b/app/code/core/Mage/Backend/Block/Store/Switcher.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -28,10 +28,10 @@ * Store switcher block * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Block_Store_Switcher extends Mage_Adminhtml_Block_Template +class Mage_Backend_Block_Store_Switcher extends Mage_Backend_Block_Template { /** * Key in config for store switcher hint @@ -62,7 +62,58 @@ class Mage_Adminhtml_Block_Store_Switcher extends Mage_Adminhtml_Block_Template */ protected $_hasDefaultOption = true; - protected $_template = 'Mage_Adminhtml::store/switcher.phtml'; + /** + * Block template filename + * + * @var string + */ + protected $_template = 'Mage_Backend::store/switcher.phtml'; + + /** + * Application model + * + * @var Mage_Core_Model_App + */ + protected $_application; + + /** + * Website factory + * + * @var Mage_Core_Model_Website_Factory + */ + protected $_websiteFactory; + + /** + * Store Group Factory + * + * @var Mage_Core_Model_Store_Group_Factory + */ + protected $_storeGroupFactory; + + public function __construct( + Mage_Core_Controller_Request_Http $request, + Mage_Core_Model_Layout $layout, + Mage_Core_Model_Event_Manager $eventManager, + Mage_Backend_Model_Url $urlBuilder, + Mage_Core_Model_Translate $translator, + Mage_Core_Model_Cache $cache, + Mage_Core_Model_Design_Package $designPackage, + Mage_Core_Model_Session $session, + Mage_Core_Model_Store_Config $storeConfig, + Mage_Core_Controller_Varien_Front $frontController, + Mage_Core_Model_Factory_Helper $helperFactory, + Mage_Core_Model_App $application, + Mage_Core_Model_Website_Factory $websiteFactory, + Mage_Core_Model_Store_Group_Factory $storeGroupFactory, + array $data = array() + ) { + parent::__construct($request, $layout, $eventManager, $urlBuilder, $translator, $cache, $designPackage, + $session, $storeConfig, $frontController, $helperFactory, $data); + $this->_application = $application; + $this->_websiteFactory = $websiteFactory; + $this->_storeGroupFactory = $storeGroupFactory; + } + protected function _construct() { @@ -78,7 +129,7 @@ class Mage_Adminhtml_Block_Store_Switcher extends Mage_Adminhtml_Block_Template */ public function getWebsiteCollection() { - $collection = Mage::getModel('Mage_Core_Model_Website')->getResourceCollection(); + $collection = $this->_websiteFactory->create()->getResourceCollection(); $websiteIds = $this->getWebsiteIds(); if (!is_null($websiteIds)) { @@ -95,7 +146,7 @@ class Mage_Adminhtml_Block_Store_Switcher extends Mage_Adminhtml_Block_Template */ public function getWebsites() { - $websites = Mage::app()->getWebsites(); + $websites = $this->_application->getWebsites(); if ($websiteIds = $this->getWebsiteIds()) { foreach ($websites as $websiteId => $website) { if (!in_array($websiteId, $websiteIds)) { @@ -107,12 +158,13 @@ class Mage_Adminhtml_Block_Store_Switcher extends Mage_Adminhtml_Block_Template } /** + * @param int|Mage_Core_Model_Website $website * @return Mage_Core_Model_Resource_Store_Group_Collection */ public function getGroupCollection($website) { if (!$website instanceof Mage_Core_Model_Website) { - $website = Mage::getModel('Mage_Core_Model_Website')->load($website); + $website = $this->_websiteFactory->create()->load($website); } return $website->getGroupCollection(); } @@ -120,24 +172,25 @@ class Mage_Adminhtml_Block_Store_Switcher extends Mage_Adminhtml_Block_Template /** * Get store groups for specified website * - * @param Mage_Core_Model_Website $website + * @param Mage_Core_Model_Website|int $website * @return array */ public function getStoreGroups($website) { if (!$website instanceof Mage_Core_Model_Website) { - $website = Mage::app()->getWebsite($website); + $website = $this->_application->getWebsite($website); } return $website->getGroups(); } /** + * @param Mage_Core_Model_Store_Group|int $group * @return Mage_Core_Model_Resource_Store_Collection */ public function getStoreCollection($group) { if (!$group instanceof Mage_Core_Model_Store_Group) { - $group = Mage::getModel('Mage_Core_Model_Store_Group')->load($group); + $group = $this->_storeGroupFactory->createFromArray()->load($group); } $stores = $group->getStoreCollection(); $_storeIds = $this->getStoreIds(); @@ -150,13 +203,13 @@ class Mage_Adminhtml_Block_Store_Switcher extends Mage_Adminhtml_Block_Template /** * Get store views for specified store group * - * @param Mage_Core_Model_Store_Group $group + * @param Mage_Core_Model_Store_Group|int $group * @return array */ public function getStores($group) { if (!$group instanceof Mage_Core_Model_Store_Group) { - $group = Mage::app()->getGroup($group); + $group = $this->_application->getGroup($group); } $stores = $group->getStores(); if ($storeIds = $this->getStoreIds()) { @@ -169,6 +222,9 @@ class Mage_Adminhtml_Block_Store_Switcher extends Mage_Adminhtml_Block_Template return $stores; } + /** + * @return string + */ public function getSwitchUrl() { if ($url = $this->getData('switch_url')) { @@ -177,36 +233,56 @@ class Mage_Adminhtml_Block_Store_Switcher extends Mage_Adminhtml_Block_Template return $this->getUrl('*/*/*', array('_current' => true, $this->_storeVarName => null)); } + /** + * @param string $varName + * @return Mage_Backend_Block_Store_Switcher + */ public function setStoreVarName($varName) { $this->_storeVarName = $varName; return $this; } + /** + * @return int + */ public function getStoreId() { return $this->getRequest()->getParam($this->_storeVarName); } + /** + * @param array $storeIds + * @return Mage_Backend_Block_Store_Switcher + */ public function setStoreIds($storeIds) { $this->_storeIds = $storeIds; return $this; } + /** + * @return array + */ public function getStoreIds() { return $this->_storeIds; } + /** + * @return bool + */ public function isShow() { - return !Mage::app()->isSingleStoreMode(); + return !$this->_application->isSingleStoreMode(); } + /** + * @return string + */ protected function _toHtml() { - if (!Mage::app()->isSingleStoreMode()) { + if (!$this->_application->isSingleStoreMode()) { return parent::_toHtml(); } return ''; @@ -234,7 +310,7 @@ class Mage_Adminhtml_Block_Store_Switcher extends Mage_Adminhtml_Block_Template public function getHintUrl() { if (null === $this->_hintUrl) { - $this->_hintUrl = Mage::helper('Mage_Core_Helper_Hint')->getHintByCode(self::XPATH_HINT_KEY); + $this->_hintUrl = $this->helper('Mage_Core_Helper_Hint')->getHintByCode(self::XPATH_HINT_KEY); } return $this->_hintUrl; } diff --git a/app/code/core/Mage/Adminhtml/Block/Store/Switcher/Form/Renderer/Fieldset.php b/app/code/core/Mage/Backend/Block/Store/Switcher/Form/Renderer/Fieldset.php similarity index 85% rename from app/code/core/Mage/Adminhtml/Block/Store/Switcher/Form/Renderer/Fieldset.php rename to app/code/core/Mage/Backend/Block/Store/Switcher/Form/Renderer/Fieldset.php index 6c8c89ba838682700a585ddf0f903104d21a72b8..7275669e68fa8452c0c0d659f820f5cad624d6f1 100644 --- a/app/code/core/Mage/Adminhtml/Block/Store/Switcher/Form/Renderer/Fieldset.php +++ b/app/code/core/Mage/Backend/Block/Store/Switcher/Form/Renderer/Fieldset.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -28,11 +28,11 @@ * Form fieldset renderer * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Block_Store_Switcher_Form_Renderer_Fieldset - extends Mage_Adminhtml_Block_Template implements Varien_Data_Form_Element_Renderer_Interface +class Mage_Backend_Block_Store_Switcher_Form_Renderer_Fieldset + extends Mage_Backend_Block_Template implements Varien_Data_Form_Element_Renderer_Interface { /** * Form element which re-rendering @@ -72,6 +72,6 @@ class Mage_Adminhtml_Block_Store_Switcher_Form_Renderer_Fieldset */ public function getHintHtml() { - return Mage::getBlockSingleton('Mage_Adminhtml_Block_Store_Switcher')->getHintHtml(); + return Mage::getBlockSingleton('Mage_Backend_Block_Store_Switcher')->getHintHtml(); } } diff --git a/app/code/core/Mage/Adminhtml/Block/Store/Switcher/Form/Renderer/Fieldset/Element.php b/app/code/core/Mage/Backend/Block/Store/Switcher/Form/Renderer/Fieldset/Element.php similarity index 86% rename from app/code/core/Mage/Adminhtml/Block/Store/Switcher/Form/Renderer/Fieldset/Element.php rename to app/code/core/Mage/Backend/Block/Store/Switcher/Form/Renderer/Fieldset/Element.php index 721687a00ed98e95479c0112d50e8d8c6080f45d..406b4c8c500ef25980b3d12b520c185caa7886c8 100644 --- a/app/code/core/Mage/Adminhtml/Block/Store/Switcher/Form/Renderer/Fieldset/Element.php +++ b/app/code/core/Mage/Backend/Block/Store/Switcher/Form/Renderer/Fieldset/Element.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -28,11 +28,11 @@ * Form fieldset renderer * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Block_Store_Switcher_Form_Renderer_Fieldset_Element - extends Mage_Adminhtml_Block_Widget_Form_Renderer_Fieldset_Element +class Mage_Backend_Block_Store_Switcher_Form_Renderer_Fieldset_Element + extends Mage_Backend_Block_Widget_Form_Renderer_Fieldset_Element implements Varien_Data_Form_Element_Renderer_Interface { /** @@ -73,6 +73,6 @@ class Mage_Adminhtml_Block_Store_Switcher_Form_Renderer_Fieldset_Element */ public function getHintHtml() { - return Mage::getBlockSingleton('Mage_Adminhtml_Block_Store_Switcher')->getHintHtml(); + return Mage::getBlockSingleton('Mage_Backend_Block_Store_Switcher')->getHintHtml(); } } diff --git a/app/code/core/Mage/Adminhtml/Block/System/Config/Dwstree.php b/app/code/core/Mage/Backend/Block/System/Config/Dwstree.php similarity index 70% rename from app/code/core/Mage/Adminhtml/Block/System/Config/Dwstree.php rename to app/code/core/Mage/Backend/Block/System/Config/Dwstree.php index 45b560e0b485734cd5d8856be129262ed2c16c6d..9e7cb120a5438e19ba328735d023b8a481ab55cb 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Config/Dwstree.php +++ b/app/code/core/Mage/Backend/Block/System/Config/Dwstree.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -28,22 +28,21 @@ * admin customer left menu * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Block_System_Config_Dwstree extends Mage_Adminhtml_Block_Widget_Tabs +class Mage_Backend_Block_System_Config_Dwstree extends Mage_Backend_Block_Widget_Tabs { - - protected $_template = 'widget/tabs.phtml'; - protected function _construct() { parent::_construct(); - # $this->setId('system_config_dwstree'); $this->setDestElementId('system_config_form'); } + /** + * @return Mage_Backend_Block_System_Config_Dwstree + */ public function initTabs() { $section = $this->getRequest()->getParam('section'); @@ -55,42 +54,44 @@ class Mage_Adminhtml_Block_System_Config_Dwstree extends Mage_Adminhtml_Block_Wi $storesConfig = Mage::getConfig()->getNode('stores'); $this->addTab('default', array( - 'label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Default Config'), + 'label' => $this->helper('Mage_Backend_Helper_Data')->__('Default Config'), 'url' => $this->getUrl('*/*/*', array('section'=>$section)), 'class' => 'default', )); - foreach ($websitesConfig->children() as $wCode=>$wConfig) { + foreach ($websitesConfig->children() as $wCode => $wConfig) { $wName = (string)$wConfig->descend('system/website/name'); - $wUrl = $this->getUrl('*/*/*', array('section'=>$section, 'website'=>$wCode)); - $this->addTab('website_'.$wCode, array( + $wUrl = $this->getUrl('*/*/*', array('section' => $section, 'website' => $wCode)); + $this->addTab('website_' . $wCode, array( 'label' => $wName, 'url' => $wUrl, 'class' => 'website', )); - if ($curWebsite===$wCode) { + if ($curWebsite === $wCode) { if ($curStore) { $this->_addBreadcrumb($wName, '', $wUrl); } else { $this->_addBreadcrumb($wName); } } - foreach ($wConfig->descend('system/stores')->children() as $sCode=>$sId) { - $sName = (string)$storesConfig->descend($sCode.'/system/store/name'); - $this->addTab('store_'.$sCode, array( + foreach ($wConfig->descend('system/stores')->children() as $sCode => $sId) { + $sName = (string)$storesConfig->descend($sCode . '/system/store/name'); + $this->addTab('store_' . $sCode, array( 'label' => $sName, - 'url' => $this->getUrl('*/*/*', array('section'=>$section, 'website'=>$wCode, 'store'=>$sCode)), + 'url' => $this->getUrl('*/*/*', array( + 'section' => $section, 'website' => $wCode, 'store' => $sCode) + ), 'class' => 'store', )); - if ($curStore===$sCode) { + if ($curStore === $sCode) { $this->_addBreadcrumb($sName); } } } if ($curStore) { - $this->setActiveTab('store_'.$curStore); + $this->setActiveTab('store_' . $curStore); } elseif ($curWebsite) { - $this->setActiveTab('website_'.$curWebsite); + $this->setActiveTab('website_' . $curWebsite); } else { $this->setActiveTab('default'); } diff --git a/app/code/core/Mage/Backend/Block/System/Config/Edit.php b/app/code/core/Mage/Backend/Block/System/Config/Edit.php new file mode 100644 index 0000000000000000000000000000000000000000..1f947638be09508a48630dc7b08ebef0bc29239f --- /dev/null +++ b/app/code/core/Mage/Backend/Block/System/Config/Edit.php @@ -0,0 +1,117 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Mage_Backend + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +/** + * Config edit page + * + * @category Mage + * @package Mage_Backend + * @author Magento Core Team <core@magentocommerce.com> + */ +class Mage_Backend_Block_System_Config_Edit extends Mage_Backend_Block_Widget +{ + const DEFAULT_SECTION_BLOCK = 'Mage_Backend_Block_System_Config_Form'; + + /** + * Sections configuration + * + * @var array + */ + protected $_section; + + /** + * @var Mage_Backend_Model_Config_StructureInterface + */ + protected $_systemConfig; + + /** + * Block template File + * + * @var string + */ + protected $_template = 'Mage_Backend::system/config/edit.phtml'; + + protected function _construct() + { + $this->_systemConfig = $this->hasData('systemConfig') ? + $this->getData('systemConfig') : + Mage::getSingleton('Mage_Backend_Model_Config_Structure_Reader')->getConfiguration(); + + parent::_construct(); + + $sectionCode = $this->getRequest()->getParam('section'); + + $this->_section = $this->_systemConfig->getSection($sectionCode); + + $this->setTitle($this->_section['label']); + $this->setHeaderCss(isset($this->_section['header_css']) ? $this->_section['header_css'] : ''); + } + + /** + * @return Mage_Core_Block_Abstract + */ + protected function _prepareLayout() + { + $this->addChild('save_button', 'Mage_Backend_Block_Widget_Button', array( + 'label' => $this->helper('Mage_Backend_Helper_Data')->__('Save Config'), + 'onclick' => 'configForm.submit()', + 'class' => 'save', + )); + return parent::_prepareLayout(); + } + + /** + * @return string + */ + public function getSaveButtonHtml() + { + return $this->getChildHtml('save_button'); + } + + /** + * @return string + */ + public function getSaveUrl() + { + return $this->getUrl('*/*/save', array('_current' => true)); + } + + /** + * @return Mage_Backend_Block_System_Config_Edit + */ + public function initForm() + { + $blockName = isset($this->_section['frontend_model']) ? $this->_section['frontend_model'] : ''; + if (empty($blockName)) { + $blockName = self::DEFAULT_SECTION_BLOCK; + } + + $block = $this->getLayout()->createBlock($blockName); + $block->initForm(); + $this->setChild('form', $block); + return $this; + } +} diff --git a/app/code/core/Mage/Adminhtml/Block/System/Config/Form.php b/app/code/core/Mage/Backend/Block/System/Config/Form.php similarity index 56% rename from app/code/core/Mage/Adminhtml/Block/System/Config/Form.php rename to app/code/core/Mage/Backend/Block/System/Config/Form.php index 244189946373a30dda6e9b3299772aaae2da5dbb..4b33f0313437c30138c7f9425b6a751f9ecba6c4 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Config/Form.php +++ b/app/code/core/Mage/Backend/Block/System/Config/Form.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -29,10 +29,10 @@ * System config form block * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Block_System_Config_Form extends Mage_Adminhtml_Block_Widget_Form +class Mage_Backend_Block_System_Config_Form extends Mage_Backend_Block_Widget_Form { const SCOPE_DEFAULT = 'default'; @@ -47,9 +47,9 @@ class Mage_Adminhtml_Block_System_Config_Form extends Mage_Adminhtml_Block_Widge protected $_configData; /** - * Adminhtml config data instance + * Backend config data instance * - * @var Mage_Adminhtml_Model_Config_Data + * @var Mage_Backend_Model_Config */ protected $_configDataObject; @@ -61,28 +61,28 @@ class Mage_Adminhtml_Block_System_Config_Form extends Mage_Adminhtml_Block_Widge protected $_configRoot; /** - * Enter description here... + * System configuration * - * @var Mage_Adminhtml_Model_Config + * @var Mage_Backend_Model_Config_StructureInterface */ - protected $_configFields; + protected $_systemConfig; /** * Enter description here... * - * @var Mage_Adminhtml_Block_System_Config_Form_Fieldset + * @var Mage_Backend_Block_System_Config_Form_Fieldset */ protected $_defaultFieldsetRenderer; /** * Enter description here... * - * @var Mage_Adminhtml_Block_System_Config_Form_Field + * @var Mage_Backend_Block_System_Config_Form_Field */ protected $_defaultFieldRenderer; /** - * Enter description here... + * List of fieldset * * @var array */ @@ -96,79 +96,126 @@ class Mage_Adminhtml_Block_System_Config_Form extends Mage_Adminhtml_Block_Widge protected $_scopeLabels = array(); /** - * Enter description here... - * - */ + * Backend Config model factory + * + * @var Mage_Backend_Model_Config_Factory + */ + protected $_configFactory; + + /** + * Varien_Data_Form_Factory + * + * @var Varien_Data_Form_Factory + */ + protected $_formFactory; + + /** + * @param Mage_Core_Controller_Request_Http $request + * @param Mage_Core_Model_Layout $layout + * @param Mage_Core_Model_Event_Manager $eventManager + * @param Mage_Backend_Model_Url $urlBuilder + * @param Mage_Core_Model_Translate $translator + * @param Mage_Core_Model_Cache $cache + * @param Mage_Core_Model_Design_Package $designPackage + * @param Mage_Core_Model_Session $session + * @param Mage_Core_Model_Store_Config $storeConfig + * @param Mage_Core_Controller_Varien_Front $frontController + * @param Mage_Core_Model_Factory_Helper $helperFactory + * @param Mage_Backend_Model_Config_Factory $configFactory + * @param Varien_Data_Form_Factory $formFactory + * @param Mage_Backend_Model_Config_Clone_Factory $cloneModelFactory + * @param array $data + * + * @SuppressWarnings(PHPMD.ExcessiveParameterList) + */ + public function __construct( + Mage_Core_Controller_Request_Http $request, + Mage_Core_Model_Layout $layout, + Mage_Core_Model_Event_Manager $eventManager, + Mage_Backend_Model_Url $urlBuilder, + Mage_Core_Model_Translate $translator, + Mage_Core_Model_Cache $cache, + Mage_Core_Model_Design_Package $designPackage, + Mage_Core_Model_Session $session, + Mage_Core_Model_Store_Config $storeConfig, + Mage_Core_Controller_Varien_Front $frontController, + Mage_Core_Model_Factory_Helper $helperFactory, + Mage_Backend_Model_Config_Factory $configFactory, + Varien_Data_Form_Factory $formFactory, + Mage_Backend_Model_Config_Clone_Factory $cloneModelFactory, + array $data = array() + ) { + parent::__construct($request, $layout, $eventManager, $urlBuilder, $translator, $cache, $designPackage, + $session, $storeConfig, $frontController, $helperFactory, $data + ); + $this->_configFactory = $configFactory; + $this->_formFactory = $formFactory; + $this->_cloneModelFactory = $cloneModelFactory; + } + + protected function _construct() { parent::_construct(); + $this->_systemConfig = $this->hasData('systemConfig') ? + $this->getData('systemConfig') : + Mage::getSingleton('Mage_Backend_Model_Config_Structure_Reader')->getConfiguration(); + $this->_scopeLabels = array( - self::SCOPE_DEFAULT => Mage::helper('Mage_Adminhtml_Helper_Data')->__('[GLOBAL]'), - self::SCOPE_WEBSITES => Mage::helper('Mage_Adminhtml_Helper_Data')->__('[WEBSITE]'), - self::SCOPE_STORES => Mage::helper('Mage_Adminhtml_Helper_Data')->__('[STORE VIEW]'), + self::SCOPE_DEFAULT => $this->helper('Mage_Backend_Helper_Data')->__('[GLOBAL]'), + self::SCOPE_WEBSITES => $this->helper('Mage_Backend_Helper_Data')->__('[WEBSITE]'), + self::SCOPE_STORES => $this->helper('Mage_Backend_Helper_Data')->__('[STORE VIEW]'), ); } /** * Enter description here... * - * @return Mage_Adminhtml_Block_System_Config_Form + * @return Mage_Backend_Block_System_Config_Form */ protected function _initObjects() { $this->_configRoot = Mage::getConfig()->getNode(null, $this->getScope(), $this->getScopeCode()); - $this->_configDataObject = Mage::getModel('Mage_Adminhtml_Model_Config_Data') + $this->_configDataObject = $this->_configFactory->create() ->setSection($this->getSectionCode()) ->setWebsite($this->getWebsiteCode()) ->setStore($this->getStoreCode()); $this->_configData = $this->_configDataObject->load(); - $this->_configFields = Mage::getSingleton('Mage_Adminhtml_Model_Config'); - - $this->_defaultFieldsetRenderer = Mage::getBlockSingleton('Mage_Adminhtml_Block_System_Config_Form_Fieldset'); - $this->_defaultFieldRenderer = Mage::getBlockSingleton('Mage_Adminhtml_Block_System_Config_Form_Field'); + $this->_defaultFieldsetRenderer = Mage::getBlockSingleton('Mage_Backend_Block_System_Config_Form_Fieldset'); + $this->_defaultFieldRenderer = Mage::getBlockSingleton('Mage_Backend_Block_System_Config_Form_Field'); return $this; } /** - * Enter description here... + * Initialize form * - * @return Mage_Adminhtml_Block_System_Config_Form + * @return Mage_Backend_Block_System_Config_Form */ public function initForm() { $this->_initObjects(); - $form = new Varien_Data_Form(); + /** @var Varien_Data_Form $form */ + $form = $this->_formFactory->create(); - $sections = $this->_configFields->getSection( + $section = $this->_systemConfig->getSection( $this->getSectionCode(), $this->getWebsiteCode(), $this->getStoreCode() ); - if (empty($sections)) { - $sections = array(); - } - foreach ($sections as $section) { - /* @var $section Varien_Simplexml_Element */ - if (!$this->_canShowField($section)) { - continue; - } - foreach ($section->groups as $groups){ + if (!empty($section) && false !== $this->_canShowField($section)) { + $groups = $section['groups']; + usort($groups, array($this, '_sortForm')); - $groups = (array)$groups; - usort($groups, array($this, '_sortForm')); - - foreach ($groups as $group){ - /* @var $group Varien_Simplexml_Element */ - if (!$this->_canShowField($group)) { - continue; - } - - $this->_initGroup($group, $section, $form); + foreach ($groups as $group){ + /* @var $group array */ + if (false == $this->_canShowField($group)) { + continue; } + $this->_initGroup($group, $section, $form); } } @@ -179,14 +226,14 @@ class Mage_Adminhtml_Block_System_Config_Form extends Mage_Adminhtml_Block_Widge /** * Initialize element group * - * @param Varien_SimpleXml_Element $group - * @param Varien_SimpleXml_Element $section + * @param array $group + * @param array $section * @param Varien_Data_Form $form */ protected function _initGroup($group, $section, $form) { - if ($group->frontend_model) { - $fieldsetRenderer = Mage::getBlockSingleton((string)$group->frontend_model); + if (isset($group['frontend_model'])) { + $fieldsetRenderer = Mage::getBlockSingleton((string)$group['frontend_model']); } else { $fieldsetRenderer = $this->_defaultFieldsetRenderer; } @@ -195,27 +242,29 @@ class Mage_Adminhtml_Block_System_Config_Form extends Mage_Adminhtml_Block_Widge $fieldsetRenderer->setConfigData($this->_configData); $fieldsetRenderer->setGroup($group); - if ($this->_configFields->hasChildren($group, $this->getWebsiteCode(), $this->getStoreCode())) { + if ($this->_systemConfig->hasChildren($group, $this->getWebsiteCode(), $this->getStoreCode())) { - $helperName = $this->_configFields->getAttributeModule($section, $group); + $helperName = $this->_systemConfig->getAttributeModule($section, $group); - $fieldsetConfig = array('legend' => Mage::helper($helperName)->__((string)$group->label)); - if (!empty($group->comment)) { - $fieldsetConfig['comment'] = Mage::helper($helperName)->__((string)$group->comment); + $fieldsetConfig = array( + 'legend' => $this->helper($helperName) + ->__(array_key_exists('label', $group) ? $group['label'] : '') + ); + if (isset($group['comment'])) { + $fieldsetConfig['comment'] = $this->helper($helperName)->__($group['comment']); } - if (!empty($group->expanded)) { - $fieldsetConfig['expanded'] = (bool)$group->expanded; + if (isset($group['expanded'])) { + $fieldsetConfig['expanded'] = (bool)$group['expanded']; } - $fieldset = $form->addFieldset( - $section->getName() . '_' . $group->getName(), $fieldsetConfig) + $fieldset = $form->addFieldset($section['id'] . '_' . $group['id'], $fieldsetConfig) ->setRenderer($fieldsetRenderer); $this->_prepareFieldOriginalData($fieldset, $group); $this->_addElementTypes($fieldset); - if ($group->clone_fields) { - if ($group->clone_model) { - $cloneModel = Mage::getModel((string)$group->clone_model); + if (isset($group['clone_fields'])) { + if (isset($group['clone_model'])) { + $cloneModel = $this->_cloneModelFactory->create($group['clone_model']); } else { Mage::throwException( 'Config form fieldset clone model required to be able to clone fields' @@ -228,19 +277,19 @@ class Mage_Adminhtml_Block_System_Config_Form extends Mage_Adminhtml_Block_Widge $this->initFields($fieldset, $group, $section); } - $this->_fieldsets[$group->getName()] = $fieldset; + $this->_fieldsets[$group['id']] = $fieldset; } } /** * Return dependency block object * - * @return Mage_Adminhtml_Block_Widget_Form_Element_Dependence + * @return Mage_Backend_Block_Widget_Form_Element_Dependence */ protected function _getDependence() { if (!$this->getChildBlock('element_dependence')){ - $this->addChild('element_dependence', 'Mage_Adminhtml_Block_Widget_Form_Element_Dependence'); + $this->addChild('element_dependence', 'Mage_Backend_Block_Widget_Form_Element_Dependence'); } return $this->getChildBlock('element_dependence'); } @@ -249,11 +298,11 @@ class Mage_Adminhtml_Block_System_Config_Form extends Mage_Adminhtml_Block_Widge * Init fieldset fields * * @param Varien_Data_Form_Element_Fieldset $fieldset - * @param Varien_Simplexml_Element $group - * @param Varien_Simplexml_Element $section + * @param array $group + * @param array $section * @param string $fieldPrefix * @param string $labelPrefix - * @return Mage_Adminhtml_Block_System_Config_Form + * @return Mage_Backend_Block_System_Config_Form */ public function initFields($fieldset, $group, $section, $fieldPrefix='', $labelPrefix='') { @@ -264,52 +313,52 @@ class Mage_Adminhtml_Block_System_Config_Form extends Mage_Adminhtml_Block_Widge // Extends for config data $configDataAdditionalGroups = array(); - foreach ($group->fields as $elements) { + $fields = isset($group['fields']) ? $group['fields'] : array(); + /** @var array $elements */ + // sort either by sortOrder or by child node values by passing the sortOrder + $elements = $this->_sortElements($group, $fieldset, $fields); - // sort either by sort_order or by child node values bypassing the sort_order - $elements = $this->_sortElements($group, $fieldset, (array) $elements); - - foreach ($elements as $element) { - if (!$this->_canShowField($element)) { - continue; - } + foreach ($elements as $element) { + if (false == $this->_canShowField($element)) { + continue; + } - /** - * Look for custom defined field path - */ - $path = (string)$element->config_path; - if (empty($path)) { - $path = $section->getName() . '/' . $group->getName() . '/' . $fieldPrefix . $element->getName(); - } elseif (strrpos($path, '/') > 0) { - // Extend config data with new section group - $groupPath = substr($path, 0, strrpos($path, '/')); - if (!isset($configDataAdditionalGroups[$groupPath])) { - $this->_configData = $this->_configDataObject->extendConfig( - $groupPath, - false, - $this->_configData - ); - $configDataAdditionalGroups[$groupPath] = true; - } + /** + * Look for custom defined field path + */ + $path = (isset($element['config_path'])) ? $element['config_path'] : ''; + + if (empty($path)) { + $path = $section['id'] . '/' . $group['id'] . '/' . $fieldPrefix . $element['id']; + } elseif (strrpos($path, '/') > 0) { + // Extend config data with new section group + $groupPath = substr($path, 0, strrpos($path, '/')); + if (false == isset($configDataAdditionalGroups[$groupPath])) { + $this->_configData = $this->_configDataObject->extendConfig( + $groupPath, + false, + $this->_configData + ); + $configDataAdditionalGroups[$groupPath] = true; } - - $this->_initElement($element, $fieldset, $group, $section, $path, $fieldPrefix, $labelPrefix); } + + $this->_initElement($element, $fieldset, $group, $section, $path, $fieldPrefix, $labelPrefix); } return $this; } /** - * @param Varien_SimpleXml_Element $group + * @param array $group * @param Varien_Data_Form_Element_Fieldset $fieldset * @param array $elements * @return mixed */ protected function _sortElements($group, $fieldset, $elements) { - if ($group->sort_fields && $group->sort_fields->by) { - $fieldset->setSortElementsByAttribute((string)$group->sort_fields->by, - ($group->sort_fields->direction_desc ? SORT_DESC : SORT_ASC) + if (isset($group['sort_fields']) && isset($group['sort_fields']['by'])) { + $fieldset->setSortElementsByAttribute($group['sort_fields']['by'], + isset($group['sort_fields']['direction_desc']) ? SORT_DESC : SORT_ASC ); } else { usort($elements, array($this, '_sortForm')); @@ -320,17 +369,17 @@ class Mage_Adminhtml_Block_System_Config_Form extends Mage_Adminhtml_Block_Widge /** * Initialize form element * - * @param Varien_Data_Form_Element_Abstract $element + * @param array $element * @param Varien_Data_Form_Element_Fieldset $fieldset - * @param Varien_SimpleXml_Element $group - * @param Varien_SimpleXml_Element $section + * @param array $group + * @param array $section * @param string $path * @param string $fieldPrefix * @param string $labelPrefix */ protected function _initElement($element, $fieldset, $group, $section, $path, $fieldPrefix = '', $labelPrefix = '') { - $elementId = $section->getName() . '_' . $group->getName() . '_' . $fieldPrefix . $element->getName(); + $elementId = $section['id'] . '_' . $group['id'] . '_' . $fieldPrefix . $element['id']; if (array_key_exists($path, $this->_configData)) { $data = $this->_configData[$path]; @@ -344,20 +393,22 @@ class Mage_Adminhtml_Block_System_Config_Form extends Mage_Adminhtml_Block_Widge $fieldRenderer->setForm($this); $fieldRenderer->setConfigData($this->_configData); - $helperName = $this->_configFields->getAttributeModule($section, $group, $element); - $fieldType = (string)$element->frontend_type ? (string)$element->frontend_type : 'text'; - $name = 'groups[' . $group->getName() . '][fields][' . $fieldPrefix . $element->getName() . '][value]'; - $label = Mage::helper($helperName)->__($labelPrefix) . ' ' . Mage::helper($helperName)->__((string)$element->label); - $hint = (string)$element->hint ? Mage::helper($helperName)->__((string)$element->hint) : ''; + $helperName = $this->_systemConfig->getAttributeModule($section, $group, $element); + $fieldType = isset($element['type']) ? $element['type'] : 'text'; + $name = 'groups[' . $group['id'] . '][fields][' . $fieldPrefix . $element['id'] . '][value]'; + $label = $this->helper($helperName)->__($labelPrefix) + . ' ' + . $this->helper($helperName)->__(array_key_exists('label', $element) ? (string)$element['label'] : ''); + $hint = isset($element['hint']) ? $this->helper($helperName)->__($element['hint']) : ''; - if ($element->backend_model) { + if (isset($element['backend_model'])) { $data = $this->_fetchBackendModelData($element, $path, $data); } $comment = $this->_prepareFieldComment($element, $helperName, $data); $tooltip = $this->_prepareFieldTooltip($element, $helperName); - if ($element->depends) { + if (isset($element['depends'])) { $this->_processElementDependencies($element, $section, $group, $elementId, $fieldPrefix); } @@ -369,33 +420,37 @@ class Mage_Adminhtml_Block_System_Config_Form extends Mage_Adminhtml_Block_Widge 'hint' => $hint, 'value' => $data, 'inherit' => $inherit, - 'class' => $element->frontend_class, + 'class' => isset($element['frontend_class']) ? $element['frontend_class'] : '', 'field_config' => $element, 'scope' => $this->getScope(), 'scope_id' => $this->getScopeId(), 'scope_label' => $this->getScopeLabel($element), - 'can_use_default_value' => $this->canUseDefaultValue((int)$element->show_in_default), - 'can_use_website_value' => $this->canUseWebsiteValue((int)$element->show_in_website), + 'can_use_default_value' => $this->canUseDefaultValue( + isset($element['showInDefault']) ? (int)$element['showInDefault'] : 0 + ), + 'can_use_website_value' => $this->canUseWebsiteValue( + isset($element['showInWebsite']) ? (int)$element['showInWebsite'] : 0 + ), )); $this->_applyFieldConfiguration($field, $element); $field->setRenderer($fieldRenderer); - if ($element->source_model) { + if (isset($element['source_model'])) { $field->setValues($this->_extractDataFromSourceModel($element, $path, $fieldType)); } } /** - * Retreive field renderer block + * Retrieve field renderer block * - * @param Varien_SimpleXml_Element $element - * @return Mage_Adminhtml_Block_System_Config_Form_Field + * @param array $element + * @return Mage_Backend_Block_System_Config_Form_Field */ protected function _getFieldRenderer($element) { - if ($element->frontend_model) { - $fieldRenderer = Mage::getBlockSingleton((string)$element->frontend_model); + if (isset($element['frontend_model'])) { + $fieldRenderer = Mage::getBlockSingleton($element['frontend_model']); return $fieldRenderer; } else { $fieldRenderer = $this->_defaultFieldRenderer; @@ -404,18 +459,18 @@ class Mage_Adminhtml_Block_System_Config_Form extends Mage_Adminhtml_Block_Widge } /** - * Retreive dvta from bakcend model + * Retrieve data from backend model * - * @param Varien_SimpleXml_Element $element + * @param array $element * @param string $path * @param mixed $data * @return mixed */ protected function _fetchBackendModelData($element, $path, $data) { - $model = Mage::getModel((string)$element->backend_model); + $model = Mage::getModel($element['backend_model']); if (!$model instanceof Mage_Core_Model_Config_Data) { - Mage::throwException('Invalid config field backend model: ' . (string)$element->backend_model); + Mage::throwException('Invalid config field backend model: ' . $element['backend_model']); } $model->setPath($path) ->setValue($data) @@ -429,37 +484,31 @@ class Mage_Adminhtml_Block_System_Config_Form extends Mage_Adminhtml_Block_Widge /** * Apply element dependencies from configuration * - * @param Varien_SimpleXml_Element $element - * @param Varien_SimpleXml_Element $section - * @param Varien_SimpleXml_Element $group + * @param array $element + * @param array $section + * @param array $group * @param string $elementId * @param string $fieldPrefix */ protected function _processElementDependencies($element, $section, $group, $elementId, $fieldPrefix = '') { - foreach ($element->depends->children() as $dependent) { - /* @var $dependent Mage_Core_Model_Config_Element */ - $dependentId = $section->getName() - . '_' . $group->getName() - . '_' . $fieldPrefix - . $dependent->getName(); + foreach ($element['depends']['fields'] as $depend) { + /* @var array $depend */ + $dependentId = $section['id'] . '_' . $group['id'] . '_' . $fieldPrefix . $depend['id']; $shouldBeAddedDependence = true; - $dependentValue = (string)$dependent; - if (isset($dependent['separator'])) { - $dependentValue = explode((string)$dependent['separator'], $dependentValue); + $dependentValue = $depend['value']; + if (isset($depend['separator'])) { + $dependentValue = explode($depend['separator'], $dependentValue); } - $dependentFieldName = $fieldPrefix . $dependent->getName(); - $dependentField = $group->fields->$dependentFieldName; + $dependentFieldName = $fieldPrefix . $depend['id']; + $dependentField = $group['fields'][$dependentFieldName]; /* * If dependent field can't be shown in current scope and real dependent config value * is not equal to preferred one, then hide dependence fields by adding dependence * based on not shown field (not rendered field) */ if (!$this->_canShowField($dependentField)) { - $dependentFullPath = $section->getName() - . '/' . $group->getName() - . '/' . $fieldPrefix - . $dependent->getName(); + $dependentFullPath = $section['id'] . '/' . $group['id'] . '/' . $fieldPrefix . $depend['id']; $dependentValueInStore = Mage::getStoreConfig($dependentFullPath, $this->getStoreCode()); if (is_array($dependentValue)) { $shouldBeAddedDependence = !in_array($dependentValueInStore, $dependentValue); @@ -480,35 +529,32 @@ class Mage_Adminhtml_Block_System_Config_Form extends Mage_Adminhtml_Block_Widge * Apply custom element configuration * * @param Varien_Data_Form_Element_Abstract $field - * @param Varien_SimpleXml_Element $element + * @param array $element */ protected function _applyFieldConfiguration($field, $element) { $this->_prepareFieldOriginalData($field, $element); - if (isset($element->validate)) { - $field->addClass($element->validate); + if (isset($element['validate'])) { + $field->addClass($element['validate']); } - if (isset($element->frontend_type) - && 'multiselect' === (string)$element->frontend_type - && isset($element->can_be_empty) - ) { + if (isset($element['type']) && 'multiselect' === $element['type'] && isset($element['can_be_empty'])) { $field->setCanBeEmpty(true); } } /** - * Retreive source model option list + * Retrieve source model option list * - * @param Varien_SimpleXml_Element $element + * @param array $element * @param string $path * @param string $fieldType * @return array */ protected function _extractDataFromSourceModel($element, $path, $fieldType) { - $factoryName = (string)$element->source_model; + $factoryName = $element['source_model']; $method = false; if (preg_match('/^([^:]+?)::([^:]+?)$/', $factoryName, $matches)) { array_shift($matches); @@ -552,17 +598,17 @@ class Mage_Adminhtml_Block_System_Config_Form extends Mage_Adminhtml_Block_Widge } /** - * Set "original_data" array to the element, composed from nodes with scalar values + * Set "original_data" array to the element, composed from array elements with scalar values * * @param Varien_Data_Form_Element_Abstract $field - * @param Varien_Simplexml_Element $xmlElement + * @param array $data */ - protected function _prepareFieldOriginalData($field, $xmlElement) + protected function _prepareFieldOriginalData($field, $data) { $originalData = array(); - foreach ($xmlElement as $key => $value) { - if (!$value->hasChildren()) { - $originalData[$key] = (string)$value; + foreach ($data as $key => $value) { + if (!is_array($value)) { + $originalData[$key] = $value; } } $field->setOriginalData($originalData); @@ -571,24 +617,24 @@ class Mage_Adminhtml_Block_System_Config_Form extends Mage_Adminhtml_Block_Widge /** * Support models "getCommentText" method for field note generation * - * @param Mage_Core_Model_Config_Element $element + * @param array $element * @param string $helper + * @param string $currentValue * @return string */ protected function _prepareFieldComment($element, $helper, $currentValue) { $comment = ''; - if ($element->comment) { - $commentInfo = $element->comment->asArray(); - if (is_array($commentInfo)) { - if (isset($commentInfo['model'])) { - $model = Mage::getModel($commentInfo['model']); + if (isset($element['comment'])) { + if (is_array($element['comment'])) { + if (isset($element['comment']['model'])) { + $model = Mage::getModel($element['comment']['model']); if (method_exists($model, 'getCommentText')) { $comment = $model->getCommentText($element, $currentValue); } } } else { - $comment = Mage::helper($helper)->__($commentInfo); + $comment = $this->helper($helper)->__($element['comment']); } } return $comment; @@ -597,16 +643,16 @@ class Mage_Adminhtml_Block_System_Config_Form extends Mage_Adminhtml_Block_Widge /** * Prepare additional comment for field like tooltip * - * @param Mage_Core_Model_Config_Element $element + * @param array $element * @param string $helper * @return string */ protected function _prepareFieldTooltip($element, $helper) { - if ($element->tooltip) { - return Mage::helper($helper)->__((string)$element->tooltip); - } elseif ($element->tooltip_block) { - return $this->getLayout()->createBlock((string)$element->tooltip_block)->toHtml(); + if (isset($element['tooltip'])) { + return $this->helper($helper)->__($element['tooltip']); + } elseif (isset($element['tooltip_block'])) { + return $this->getLayout()->createBlock($element['tooltip_block'])->toHtml(); } return ''; } @@ -614,7 +660,8 @@ class Mage_Adminhtml_Block_System_Config_Form extends Mage_Adminhtml_Block_Widge /** * Append dependence block at then end of form block * - * + * @param string $html + * @return string */ protected function _afterToHtml($html) { @@ -626,44 +673,45 @@ class Mage_Adminhtml_Block_System_Config_Form extends Mage_Adminhtml_Block_Widge } /** - * Enter description here... + * Sort elements * - * @param Varien_Simplexml_Element $a - * @param Varien_Simplexml_Element $b + * @param array $a + * @param array $b * @return boolean */ protected function _sortForm($a, $b) { - return (int)$a->sort_order < (int)$b->sort_order ? -1 : ((int)$a->sort_order > (int)$b->sort_order ? 1 : 0); - + $aSortOrder = isset($a['sortOrder']) ? (int)$a['sortOrder'] : 0; + $bSortOrder = isset($b['sortOrder']) ? (int)$b['sortOrder'] : 0; + return $aSortOrder < $bSortOrder ? -1 : ($aSortOrder > $bSortOrder ? 1 : 0); } /** - * Enter description here... + * Check if can use default value * - * @param Varien_Simplexml_Element $field + * @param int $fieldValue * @return boolean */ - public function canUseDefaultValue($field) + public function canUseDefaultValue($fieldValue) { - if ($this->getScope() == self::SCOPE_STORES && $field) { + if ($this->getScope() == self::SCOPE_STORES && $fieldValue) { return true; } - if ($this->getScope() == self::SCOPE_WEBSITES && $field) { + if ($this->getScope() == self::SCOPE_WEBSITES && $fieldValue) { return true; } return false; } /** - * Enter description here... + * Check if can use website value * - * @param Varien_Simplexml_Element $field + * @param int $fieldValue * @return boolean */ - public function canUseWebsiteValue($field) + public function canUseWebsiteValue($fieldValue) { - if ($this->getScope() == self::SCOPE_STORES && $field) { + if ($this->getScope() == self::SCOPE_STORES && $fieldValue) { return true; } return false; @@ -672,33 +720,38 @@ class Mage_Adminhtml_Block_System_Config_Form extends Mage_Adminhtml_Block_Widge /** * Checking field visibility * - * @param Varien_Simplexml_Element $field + * @param array $field * @return bool */ protected function _canShowField($field) { - $ifModuleEnabled = trim((string)$field->if_module_enabled); - if ($ifModuleEnabled && !Mage::helper('Mage_Core_Helper_Data')->isModuleEnabled($ifModuleEnabled)) { + $ifModuleEnabled = isset($field['if_module_enabled']) ? trim($field['if_module_enabled']) : false; + + if ($ifModuleEnabled && + false == $this->helper('Mage_Core_Helper_Data')->isModuleEnabled($ifModuleEnabled)) { return false; } + $showInDefault = isset($field['showInDefault']) ? (bool)$field['showInDefault'] : false; + $showInWebsite = isset($field['showInWebsite']) ? (bool)$field['showInWebsite'] : false; + $showInStore = isset($field['showInStore']) ? (bool)$field['showInStore'] : false; + $hideIfSingleStore = isset($field['hide_in_single_store_mode']) ? (int)$field['hide_in_single_store_mode'] : 0; + + $fieldIsDisplayable = $showInDefault || $showInWebsite || $showInStore; - $fieldIsDisplayable = (bool)$field->show_in_default - || (bool)$field->show_in_website - || (bool)$field->show_in_store; if (Mage::app()->isSingleStoreMode() && $fieldIsDisplayable) { - return !(int)$field->hide_in_single_store_mode; + return !$hideIfSingleStore; } $result = true; switch ($this->getScope()) { case self::SCOPE_DEFAULT: - $result = (int)$field->show_in_default; + $result = (int)$showInDefault; break; case self::SCOPE_WEBSITES: - $result = (int)$field->show_in_website; + $result = (int)$showInWebsite; break; case self::SCOPE_STORES: - $result = (int)$field->show_in_store; + $result = (int)$showInStore; break; } return $result; @@ -729,14 +782,17 @@ class Mage_Adminhtml_Block_System_Config_Form extends Mage_Adminhtml_Block_Widge /** * Retrieve label for scope * - * @param Mage_Core_Model_Config_Element $element + * @param array $element * @return string */ public function getScopeLabel($element) { - if ($element->show_in_store == 1) { + $showInStore = isset($element['showInStore']) ? (int)$element['showInStore'] : 0; + $showInWebsite = isset($element['showInWebsite']) ? (int)$element['showInWebsite'] : 0; + + if ($showInStore == 1) { return $this->_scopeLabels[self::SCOPE_STORES]; - } elseif ($element->show_in_website == 1) { + } elseif ($showInWebsite == 1) { return $this->_scopeLabels[self::SCOPE_WEBSITES]; } return $this->_scopeLabels[self::SCOPE_DEFAULT]; @@ -786,7 +842,7 @@ class Mage_Adminhtml_Block_System_Config_Form extends Mage_Adminhtml_Block_Widge } /** - * Enter description here... + * Get additional element types * * @return array */ @@ -794,15 +850,15 @@ class Mage_Adminhtml_Block_System_Config_Form extends Mage_Adminhtml_Block_Widge { return array( 'export' => Mage::getConfig() - ->getBlockClassName('Mage_Adminhtml_Block_System_Config_Form_Field_Export'), + ->getBlockClassName('Mage_Backend_Block_System_Config_Form_Field_Export'), 'import' => Mage::getConfig() - ->getBlockClassName('Mage_Adminhtml_Block_System_Config_Form_Field_Import'), + ->getBlockClassName('Mage_Backend_Block_System_Config_Form_Field_Import'), 'allowspecific' => Mage::getConfig() - ->getBlockClassName('Mage_Adminhtml_Block_System_Config_Form_Field_Select_Allowspecific'), + ->getBlockClassName('Mage_Backend_Block_System_Config_Form_Field_Select_Allowspecific'), 'image' => Mage::getConfig() - ->getBlockClassName('Mage_Adminhtml_Block_System_Config_Form_Field_Image'), + ->getBlockClassName('Mage_Backend_Block_System_Config_Form_Field_Image'), 'file' => Mage::getConfig() - ->getBlockClassName('Mage_Adminhtml_Block_System_Config_Form_Field_File') + ->getBlockClassName('Mage_Backend_Block_System_Config_Form_Field_File') ); } @@ -842,5 +898,4 @@ class Mage_Adminhtml_Block_System_Config_Form extends Mage_Adminhtml_Block_Widge { return $this->getRequest()->getParam('store', ''); } - } diff --git a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field.php b/app/code/core/Mage/Backend/Block/System/Config/Form/Field.php similarity index 71% rename from app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field.php rename to app/code/core/Mage/Backend/Block/System/Config/Form/Field.php index 585921cd6bfc273688c49e15653125dc1fb90726..173c7cca62322d8a083d5caf5bf183d42f3531df 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field.php +++ b/app/code/core/Mage/Backend/Block/System/Config/Form/Field.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -28,13 +28,57 @@ * Abstract config form element renderer * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Block_System_Config_Form_Field - extends Mage_Adminhtml_Block_Abstract +class Mage_Backend_Block_System_Config_Form_Field + extends Mage_Backend_Block_Abstract implements Varien_Data_Form_Element_Renderer_Interface { + /** + * Application + * + * @var Mage_Core_Model_App + */ + protected $_application; + + /** + * @param Mage_Core_Controller_Request_Http $request + * @param Mage_Core_Model_Layout $layout + * @param Mage_Core_Model_Event_Manager $eventManager + * @param Mage_Backend_Model_Url $urlBuilder + * @param Mage_Core_Model_Translate $translator + * @param Mage_Core_Model_Cache $cache + * @param Mage_Core_Model_Design_Package $designPackage + * @param Mage_Core_Model_Session $session + * @param Mage_Core_Model_Store_Config $storeConfig + * @param Mage_Core_Controller_Varien_Front $frontController + * @param Mage_Core_Model_Factory_Helper $helperFactory + * @param Mage_Core_Model_App $application + * @param array $data + * + * @SuppressWarnings(PHPMD.ExcessiveParameterList) + */ + public function __construct( + Mage_Core_Controller_Request_Http $request, + Mage_Core_Model_Layout $layout, + Mage_Core_Model_Event_Manager $eventManager, + Mage_Backend_Model_Url $urlBuilder, + Mage_Core_Model_Translate $translator, + Mage_Core_Model_Cache $cache, + Mage_Core_Model_Design_Package $designPackage, + Mage_Core_Model_Session $session, + Mage_Core_Model_Store_Config $storeConfig, + Mage_Core_Controller_Varien_Front $frontController, + Mage_Core_Model_Factory_Helper $helperFactory, + Mage_Core_Model_App $application, + array $data = array() + ) { + $this->_application = $application; + parent::__construct($request, $layout, $eventManager, $urlBuilder, $translator, $cache, $designPackage, + $session, $storeConfig, $frontController, $helperFactory, $data + ); + } /** * Retrieve element HTML markup @@ -137,9 +181,9 @@ class Mage_Adminhtml_Block_System_Config_Form_Field */ protected function _getInheritCheckboxLabel(Varien_Data_Form_Element_Abstract $element) { - $checkboxLabel = Mage::helper('Mage_Adminhtml_Helper_Data')->__('Use Default'); + $checkboxLabel = $this->helper('Mage_Backend_Helper_Data')->__('Use Default'); if ($element->getCanUseWebsiteValue()) { - $checkboxLabel = Mage::helper('Mage_Adminhtml_Helper_Data')->__('Use Website'); + $checkboxLabel = $this->helper('Mage_Backend_Helper_Data')->__('Use Website'); } return $checkboxLabel; } @@ -148,12 +192,12 @@ class Mage_Adminhtml_Block_System_Config_Form_Field * Render scope label * * @param Varien_Data_Form_Element_Abstract $element - * @return Mage_Adminhtml_Block_System_Config_Form_Field + * @return string */ protected function _renderScopeLabel(Varien_Data_Form_Element_Abstract $element) { $html = '<td class="scope-label">'; - if ($element->getScope() && !Mage::app()->isSingleStoreMode()) { + if ($element->getScope() && false == $this->_application->isSingleStoreMode()) { $html .= $element->getScopeLabel(); } $html .= '</td>'; diff --git a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Array/Abstract.php b/app/code/core/Mage/Backend/Block/System/Config/Form/Field/Array/Abstract.php similarity index 93% rename from app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Array/Abstract.php rename to app/code/core/Mage/Backend/Block/System/Config/Form/Field/Array/Abstract.php index 1e8f6994343ba658c9e2e2703bcc632743161f80..8f7727df6f9af2319e04baa3de34345421832320 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Array/Abstract.php +++ b/app/code/core/Mage/Backend/Block/System/Config/Form/Field/Array/Abstract.php @@ -19,20 +19,20 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ /** - * Adminhtml system config array field renderer + * Backend system config array field renderer * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @author Magento Core Team <core@magentocommerce.com> */ -abstract class Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract - extends Mage_Adminhtml_Block_System_Config_Form_Field +abstract class Mage_Backend_Block_System_Config_Form_Field_Array_Abstract + extends Mage_Backend_Block_System_Config_Form_Field { /** * Grid columns @@ -51,7 +51,7 @@ abstract class Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract /** * Label of add button * - * @var unknown_type + * @var string */ protected $_addButtonLabel; @@ -69,7 +69,7 @@ abstract class Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract */ protected $_isPreparedToRender = false; - protected $_template = 'Mage_Adminhtml::system/config/form/field/array.phtml'; + protected $_template = 'Mage_Backend::system/config/form/field/array.phtml'; /** * Check if columns are defined, set template @@ -78,12 +78,10 @@ abstract class Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract protected function _construct() { if (!$this->_addButtonLabel) { - $this->_addButtonLabel = Mage::helper('Mage_Adminhtml_Helper_Data')->__('Add'); + $this->_addButtonLabel = $this->helper('Mage_Backend_Helper_Data')->__('Add'); } parent::_construct(); - if (!$this->getTemplate()) { - - } + } /** diff --git a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Datetime.php b/app/code/core/Mage/Backend/Block/System/Config/Form/Field/Datetime.php similarity index 85% rename from app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Datetime.php rename to app/code/core/Mage/Backend/Block/System/Config/Form/Field/Datetime.php index f51bd9ab6cc045435fcbdc64dc8f191ca7a51f0e..d2f436dff9d1067831f72a187d374bbd11eff656 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Datetime.php +++ b/app/code/core/Mage/Backend/Block/System/Config/Form/Field/Datetime.php @@ -19,20 +19,20 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ /** - * Adminhtml system config datetime field renderer + * Backend system config datetime field renderer * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Block_System_Config_Form_Field_Datetime extends Mage_Adminhtml_Block_System_Config_Form_Field +class Mage_Backend_Block_System_Config_Form_Field_Datetime extends Mage_Backend_Block_System_Config_Form_Field { protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) { diff --git a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Export.php b/app/code/core/Mage/Backend/Block/System/Config/Form/Field/Export.php similarity index 55% rename from app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Export.php rename to app/code/core/Mage/Backend/Block/System/Config/Form/Field/Export.php index 05d9c92bea877a48b688dfeac8276feda9a52219..d450c34228e32fcdc3dd0cd7b4cc157cc54aec25 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Export.php +++ b/app/code/core/Mage/Backend/Block/System/Config/Form/Field/Export.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -28,29 +28,52 @@ * Export CSV button for shipping table rates * * @category Mage - * @package Mage_Adminhtml - * @author Magento Core Team <core@magentocommerce.com> + * @package Mage_Backend + * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Block_System_Config_Form_Field_Export extends Varien_Data_Form_Element_Abstract +class Mage_Backend_Block_System_Config_Form_Field_Export extends Varien_Data_Form_Element_Abstract { + /** + * @var Mage_Core_Model_Factory_Helper + */ + protected $_helperFactory; + + /** + * @param array $attributes + */ + public function __construct(array $attributes = array()) + { + if (isset($attributes['helperFactory'])) { + $this->_helperFactory = $attributes['helperFactory']; + unset($attributes['helperFactory']); + } else { + $this->_helperFactory = Mage::getSingleton('Mage_Core_Model_Factory_Helper'); + } + + parent::__construct($attributes); + } + public function getElementHtml() { - $buttonBlock = $this->getForm()->getParent()->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button'); + /** @var Mage_Backend_Block_Widget_Button $buttonBlock */ + $buttonBlock = $this->getForm() + ->getParent() + ->getLayout() + ->createBlock('Mage_Backend_Block_Widget_Button'); $params = array( 'website' => $buttonBlock->getRequest()->getParam('website') ); - $url = Mage::helper('Mage_Adminhtml_Helper_Data')->getUrl("*/*/exportTablerates", $params); + $url = $this->_helperFactory->get('Mage_Backend_Helper_Data')->getUrl("*/*/exportTablerates", $params); $data = array( - 'label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Export CSV'), + 'label' => $this->_helperFactory->get('Mage_Backend_Helper_Data')->__('Export CSV'), 'onclick' => "setLocation('" . $url . "conditionName/' + $('carriers_tablerate_condition_name').value + '/tablerates.csv' )", 'class' => '', ); $html = $buttonBlock->setData($data)->toHtml(); - return $html; } } diff --git a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/File.php b/app/code/core/Mage/Backend/Block/System/Config/Form/Field/File.php similarity index 64% rename from app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/File.php rename to app/code/core/Mage/Backend/Block/System/Config/Form/Field/File.php index 6727c50c6b7567148c66c6505cbe54d548db46ca..ab003eb87fbfab63522a55bce273f6fb502eeaad 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/File.php +++ b/app/code/core/Mage/Backend/Block/System/Config/Form/Field/File.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -29,10 +29,10 @@ * File config field renderer * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Block_System_Config_Form_Field_File extends Varien_Data_Form_Element_File +class Mage_Backend_Block_System_Config_Form_Field_File extends Varien_Data_Form_Element_File { /** * Get element html @@ -55,11 +55,17 @@ class Mage_Adminhtml_Block_System_Config_Form_Field_File extends Varien_Data_For { $html = ''; if ((string)$this->getValue()) { - $label = Mage::helper('Mage_Adminhtml_Helper_Data')->__('Delete File'); - $html .= '<div>'.$this->getValue().' '; - $html .= '<input type="checkbox" name="'.parent::getName().'[delete]" value="1" class="checkbox" id="'.$this->getHtmlId().'_delete"'.($this->getDisabled() ? ' disabled="disabled"': '').'/>'; - $html .= '<label for="'.$this->getHtmlId().'_delete"'.($this->getDisabled() ? ' class="disabled"' : '').'> '.$label.'</label>'; - $html .= '<input type="hidden" name="'.parent::getName().'[value]" value="'.$this->getValue().'" />'; + $label = Mage::helper('Mage_Backend_Helper_Data')->__('Delete File'); + $html .= '<div>' . $this->getValue() . ' '; + $html .= '<input type="checkbox" name="' . parent::getName() + . '[delete]" value="1" class="checkbox" id="' + . $this->getHtmlId() . '_delete"' + . ($this->getDisabled() ? ' disabled="disabled"': '') . '/>'; + $html .= '<label for="' . $this->getHtmlId() . '_delete"' + . ($this->getDisabled() ? ' class="disabled"' : '').'> ' + . $label . '</label>'; + $html .= '<input type="hidden" name="' . parent::getName() + . '[value]" value="' . $this->getValue() . '" />'; $html .= '</div>'; } return $html; diff --git a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Heading.php b/app/code/core/Mage/Backend/Block/System/Config/Form/Field/Heading.php similarity index 89% rename from app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Heading.php rename to app/code/core/Mage/Backend/Block/System/Config/Form/Field/Heading.php index 1b3188340b3a862a4cb0ffe8f0392d356bb774c0..304e053a89b898e9f76e14834ea83b6ae3ab476d 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Heading.php +++ b/app/code/core/Mage/Backend/Block/System/Config/Form/Field/Heading.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -30,8 +30,8 @@ * * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Block_System_Config_Form_Field_Heading - extends Mage_Adminhtml_Block_Abstract implements Varien_Data_Form_Element_Renderer_Interface +class Mage_Backend_Block_System_Config_Form_Field_Heading + extends Mage_Backend_Block_Abstract implements Varien_Data_Form_Element_Renderer_Interface { /** * Render element html diff --git a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Image.php b/app/code/core/Mage/Backend/Block/System/Config/Form/Field/Image.php similarity index 74% rename from app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Image.php rename to app/code/core/Mage/Backend/Block/System/Config/Form/Field/Image.php index f6405a23278937dda343822d2e16d879a0b8409b..9c2622b5b5a3dce46a757e55575c99d4c1b2c402 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Image.php +++ b/app/code/core/Mage/Backend/Block/System/Config/Form/Field/Image.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -29,10 +29,10 @@ * Image config field renderer * * @category Mage - * @package Mage_Adminhtml - * @author Magento Core Team <core@magentocommerce.com> + * @package Mage_Backend + * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Block_System_Config_Form_Field_Image extends Varien_Data_Form_Element_Image +class Mage_Backend_Block_System_Config_Form_Field_Image extends Varien_Data_Form_Element_Image { /** @@ -45,11 +45,11 @@ class Mage_Adminhtml_Block_System_Config_Form_Field_Image extends Varien_Data_Fo $url = parent::_getUrl(); $config = $this->getFieldConfig(); - /* @var $config Varien_Simplexml_Element */ - if (!empty($config->base_url)) { - $el = $config->descend('base_url'); + /* @var $config array */ + if (array_key_exists('base_url', $config)) { + $el = $config['base_url']; $urlType = empty($el['type']) ? 'link' : (string)$el['type']; - $url = Mage::getBaseUrl($urlType) . (string)$config->base_url . '/' . $url; + $url = Mage::getBaseUrl($urlType) . $el['value'] . '/' . $url; } return $url; diff --git a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Import.php b/app/code/core/Mage/Backend/Block/System/Config/Form/Field/Import.php similarity index 87% rename from app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Import.php rename to app/code/core/Mage/Backend/Block/System/Config/Form/Field/Import.php index 91e5f6cf0eb2b334daca10c5f074c3cf3491b4f7..1efe527e2a5aeed94e561ed5bbff7b3ec5cb55e8 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Import.php +++ b/app/code/core/Mage/Backend/Block/System/Config/Form/Field/Import.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -29,10 +29,10 @@ * Custom import CSV file field for shipping table rates * * @category Mage - * @package Mage_Adminhtml - * @author Magento Core Team <core@magentocommerce.com> + * @package Mage_Backend + * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Block_System_Config_Form_Field_Import extends Varien_Data_Form_Element_Abstract +class Mage_Backend_Block_System_Config_Form_Field_Import extends Varien_Data_Form_Element_Abstract { protected function _construct() @@ -50,7 +50,7 @@ class Mage_Adminhtml_Block_System_Config_Form_Field_Import extends Varien_Data_F { $html = ''; - $html .= '<input id="time_condition" type="hidden" name="'.$this->getName().'" value="'.time().'" />'; + $html .= '<input id="time_condition" type="hidden" name="' . $this->getName() . '" value="'.time().'" />'; $html .= <<<EndHTML <script type="text/javascript"> diff --git a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Notification.php b/app/code/core/Mage/Backend/Block/System/Config/Form/Field/Notification.php similarity index 85% rename from app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Notification.php rename to app/code/core/Mage/Backend/Block/System/Config/Form/Field/Notification.php index db3f2e551b43bfdd7bc71286debf46cfe8dcbba7..92b4e620f5321e19d3e9ba90c54f358b4862de46 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Notification.php +++ b/app/code/core/Mage/Backend/Block/System/Config/Form/Field/Notification.php @@ -19,20 +19,20 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ /** - * Adminhtml system config datetime field renderer + * Backend system config datetime field renderer * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Block_System_Config_Form_Field_Notification extends Mage_Adminhtml_Block_System_Config_Form_Field +class Mage_Backend_Block_System_Config_Form_Field_Notification extends Mage_Backend_Block_System_Config_Form_Field { protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) { diff --git a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Regexceptions.php b/app/code/core/Mage/Backend/Block/System/Config/Form/Field/Regexceptions.php similarity index 84% rename from app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Regexceptions.php rename to app/code/core/Mage/Backend/Block/System/Config/Form/Field/Regexceptions.php index 1c9d16933a2ba298ffb6e307c963fcf1a54ecc29..9aef6439a3264b1366500dc3a743d8284d72d983 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Regexceptions.php +++ b/app/code/core/Mage/Backend/Block/System/Config/Form/Field/Regexceptions.php @@ -19,28 +19,29 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ /** - * Adminhtml system config array field renderer + * Backend system config array field renderer * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Block_System_Config_Form_Field_Regexceptions extends Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract +class Mage_Backend_Block_System_Config_Form_Field_Regexceptions + extends Mage_Backend_Block_System_Config_Form_Field_Array_Abstract { protected function _construct() { $this->addColumn('search', array( - 'label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Search String'), + 'label' => $this->helper('Mage_Backend_Helper_Data')->__('Search String'), 'style' => 'width:120px', )); $this->addColumn('value', array( - 'label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Design Theme'), + 'label' => $this->helper('Mage_Backend_Helper_Data')->__('Design Theme'), 'style' => 'width:120px', )); $this->_addAfter = false; diff --git a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Select/Allowspecific.php b/app/code/core/Mage/Backend/Block/System/Config/Form/Field/Select/Allowspecific.php similarity index 72% rename from app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Select/Allowspecific.php rename to app/code/core/Mage/Backend/Block/System/Config/Form/Field/Select/Allowspecific.php index 630dc0c10fb48a9500810381f7d6b15b7ef60cce..3da27d7482e4b27254477ad122acdc6e9092e702 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Select/Allowspecific.php +++ b/app/code/core/Mage/Backend/Block/System/Config/Form/Field/Select/Allowspecific.php @@ -19,22 +19,27 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ /** - * System congifuration shipping methods allow all countries selec + * System configuration shipping methods allow all countries select * * @category Mage - * @package Mage_Adminhtml - * @author Magento Core Team <core@magentocommerce.com> + * @package Mage_Backend + * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Block_System_Config_Form_Field_Select_Allowspecific extends Varien_Data_Form_Element_Select +class Mage_Backend_Block_System_Config_Form_Field_Select_Allowspecific extends Varien_Data_Form_Element_Select { + /** + * Add additional Javascript code + * + * @return string + */ public function getAfterElementHtml() { $javaScript = " @@ -47,14 +52,21 @@ class Mage_Adminhtml_Block_System_Config_Form_Field_Select_Allowspecific extends return $javaScript . parent::getAfterElementHtml(); } + /** + * @return string + */ public function getHtml() { - if(!$this->getValue() || $this->getValue()!=1) { - $this->getForm()->getElement($this->_getSpecificCountryElementId())->setDisabled('disabled'); + if(!$this->getValue() || 1 != $this->getValue()) { + $element = $this->getForm()->getElement($this->_getSpecificCountryElementId()); + $element->setDisabled('disabled'); } return parent::getHtml(); } + /** + * @return string + */ protected function _getSpecificCountryElementId() { return substr($this->getId(), 0, strrpos($this->getId(), 'allowspecific')) . 'specificcountry'; diff --git a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Fieldset.php b/app/code/core/Mage/Backend/Block/System/Config/Form/Fieldset.php similarity index 94% rename from app/code/core/Mage/Adminhtml/Block/System/Config/Form/Fieldset.php rename to app/code/core/Mage/Backend/Block/System/Config/Form/Fieldset.php index b70db58cb9c39f225feb4d0ea5622657d83cc991..cdf9552c53522568e767d472c1fa6828aa23977f 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Fieldset.php +++ b/app/code/core/Mage/Backend/Block/System/Config/Form/Fieldset.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -29,11 +29,11 @@ * Config form fieldset renderer * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Block_System_Config_Form_Fieldset - extends Mage_Adminhtml_Block_Abstract +class Mage_Backend_Block_System_Config_Form_Fieldset + extends Mage_Backend_Block_Abstract implements Varien_Data_Form_Element_Renderer_Interface { @@ -48,7 +48,7 @@ class Mage_Adminhtml_Block_System_Config_Form_Fieldset $html = $this->_getHeaderHtml($element); foreach ($element->getSortedElements() as $field) { - $html.= $field->toHtml(); + $html .= $field->toHtml(); } $html .= $this->_getFooterHtml($element); @@ -94,8 +94,9 @@ class Mage_Adminhtml_Block_System_Config_Form_Fieldset */ protected function _getFieldsetCss() { - $configCss = (string)$this->getGroup()->fieldset_css; - return 'config collapseable'.($configCss ? ' ' . $configCss : ''); + $group = $this->getGroup(); + $configCss = isset($group['fieldset_css']) ? $group['fieldset_css'] : null; + return 'config collapseable' . ($configCss ? ' ' . $configCss : ''); } /** @@ -182,7 +183,7 @@ class Mage_Adminhtml_Block_System_Config_Form_Fieldset } };"; } - return Mage::helper('Mage_Adminhtml_Helper_Js')->getScript($js); + return $this->helper('Mage_Core_Helper_Js')->getScript($js); } /** diff --git a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Fieldset/Modules/DisableOutput.php b/app/code/core/Mage/Backend/Block/System/Config/Form/Fieldset/Modules/DisableOutput.php similarity index 72% rename from app/code/core/Mage/Adminhtml/Block/System/Config/Form/Fieldset/Modules/DisableOutput.php rename to app/code/core/Mage/Backend/Block/System/Config/Form/Fieldset/Modules/DisableOutput.php index 2e9137cff19efaa8ec63ed573b45fb115429506f..23c14a9bd24bf6037871c50114bb22de83183088 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Fieldset/Modules/DisableOutput.php +++ b/app/code/core/Mage/Backend/Block/System/Config/Form/Fieldset/Modules/DisableOutput.php @@ -19,19 +19,35 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Adminhtml_Block_System_Config_Form_Fieldset_Modules_DisableOutput - extends Mage_Adminhtml_Block_System_Config_Form_Fieldset +class Mage_Backend_Block_System_Config_Form_Fieldset_Modules_DisableOutput + extends Mage_Backend_Block_System_Config_Form_Fieldset { + /** + * @var Varien_Object + */ protected $_dummyElement; + + + /** + * @var Mage_Backend_Block_System_Config_Form_Field + */ protected $_fieldRenderer; + + /** + * @var array + */ protected $_values; + /** + * @param Varien_Data_Form_Element_Abstract $element + * @return string + */ public function render(Varien_Data_Form_Element_Abstract $element) { $html = $this->_getHeaderHtml($element); @@ -39,8 +55,7 @@ class Mage_Adminhtml_Block_System_Config_Form_Fieldset_Modules_DisableOutput $modules = array_keys((array)Mage::getConfig()->getNode('modules')->children()); $dispatchResult = new Varien_Object($modules); - Mage::dispatchEvent( - 'adminhtml_system_config_advanced_disableoutput_render_before', + $this->_eventManager->dispatch('adminhtml_system_config_advanced_disableoutput_render_before', array('modules' => $dispatchResult) ); $modules = $dispatchResult->toArray(); @@ -48,7 +63,7 @@ class Mage_Adminhtml_Block_System_Config_Form_Fieldset_Modules_DisableOutput sort($modules); foreach ($modules as $moduleName) { - if ($moduleName==='Mage_Adminhtml') { + if ($moduleName === 'Mage_Adminhtml' || $moduleName === 'Mage_Backend') { continue; } $html.= $this->_getFieldHtml($element, $moduleName); @@ -58,37 +73,51 @@ class Mage_Adminhtml_Block_System_Config_Form_Fieldset_Modules_DisableOutput return $html; } + /** + * @return Varien_Object + */ protected function _getDummyElement() { if (empty($this->_dummyElement)) { - $this->_dummyElement = new Varien_Object(array('show_in_default'=>1, 'show_in_website'=>1)); + $this->_dummyElement = new Varien_Object(array('showInDefault' => 1, 'showInWebsite' => 1)); } return $this->_dummyElement; } + /** + * @return Mage_Backend_Block_System_Config_Form_Field + */ protected function _getFieldRenderer() { if (empty($this->_fieldRenderer)) { - $this->_fieldRenderer = Mage::getBlockSingleton('Mage_Adminhtml_Block_System_Config_Form_Field'); + $this->_fieldRenderer = Mage::getBlockSingleton('Mage_Backend_Block_System_Config_Form_Field'); } return $this->_fieldRenderer; } + /** + * @return array + */ protected function _getValues() { if (empty($this->_values)) { $this->_values = array( - array('label'=>Mage::helper('Mage_Adminhtml_Helper_Data')->__('Enable'), 'value'=>0), - array('label'=>Mage::helper('Mage_Adminhtml_Helper_Data')->__('Disable'), 'value'=>1), + array('label' => $this->helper('Mage_Backend_Helper_Data')->__('Enable'), 'value' => 0), + array('label' => $this->helper('Mage_Backend_Helper_Data')->__('Disable'), 'value' => 1), ); } return $this->_values; } + /** + * @param Varien_Data_Form_Element_Fieldset $fieldset + * @param string $moduleName + * @return mixed + */ protected function _getFieldHtml($fieldset, $moduleName) { $configData = $this->getConfigData(); - $path = 'advanced/modules_disable_output/'.$moduleName; //TODO: move as property of form + $path = 'advanced/modules_disable_output/' . $moduleName; //TODO: move as property of form if (isset($configData[$path])) { $data = $configData[$path]; $inherit = false; diff --git a/app/code/core/Mage/Adminhtml/Block/System/Config/Switcher.php b/app/code/core/Mage/Backend/Block/System/Config/Switcher.php similarity index 83% rename from app/code/core/Mage/Adminhtml/Block/System/Config/Switcher.php rename to app/code/core/Mage/Backend/Block/System/Config/Switcher.php index bf17114054380a2dcb41b38238e915a6aff28f7c..e1d04019d14e72e179dca44b2257759e0bc37ff2 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Config/Switcher.php +++ b/app/code/core/Mage/Backend/Block/System/Config/Switcher.php @@ -19,14 +19,16 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ - -class Mage_Adminhtml_Block_System_Config_Switcher extends Mage_Adminhtml_Block_Template +class Mage_Backend_Block_System_Config_Switcher extends Mage_Backend_Block_Template { + /** + * @return Mage_Core_Block_Abstract + */ protected function _prepareLayout() { $this->setTemplate('system/config/switcher.phtml'); @@ -41,19 +43,16 @@ class Mage_Adminhtml_Block_System_Config_Switcher extends Mage_Adminhtml_Block_T public function getStoreSelectOptions() { $section = $this->getRequest()->getParam('section'); - $curWebsite = $this->getRequest()->getParam('website'); $curStore = $this->getRequest()->getParam('store'); $storeModel = Mage::getSingleton('Mage_Core_Model_System_Store'); /* @var $storeModel Mage_Core_Model_System_Store */ - $url = Mage::getModel('Mage_Adminhtml_Model_Url'); - $options = array(); $options['default'] = array( - 'label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Default Config'), - 'url' => $url->getUrl('*/*/*', array('section'=>$section)), + 'label' => $this->helper('Mage_Backend_Helper_Data')->__('Default Config'), + 'url' => $this->getUrl('*/*/*', array('section' => $section)), 'selected' => !$curWebsite && !$curStore, 'style' => 'background:#ccc; font-weight:bold;', ); @@ -73,7 +72,9 @@ class Mage_Adminhtml_Block_System_Config_Switcher extends Mage_Adminhtml_Block_T $websiteShow = true; $options['website_' . $website->getCode()] = array( 'label' => $website->getName(), - 'url' => $url->getUrl('*/*/*', array('section'=>$section, 'website'=>$website->getCode())), + 'url' => $this->getUrl('*/*/*', + array('section' => $section, 'website' => $website->getCode()) + ), 'selected' => !$curStore && $curWebsite == $website->getCode(), 'style' => 'padding-left:16px; background:#DDD; font-weight:bold;', ); @@ -89,7 +90,9 @@ class Mage_Adminhtml_Block_System_Config_Switcher extends Mage_Adminhtml_Block_T } $options['store_' . $store->getCode()] = array( 'label' => $store->getName(), - 'url' => $url->getUrl('*/*/*', array('section'=>$section, 'website'=>$website->getCode(), 'store'=>$store->getCode())), + 'url' => $this->getUrl('*/*/*', + array('section' => $section, 'website' => $website->getCode(), 'store' => $store->getCode()) + ), 'selected' => $curStore == $store->getCode(), 'style' => '', ); @@ -113,7 +116,7 @@ class Mage_Adminhtml_Block_System_Config_Switcher extends Mage_Adminhtml_Block_T */ public function getHintHtml() { - return Mage::getBlockSingleton('Mage_Adminhtml_Block_Store_Switcher')->getHintHtml(); + return Mage::getBlockSingleton('Mage_Backend_Block_Store_Switcher')->getHintHtml(); } /** diff --git a/app/code/core/Mage/Adminhtml/Block/System/Config/System/Storage/Media/Synchronize.php b/app/code/core/Mage/Backend/Block/System/Config/System/Storage/Media/Synchronize.php similarity index 85% rename from app/code/core/Mage/Adminhtml/Block/System/Config/System/Storage/Media/Synchronize.php rename to app/code/core/Mage/Backend/Block/System/Config/System/Storage/Media/Synchronize.php index 19b27810fbb06d2543f2ba0b2d8ee241f1027fbf..de640b1f2cec2ea1d692b1f08ad1c0d14173ab65 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Config/System/Storage/Media/Synchronize.php +++ b/app/code/core/Mage/Backend/Block/System/Config/System/Storage/Media/Synchronize.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -29,11 +29,11 @@ * Synchronize button renderer * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Block_System_Config_System_Storage_Media_Synchronize - extends Mage_Adminhtml_Block_System_Config_Form_Field +class Mage_Backend_Block_System_Config_System_Storage_Media_Synchronize + extends Mage_Backend_Block_System_Config_Form_Field { protected $_template = 'system/config/system/storage/media/synchronize.phtml'; @@ -68,7 +68,7 @@ class Mage_Adminhtml_Block_System_Config_System_Storage_Media_Synchronize */ public function getAjaxSyncUrl() { - return Mage::getSingleton('Mage_Adminhtml_Model_Url')->getUrl('*/system_config_system_storage/synchronize'); + return $this->getUrl('*/system_config_system_storage/synchronize'); } /** @@ -78,7 +78,7 @@ class Mage_Adminhtml_Block_System_Config_System_Storage_Media_Synchronize */ public function getAjaxStatusUpdateUrl() { - return Mage::getSingleton('Mage_Adminhtml_Model_Url')->getUrl('*/system_config_system_storage/status'); + return $this->getUrl('*/system_config_system_storage/status'); } /** @@ -88,10 +88,10 @@ class Mage_Adminhtml_Block_System_Config_System_Storage_Media_Synchronize */ public function getButtonHtml() { - $button = $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button') + $button = $this->getLayout()->createBlock('Mage_Backend_Block_Widget_Button') ->setData(array( 'id' => 'synchronize_button', - 'label' => $this->helper('Mage_Adminhtml_Helper_Data')->__('Synchronize'), + 'label' => $this->helper('Mage_Backend_Helper_Data')->__('Synchronize'), 'onclick' => 'javascript:synchronize(); return false;' )); diff --git a/app/code/core/Mage/Backend/Block/System/Config/Tabs.php b/app/code/core/Mage/Backend/Block/System/Config/Tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..ec6b385f0208fb992cbad119f83d3bf4a275a7ec --- /dev/null +++ b/app/code/core/Mage/Backend/Block/System/Config/Tabs.php @@ -0,0 +1,441 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Mage_Backend + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + + +/** + * System configuration tabs block + * + * @method setTitle(string $title) + * + * @category Mage + * @package Mage_Backend + * @author Magento Core Team <core@magentocommerce.com> + */ +class Mage_Backend_Block_System_Config_Tabs extends Mage_Backend_Block_Widget +{ + + /** + * Tabs + * + * @var array + */ + protected $_tabs; + + /** + * @var Mage_Backend_Model_Config_StructureInterface + */ + protected $_systemConfig; + + /** + * Block template filename + * + * @var string + */ + protected $_template = 'system/config/tabs.phtml'; + + /** + * @var Varien_Data_Collection_Factory + */ + protected $_collectionFactory; + + /** + * @var Varien_Object_Factory + */ + protected $_objectFactory; + + /** + * @param Mage_Core_Controller_Request_Http $request + * @param Mage_Core_Model_Layout $layout + * @param Mage_Core_Model_Event_Manager $eventManager + * @param Mage_Backend_Model_Url $urlBuilder + * @param Mage_Core_Model_Translate $translator + * @param Mage_Core_Model_Cache $cache + * @param Mage_Core_Model_Design_Package $designPackage + * @param Mage_Core_Model_Session $session + * @param Mage_Core_Model_Store_Config $storeConfig + * @param Mage_Core_Controller_Varien_Front $frontController + * @param Mage_Core_Model_Factory_Helper $helperFactory + * @param Varien_Data_Collection_Factory $collectionFactory + * @param Varien_Object_Factory $objectFactory + * @param array $data + * + * @SuppressWarnings(PHPMD.ExcessiveParameterList) + */ + public function __construct( + Mage_Core_Controller_Request_Http $request, + Mage_Core_Model_Layout $layout, + Mage_Core_Model_Event_Manager $eventManager, + Mage_Backend_Model_Url $urlBuilder, + Mage_Core_Model_Translate $translator, + Mage_Core_Model_Cache $cache, + Mage_Core_Model_Design_Package $designPackage, + Mage_Core_Model_Session $session, + Mage_Core_Model_Store_Config $storeConfig, + Mage_Core_Controller_Varien_Front $frontController, + Mage_Core_Model_Factory_Helper $helperFactory, + Varien_Data_Collection_Factory $collectionFactory, + Varien_Object_Factory $objectFactory, + array $data = array() + ) { + parent::__construct($request, $layout, $eventManager, $urlBuilder, $translator, $cache, $designPackage, + $session, $storeConfig, $frontController, $helperFactory, $data + ); + $this->_collectionFactory = $collectionFactory; + $this->_objectFactory = $objectFactory; + } + + + protected function _construct() + { + parent::_construct(); + $this->_systemConfig = $this->hasData('systemConfig') ? + $this->getData('systemConfig') : + Mage::getSingleton('Mage_Backend_Model_Config_Structure_Reader')->getConfiguration(); + + $this->setId('system_config_tabs'); + $this->setTitle($this->helper('Mage_Backend_Helper_Data')->__('Configuration')); + } + + /** + * Sort sections/tabs + * + * @param mixed $a + * @param mixed $b + * @return int + */ + protected function _sort($a, $b) + { + $aSortOrder = isset($a['sortOrder']) ? (int)$a['sortOrder'] : 0; + $bSortOrder = isset($b['sortOrder']) ? (int)$b['sortOrder'] : 0; + return $aSortOrder < $bSortOrder ? -1 : ($aSortOrder > $bSortOrder ? 1 : 0); + } + + /** + * Initialize tabs + * + * @return Mage_Backend_Block_System_Config_Tabs + */ + public function initTabs() + { + $sections = $this->_systemConfig->getSections(); + $tabs = $this->_systemConfig->getTabs(); + + usort($sections, array($this, '_sort')); + usort($tabs, array($this, '_sort')); + + $this->_initializeTabs($tabs); + $current = $this->_initializeSections($sections); + + /** Set last sections */ + + /** @var Varien_Object $tab */ + foreach ($this->getTabs() as $tab) { + $sections = $tab->getSections(); + if ($sections) { + $sections->getLastItem()->setIsLast(true); + } + } + $this->helper('Mage_Backend_Helper_Data')->addPageHelpUrl($current . '/'); + + return $this; + } + + /** + * Initialize sections + * + * @param $sections + * @return string + */ + protected function _initializeSections($sections) + { + $current = $this->getRequest()->getParam('section'); + $websiteCode = $this->getRequest()->getParam('website'); + $storeCode = $this->getRequest()->getParam('store'); + + /** @var $section array */ + foreach ($sections as $section) { + $this->_eventManager->dispatch('adminhtml_block_system_config_init_tab_sections_before', + array('section' => $section) + ); + + $code = $section['id']; + $sectionAllowed = false; + if (isset($section['resource'])) { + $sectionAllowed = $this->checkSectionPermissions($section['resource']); + } + if ((empty($current) && $sectionAllowed)) { + $current = $code; + $this->getRequest()->setParam('section', $current); + } + + $helperName = $this->_systemConfig->getAttributeModule($section); + $label = $this->helper($helperName)->__($section['label']); + + if ($code == $current) { + if (!$this->getRequest()->getParam('website') && !$this->getRequest()->getParam('store')) { + $this->_addBreadcrumb($label); + } else { + $this->_addBreadcrumb($label, '', $this->getUrl('*/*/*', array('section' => $code))); + } + + $this->setActiveTab($section['tab']); + $this->setActiveSection($code); + } + + $hasChildren = $this->_systemConfig->hasChildren($section, $websiteCode, $storeCode); + if ($sectionAllowed && $hasChildren) { + $this->addSection($code, $section['tab'], array( + 'class' => isset($section['class']) ? $section['class'] : '', + 'label' => $label, + 'url' => $this->getUrl('*/*/*', array('_current' => true, 'section' => $code)), + )); + } + } + + return $current; + } + + /** + * Initialize tabs + * + * @param array $tabs + * @return void + */ + protected function _initializeTabs(array $tabs) + { + foreach ($tabs as $tab) { + $helperName = $this->_systemConfig->getAttributeModule($tab); + $label = $this->helper($helperName)->__($tab['label']); + + $this->addTab($tab['id'], array( + 'label' => $label, + 'class' => isset($tab['class']) ? $tab['class'] : '' + )); + } + } + + /** + * Add tab to tabs list + * + * @param string $code + * @param array $config + * @return Mage_Backend_Block_System_Config_Tabs + */ + public function addTab($code, $config) + { + $tab = $this->_objectFactory->create($config); + $tab->setId($code); + $this->_tabs[$code] = $tab; + return $this; + } + + /** + * Retrieve tab + * + * @param string $code + * @return Varien_Object + */ + public function getTab($code) + { + if(isset($this->_tabs[$code])) { + return $this->_tabs[$code]; + } + return null; + } + + /** + * Add section to tab + * + * @param string $code + * @param string $tabCode + * @param array $config + * @return Mage_Backend_Block_System_Config_Tabs + */ + public function addSection($code, $tabCode, $config) + { + if($tab = $this->getTab($tabCode)) { + if(!$tab->getSections()) { + $tab->setSections($this->_collectionFactory->create()); + } + $section = $this->_objectFactory->create($config); + $section->setId($code); + $tab->getSections()->addItem($section); + } + return $this; + } + + /** + * Get all tabs + * + * @return Varien_Object[] + */ + public function getTabs() + { + return $this->_tabs; + } + + /** + * Get store select options + * + * @return array + */ + public function getStoreSelectOptions() + { + $section = $this->getRequest()->getParam('section'); + $curWebsite = $this->getRequest()->getParam('website'); + $curStore = $this->getRequest()->getParam('store'); + + /* @var $storeModel Mage_Core_Model_System_Store */ + $storeModel = Mage::getSingleton('Mage_Core_Model_System_Store'); + + $options = array(); + $options['default'] = array( + 'label' => $this->helper('Mage_Backend_Helper_Data')->__('Default Config'), + 'url' => $this->getUrl('*/*/*', array('section' => $section)), + 'selected' => !$curWebsite && !$curStore, + 'style' => 'background:#ccc; font-weight:bold;', + ); + + foreach ($storeModel->getWebsiteCollection() as $website) { + $websiteShow = false; + foreach ($storeModel->getGroupCollection() as $group) { + if ($group->getWebsiteId() != $website->getId()) { + continue; + } + $groupShow = false; + foreach ($storeModel->getStoreCollection() as $store) { + if ($store->getGroupId() != $group->getId()) { + continue; + } + if (!$websiteShow) { + $websiteShow = true; + $options['website_' . $website->getCode()] = array( + 'label' => $website->getName(), + 'url' => $this->getUrl('*/*/*', + array('section' => $section, 'website' => $website->getCode()) + ), + 'selected' => !$curStore && $curWebsite == $website->getCode(), + 'style' => 'padding-left:16px; background:#DDD; font-weight:bold;', + ); + } + if (!$groupShow) { + $groupShow = true; + $options['group_' . $group->getId() . '_open'] = array( + 'is_group' => true, + 'is_close' => false, + 'label' => $group->getName(), + 'style' => 'padding-left:32px;' + ); + } + $options['store_' . $store->getCode()] = array( + 'label' => $store->getName(), + 'url' => $this->getUrl('*/*/*', + array('section'=>$section, 'website' => $website->getCode(), 'store' => $store->getCode()) + ), + 'selected' => $curStore == $store->getCode(), + 'style' => '', + ); + } + if ($groupShow) { + $options['group_' . $group->getId() . '_close'] = array( + 'is_group' => true, + 'is_close' => true, + ); + } + } + } + + return $options; + } + + /** + * Get store button html code + * + * @return string + */ + public function getStoreButtonsHtml() + { + $curWebsite = $this->getRequest()->getParam('website'); + $curStore = $this->getRequest()->getParam('store'); + + $html = ''; + + if (!$curWebsite && !$curStore) { + $html .= $this->getLayout()->createBlock('Mage_Backend_Block_Widget_Button')->setData(array( + 'label' => $this->helper('Mage_Backend_Helper_Data')->__('New Website'), + 'onclick' => "location.href='" . $this->getUrl('*/system_website/new') . "'", + 'class' => 'add', + ))->toHtml(); + } elseif (!$curStore) { + $html .= $this->getLayout()->createBlock('Mage_Backend_Block_Widget_Button')->setData(array( + 'label' => $this->helper('Mage_Backend_Helper_Data')->__('Edit Website'), + 'onclick' => "location.href='" . + $this->getUrl('*/system_website/edit', array('website'=>$curWebsite)) . "'", + ))->toHtml(); + $html .= $this->getLayout()->createBlock('Mage_Backend_Block_Widget_Button')->setData(array( + 'label' => $this->helper('Mage_Backend_Helper_Data')->__('New Store View'), + 'onclick' => "location.href='" . + $this->getUrl('*/system_store/new', array('website'=>$curWebsite)) . "'", + 'class' => 'add', + ))->toHtml(); + $html .= $this->getLayout()->createBlock('Mage_Backend_Block_Widget_Button')->setData(array( + 'label' => $this->helper('Mage_Backend_Helper_Data')->__('Delete Website'), + 'onclick' => "location.href='" . + $this->getUrl('*/system_website/delete', array('website'=>$curWebsite)) . "'", + 'class' => 'delete', + ))->toHtml(); + } else { + $html .= $this->getLayout()->createBlock('Mage_Backend_Block_Widget_Button')->setData(array( + 'label' => $this->helper('Mage_Backend_Helper_Data')->__('Edit Store View'), + 'onclick' => "location.href='" . + $this->getUrl('*/system_store/edit', array('store'=>$curStore)) . + "'", + ))->toHtml(); + $html .= $this->getLayout()->createBlock('Mage_Backend_Block_Widget_Button')->setData(array( + 'label' => $this->helper('Mage_Backend_Helper_Data')->__('Delete Store View'), + 'onclick' => "location.href='" . + $this->getUrl('*/system_store/delete', array('store'=>$curStore)) . "'", + 'class' => 'delete', + ))->toHtml(); + } + + return $html; + } + + /** + * Check if specified section can be displayed + * + * @param string $aclResourceId + * @return bool + */ + public function checkSectionPermissions($aclResourceId) + { + if (!$aclResourceId || trim($aclResourceId) == "") { + return false; + } + return Mage::getSingleton('Mage_Core_Model_Authorization')->isAllowed($aclResourceId); + } +} diff --git a/app/code/core/Mage/Backend/Block/Template.php b/app/code/core/Mage/Backend/Block/Template.php index 429cd2708f06791e0cf0c0cf9670ce15abcaa585..61d4bf503cffabbcd84cbde81aebb9a3764102e1 100644 --- a/app/code/core/Mage/Backend/Block/Template.php +++ b/app/code/core/Mage/Backend/Block/Template.php @@ -34,13 +34,38 @@ class Mage_Backend_Block_Template extends Mage_Core_Block_Template { /** - * Enter description here... + * @param Mage_Core_Controller_Request_Http $request + * @param Mage_Core_Model_Layout $layout + * @param Mage_Core_Model_Event_Manager $eventManager + * @param Mage_Backend_Model_Url $urlBuilder + * @param Mage_Core_Model_Translate $translator + * @param Mage_Core_Model_Cache $cache + * @param Mage_Core_Model_Design_Package $designPackage + * @param Mage_Core_Model_Session $session + * @param Mage_Core_Model_Store_Config $storeConfig + * @param Mage_Core_Controller_Varien_Front $frontController + * @param Mage_Core_Model_Factory_Helper $helperFactory + * @param array $data * - * @return string + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ - protected function _getUrlModelClass() - { - return 'Mage_Backend_Model_Url'; + public function __construct( + Mage_Core_Controller_Request_Http $request, + Mage_Core_Model_Layout $layout, + Mage_Core_Model_Event_Manager $eventManager, + Mage_Backend_Model_Url $urlBuilder, + Mage_Core_Model_Translate $translator, + Mage_Core_Model_Cache $cache, + Mage_Core_Model_Design_Package $designPackage, + Mage_Core_Model_Session $session, + Mage_Core_Model_Store_Config $storeConfig, + Mage_Core_Controller_Varien_Front $frontController, + Mage_Core_Model_Factory_Helper $helperFactory, + array $data = array() + ) { + parent::__construct($request, $layout, $eventManager, $urlBuilder, $translator, $cache, $designPackage, + $session, $storeConfig, $frontController, $helperFactory, $data + ); } /** diff --git a/app/code/core/Mage/Backend/Block/Widget.php b/app/code/core/Mage/Backend/Block/Widget.php index 933b97fe8917c1a03534a385d4adc22118a2e557..80d8d3c9fc70bd4901c51c98dfcb9c3f97c8a9cd 100644 --- a/app/code/core/Mage/Backend/Block/Widget.php +++ b/app/code/core/Mage/Backend/Block/Widget.php @@ -99,7 +99,7 @@ class Mage_Backend_Block_Widget extends Mage_Backend_Block_Template public function getGlobalIcon() { - return '<img src="'.$this->getSkinUrl('images/fam_link.gif').'" alt="'.$this->__('Global Attribute').'" title="'.$this->__('This attribute shares the same value in all the stores').'" class="attribute-global"/>'; + return '<img src="'.$this->getViewFileUrl('images/fam_link.gif').'" alt="'.$this->__('Global Attribute').'" title="'.$this->__('This attribute shares the same value in all the stores').'" class="attribute-global"/>'; } } diff --git a/app/code/core/Mage/Backend/Block/Widget/Form.php b/app/code/core/Mage/Backend/Block/Widget/Form.php index 0fc5a243d7ac1330eab5061ec2e8f659971200a6..5aab7cb87e264728f1e453cec0458079e2988704 100644 --- a/app/code/core/Mage/Backend/Block/Widget/Form.php +++ b/app/code/core/Mage/Backend/Block/Widget/Form.php @@ -202,7 +202,7 @@ class Mage_Backend_Block_Widget_Form extends Mage_Backend_Block_Widget $element->setValues($attribute->getSource()->getAllOptions(false, true)); $element->setCanBeEmpty(true); } else if ($inputType == 'date') { - $element->setImage($this->getSkinUrl('images/grid-cal.gif')); + $element->setImage($this->getViewFileUrl('images/grid-cal.gif')); $element->setDateFormat(Mage::app()->getLocale()->getDateFormatWithLongYear()); } else if ($inputType == 'multiline') { $element->setLineCount($attribute->getMultilineCount()); diff --git a/app/code/core/Mage/Backend/Block/Widget/Grid.php b/app/code/core/Mage/Backend/Block/Widget/Grid.php index 8f29673d9a39929221aa215dc527539774fdc087..1fc05ceccc24648d4f76d60335c49b621eab1d23 100644 --- a/app/code/core/Mage/Backend/Block/Widget/Grid.php +++ b/app/code/core/Mage/Backend/Block/Widget/Grid.php @@ -111,63 +111,32 @@ class Mage_Backend_Block_Widget_Grid extends Mage_Backend_Block_Widget protected $_template = 'Mage_Backend::widget/grid.phtml'; - /** - * @param Mage_Core_Controller_Request_Http $request - * @param Mage_Core_Model_Layout $layout - * @param Mage_Core_Model_Event_Manager $eventManager - * @param Mage_Core_Model_Translate $translator - * @param Mage_Core_Model_Cache $cache - * @param Mage_Core_Model_Design_Package $designPackage - * @param Mage_Core_Model_Session $session - * @param Mage_Core_Model_Store_Config $storeConfig - * @param Mage_Core_Controller_Varien_Front $frontController - * @param array $data - * - * @SuppressWarnings(PHPMD.ExcessiveParameterList) - */ - public function __construct( - Mage_Core_Controller_Request_Http $request, - Mage_Core_Model_Layout $layout, - Mage_Core_Model_Event_Manager $eventManager, - Mage_Core_Model_Translate $translator, - Mage_Core_Model_Cache $cache, - Mage_Core_Model_Design_Package $designPackage, - Mage_Core_Model_Session $session, - Mage_Core_Model_Store_Config $storeConfig, - Mage_Core_Controller_Varien_Front $frontController, - array $data = array() - ) { - parent::__construct($request, $layout, $eventManager, $translator, $cache, $designPackage, $session, - $storeConfig, $frontController, $data - ); + protected function _construct() + { + parent::_construct(); if (!$this->getRowClickCallback()) { $this->setRowClickCallback('openGridRow'); } - $this->setData( - 'filter_visibility', - array_key_exists('filter_visibility', $data) ? $data['filter_visibility'] : true - ); - - if (isset($data['id'])) { - $this->setId($data['id']); + if ($this->hasData('id')) { + $this->setId($this->getData('id')); } - if (isset($data['default_sort'])) { - $this->setDefaultSort($data['default_sort']); + if ($this->hasData('default_sort')) { + $this->setDefaultSort($this->getData('default_sort')); } - if (isset($data['default_dir'])) { - $this->setDefaultDir($data['default_dir']); + if ($this->hasData('default_dir')) { + $this->setDefaultDir($this->getData('default_dir')); } - if (isset($data['save_parameters_in_session'])) { - $this->setSaveParametersInSession($data['save_parameters_in_session']); + if ($this->hasData('save_parameters_in_session')) { + $this->setSaveParametersInSession($this->getData('save_parameters_in_session')); } - if (isset($data['rssList']) && is_array($data['rssList'])) { - foreach ($data['rssList'] as $item) { + if ($this->hasData('rssList') && is_array($this->getData('rssList'))) { + foreach ($this->getData('rssList') as $item) { $this->addRssList($item['url'], $item['label']); } } @@ -577,7 +546,7 @@ class Mage_Backend_Block_Widget_Grid extends Mage_Backend_Block_Widget * * @param boolean $visible */ - public function setPagerVisibility($visible=true) + public function setPagerVisibility($visible = true) { $this->_pagerVisibility = $visible; } @@ -597,7 +566,7 @@ class Mage_Backend_Block_Widget_Grid extends Mage_Backend_Block_Widget * * @param boolean $visible */ - public function setMessageBlockVisibility($visible=true) + public function setMessageBlockVisibility($visible = true) { $this->_messageBlockVisibility = $visible; } @@ -741,6 +710,16 @@ class Mage_Backend_Block_Widget_Grid extends Mage_Backend_Block_Widget return true; } + /** + * Retrieve grid reload url + * + * @return string; + */ + public function getGridUrl() + { + return $this->hasData('grid_url') ? $this->getData('grid_url') : $this->getAbsoluteGridUrl(); + } + /** * Grid url getter * Version of getGridUrl() but with parameters @@ -851,7 +830,7 @@ class Mage_Backend_Block_Widget_Grid extends Mage_Backend_Block_Widget public function getMainButtonsHtml() { $html = ''; - if($this->getData('filter_visibility')) { + if($this->getColumnSet()->isFilterVisible()) { $html.= $this->getResetFilterButtonHtml(); $html.= $this->getSearchButtonHtml(); } diff --git a/app/code/core/Mage/Backend/Block/Widget/Grid/Column/Filter/Date.php b/app/code/core/Mage/Backend/Block/Widget/Grid/Column/Filter/Date.php index 4c40b5b63998c1ecaa52dec28a3d213b059bb03f..b06c554f661f1b7637d20c43f11d293d79ccea5d 100644 --- a/app/code/core/Mage/Backend/Block/Widget/Grid/Column/Filter/Date.php +++ b/app/code/core/Mage/Backend/Block/Widget/Grid/Column/Filter/Date.php @@ -64,7 +64,7 @@ class Mage_Backend_Block_Widget_Grid_Column_Filter_Date extends Mage_Backend_Blo (function( $ ) { $("#'.$htmlId.'_range").dateRange({ dateFormat: "'.$format.'", - buttonImage: "' . Mage::getDesign()->getSkinUrl('images/grid-cal.gif') . '", + buttonImage: "' . Mage::getDesign()->getViewFileUrl('images/grid-cal.gif') . '", buttonText: "'.$this->escapeHtml(Mage::helper('Mage_Backend_Helper_Data')->__('Date selector')).'", from: { id: "'.$htmlId.'_from" diff --git a/app/code/core/Mage/Backend/Block/Widget/Grid/Column/Filter/Datetime.php b/app/code/core/Mage/Backend/Block/Widget/Grid/Column/Filter/Datetime.php index f1a4f9f0261aaed0bd27820f10600fea77b5dc03..7cd9bef0e88116e73b8dba2e196d222c87fd51dc 100644 --- a/app/code/core/Mage/Backend/Block/Widget/Grid/Column/Filter/Datetime.php +++ b/app/code/core/Mage/Backend/Block/Widget/Grid/Column/Filter/Datetime.php @@ -133,7 +133,7 @@ class Mage_Backend_Block_Widget_Grid_Column_Filter_Datetime extends Mage_Backend dateFormat: "' . $format . '", timeFormat: "' . $timeFormat . '", showsTime: '. ( $this->getColumn()->getFilterTime() ? 'true' : 'false') .', - buttonImage: "'. Mage::getDesign()->getSkinUrl('images/grid-cal.gif') . '", + buttonImage: "'. Mage::getDesign()->getViewFileUrl('images/grid-cal.gif') . '", buttonText: "'.$this->escapeHtml(Mage::helper('Mage_Backend_Helper_Data')->__('Date selector')).'", from: { id: "'.$htmlId.'_from" diff --git a/app/code/core/Mage/Backend/Block/Widget/Grid/Column/Multistore.php b/app/code/core/Mage/Backend/Block/Widget/Grid/Column/Multistore.php index 85f6e3385c080b954a6a77d3f46617460684454f..bcc553ccd61c5887ca829fb876e2bc4db2baa09a 100644 --- a/app/code/core/Mage/Backend/Block/Widget/Grid/Column/Multistore.php +++ b/app/code/core/Mage/Backend/Block/Widget/Grid/Column/Multistore.php @@ -44,13 +44,15 @@ class Mage_Backend_Block_Widget_Grid_Column_Multistore extends Mage_Backend_Bloc * @param Mage_Core_Controller_Request_Http $request * @param Mage_Core_Model_Layout $layout * @param Mage_Core_Model_Event_Manager $eventManager + * @param Mage_Backend_Model_Url $urlBuilder * @param Mage_Core_Model_Translate $translator * @param Mage_Core_Model_Cache $cache * @param Mage_Core_Model_Design_Package $designPackage * @param Mage_Core_Model_Session $session * @param Mage_Core_Model_Store_Config $storeConfig * @param Mage_Core_Controller_Varien_Front $frontController - * @param Mage_Core_Model_App $app + * @param Mage_Core_Model_Factory_Helper $helperFactory + * @param Mage_Core_Model_App $application * @param array $data * * @SuppressWarnings(PHPMD.ExcessiveParameterList) @@ -59,22 +61,24 @@ class Mage_Backend_Block_Widget_Grid_Column_Multistore extends Mage_Backend_Bloc Mage_Core_Controller_Request_Http $request, Mage_Core_Model_Layout $layout, Mage_Core_Model_Event_Manager $eventManager, + Mage_Backend_Model_Url $urlBuilder, Mage_Core_Model_Translate $translator, Mage_Core_Model_Cache $cache, Mage_Core_Model_Design_Package $designPackage, Mage_Core_Model_Session $session, Mage_Core_Model_Store_Config $storeConfig, Mage_Core_Controller_Varien_Front $frontController, - Mage_Core_Model_App $app, + Mage_Core_Model_Factory_Helper $helperFactory, + Mage_Core_Model_App $application, array $data = array() ) { - parent::__construct($request, $layout, $eventManager, $translator, $cache, $designPackage, $session, - $storeConfig, $frontController, $data + parent::__construct($request, $layout, $eventManager, $urlBuilder, $translator, $cache, $designPackage, + $session, $storeConfig, $frontController, $helperFactory, $data ); - - $this->_app = $app; + $this->_app = $application; } + /** * Get header css class name * diff --git a/app/code/core/Mage/Backend/Block/Widget/Grid/ColumnSet.php b/app/code/core/Mage/Backend/Block/Widget/Grid/ColumnSet.php index e6afd670b98fd04339ddab8fd1147d50455b91e4..89682747405f5b44e4a890a17869d38dcd8308d2 100644 --- a/app/code/core/Mage/Backend/Block/Widget/Grid/ColumnSet.php +++ b/app/code/core/Mage/Backend/Block/Widget/Grid/ColumnSet.php @@ -114,12 +114,14 @@ class Mage_Backend_Block_Widget_Grid_ColumnSet extends Mage_Core_Block_Template * @param Mage_Core_Controller_Request_Http $request * @param Mage_Core_Model_Layout $layout * @param Mage_Core_Model_Event_Manager $eventManager + * @param Mage_Core_Model_Url $urlBuilder * @param Mage_Core_Model_Translate $translator * @param Mage_Core_Model_Cache $cache * @param Mage_Core_Model_Design_Package $designPackage * @param Mage_Core_Model_Session $session * @param Mage_Core_Model_Store_Config $storeConfig * @param Mage_Core_Controller_Varien_Front $frontController + * @param Mage_Core_Model_Factory_Helper $helperFactory * @param Mage_Backend_Helper_Data $helper * @param Mage_Backend_Model_Widget_Grid_Row_UrlGeneratorFactory $generatorFactory * @param array $data @@ -130,12 +132,14 @@ class Mage_Backend_Block_Widget_Grid_ColumnSet extends Mage_Core_Block_Template Mage_Core_Controller_Request_Http $request, Mage_Core_Model_Layout $layout, Mage_Core_Model_Event_Manager $eventManager, + Mage_Core_Model_Url $urlBuilder, Mage_Core_Model_Translate $translator, Mage_Core_Model_Cache $cache, Mage_Core_Model_Design_Package $designPackage, Mage_Core_Model_Session $session, Mage_Core_Model_Store_Config $storeConfig, Mage_Core_Controller_Varien_Front $frontController, + Mage_Core_Model_Factory_Helper $helperFactory, Mage_Backend_Helper_Data $helper, Mage_Backend_Model_Widget_Grid_Row_UrlGeneratorFactory $generatorFactory, array $data = array() @@ -152,9 +156,8 @@ class Mage_Backend_Block_Widget_Grid_ColumnSet extends Mage_Core_Block_Template = $generatorFactory->createUrlGenerator($generatorClassName, array('args' => $rowUrlParams)); } - parent::__construct($request, $layout, $eventManager, $translator, $cache, $designPackage, $session, - $storeConfig, $frontController, $data - ); + parent::__construct($request, $layout, $eventManager, $urlBuilder, $translator, $cache, $designPackage, + $session, $storeConfig, $frontController, $helperFactory, $data); $this->setEmptyText($this->_helper->__('No records found.')); } diff --git a/app/code/core/Mage/Backend/Block/Widget/Grid/Export.php b/app/code/core/Mage/Backend/Block/Widget/Grid/Export.php index ae863f87148022f0eda2a74643b2d178149234db..50885e8c61d800a7eeb598e87ac62e7199ef60ef 100644 --- a/app/code/core/Mage/Backend/Block/Widget/Grid/Export.php +++ b/app/code/core/Mage/Backend/Block/Widget/Grid/Export.php @@ -52,38 +52,11 @@ class Mage_Backend_Block_Widget_Grid_Export */ protected $_template = "Mage_Backend::widget/grid/export.phtml"; - /** - * @param Mage_Core_Controller_Request_Http $request - * @param Mage_Core_Model_Layout $layout - * @param Mage_Core_Model_Event_Manager $eventManager - * @param Mage_Core_Model_Translate $translator - * @param Mage_Core_Model_Cache $cache - * @param Mage_Core_Model_Design_Package $designPackage - * @param Mage_Core_Model_Session $session - * @param Mage_Core_Model_Store_Config $storeConfig - * @param Mage_Core_Controller_Varien_Front $frontController - * @param array $data - * - * @SuppressWarnings(PHPMD.ExcessiveParameterList) - */ - public function __construct( - Mage_Core_Controller_Request_Http $request, - Mage_Core_Model_Layout $layout, - Mage_Core_Model_Event_Manager $eventManager, - Mage_Core_Model_Translate $translator, - Mage_Core_Model_Cache $cache, - Mage_Core_Model_Design_Package $designPackage, - Mage_Core_Model_Session $session, - Mage_Core_Model_Store_Config $storeConfig, - Mage_Core_Controller_Varien_Front $frontController, - array $data = array() - ) { - parent::__construct($request, $layout, $eventManager, $translator, $cache, $designPackage, $session, - $storeConfig, $frontController, $data - ); - - if (isset($data['exportTypes'])) { - foreach ($data['exportTypes'] as $type) { + protected function _construct() + { + parent::_construct(); + if ($this->hasData('exportTypes')) { + foreach ($this->getData('exportTypes') as $type) { if (!isset($type['urlPath']) || !isset($type['label'])) { Mage::throwException('Invalid export type supplied for grid export block'); } diff --git a/app/code/core/Mage/Backend/Block/Widget/Grid/Extended.php b/app/code/core/Mage/Backend/Block/Widget/Grid/Extended.php index 19a6fe3c5139102c4859b883d9259611c5b06930..7c3e469011462d47b442a4247385659b049103e0 100644 --- a/app/code/core/Mage/Backend/Block/Widget/Grid/Extended.php +++ b/app/code/core/Mage/Backend/Block/Widget/Grid/Extended.php @@ -1250,4 +1250,19 @@ class Mage_Backend_Block_Widget_Grid_Extended { return $this->_subtotals; } + + /** + * Generate list of grid buttons + * + * @return string + */ + public function getMainButtonsHtml() + { + $html = ''; + if($this->getFilterVisibility()) { + $html.= $this->getResetFilterButtonHtml(); + $html.= $this->getSearchButtonHtml(); + } + return $html; + } } diff --git a/app/code/core/Mage/Backend/Block/Widget/Grid/Massaction/Abstract.php b/app/code/core/Mage/Backend/Block/Widget/Grid/Massaction/Abstract.php index 179b285989db65a60a7056a2f30b20b9af69f9f8..32e6793178cadc60a461b214862288fb302ed209 100644 --- a/app/code/core/Mage/Backend/Block/Widget/Grid/Massaction/Abstract.php +++ b/app/code/core/Mage/Backend/Block/Widget/Grid/Massaction/Abstract.php @@ -51,46 +51,12 @@ abstract class Mage_Backend_Block_Widget_Grid_Massaction_Abstract extends Mage_B protected $_template = 'Mage_Backend::widget/grid/massaction.phtml'; - /** - * @param Mage_Core_Controller_Request_Http $request - * @param Mage_Core_Model_Layout $layout - * @param Mage_Core_Model_Event_Manager $eventManager - * @param Mage_Core_Model_Translate $translator - * @param Mage_Core_Model_Cache $cache - * @param Mage_Core_Model_Design_Package $designPackage - * @param Mage_Core_Model_Session $session - * @param Mage_Core_Model_Store_Config $storeConfig - * @param Mage_Core_Controller_Varien_Front $frontController - * @param Mage_Backend_Helper_Data $backendHelper - * @param array $data - * - * @SuppressWarnings(PHPMD.ExcessiveParameterList) - */ - public function __construct( - Mage_Core_Controller_Request_Http $request, - Mage_Core_Model_Layout $layout, - Mage_Core_Model_Event_Manager $eventManager, - Mage_Core_Model_Translate $translator, - Mage_Core_Model_Cache $cache, - Mage_Core_Model_Design_Package $designPackage, - Mage_Core_Model_Session $session, - Mage_Core_Model_Store_Config $storeConfig, - Mage_Core_Controller_Varien_Front $frontController, - Mage_Backend_Helper_Data $backendHelper, - array $data = array() - ) { - $this->_backendHelper = $backendHelper; - - parent::__construct($request, $layout, $eventManager, $translator, $cache, $designPackage, $session, - $storeConfig, $frontController, $data - ); - } - protected function _construct() { parent::_construct(); - $this->setErrorText($this->_backendHelper->jsQuoteEscape($this->_backendHelper->__('Please select items.'))); + $this->setErrorText($this->helper('Mage_Backend_Helper_Data') + ->jsQuoteEscape($this->helper('Mage_Backend_Helper_Data')->__('Please select items.'))); if (null !== $this->getOptions()) { foreach ($this->getOptions() as $optionId => $option) { diff --git a/app/code/core/Mage/Backend/Helper/Data.php b/app/code/core/Mage/Backend/Helper/Data.php index 05154cad0390c43e9e9d56a02a9e76c114d476c8..ae7fbdb24ec4c507ae000ac9ef07fbf3cea49c77 100644 --- a/app/code/core/Mage/Backend/Helper/Data.php +++ b/app/code/core/Mage/Backend/Helper/Data.php @@ -147,7 +147,7 @@ class Mage_Backend_Helper_Data extends Mage_Core_Helper_Abstract */ public function getHomePageUrl() { - return Mage::getModel('Mage_Backend_Model_Url')->getRouteUrl('adminhtml'); + return Mage::getSingleton('Mage_Backend_Model_Url')->getRouteUrl('adminhtml'); } /** diff --git a/app/code/core/Mage/Backend/Model/Auth/Session.php b/app/code/core/Mage/Backend/Model/Auth/Session.php index fff8e59bd5305dc5ccf2f7429897806f24097fa0..ec0a114a4fcf6d0b7cafa2fc5bb4cc65be55c984 100644 --- a/app/code/core/Mage/Backend/Model/Auth/Session.php +++ b/app/code/core/Mage/Backend/Model/Auth/Session.php @@ -198,8 +198,8 @@ class Mage_Backend_Model_Auth_Session extends Mage_Core_Model_Session_Abstract i if ($this->getUser()) { $this->renewSession(); - if (Mage::getSingleton('Mage_Adminhtml_Model_Url')->useSecretKey()) { - Mage::getSingleton('Mage_Adminhtml_Model_Url')->renewSecretUrls(); + if (Mage::getSingleton('Mage_Backend_Model_Url')->useSecretKey()) { + Mage::getSingleton('Mage_Backend_Model_Url')->renewSecretUrls(); } $this->setIsFirstPageAfterLogin(true); diff --git a/app/code/core/Mage/Adminhtml/Model/Config/Data.php b/app/code/core/Mage/Backend/Model/Config.php similarity index 66% rename from app/code/core/Mage/Adminhtml/Model/Config/Data.php rename to app/code/core/Mage/Backend/Model/Config.php index b3a7de03b9662538f0bc54c5106d92c496990471..edde8ba39fe4dcb45a416023270f314a588c6c2b 100644 --- a/app/code/core/Mage/Adminhtml/Model/Config/Data.php +++ b/app/code/core/Mage/Backend/Model/Config.php @@ -19,33 +19,103 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ /** - * Adminhtml config data model + * Backend config model + * Used to save configuration * * @category Mage - * @package Mage_Adminhtml - * @author Magento Core Team <core@magentocommerce.com> + * @package Mage_Backend + * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Model_Config_Data extends Varien_Object +class Mage_Backend_Model_Config extends Varien_Object { + /** + * Event dispatcher + * + * @var Mage_Core_Model_Event_Manager + */ + protected $_eventManager; + + /** + * Reader that retreives structure of configuration edit form from storage + * + * @var Mage_Backend_Model_Config_Structure_Reader + */ + protected $_structureReader; + + /** + * Application config + * + * @var Mage_Core_Model_Config + */ + protected $_appConfig; + + /** + * Global factory + * + * @var Mage_Core_Model_Config + */ + protected $_objectFactory; + + /** + * TransactionFactory + * + * @var Mage_Core_Model_Resource_Transaction_Factory + */ + protected $_transactionFactory; + + /** + * Global Application + * + * @var Mage_Core_Model_App + */ + protected $_application; + + public function __construct(array $data = array()) + { + $this->_eventManager = isset($data['eventManager']) ? + $data['eventManager'] : + Mage::getSingleton('Mage_Core_Model_Event_Manager'); + + $this->_structureReader = isset($data['structureReader']) ? + $data['structureReader'] : + Mage::getSingleton('Mage_Backend_Model_Config_Structure_Reader'); + + $this->_transactionFactory = isset($data['transactionFactory']) ? + $data['transactionFactory'] : + Mage::getSingleton('Mage_Core_Model_Resource_Transaction_Factory'); + + $this->_objectFactory = isset($data['objectFactory']) ? + $data['objectFactory'] : + Mage::getConfig(); + + $this->_appConfig = isset($data['applicationConfig']) ? + $data['applicationConfig'] : + Mage::getConfig(); + + $this->_application = isset($data['application']) ? $data['application'] : Mage::app(); + + parent::__construct($data); + } + /** * Save config section * Require set: section, website, store and groups * - * @return Mage_Adminhtml_Model_Config_Data + * @return Mage_Backend_Model_Config */ public function save() { $this->_validate(); $this->_getScope(); - Mage::dispatchEvent('model_config_data_save_before', array('object' => $this)); + $this->_eventManager->dispatch('model_config_data_save_before', array('object' => $this)); $section = $this->getSection(); $website = $this->getWebsite(); @@ -58,14 +128,13 @@ class Mage_Adminhtml_Model_Config_Data extends Varien_Object return $this; } - $sections = Mage::getModel('Mage_Adminhtml_Model_Config')->getSections(); - /* @var $sections Mage_Core_Model_Config_Element */ + $sections = $this->_structureReader->getConfiguration()->getSections(); $oldConfig = $this->_getConfig(true); - $deleteTransaction = Mage::getModel('Mage_Core_Model_Resource_Transaction'); + $deleteTransaction = $this->_transactionFactory->create(); /* @var $deleteTransaction Mage_Core_Model_Resource_Transaction */ - $saveTransaction = Mage::getModel('Mage_Core_Model_Resource_Transaction'); + $saveTransaction = $this->_transactionFactory->create(); /* @var $saveTransaction Mage_Core_Model_Resource_Transaction */ // Extends for old config data @@ -76,19 +145,20 @@ class Mage_Adminhtml_Model_Config_Data extends Varien_Object /** * Map field names if they were cloned */ - $groupConfig = $sections->descend($section . '/groups/' . $group); + $groupConfig = $sections[$section]['groups'][$group]; - if ($clonedFields = !empty($groupConfig->clone_fields)) { - if ($groupConfig->clone_model) { - $cloneModel = Mage::getModel((string)$groupConfig->clone_model); + if ($clonedFields = (isset($groupConfig['clone_fields']) && !empty($groupConfig['clone_fields']))) { + if (isset($groupConfig['clone_model']) && $groupConfig['clone_model']) { + $cloneModel = $this->_objectFactory->getModelInstance((string)$groupConfig['clone_model']); } else { Mage::throwException('Config form fieldset clone model required to be able to clone fields'); } $mappedFields = array(); - $fieldsConfig = $sections->descend($section . '/groups/' . $group . '/fields'); - if ($fieldsConfig->hasChildren()) { - foreach ($fieldsConfig->children() as $field => $node) { + if (isset($groupConfig['fields'])) { + $fieldsConfig = $groupConfig['fields']; + + foreach ($fieldsConfig as $field => $node) { foreach ($cloneModel->getPrefixes() as $prefix) { $mappedFields[$prefix['field'] . (string)$field] = (string)$field; } @@ -107,29 +177,27 @@ class Mage_Adminhtml_Model_Config_Data extends Varien_Object /** * Get field backend model */ - $backendClass = (string)$sections->descend( - $section . '/groups/' . $group . '/fields/' . $field . '/backend_model' - ); - if (!$backendClass && $clonedFields && isset($mappedFields[$field])) { - $backendClass = (string)$sections->descend( - $section . '/groups/' . $group . '/fields/' . $mappedFields[$field] . '/backend_model' - ); - } - if (!$backendClass) { + if (isset($groupConfig['fields'][$field]['backend_model'])) { + $backendClass = $groupConfig['fields'][$field]['backend_model']; + } else if ($clonedFields && + isset($mappedFields[$field]) && + isset($groupConfig['fields'][$mappedFields[$field]]['backend_model']) + ) { + $backendClass = $groupConfig['fields'][$mappedFields[$field]]['backend_model']; + } else { $backendClass = 'Mage_Core_Model_Config_Data'; } /* @var $dataObject Mage_Core_Model_Config_Data */ - $dataObject = Mage::getModel($backendClass); + $dataObject = $this->_objectFactory->getModelInstance($backendClass); if (!$dataObject instanceof Mage_Core_Model_Config_Data) { Mage::throwException('Invalid config field backend model: ' . $backendClass); } - $fieldConfig = $sections->descend($section . '/groups/' . $group . '/fields/' . $field); - if (!$fieldConfig && $clonedFields && isset($mappedFields[$field])) { - $fieldConfig = $sections->descend( - $section . '/groups/' . $group . '/fields/' . $mappedFields[$field] - ); + if (isset($groupConfig['fields'][$field])) { + $fieldConfig = $groupConfig['fields'][$field]; + } else if ($clonedFields && isset($mappedFields[$field])) { + $fieldConfig = $groupConfig['fields'][$mappedFields[$field]]; } $dataObject @@ -154,8 +222,8 @@ class Mage_Adminhtml_Model_Config_Data extends Varien_Object /** * Look for custom defined field path */ - if (is_object($fieldConfig)) { - $configPath = (string)$fieldConfig->config_path; + if ($fieldConfig && isset($fieldConfig['config_path'])) { + $configPath = (string)$fieldConfig['config_path']; if (!empty($configPath) && strrpos($configPath, '/') > 0) { // Extend old data with specified section group $groupPath = substr($configPath, 0, strrpos($configPath, '/')); @@ -252,10 +320,10 @@ class Mage_Adminhtml_Model_Config_Data extends Varien_Object { if ($this->getStore()) { $scope = 'stores'; - $scopeId = (int)Mage::getConfig()->getNode('stores/' . $this->getStore() . '/system/store/id'); + $scopeId = (int) $this->_appConfig->getNode('stores/' . $this->getStore() . '/system/store/id'); } elseif ($this->getWebsite()) { $scope = 'websites'; - $scopeId = (int)Mage::getConfig()->getNode('websites/' . $this->getWebsite() . '/system/website/id'); + $scopeId = (int) $this->_appConfig->getNode('websites/' . $this->getWebsite() . '/system/website/id'); } else { $scope = 'default'; $scopeId = 0; @@ -284,7 +352,7 @@ class Mage_Adminhtml_Model_Config_Data extends Varien_Object */ protected function _getPathConfig($path, $full = true) { - $configDataCollection = Mage::getModel('Mage_Core_Model_Config_Data') + $configDataCollection = $this->_objectFactory->getModelInstance('Mage_Core_Model_Config_Data') ->getCollection() ->addScopeFilter($this->getScope(), $this->getScopeId(), $path); @@ -307,17 +375,17 @@ class Mage_Adminhtml_Model_Config_Data extends Varien_Object /** * Set correct scope if isSingleStoreMode = true * - * @param Varien_Simplexml_Element $fieldConfig + * @param array $fieldConfig * @param Mage_Core_Model_Config_Data $dataObject */ protected function _checkSingleStoreMode($fieldConfig, $dataObject) { - $isSingleStoreMode = Mage::app()->isSingleStoreMode(); + $isSingleStoreMode = $this->_application->isSingleStoreMode(); if (!$isSingleStoreMode) { return; } - if (!(int)$fieldConfig->show_in_default) { - $websites = Mage::app()->getWebsites(); + if (!isset($fieldConfig['showInDefault']) || !(int)$fieldConfig['showInDefault']) { + $websites = $this->_application->getWebsites(); $singleStoreWebsite = array_shift($websites); $dataObject->setScope('websites'); $dataObject->setWebsiteCode($singleStoreWebsite->getCode()); diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Custom.php b/app/code/core/Mage/Backend/Model/Config/Backend/Admin/Custom.php similarity index 87% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Custom.php rename to app/code/core/Mage/Backend/Model/Config/Backend/Admin/Custom.php index 36c769f43ad9c1317d5cb4f848939f20255902f2..e99db50eb72d4a38a62a2b359353e6fad267c501 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Custom.php +++ b/app/code/core/Mage/Backend/Model/Config/Backend/Admin/Custom.php @@ -19,20 +19,20 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ /** - * Adminhtml backend model for "Custom Admin URL" option + * Config backend model for "Custom Admin URL" option * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Model_System_Config_Backend_Admin_Custom extends Mage_Core_Model_Config_Data +class Mage_Backend_Model_Config_Backend_Admin_Custom extends Mage_Core_Model_Config_Data { const CONFIG_SCOPE = 'stores'; const CONFIG_SCOPE_ID = 0; @@ -45,7 +45,7 @@ class Mage_Adminhtml_Model_System_Config_Backend_Admin_Custom extends Mage_Core_ /** * Validate value before save * - * @return Mage_Adminhtml_Model_System_Config_Backend_Admin_Custom + * @return Mage_Backend_Model_Config_Backend_Admin_Custom */ protected function _beforeSave() { @@ -62,7 +62,7 @@ class Mage_Adminhtml_Model_System_Config_Backend_Admin_Custom extends Mage_Core_ /** * Change secure/unsecure base_url after use_custom_url was modified * - * @return Mage_Adminhtml_Model_System_Config_Backend_Admin_Custom + * @return Mage_Backend_Model_Config_Backend_Admin_Custom */ public function _afterSave() { diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Custompath.php b/app/code/core/Mage/Backend/Model/Config/Backend/Admin/Custompath.php similarity index 82% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Custompath.php rename to app/code/core/Mage/Backend/Model/Config/Backend/Admin/Custompath.php index 13fa1236a8c3d98d870b2a9970472c0a09d0cd3b..29d93798ec9c3e0ed2dc5255616cab109ac336ed 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Custompath.php +++ b/app/code/core/Mage/Backend/Model/Config/Backend/Admin/Custompath.php @@ -19,25 +19,25 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ /** - * Adminhtml backend model for "Custom Admin Path" option + * Config backend model for "Custom Admin Path" option * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Model_System_Config_Backend_Admin_Custompath extends Mage_Core_Model_Config_Data +class Mage_Backend_Model_Config_Backend_Admin_Custompath extends Mage_Core_Model_Config_Data { /** * Check whether redirect should be set * - * @return Mage_Adminhtml_Model_System_Config_Backend_Admin_Custom + * @return Mage_Backend_Model_Config_Backend_Admin_Custom */ protected function _beforeSave() { diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Observer.php b/app/code/core/Mage/Backend/Model/Config/Backend/Admin/Observer.php similarity index 94% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Observer.php rename to app/code/core/Mage/Backend/Model/Config/Backend/Admin/Observer.php index 0fe096ace740b9c24b78c58d4c3011969ac9c02c..2996c9db7719888919af8e00e6fe9e8c92889292 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Observer.php +++ b/app/code/core/Mage/Backend/Model/Config/Backend/Admin/Observer.php @@ -19,12 +19,12 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Adminhtml_Model_System_Config_Backend_Admin_Observer +class Mage_Backend_Model_Config_Backend_Admin_Observer { /** * Log out user and redirect him to new admin custom url diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Password/Link/Expirationperiod.php b/app/code/core/Mage/Backend/Model/Config/Backend/Admin/Password/Link/Expirationperiod.php similarity index 87% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Password/Link/Expirationperiod.php rename to app/code/core/Mage/Backend/Model/Config/Backend/Admin/Password/Link/Expirationperiod.php index 55d59675fef4f42d8f0208246e83ede77020810b..8b876822137d0bce9431f86f2df53e1b54de90ea 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Password/Link/Expirationperiod.php +++ b/app/code/core/Mage/Backend/Model/Config/Backend/Admin/Password/Link/Expirationperiod.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -28,16 +28,16 @@ * Admin Reset Password Link Expiration period backend model * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Model_System_Config_Backend_Admin_Password_Link_Expirationperiod +class Mage_Backend_Model_Config_Backend_Admin_Password_Link_Expirationperiod extends Mage_Core_Model_Config_Data { /** * Validate expiration period value before saving * - * @return Mage_Adminhtml_Model_System_Config_Backend_Admin_Password_Link_Expirationperiod + * @return Mage_Backend_Model_Config_Backend_Admin_Password_Link_Expirationperiod */ protected function _beforeSave() { diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Robots.php b/app/code/core/Mage/Backend/Model/Config/Backend/Admin/Robots.php similarity index 88% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Robots.php rename to app/code/core/Mage/Backend/Model/Config/Backend/Admin/Robots.php index 307e90ce035d5b3924b704ee30e5ecd75db7c4ad..a71b1836db8e55f1275967a74ac318ab70a34411 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Robots.php +++ b/app/code/core/Mage/Backend/Model/Config/Backend/Admin/Robots.php @@ -19,19 +19,19 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ /** - * Adminhtml backend model for robots.txt + * Config backend model for robots.txt * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Model_System_Config_Backend_Admin_Robots extends Mage_Core_Model_Config_Data +class Mage_Backend_Model_Config_Backend_Admin_Robots extends Mage_Core_Model_Config_Data { /** * Return content of default robot.txt @@ -52,7 +52,7 @@ class Mage_Adminhtml_Model_System_Config_Backend_Admin_Robots extends Mage_Core_ /** * Load default content from robots.txt if customer does not define own * - * @return Mage_Adminhtml_Model_System_Config_Backend_Admin_Robots + * @return Mage_Backend_Model_Config_Backend_Admin_Robots */ protected function _afterLoad() { @@ -66,7 +66,7 @@ class Mage_Adminhtml_Model_System_Config_Backend_Admin_Robots extends Mage_Core_ /** * Check and process robots file * - * @return Mage_Adminhtml_Model_System_Config_Backend_Admin_Robots + * @return Mage_Backend_Model_Config_Backend_Admin_Robots */ protected function _afterSave() { diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Usecustom.php b/app/code/core/Mage/Backend/Model/Config/Backend/Admin/Usecustom.php similarity index 62% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Usecustom.php rename to app/code/core/Mage/Backend/Model/Config/Backend/Admin/Usecustom.php index 453b4350d9b5c290a42cd938536feac4f86b4407..520ecc9b2acb26d8e7d3f48c2b5dfead473680ce 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Usecustom.php +++ b/app/code/core/Mage/Backend/Model/Config/Backend/Admin/Usecustom.php @@ -19,25 +19,25 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ /** - * Adminhtml backend model for "Use Custom Admin URL" option + * Config backend model for "Use Custom Admin URL" option * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Model_System_Config_Backend_Admin_Usecustom extends Mage_Core_Model_Config_Data +class Mage_Backend_Model_Config_Backend_Admin_Usecustom extends Mage_Core_Model_Config_Data { /** * Validate custom url * - * @return Mage_Adminhtml_Model_System_Config_Backend_Admin_Usecustom + * @return Mage_Backend_Model_Config_Backend_Admin_Usecustom */ protected function _beforeSave() { @@ -45,7 +45,7 @@ class Mage_Adminhtml_Model_System_Config_Backend_Admin_Usecustom extends Mage_Co if ($value == 1) { $customUrl = $this->getData('groups/url/fields/custom/value'); if (empty($customUrl)) { - Mage::throwException(Mage::helper('Mage_Adminhtml_Helper_Data')->__('Please specify the admin custom URL.')); + Mage::throwException(Mage::helper('Mage_Backend_Helper_Data')->__('Please specify the admin custom URL.')); } } @@ -55,7 +55,7 @@ class Mage_Adminhtml_Model_System_Config_Backend_Admin_Usecustom extends Mage_Co /** * Delete custom admin url from configuration if "Use Custom Admin Url" option disabled * - * @return Mage_Adminhtml_Model_System_Config_Backend_Admin_Usecustom + * @return Mage_Backend_Model_Config_Backend_Admin_Usecustom */ protected function _afterSave() { @@ -63,14 +63,14 @@ class Mage_Adminhtml_Model_System_Config_Backend_Admin_Usecustom extends Mage_Co if (!$value) { Mage::getConfig()->deleteConfig( - Mage_Adminhtml_Model_System_Config_Backend_Admin_Custom::XML_PATH_SECURE_BASE_URL, - Mage_Adminhtml_Model_System_Config_Backend_Admin_Custom::CONFIG_SCOPE, - Mage_Adminhtml_Model_System_Config_Backend_Admin_Custom::CONFIG_SCOPE_ID + Mage_Backend_Model_Config_Backend_Admin_Custom::XML_PATH_SECURE_BASE_URL, + Mage_Backend_Model_Config_Backend_Admin_Custom::CONFIG_SCOPE, + Mage_Backend_Model_Config_Backend_Admin_Custom::CONFIG_SCOPE_ID ); Mage::getConfig()->deleteConfig( - Mage_Adminhtml_Model_System_Config_Backend_Admin_Custom::XML_PATH_UNSECURE_BASE_URL, - Mage_Adminhtml_Model_System_Config_Backend_Admin_Custom::CONFIG_SCOPE, - Mage_Adminhtml_Model_System_Config_Backend_Admin_Custom::CONFIG_SCOPE_ID + Mage_Backend_Model_Config_Backend_Admin_Custom::XML_PATH_UNSECURE_BASE_URL, + Mage_Backend_Model_Config_Backend_Admin_Custom::CONFIG_SCOPE, + Mage_Backend_Model_Config_Backend_Admin_Custom::CONFIG_SCOPE_ID ); } diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Usecustompath.php b/app/code/core/Mage/Backend/Model/Config/Backend/Admin/Usecustompath.php similarity index 81% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Usecustompath.php rename to app/code/core/Mage/Backend/Model/Config/Backend/Admin/Usecustompath.php index 74cd26c15542ef219e05d550ce64cb199a6b7bef..168053d9d8539ebe6ff4fd949109bfe0b8b5af6e 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Usecustompath.php +++ b/app/code/core/Mage/Backend/Model/Config/Backend/Admin/Usecustompath.php @@ -19,25 +19,25 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ /** - * Adminhtml backend model for "Use Custom Admin Path" option + * Config backend model for "Use Custom Admin Path" option * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Model_System_Config_Backend_Admin_Usecustompath extends Mage_Core_Model_Config_Data +class Mage_Backend_Model_Config_Backend_Admin_Usecustompath extends Mage_Core_Model_Config_Data { /** * Check whether redirect should be set * - * @return Mage_Adminhtml_Model_System_Config_Backend_Admin_Usecustompath + * @return Mage_Backend_Model_Config_Backend_Admin_Usecustompath */ protected function _beforeSave() { diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Usesecretkey.php b/app/code/core/Mage/Backend/Model/Config/Backend/Admin/Usesecretkey.php similarity index 78% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Usesecretkey.php rename to app/code/core/Mage/Backend/Model/Config/Backend/Admin/Usesecretkey.php index e422d45a38475561895777eb4d45da914e09177a..c7b2820f82330db375dbf09d275185bd9a7162eb 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Usesecretkey.php +++ b/app/code/core/Mage/Backend/Model/Config/Backend/Admin/Usesecretkey.php @@ -19,24 +19,24 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ /** - * Adminhtml backend model for "Use secret key in Urls" option + * Config backend model for "Use secret key in Urls" option * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Model_System_Config_Backend_Admin_Usesecretkey extends Mage_Core_Model_Config_Data +class Mage_Backend_Model_Config_Backend_Admin_Usesecretkey extends Mage_Core_Model_Config_Data { protected function _afterSave() { - Mage::getSingleton('Mage_Adminhtml_Model_Url')->renewSecretUrls(); + Mage::getSingleton('Mage_Backend_Model_Url')->renewSecretUrls(); return $this; } } diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Baseurl.php b/app/code/core/Mage/Backend/Model/Config/Backend/Baseurl.php similarity index 94% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Baseurl.php rename to app/code/core/Mage/Backend/Model/Config/Backend/Baseurl.php index 2bea13cd4d3292c83fce2e83fe59a50d10ad3c68..8ec534bfa490391412ba7a68b18e43c28294789b 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Baseurl.php +++ b/app/code/core/Mage/Backend/Model/Config/Backend/Baseurl.php @@ -19,13 +19,13 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Adminhtml_Model_System_Config_Backend_Baseurl extends Mage_Core_Model_Config_Data +class Mage_Backend_Model_Config_Backend_Baseurl extends Mage_Core_Model_Config_Data { protected function _beforeSave() { diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Cache.php b/app/code/core/Mage/Backend/Model/Config/Backend/Cache.php similarity index 91% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Cache.php rename to app/code/core/Mage/Backend/Model/Config/Backend/Cache.php index f9f6af5e63dbafc681810b935da666b911ca7cbd..97f90794b3393c3b6ef497c6a5b167616af64c8c 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Cache.php +++ b/app/code/core/Mage/Backend/Model/Config/Backend/Cache.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -28,7 +28,7 @@ * Cache cleaner backend model * */ -class Mage_Adminhtml_Model_System_Config_Backend_Cache extends Mage_Core_Model_Config_Data +class Mage_Backend_Model_Config_Backend_Cache extends Mage_Core_Model_Config_Data { /** * Cache tags to clean diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Cookie.php b/app/code/core/Mage/Backend/Model/Config/Backend/Cookie.php similarity index 88% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Cookie.php rename to app/code/core/Mage/Backend/Model/Config/Backend/Cookie.php index b9d3ddbfd0b86327cafa9154eff46cad8407a84c..158ffbc0e125b947d37e28cd1c090da991cb248e 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Cookie.php +++ b/app/code/core/Mage/Backend/Model/Config/Backend/Cookie.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -28,10 +28,10 @@ * Config Cookie Restriction mode backend * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Model_System_Config_Backend_Cookie extends Mage_Core_Model_Config_Data +class Mage_Backend_Model_Config_Backend_Cookie extends Mage_Core_Model_Config_Data { protected $_eventPrefix = 'adminhtml_system_config_backend_cookie'; } diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Abstract.php b/app/code/core/Mage/Backend/Model/Config/Backend/Currency/Abstract.php similarity index 94% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Abstract.php rename to app/code/core/Mage/Backend/Model/Config/Backend/Currency/Abstract.php index c8e8deabf3dc2a99a6f41c9a10562c2f3aabc7fd..247dbb8a45e66ed1e3abb4ca7a0b17c39592251f 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Abstract.php +++ b/app/code/core/Mage/Backend/Model/Config/Backend/Currency/Abstract.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -31,10 +31,10 @@ * Allows dispatching before and after events for each controller action * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @author Magento Core Team <core@magentocommerce.com> */ -abstract class Mage_Adminhtml_Model_System_Config_Backend_Currency_Abstract extends Mage_Core_Model_Config_Data +abstract class Mage_Backend_Model_Config_Backend_Currency_Abstract extends Mage_Core_Model_Config_Data { /** * Retrieve allowed currencies for current scope diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Allow.php b/app/code/core/Mage/Backend/Model/Config/Backend/Currency/Allow.php similarity index 69% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Allow.php rename to app/code/core/Mage/Backend/Model/Config/Backend/Currency/Allow.php index d244be362bfab7e4afa3726568dd45fefbaa7107..8dc7455da9a6668d72117ea3dd166b7b74d92a2f 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Allow.php +++ b/app/code/core/Mage/Backend/Model/Config/Backend/Currency/Allow.php @@ -19,40 +19,40 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ /** - * Adminhtml Directory currency backend model + * Config Directory currency backend model * * Allows dispatching before and after events for each controller action * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Model_System_Config_Backend_Currency_Allow extends Mage_Adminhtml_Model_System_Config_Backend_Currency_Abstract +class Mage_Backend_Model_Config_Backend_Currency_Allow extends Mage_Backend_Model_Config_Backend_Currency_Abstract { /** * Check is isset default display currency in allowed currencies * Check allowed currencies is available in installed currencies * - * @return Mage_Adminhtml_Model_System_Config_Backend_Currency_Allow + * @return Mage_Backend_Model_Config_Backend_Currency_Allow */ protected function _afterSave() { $exceptions = array(); foreach ($this->_getAllowedCurrencies() as $currencyCode) { if (!in_array($currencyCode, $this->_getInstalledCurrencies())) { - $exceptions[] = Mage::helper('Mage_Adminhtml_Helper_Data')->__('Selected allowed currency "%s" is not available in installed currencies.', Mage::app()->getLocale()->currency($currencyCode)->getName()); + $exceptions[] = Mage::helper('Mage_Backend_Helper_Data')->__('Selected allowed currency "%s" is not available in installed currencies.', Mage::app()->getLocale()->currency($currencyCode)->getName()); } } if (!in_array($this->_getCurrencyDefault(), $this->_getAllowedCurrencies())) { - $exceptions[] = Mage::helper('Mage_Adminhtml_Helper_Data')->__('Default display currency "%s" is not available in allowed currencies.', Mage::app()->getLocale()->currency($this->_getCurrencyDefault())->getName()); + $exceptions[] = Mage::helper('Mage_Backend_Helper_Data')->__('Default display currency "%s" is not available in allowed currencies.', Mage::app()->getLocale()->currency($this->_getCurrencyDefault())->getName()); } if ($exceptions) { diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Base.php b/app/code/core/Mage/Backend/Model/Config/Backend/Currency/Base.php similarity index 74% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Base.php rename to app/code/core/Mage/Backend/Model/Config/Backend/Currency/Base.php index dcbac27fd83110364efb45949a11436fb2931008..cd8ed1092df6a3d08a8f4da144da0fbd2b2c9a8e 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Base.php +++ b/app/code/core/Mage/Backend/Model/Config/Backend/Currency/Base.php @@ -19,32 +19,32 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ /** - * Adminhtml Directory currency backend model + * Backend Directory currency backend model * * Allows dispatching before and after events for each controller action * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Model_System_Config_Backend_Currency_Base extends Mage_Adminhtml_Model_System_Config_Backend_Currency_Abstract +class Mage_Backend_Model_Config_Backend_Currency_Base extends Mage_Backend_Model_Config_Backend_Currency_Abstract { /** * Check base currency is available in installed currencies * - * @return Mage_Adminhtml_Model_System_Config_Backend_Currency_Base + * @return Mage_Backend_Model_Config_Backend_Currency_Base */ protected function _afterSave() { if (!in_array($this->getValue(), $this->_getInstalledCurrencies())) { - Mage::throwException(Mage::helper('Mage_Adminhtml_Helper_Data')->__('Selected base currency is not available in installed currencies.')); + Mage::throwException(Mage::helper('Mage_Backend_Helper_Data')->__('Selected base currency is not available in installed currencies.')); } return $this; diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Cron.php b/app/code/core/Mage/Backend/Model/Config/Backend/Currency/Cron.php similarity index 84% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Cron.php rename to app/code/core/Mage/Backend/Model/Config/Backend/Currency/Cron.php index 3c315bbe06487966ee4e44c075819d70fcc57ddc..284d373107cefaaa686a09fb040fdf4e77b32fe0 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Cron.php +++ b/app/code/core/Mage/Backend/Model/Config/Backend/Currency/Cron.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -28,10 +28,10 @@ * Backend Model for Currency import options * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Model_System_Config_Backend_Currency_Cron extends Mage_Core_Model_Config_Data +class Mage_Backend_Model_Config_Backend_Currency_Cron extends Mage_Core_Model_Config_Data { const CRON_STRING_PATH = 'crontab/jobs/currency_rates_update/schedule/cron_expr'; @@ -44,9 +44,9 @@ class Mage_Adminhtml_Model_System_Config_Backend_Currency_Cron extends Mage_Core $frequency = $this->getData('groups/import/fields/frequency/value'); $errorEmail = $this->getData('groups/import/fields/error_email/value'); - $frequencyDaily = Mage_Adminhtml_Model_System_Config_Source_Cron_Frequency::CRON_DAILY; - $frequencyWeekly = Mage_Adminhtml_Model_System_Config_Source_Cron_Frequency::CRON_WEEKLY; - $frequencyMonthly = Mage_Adminhtml_Model_System_Config_Source_Cron_Frequency::CRON_MONTHLY; + $frequencyDaily = Mage_Cron_Model_Config_Source_Frequency::CRON_DAILY; + $frequencyWeekly = Mage_Cron_Model_Config_Source_Frequency::CRON_WEEKLY; + $frequencyMonthly = Mage_Cron_Model_Config_Source_Frequency::CRON_MONTHLY; $cronDayOfWeek = date('N'); diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Default.php b/app/code/core/Mage/Backend/Model/Config/Backend/Currency/Default.php similarity index 70% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Default.php rename to app/code/core/Mage/Backend/Model/Config/Backend/Currency/Default.php index 25200d6ab9ebaad83d5a4e8dc2940383422712f0..7664d471828883eeacd7028a5dfe2342b2dacb54 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Default.php +++ b/app/code/core/Mage/Backend/Model/Config/Backend/Currency/Default.php @@ -19,37 +19,37 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ /** - * Adminhtml Directory currency backend model + * Config Directory currency backend model * * Allows dispatching before and after events for each controller action * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Model_System_Config_Backend_Currency_Default extends Mage_Adminhtml_Model_System_Config_Backend_Currency_Abstract +class Mage_Backend_Model_Config_Backend_Currency_Default extends Mage_Backend_Model_Config_Backend_Currency_Abstract { /** * Check default currency is available in installed currencies * Check default currency is available in allowed currencies * - * @return Mage_Adminhtml_Model_System_Config_Backend_Currency_Default + * @return Mage_Backend_Model_Config_Backend_Currency_Default */ protected function _afterSave() { if (!in_array($this->getValue(), $this->_getInstalledCurrencies())) { - Mage::throwException(Mage::helper('Mage_Adminhtml_Helper_Data')->__('Selected default display currency is not available in installed currencies.')); + Mage::throwException(Mage::helper('Mage_Backend_Helper_Data')->__('Selected default display currency is not available in installed currencies.')); } if (!in_array($this->getValue(), $this->_getAllowedCurrencies())) { - Mage::throwException(Mage::helper('Mage_Adminhtml_Helper_Data')->__('Selected default display currency is not available in allowed currencies.')); + Mage::throwException(Mage::helper('Mage_Backend_Helper_Data')->__('Selected default display currency is not available in allowed currencies.')); } return $this; diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Datashare.php b/app/code/core/Mage/Backend/Model/Config/Backend/Datashare.php similarity index 84% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Datashare.php rename to app/code/core/Mage/Backend/Model/Config/Backend/Datashare.php index 7c472a0b7ab20c7772d31a349d1c95943fefdea0..1b09e4c89c2f2e42751dbf3604745ead583b7afe 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Datashare.php +++ b/app/code/core/Mage/Backend/Model/Config/Backend/Datashare.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -28,13 +28,12 @@ * Config category field backend * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Model_System_Config_Backend_Datashare extends Mage_Core_Model_Config_Data +class Mage_Backend_Model_Config_Backend_Datashare extends Mage_Core_Model_Config_Data { protected function _afterSave() { -#echo "<pre>".print_r($configData,1)."</pre>"; die; } } diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Design/Exception.php b/app/code/core/Mage/Backend/Model/Config/Backend/Design/Exception.php similarity index 85% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Design/Exception.php rename to app/code/core/Mage/Backend/Model/Config/Backend/Design/Exception.php index a1648d1c033a209cb8f893c906db97fd3199bfc6..3b26d5f050714ae5808b45ffde5628008cc4e719 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Design/Exception.php +++ b/app/code/core/Mage/Backend/Model/Config/Backend/Design/Exception.php @@ -19,12 +19,12 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Adminhtml_Model_System_Config_Backend_Design_Exception extends Mage_Adminhtml_Model_System_Config_Backend_Serialized_Array +class Mage_Backend_Model_Config_Backend_Design_Exception extends Mage_Backend_Model_Config_Backend_Serialized_Array { protected $_eventPrefix = 'core_config_backend_design_exception'; } diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Email/Address.php b/app/code/core/Mage/Backend/Model/Config/Backend/Email/Address.php similarity index 77% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Email/Address.php rename to app/code/core/Mage/Backend/Model/Config/Backend/Email/Address.php index 80a458feccb09cb0b966a687ef8f15192d634f70..aed894e685ef6a0680cc981b899e33d5821d5ce4 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Email/Address.php +++ b/app/code/core/Mage/Backend/Model/Config/Backend/Email/Address.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -29,16 +29,16 @@ * System config email field backend model * * @category Mage - * @package Mage_Adminhtml - * @author Magento Core Team <core@magentocommerce.com> + * @package Mage_Backend + * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Model_System_Config_Backend_Email_Address extends Mage_Core_Model_Config_Data +class Mage_Backend_Model_Config_Backend_Email_Address extends Mage_Core_Model_Config_Data { protected function _beforeSave() { $value = $this->getValue(); if (!Zend_Validate::is($value, 'EmailAddress')) { - Mage::throwException(Mage::helper('Mage_Adminhtml_Helper_Data')->__('Invalid email address "%s".', $value)); + Mage::throwException(Mage::helper('Mage_Backend_Helper_Data')->__('Invalid email address "%s".', $value)); } return $this; } diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Email/Logo.php b/app/code/core/Mage/Backend/Model/Config/Backend/Email/Logo.php similarity index 91% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Email/Logo.php rename to app/code/core/Mage/Backend/Model/Config/Backend/Email/Logo.php index 4cf9be100b9ef7a0f4d53f1e18918acefeeed180..4c7ad6da0788895bce354460967227cb225c8add 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Email/Logo.php +++ b/app/code/core/Mage/Backend/Model/Config/Backend/Email/Logo.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -28,10 +28,10 @@ * Backend model for uploading transactional emails custom logo image * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Model_System_Config_Backend_Email_Logo extends Mage_Adminhtml_Model_System_Config_Backend_Image +class Mage_Backend_Model_Config_Backend_Email_Logo extends Mage_Backend_Model_Config_Backend_Image { /** * The tail part of directory path for uploading @@ -78,7 +78,7 @@ class Mage_Adminhtml_Model_System_Config_Backend_Email_Logo extends Mage_Adminht * * Save changes and delete file if "delete" option passed * - * @return Mage_Adminhtml_Model_System_Config_Backend_Email_Logo + * @return Mage_Backend_Model_Config_Backend_Email_Logo */ protected function _beforeSave() { diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Email/Sender.php b/app/code/core/Mage/Backend/Model/Config/Backend/Email/Sender.php similarity index 71% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Email/Sender.php rename to app/code/core/Mage/Backend/Model/Config/Backend/Email/Sender.php index a6fa3c6baec5e08874f631e8959884a3121ff6df..cc25db491550a0b532e15fcd2c5a101fd0d7b873 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Email/Sender.php +++ b/app/code/core/Mage/Backend/Model/Config/Backend/Email/Sender.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -29,25 +29,25 @@ * System config email sender field backend model * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Model_System_Config_Backend_Email_Sender extends Mage_Core_Model_Config_Data +class Mage_Backend_Model_Config_Backend_Email_Sender extends Mage_Core_Model_Config_Data { /** * Check sender name validity * - * @return Mage_Adminhtml_Model_System_Config_Backend_Email_Sender + * @return Mage_Backend_Model_Config_Backend_Email_Sender */ protected function _beforeSave() { $value = $this->getValue(); if (!preg_match("/^[\S ]+$/", $value)) { - Mage::throwException(Mage::helper('Mage_Adminhtml_Helper_Data')->__('Invalid sender name "%s". Please use only visible characters and spaces.', $value)); + Mage::throwException(Mage::helper('Mage_Backend_Helper_Data')->__('Invalid sender name "%s". Please use only visible characters and spaces.', $value)); } if (strlen($value) > 255) { - Mage::throwException(Mage::helper('Mage_Adminhtml_Helper_Data')->__('Maximum sender name length is 255. Please correct your settings.')); + Mage::throwException(Mage::helper('Mage_Backend_Helper_Data')->__('Maximum sender name length is 255. Please correct your settings.')); } return $this; } diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Encrypted.php b/app/code/core/Mage/Backend/Model/Config/Backend/Encrypted.php similarity index 92% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Encrypted.php rename to app/code/core/Mage/Backend/Model/Config/Backend/Encrypted.php index 14a1129a27f54937c3fab18e93441c7f71b5358a..7aef8ca4985330db3229794bc3c20d40c56c5c63 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Encrypted.php +++ b/app/code/core/Mage/Backend/Model/Config/Backend/Encrypted.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -29,9 +29,9 @@ * Encrypted config field backend model * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend */ -class Mage_Adminhtml_Model_System_Config_Backend_Encrypted extends Mage_Core_Model_Config_Data +class Mage_Backend_Model_Config_Backend_Encrypted extends Mage_Core_Model_Config_Data { /** diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/File.php b/app/code/core/Mage/Backend/Model/Config/Backend/File.php similarity index 78% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Backend/File.php rename to app/code/core/Mage/Backend/Model/Config/Backend/File.php index ffdab581b364feee3f4651f25de85f396b3078fd..24976c0d0d1a709af2b4a2e8e7a86bab542ac1d4 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/File.php +++ b/app/code/core/Mage/Backend/Model/Config/Backend/File.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -28,10 +28,10 @@ * System config file field backend model * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Model_System_Config_Backend_File extends Mage_Core_Model_Config_Data +class Mage_Backend_Model_Config_Backend_File extends Mage_Core_Model_Config_Data { /** * Upload max file size in kilobytes @@ -43,7 +43,7 @@ class Mage_Adminhtml_Model_System_Config_Backend_File extends Mage_Core_Model_Co /** * Save uploaded file before saving config value * - * @return Mage_Adminhtml_Model_System_Config_Backend_File + * @return Mage_Backend_Model_Config_Backend_File */ protected function _beforeSave() { @@ -96,7 +96,7 @@ class Mage_Adminhtml_Model_System_Config_Backend_File extends Mage_Core_Model_Co public function validateMaxSize($filePath) { if ($this->_maxFileSize > 0 && filesize($filePath) > ($this->_maxFileSize * 1024)) { - throw Mage::exception('Mage_Core', Mage::helper('Mage_Adminhtml_Helper_Data')->__('Uploaded file is larger than %.2f kilobytes allowed by server', $this->_maxFileSize)); + throw Mage::exception('Mage_Core', Mage::helper('Mage_Backend_Helper_Data')->__('Uploaded file is larger than %.2f kilobytes allowed by server', $this->_maxFileSize)); } } @@ -108,8 +108,8 @@ class Mage_Adminhtml_Model_System_Config_Backend_File extends Mage_Core_Model_Co protected function _addWhetherScopeInfo() { $fieldConfig = $this->getFieldConfig(); - $el = $fieldConfig->descend('upload_dir'); - return (!empty($el['scope_info'])); + $el = array_key_exists('upload_dir', $fieldConfig) ? $fieldConfig['upload_dir'] : array(); + return (is_array($el) && array_key_exists('scope_info', $el) && $el['scope_info']); } /** @@ -123,28 +123,26 @@ class Mage_Adminhtml_Model_System_Config_Backend_File extends Mage_Core_Model_Co $fieldConfig = $this->getFieldConfig(); /* @var $fieldConfig Varien_Simplexml_Element */ - if (empty($fieldConfig->upload_dir)) { - Mage::throwException(Mage::helper('Mage_Catalog_Helper_Data')->__('The base directory to upload file is not specified.')); + if (!array_key_exists('upload_dir', $fieldConfig)) { + Mage::throwException( + Mage::helper('Mage_Catalog_Helper_Data')->__('The base directory to upload file is not specified.') + ); } - $uploadDir = (string)$fieldConfig->upload_dir; - - $el = $fieldConfig->descend('upload_dir'); + if (is_array($fieldConfig['upload_dir'])) { + $uploadDir = $fieldConfig['upload_dir']['value']; + if (array_key_exists('scope_info', $fieldConfig['upload_dir']) && $fieldConfig['upload_dir']['scope_info']){ + $uploadDir = $this->_appendScopeInfo($uploadDir); + } - /** - * Add scope info - */ - if (!empty($el['scope_info'])) { - $uploadDir = $this->_appendScopeInfo($uploadDir); + if (array_key_exists('config', $fieldConfig['upload_dir'])){ + $uploadRoot = $this->_getUploadRoot($fieldConfig['upload_dir']['config']); + $uploadDir = $uploadRoot . '/' . $uploadDir; + } + } else { + $uploadDir = (string) $fieldConfig['upload_dir']; } - /** - * Take root from config - */ - if (!empty($el['config'])) { - $uploadRoot = $this->_getUploadRoot((string)$el['config']); - $uploadDir = $uploadRoot . '/' . $uploadDir; - } return $uploadDir; } diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Filename.php b/app/code/core/Mage/Backend/Model/Config/Backend/Filename.php similarity index 89% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Filename.php rename to app/code/core/Mage/Backend/Model/Config/Backend/Filename.php index 83a0c76ccb59f6fde243bcdc732d5dd06a728d6c..2308e2c5057402b11cd662cc0648711cf4104f97 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Filename.php +++ b/app/code/core/Mage/Backend/Model/Config/Backend/Filename.php @@ -19,13 +19,13 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Adminhtml_Model_System_Config_Backend_Filename extends Mage_Core_Model_Config_Data +class Mage_Backend_Model_Config_Backend_Filename extends Mage_Core_Model_Config_Data { protected function _beforeSave() { diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Image.php b/app/code/core/Mage/Backend/Model/Config/Backend/Image.php similarity index 88% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Image.php rename to app/code/core/Mage/Backend/Model/Config/Backend/Image.php index 02c402377c36ed3238d9f10ed03c8ce45b041957..569bde03e44234d894161f50f084766123d5f8e3 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Image.php +++ b/app/code/core/Mage/Backend/Model/Config/Backend/Image.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -29,10 +29,10 @@ * System config image field backend model * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Model_System_Config_Backend_Image extends Mage_Adminhtml_Model_System_Config_Backend_File +class Mage_Backend_Model_Config_Backend_Image extends Mage_Backend_Model_Config_Backend_File { /** * Getter for allowed extensions of uploaded files diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Image/Adapter.php b/app/code/core/Mage/Backend/Model/Config/Backend/Image/Adapter.php similarity index 88% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Image/Adapter.php rename to app/code/core/Mage/Backend/Model/Config/Backend/Image/Adapter.php index e6f0585ef8900f39278bc16ddf52f76c57f904ec..28886af555e673978de8edd3e28b61d731eb4ec9 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Image/Adapter.php +++ b/app/code/core/Mage/Backend/Model/Config/Backend/Image/Adapter.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -29,16 +29,16 @@ * System config image field backend model for Zend PDF generator * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Model_System_Config_Backend_Image_Adapter extends Mage_Core_Model_Config_Data +class Mage_Backend_Model_Config_Backend_Image_Adapter extends Mage_Core_Model_Config_Data { /** * Checks if choosen image adapter available * * @throws Mage_Core_Exception if some of adapter dipendencies was not loaded - * @return Mage_Adminhtml_Model_System_Config_Backend_File + * @return Mage_Backend_Model_Config_Backend_File */ protected function _beforeSave() { diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Image/Favicon.php b/app/code/core/Mage/Backend/Model/Config/Backend/Image/Favicon.php similarity index 92% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Image/Favicon.php rename to app/code/core/Mage/Backend/Model/Config/Backend/Image/Favicon.php index a5621168a98f8a5c56a3f88219c8fab94ac00efc..0c2e5df5caf0e8f6abdc6a033e5d8d93bf087055 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Image/Favicon.php +++ b/app/code/core/Mage/Backend/Model/Config/Backend/Image/Favicon.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -29,10 +29,10 @@ * System config image field backend model for Zend PDF generator * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Model_System_Config_Backend_Image_Favicon extends Mage_Adminhtml_Model_System_Config_Backend_Image +class Mage_Backend_Model_Config_Backend_Image_Favicon extends Mage_Backend_Model_Config_Backend_Image { /** * The tail part of directory path for uploading diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Image/Pdf.php b/app/code/core/Mage/Backend/Model/Config/Backend/Image/Pdf.php similarity index 87% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Image/Pdf.php rename to app/code/core/Mage/Backend/Model/Config/Backend/Image/Pdf.php index 575dffbb0c86639b6ae206df33a9ec07c0f6d86b..979902de53f2bdfcec68fdaf4affd4ea30dc30c9 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Image/Pdf.php +++ b/app/code/core/Mage/Backend/Model/Config/Backend/Image/Pdf.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -29,10 +29,10 @@ * System config image field backend model for Zend PDF generator * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Model_System_Config_Backend_Image_Pdf extends Mage_Adminhtml_Model_System_Config_Backend_Image +class Mage_Backend_Model_Config_Backend_Image_Pdf extends Mage_Backend_Model_Config_Backend_Image { protected function _getAllowedExtensions() { diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Locale.php b/app/code/core/Mage/Backend/Model/Config/Backend/Locale.php similarity index 69% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Locale.php rename to app/code/core/Mage/Backend/Model/Config/Backend/Locale.php index 30a0c8061a6ab1916d8d1843ada726f629b5698a..b7b3f18abb1555dd554bbde57cf74e24c4e86fd3 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Locale.php +++ b/app/code/core/Mage/Backend/Model/Config/Backend/Locale.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -29,16 +29,16 @@ * Config locale allowed currencies backend * * @category Mage - * @package Mage_Adminhtml - * @author Magento Core Team <core@magentocommerce.com> + * @package Mage_Backend + * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Model_System_Config_Backend_Locale extends Mage_Core_Model_Config_Data +class Mage_Backend_Model_Config_Backend_Locale extends Mage_Core_Model_Config_Data { /** * Enter description here... * - * @return Mage_Adminhtml_Model_System_Config_Backend_Locale + * @return Mage_Backend_Model_Config_Backend_Locale */ protected function _afterSave() { @@ -51,35 +51,35 @@ class Mage_Adminhtml_Model_System_Config_Backend_Locale extends Mage_Core_Model_ foreach ($collection as $data) { $match = false; - $scopeName = Mage::helper('Mage_Adminhtml_Helper_Data')->__('Default scope'); + $scopeName = Mage::helper('Mage_Backend_Helper_Data')->__('Default scope'); if (preg_match('/(base|default)$/', $data->getPath(), $match)) { if (!in_array($data->getValue(), $values)) { $currencyName = Mage::app()->getLocale()->currency($data->getValue())->getName(); if ($match[1] == 'base') { - $fieldName = Mage::helper('Mage_Adminhtml_Helper_Data')->__('Base currency'); + $fieldName = Mage::helper('Mage_Backend_Helper_Data')->__('Base currency'); } else { - $fieldName = Mage::helper('Mage_Adminhtml_Helper_Data')->__('Display default currency'); + $fieldName = Mage::helper('Mage_Backend_Helper_Data')->__('Display default currency'); } switch ($data->getScope()) { case 'default': - $scopeName = Mage::helper('Mage_Adminhtml_Helper_Data')->__('Default scope'); + $scopeName = Mage::helper('Mage_Backend_Helper_Data')->__('Default scope'); break; case 'website': $websiteName = Mage::getModel('Mage_Core_Model_Website')->load($data->getScopeId())->getName(); - $scopeName = Mage::helper('Mage_Adminhtml_Helper_Data')->__('website(%s) scope', $websiteName); + $scopeName = Mage::helper('Mage_Backend_Helper_Data')->__('website(%s) scope', $websiteName); break; case 'store': $storeName = Mage::getModel('Mage_Core_Model_Store')->load($data->getScopeId())->getName(); - $scopeName = Mage::helper('Mage_Adminhtml_Helper_Data')->__('store(%s) scope', $storeName); + $scopeName = Mage::helper('Mage_Backend_Helper_Data')->__('store(%s) scope', $storeName); break; } - $exceptions[] = Mage::helper('Mage_Adminhtml_Helper_Data')->__('Currency "%s" is used as %s in %s.', $currencyName, $fieldName, $scopeName); + $exceptions[] = Mage::helper('Mage_Backend_Helper_Data')->__('Currency "%s" is used as %s in %s.', $currencyName, $fieldName, $scopeName); } } } diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Locale/Timezone.php b/app/code/core/Mage/Backend/Model/Config/Backend/Locale/Timezone.php similarity index 85% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Locale/Timezone.php rename to app/code/core/Mage/Backend/Model/Config/Backend/Locale/Timezone.php index 5035db8f2044633fb6312310d4de29fc1415b036..8a1a292ba3978599d04fa795f3346aa95d0fdd26 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Locale/Timezone.php +++ b/app/code/core/Mage/Backend/Model/Config/Backend/Locale/Timezone.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -29,10 +29,10 @@ * System config email field backend model * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Model_System_Config_Backend_Locale_Timezone extends Mage_Core_Model_Config_Data +class Mage_Backend_Model_Config_Backend_Locale_Timezone extends Mage_Core_Model_Config_Data { /** * Const for PHP 5.3+ compatibility @@ -50,7 +50,7 @@ class Mage_Adminhtml_Model_System_Config_Backend_Locale_Timezone extends Mage_Co } if (!in_array($this->getValue(), DateTimeZone::listIdentifiers($allWithBc))) { - Mage::throwException(Mage::helper('Mage_Adminhtml_Helper_Data')->__('Invalid timezone')); + Mage::throwException(Mage::helper('Mage_Backend_Helper_Data')->__('Invalid timezone')); } return $this; diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Log/Cron.php b/app/code/core/Mage/Backend/Model/Config/Backend/Log/Cron.php similarity index 81% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Log/Cron.php rename to app/code/core/Mage/Backend/Model/Config/Backend/Log/Cron.php index a2e85090949255a7e9dceec7dcc0e9cc5a5e5154..685f8ff1b49593b77045d72eef6e1a22064af968 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Log/Cron.php +++ b/app/code/core/Mage/Backend/Model/Config/Backend/Log/Cron.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -29,10 +29,10 @@ * Log Cron Backend Model * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Model_System_Config_Backend_Log_Cron extends Mage_Core_Model_Config_Data +class Mage_Backend_Model_Config_Backend_Log_Cron extends Mage_Core_Model_Config_Data { const CRON_STRING_PATH = 'crontab/jobs/log_clean/schedule/cron_expr'; const CRON_MODEL_PATH = 'crontab/jobs/log_clean/run/model'; @@ -40,7 +40,7 @@ class Mage_Adminhtml_Model_System_Config_Backend_Log_Cron extends Mage_Core_Mode /** * Cron settings after save * - * @return Mage_Adminhtml_Model_System_Config_Backend_Log_Cron + * @return Mage_Backend_Model_Config_Backend_Log_Cron */ protected function _afterSave() { @@ -49,9 +49,9 @@ class Mage_Adminhtml_Model_System_Config_Backend_Log_Cron extends Mage_Core_Mode $frequncy = $this->getData('groups/log/fields/frequency/value'); $errorEmail = $this->getData('groups/log/fields/error_email/value'); - $frequencyDaily = Mage_Adminhtml_Model_System_Config_Source_Cron_Frequency::CRON_DAILY; - $frequencyWeekly = Mage_Adminhtml_Model_System_Config_Source_Cron_Frequency::CRON_WEEKLY; - $frequencyMonthly = Mage_Adminhtml_Model_System_Config_Source_Cron_Frequency::CRON_MONTHLY; + $frequencyDaily = Mage_Cron_Model_Config_Source_Frequency::CRON_DAILY; + $frequencyWeekly = Mage_Cron_Model_Config_Source_Frequency::CRON_WEEKLY; + $frequencyMonthly = Mage_Cron_Model_Config_Source_Frequency::CRON_MONTHLY; if ($enabled) { $cronDayOfWeek = date('N'); @@ -82,7 +82,7 @@ class Mage_Adminhtml_Model_System_Config_Backend_Log_Cron extends Mage_Core_Mode ->save(); } catch (Exception $e) { - Mage::throwException(Mage::helper('Mage_Adminhtml_Helper_Data')->__('Unable to save the cron expression.')); + Mage::throwException(Mage::helper('Mage_Backend_Helper_Data')->__('Unable to save the cron expression.')); } } } diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Secure.php b/app/code/core/Mage/Backend/Model/Config/Backend/Secure.php similarity index 90% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Secure.php rename to app/code/core/Mage/Backend/Model/Config/Backend/Secure.php index c3ae44f80d0cec371677ce68bfbbaa535f9c764b..7f8ce8f133e2ed00932eaa41e6197d2c8b851532 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Secure.php +++ b/app/code/core/Mage/Backend/Model/Config/Backend/Secure.php @@ -19,13 +19,13 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Adminhtml_Model_System_Config_Backend_Secure extends Mage_Core_Model_Config_Data +class Mage_Backend_Model_Config_Backend_Secure extends Mage_Core_Model_Config_Data { /** * Clean compiled JS/CSS when updating configuration settings diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Serialized.php b/app/code/core/Mage/Backend/Model/Config/Backend/Serialized.php similarity index 91% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Serialized.php rename to app/code/core/Mage/Backend/Model/Config/Backend/Serialized.php index 3355f1776c662b10a0232f4bc5b08cab5e7514ba..e4124a0cf77ee3a676aba43fd7c53eab986c8d4e 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Serialized.php +++ b/app/code/core/Mage/Backend/Model/Config/Backend/Serialized.php @@ -19,12 +19,12 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Adminhtml_Model_System_Config_Backend_Serialized extends Mage_Core_Model_Config_Data +class Mage_Backend_Model_Config_Backend_Serialized extends Mage_Core_Model_Config_Data { protected function _afterLoad() { diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Serialized/Array.php b/app/code/core/Mage/Backend/Model/Config/Backend/Serialized/Array.php similarity index 88% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Serialized/Array.php rename to app/code/core/Mage/Backend/Model/Config/Backend/Serialized/Array.php index df16b1a1e3aec18ba6e0b19987bd07391b934df6..373b6cf8d6c11eed1523c652463adc5b2c640793 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Serialized/Array.php +++ b/app/code/core/Mage/Backend/Model/Config/Backend/Serialized/Array.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -28,7 +28,7 @@ * Backend for serialized array data * */ -class Mage_Adminhtml_Model_System_Config_Backend_Serialized_Array extends Mage_Adminhtml_Model_System_Config_Backend_Serialized +class Mage_Backend_Model_Config_Backend_Serialized_Array extends Mage_Backend_Model_Config_Backend_Serialized { /** * Unset array element with '__empty' key diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Storage/Media/Database.php b/app/code/core/Mage/Backend/Model/Config/Backend/Storage/Media/Database.php similarity index 84% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Storage/Media/Database.php rename to app/code/core/Mage/Backend/Model/Config/Backend/Storage/Media/Database.php index 877d20f2b7ae5044cf5c9d350edde38ec488e543..ffdee142fdcd8a560e9ccb9a1c87c51d43d97ec1 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Storage/Media/Database.php +++ b/app/code/core/Mage/Backend/Model/Config/Backend/Storage/Media/Database.php @@ -19,18 +19,18 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Adminhtml_Model_System_Config_Backend_Storage_Media_Database extends Mage_Core_Model_Config_Data +class Mage_Backend_Model_Config_Backend_Storage_Media_Database extends Mage_Core_Model_Config_Data { /** * Create db structure * - * @return Mage_Adminhtml_Model_System_Config_Backend_Storage_Media_Database + * @return Mage_Backend_Model_Config_Backend_Storage_Media_Database */ protected function _afterSave() { diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Store.php b/app/code/core/Mage/Backend/Model/Config/Backend/Store.php similarity index 86% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Store.php rename to app/code/core/Mage/Backend/Model/Config/Backend/Store.php index 95ed09a1f58ed5afa264f2f31bee277488a060a8..e77d9234c1c9fb33d8e104cfdda71b0b98bae335 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Store.php +++ b/app/code/core/Mage/Backend/Model/Config/Backend/Store.php @@ -19,20 +19,20 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ /** - * Adminhtml add store code to url backend + * Backend add store code to url backend * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Model_System_Config_Backend_Store extends Mage_Core_Model_Config_Data +class Mage_Backend_Model_Config_Backend_Store extends Mage_Core_Model_Config_Data { protected function _afterSave() { diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Translate.php b/app/code/core/Mage/Backend/Model/Config/Backend/Translate.php similarity index 87% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Translate.php rename to app/code/core/Mage/Backend/Model/Config/Backend/Translate.php index f92dd2d7ba453282e6de543119951f423514d6cc..b34f1af7dffeacad47d339cf2b0801c421bd106a 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Translate.php +++ b/app/code/core/Mage/Backend/Model/Config/Backend/Translate.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -28,10 +28,10 @@ * System config translate inline fields backend model * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Model_System_Config_Backend_Translate extends Mage_Core_Model_Config_Data +class Mage_Backend_Model_Config_Backend_Translate extends Mage_Core_Model_Config_Data { /** * Path to config node with list of caches @@ -43,7 +43,7 @@ class Mage_Adminhtml_Model_System_Config_Backend_Translate extends Mage_Core_Mod /** * Set status 'invalidate' for blocks and other output caches * - * @return Mage_Adminhtml_Model_System_Config_Backend_Translate + * @return Mage_Backend_Model_Config_Backend_Translate */ protected function _afterSave() { diff --git a/app/code/core/Mage/Backend/Model/Config/Clone/Factory.php b/app/code/core/Mage/Backend/Model/Config/Clone/Factory.php new file mode 100644 index 0000000000000000000000000000000000000000..b92b0fb6fa1d2fdc6136daeb87eca847b79f5645 --- /dev/null +++ b/app/code/core/Mage/Backend/Model/Config/Clone/Factory.php @@ -0,0 +1,55 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Mage_Backend + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +/** + * System configuration clone model factory + */ +class Mage_Backend_Model_Config_Clone_Factory +{ + /** + * @var Magento_ObjectManager + */ + protected $_objectManager; + + /** + * @param Magento_ObjectManager $objectManager + */ + public function __construct(Magento_ObjectManager $objectManager) + { + $this->_objectManager = $objectManager; + } + + /** + * Create new clone model + * + * @param string $cloneModel + * @return Mage_Core_Model_Config_Data + */ + public function create($cloneModel) + { + return $this->_objectManager->create($cloneModel); + } +} diff --git a/app/code/core/Mage/Backend/Model/Config/Factory.php b/app/code/core/Mage/Backend/Model/Config/Factory.php new file mode 100644 index 0000000000000000000000000000000000000000..f862f48feb52f428908e3ad7cc5358f3761dcd6a --- /dev/null +++ b/app/code/core/Mage/Backend/Model/Config/Factory.php @@ -0,0 +1,55 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Mage_Backend + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +/** + * System configuration object factory + */ +class Mage_Backend_Model_Config_Factory +{ + /** + * @var Magento_ObjectManager + */ + protected $_objectManager; + + /** + * @param Magento_ObjectManager $objectManager + */ + public function __construct(Magento_ObjectManager $objectManager) + { + $this->_objectManager = $objectManager; + } + + /** + * Create new config object + * + * @param array $data + * @return Mage_Backend_Model_Config + */ + public function create(array $data = array()) + { + return $this->_objectManager->create('Mage_Backend_Model_Config', $data); + } +} diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Admin/Page.php b/app/code/core/Mage/Backend/Model/Config/Source/Admin/Page.php similarity index 95% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Admin/Page.php rename to app/code/core/Mage/Backend/Model/Config/Source/Admin/Page.php index 80127a40c1e96784950a22820b999f43aa2f68e8..b85396f69ab56954cd211f379e557681f1b259a5 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Admin/Page.php +++ b/app/code/core/Mage/Backend/Model/Config/Source/Admin/Page.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -29,10 +29,10 @@ * Admin system config sturtup page * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Model_System_Config_Source_Admin_Page +class Mage_Backend_Model_Config_Source_Admin_Page implements Mage_Core_Model_Option_ArrayInterface { /** * Menu model diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Checktype.php b/app/code/core/Mage/Backend/Model/Config/Source/Checktype.php similarity index 81% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Checktype.php rename to app/code/core/Mage/Backend/Model/Config/Source/Checktype.php index 2408f979b0954b71e0faf0736aee83c94ff2e736..cb7cbc6b88c0d115e3f74af7b18b25cbd96b9cd0 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Checktype.php +++ b/app/code/core/Mage/Backend/Model/Config/Source/Checktype.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -29,10 +29,10 @@ * Send to a Friend Limit sending by Source * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Model_System_Config_Source_Checktype +class Mage_Backend_Model_Config_Source_Checktype implements Mage_Core_Model_Option_ArrayInterface { /** * Retrieve Check Type Option array @@ -44,11 +44,11 @@ class Mage_Adminhtml_Model_System_Config_Source_Checktype return array( array( 'value' => Mage_Sendfriend_Helper_Data::CHECK_IP, - 'label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('IP Address') + 'label' => Mage::helper('Mage_Backend_Helper_Data')->__('IP Address') ), array( 'value' => Mage_Sendfriend_Helper_Data::CHECK_COOKIE, - 'label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Cookie (unsafe)') + 'label' => Mage::helper('Mage_Backend_Helper_Data')->__('Cookie (unsafe)') ), ); } diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Currency.php b/app/code/core/Mage/Backend/Model/Config/Source/Currency.php similarity index 87% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Currency.php rename to app/code/core/Mage/Backend/Model/Config/Source/Currency.php index 44d0862e437b72f2b0ee917b8d2052b494f9feb0..665ed41e2a1e44b0e9cde9062746a25fae7eb9f0 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Currency.php +++ b/app/code/core/Mage/Backend/Model/Config/Source/Currency.php @@ -19,17 +19,17 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Adminhtml_Model_System_Config_Source_Currency +class Mage_Backend_Model_Config_Source_Currency implements Mage_Core_Model_Option_ArrayInterface { protected $_options; - public function toOptionArray($isMultiselect) + public function toOptionArray() { if (!$this->_options) { $this->_options = Mage::app()->getLocale()->getOptionCurrencies(); diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Currency/Service.php b/app/code/core/Mage/Backend/Model/Config/Source/Currency/Service.php similarity index 89% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Currency/Service.php rename to app/code/core/Mage/Backend/Model/Config/Source/Currency/Service.php index b15df5aac2b3f102fdfd7fe646babb6d62ae9e7f..28fd1ad5e662e87f18fd7efe5672af343f9f2eb7 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Currency/Service.php +++ b/app/code/core/Mage/Backend/Model/Config/Source/Currency/Service.php @@ -19,17 +19,17 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Adminhtml_Model_System_Config_Source_Currency_Service +class Mage_Backend_Model_Config_Source_Currency_Service implements Mage_Core_Model_Option_ArrayInterface { protected $_options; - public function toOptionArray($isMultiselect) + public function toOptionArray() { if (!$this->_options) { $services = Mage::getConfig()->getNode('global/currency/import/services')->asArray(); diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Date/Short.php b/app/code/core/Mage/Backend/Model/Config/Source/Date/Short.php similarity index 91% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Date/Short.php rename to app/code/core/Mage/Backend/Model/Config/Source/Date/Short.php index b0d9bee836d4fb8924980130b395acba824ea45e..51b0575615827ed1f71cdf83bd09bedc72ee3a36 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Date/Short.php +++ b/app/code/core/Mage/Backend/Model/Config/Source/Date/Short.php @@ -19,13 +19,13 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Adminhtml_Model_System_Config_Source_Date_Short +class Mage_Backend_Model_Config_Source_Date_Short implements Mage_Core_Model_Option_ArrayInterface { public function toOptionArray() { diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Design/Robots.php b/app/code/core/Mage/Backend/Model/Config/Source/Design/Robots.php similarity index 90% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Design/Robots.php rename to app/code/core/Mage/Backend/Model/Config/Source/Design/Robots.php index 2b63840fac323865b356e551b2a3c983755239c1..7724e88524c345d154b730d1a01debbbdf60044d 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Design/Robots.php +++ b/app/code/core/Mage/Backend/Model/Config/Source/Design/Robots.php @@ -19,13 +19,13 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Adminhtml_Model_System_Config_Source_Design_Robots +class Mage_Backend_Model_Config_Source_Design_Robots implements Mage_Core_Model_Option_ArrayInterface { public function toOptionArray() { diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Dev/Dbautoup.php b/app/code/core/Mage/Backend/Model/Config/Source/Dev/Dbautoup.php similarity index 74% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Dev/Dbautoup.php rename to app/code/core/Mage/Backend/Model/Config/Source/Dev/Dbautoup.php index e9ce071f07a4b2620e97bbeeaca01a362104b2f6..dc76421cc121ac8a5408f36bf74283209c275a77 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Dev/Dbautoup.php +++ b/app/code/core/Mage/Backend/Model/Config/Source/Dev/Dbautoup.php @@ -19,18 +19,18 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Adminhtml_Model_System_Config_Source_Dev_Dbautoup +class Mage_Backend_Model_Config_Source_Dev_Dbautoup implements Mage_Core_Model_Option_ArrayInterface { public function toOptionArray() { return array( - array('value'=>Mage_Core_Model_Resource::AUTO_UPDATE_ALWAYS, 'label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Always (during development)')), - array('value'=>Mage_Core_Model_Resource::AUTO_UPDATE_ONCE, 'label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Only Once (version upgrade)')), - array('value'=>Mage_Core_Model_Resource::AUTO_UPDATE_NEVER, 'label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Never (production)')), + array('value'=>Mage_Core_Model_Resource::AUTO_UPDATE_ALWAYS, 'label' => Mage::helper('Mage_Backend_Helper_Data')->__('Always (during development)')), + array('value'=>Mage_Core_Model_Resource::AUTO_UPDATE_ONCE, 'label' => Mage::helper('Mage_Backend_Helper_Data')->__('Only Once (version upgrade)')), + array('value'=>Mage_Core_Model_Resource::AUTO_UPDATE_NEVER, 'label' => Mage::helper('Mage_Backend_Helper_Data')->__('Never (production)')), ); } diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Email/Identity.php b/app/code/core/Mage/Backend/Model/Config/Source/Email/Identity.php similarity index 66% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Email/Identity.php rename to app/code/core/Mage/Backend/Model/Config/Source/Email/Identity.php index 1882c960145977246682e0397f90d7d5bc5371b6..5b75c5025e0f2ce2c3b99c57fa749ed7784ac057 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Email/Identity.php +++ b/app/code/core/Mage/Backend/Model/Config/Source/Email/Identity.php @@ -19,32 +19,35 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Adminhtml_Model_System_Config_Source_Email_Identity +class Mage_Backend_Model_Config_Source_Email_Identity implements Mage_Core_Model_Option_ArrayInterface { protected $_options = null; public function toOptionArray() { if (is_null($this->_options)) { $this->_options = array(); - $config = Mage::getSingleton('Mage_Adminhtml_Model_Config')->getSection('trans_email')->groups->children(); - foreach ($config as $node) { - $nodeName = $node->getName(); - $label = (string) $node->label; - $sortOrder = (int) $node->sort_order; + $config = Mage::getSingleton('Mage_Backend_Model_Config_Structure_Reader') + ->getConfiguration() + ->getSection('trans_email'); + + $groups = $config['groups']; + foreach ($groups as $field) { + $nodeName = $field['id']; + $label = (string) isset($field['label']) ? $field['label'] : ''; + $sortOrder = (int) isset($field['sortOrder']) ? $field['sortOrder'] : null; $this->_options[$sortOrder] = array( 'value' => preg_replace('#^ident_(.*)$#', '$1', $nodeName), - 'label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__($label) + 'label' => Mage::helper('Mage_Backend_Helper_Data')->__($label) ); } ksort($this->_options); } - return $this->_options; } } diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Email/Method.php b/app/code/core/Mage/Backend/Model/Config/Source/Email/Method.php similarity index 80% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Email/Method.php rename to app/code/core/Mage/Backend/Model/Config/Source/Email/Method.php index b877438992f2eed342c2f60dad1069c8d954b8e3..9d09085bdb7954c09ed014cbef7f2b66489f7c14 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Email/Method.php +++ b/app/code/core/Mage/Backend/Model/Config/Source/Email/Method.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -29,21 +29,21 @@ * Source for email send method * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Model_System_Config_Source_Email_Method +class Mage_Backend_Model_Config_Source_Email_Method implements Mage_Core_Model_Option_ArrayInterface { public function toOptionArray() { $options = array( array( 'value' => 'bcc', - 'label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Bcc') + 'label' => Mage::helper('Mage_Backend_Helper_Data')->__('Bcc') ), array( 'value' => 'copy', - 'label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Separate Email') + 'label' => Mage::helper('Mage_Backend_Helper_Data')->__('Separate Email') ), ); return $options; diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Email/Smtpauth.php b/app/code/core/Mage/Backend/Model/Config/Source/Email/Smtpauth.php similarity index 90% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Email/Smtpauth.php rename to app/code/core/Mage/Backend/Model/Config/Source/Email/Smtpauth.php index 4918cbe6c2b3eb2761330f26b719f814e1cdc71c..14e5ef2ac6dddb0a825e754bca548476dfcb5e89 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Email/Smtpauth.php +++ b/app/code/core/Mage/Backend/Model/Config/Source/Email/Smtpauth.php @@ -19,13 +19,13 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Adminhtml_Model_System_Config_Source_Email_Smtpauth +class Mage_Backend_Model_Config_Source_Email_Smtpauth implements Mage_Core_Model_Option_ArrayInterface { public function toOptionArray() { diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Email/Template.php b/app/code/core/Mage/Backend/Model/Config/Source/Email/Template.php similarity index 83% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Email/Template.php rename to app/code/core/Mage/Backend/Model/Config/Source/Email/Template.php index 442bd95f49212208f4fc6597dc75d93f368b2d39..0d6331940502c3086ce1bc3d39648683b21ece4e 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Email/Template.php +++ b/app/code/core/Mage/Backend/Model/Config/Source/Email/Template.php @@ -19,20 +19,21 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ /** - * Adminhtml config system template source + * Config config system template source * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Model_System_Config_Source_Email_Template extends Varien_Object +class Mage_Backend_Model_Config_Source_Email_Template extends Varien_Object + implements Mage_Core_Model_Option_ArrayInterface { /** * Generate list of email templates @@ -48,7 +49,7 @@ class Mage_Adminhtml_Model_System_Config_Source_Email_Template extends Varien_Ob Mage::register('config_system_email_template', $collection); } $options = $collection->toOptionArray(); - $templateName = Mage::helper('Mage_Adminhtml_Helper_Data')->__('Default Template'); + $templateName = Mage::helper('Mage_Backend_Helper_Data')->__('Default Template'); $nodeName = str_replace('/', '_', $this->getPath()); $templateLabelNode = Mage::app()->getConfig()->getNode( Mage_Core_Model_Email_Template::XML_PATH_TEMPLATE_EMAIL . '/' . $nodeName . '/label' @@ -56,7 +57,7 @@ class Mage_Adminhtml_Model_System_Config_Source_Email_Template extends Varien_Ob if ($templateLabelNode) { $module = (string)$templateLabelNode->getParent()->getAttribute('module'); $templateName = Mage::helper($module)->__((string)$templateLabelNode); - $templateName = Mage::helper('Mage_Adminhtml_Helper_Data')->__('%s (Default)', $templateName); + $templateName = Mage::helper('Mage_Backend_Helper_Data')->__('%s (Default)', $templateName); } array_unshift( $options, diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Enabledisable.php b/app/code/core/Mage/Backend/Model/Config/Source/Enabledisable.php similarity index 75% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Enabledisable.php rename to app/code/core/Mage/Backend/Model/Config/Source/Enabledisable.php index 160978f1be99872f1f16934bc52f90e113faaabe..f40d648e4c0591e189ff198f74d75088024f631c 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Enabledisable.php +++ b/app/code/core/Mage/Backend/Model/Config/Source/Enabledisable.php @@ -19,19 +19,19 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Adminhtml_Model_System_Config_Source_Enabledisable +class Mage_Backend_Model_Config_Source_Enabledisable implements Mage_Core_Model_Option_ArrayInterface { public function toOptionArray() { return array( - array('value'=>1, 'label'=>Mage::helper('Mage_Adminhtml_Helper_Data')->__('Enable')), - array('value'=>0, 'label'=>Mage::helper('Mage_Adminhtml_Helper_Data')->__('Disable')), + array('value'=>1, 'label'=>Mage::helper('Mage_Backend_Helper_Data')->__('Enable')), + array('value'=>0, 'label'=>Mage::helper('Mage_Backend_Helper_Data')->__('Disable')), ); } } diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Image/Adapter.php b/app/code/core/Mage/Backend/Model/Config/Source/Image/Adapter.php similarity index 85% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Image/Adapter.php rename to app/code/core/Mage/Backend/Model/Config/Source/Image/Adapter.php index 97ed64fc7bed038aaae181aecad9733b8a58881d..459a9c6620cdf66c4b61844802e4466b5a2b90ab 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Image/Adapter.php +++ b/app/code/core/Mage/Backend/Model/Config/Source/Image/Adapter.php @@ -19,13 +19,13 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Adminhtml_Model_System_Config_Source_Image_Adapter +class Mage_Backend_Model_Config_Source_Image_Adapter implements Mage_Core_Model_Option_ArrayInterface { /** * Return hash of image adapter codes and labels @@ -35,8 +35,8 @@ class Mage_Adminhtml_Model_System_Config_Source_Image_Adapter public function toOptionArray() { return array( - Varien_Image_Adapter::ADAPTER_IM => Mage::helper('Mage_Adminhtml_Helper_Data')->__('ImageMagick'), - Varien_Image_Adapter::ADAPTER_GD2 => Mage::helper('Mage_Adminhtml_Helper_Data')->__('PHP GD2'), + Varien_Image_Adapter::ADAPTER_IM => Mage::helper('Mage_Backend_Helper_Data')->__('ImageMagick'), + Varien_Image_Adapter::ADAPTER_GD2 => Mage::helper('Mage_Backend_Helper_Data')->__('PHP GD2'), ); } } diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Locale.php b/app/code/core/Mage/Backend/Model/Config/Source/Locale.php similarity index 90% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Locale.php rename to app/code/core/Mage/Backend/Model/Config/Source/Locale.php index f2d2ab830c08094d9f19c6b6eb8f168a64b5f7c5..e1aa90424f28495d13fd71afbc80779f05e889b0 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Locale.php +++ b/app/code/core/Mage/Backend/Model/Config/Source/Locale.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -29,7 +29,7 @@ * * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Model_System_Config_Source_Locale +class Mage_Backend_Model_Config_Source_Locale implements Mage_Core_Model_Option_ArrayInterface { public function toOptionArray() { diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Locale/Country.php b/app/code/core/Mage/Backend/Model/Config/Source/Locale/Country.php similarity index 89% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Locale/Country.php rename to app/code/core/Mage/Backend/Model/Config/Source/Locale/Country.php index cb509591d2641982633a4df1015d91ee0b2ba0f4..2011d3140ff5d00a85c662e98adeb48e80ba614e 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Locale/Country.php +++ b/app/code/core/Mage/Backend/Model/Config/Source/Locale/Country.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -29,7 +29,7 @@ * * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Model_System_Config_Source_Locale_Country +class Mage_Backend_Model_Config_Source_Locale_Country implements Mage_Core_Model_Option_ArrayInterface { public function toOptionArray() { diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Locale/Currency.php b/app/code/core/Mage/Backend/Model/Config/Source/Locale/Currency.php similarity index 89% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Locale/Currency.php rename to app/code/core/Mage/Backend/Model/Config/Source/Locale/Currency.php index ab5b2dfadfe681d17f0932ecf2b585a4e4922187..b2e84f73726578b783f01d4d0b641fc72bdef759 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Locale/Currency.php +++ b/app/code/core/Mage/Backend/Model/Config/Source/Locale/Currency.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -29,7 +29,7 @@ * * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Model_System_Config_Source_Locale_Currency +class Mage_Backend_Model_Config_Source_Locale_Currency implements Mage_Core_Model_Option_ArrayInterface { protected $_option; diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Locale/Currency/All.php b/app/code/core/Mage/Backend/Model/Config/Source/Locale/Currency/All.php similarity index 93% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Locale/Currency/All.php rename to app/code/core/Mage/Backend/Model/Config/Source/Locale/Currency/All.php index ff1a617b394abcb58d07c3766db1d0982dc03819..770243edb51f5ab603d1e3dc00fe2d9bd8fd9d24 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Locale/Currency/All.php +++ b/app/code/core/Mage/Backend/Model/Config/Source/Locale/Currency/All.php @@ -19,12 +19,12 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Adminhtml_Model_System_Config_Source_Locale_Currency_All +class Mage_Backend_Model_Config_Source_Locale_Currency_All { protected $_options; diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Locale/Timezone.php b/app/code/core/Mage/Backend/Model/Config/Source/Locale/Timezone.php similarity index 89% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Locale/Timezone.php rename to app/code/core/Mage/Backend/Model/Config/Source/Locale/Timezone.php index 9a319c11346b93066834c16ff65eecbb1657ee4d..dd1195384464c3a4ce8e3bb22d889af898d76942 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Locale/Timezone.php +++ b/app/code/core/Mage/Backend/Model/Config/Source/Locale/Timezone.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -29,7 +29,7 @@ * * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Model_System_Config_Source_Locale_Timezone +class Mage_Backend_Model_Config_Source_Locale_Timezone implements Mage_Core_Model_Option_ArrayInterface { public function toOptionArray() { diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Locale/Weekdays.php b/app/code/core/Mage/Backend/Model/Config/Source/Locale/Weekdays.php similarity index 89% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Locale/Weekdays.php rename to app/code/core/Mage/Backend/Model/Config/Source/Locale/Weekdays.php index d5905b739b85cd81b911bc0aac71036ff63edf97..8131c595a12450611c5d02ce181276929249705e 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Locale/Weekdays.php +++ b/app/code/core/Mage/Backend/Model/Config/Source/Locale/Weekdays.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -29,7 +29,7 @@ * * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Model_System_Config_Source_Locale_Weekdays +class Mage_Backend_Model_Config_Source_Locale_Weekdays implements Mage_Core_Model_Option_ArrayInterface { public function toOptionArray() { diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Nooptreq.php b/app/code/core/Mage/Backend/Model/Config/Source/Nooptreq.php similarity index 70% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Nooptreq.php rename to app/code/core/Mage/Backend/Model/Config/Source/Nooptreq.php index 9ad6c4d5f9a44b11a4809cbc2f1065763bbf93ee..2ec81ee0c1df81a2114462c1f738dbbbc5e7d88d 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Nooptreq.php +++ b/app/code/core/Mage/Backend/Model/Config/Source/Nooptreq.php @@ -19,18 +19,18 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Adminhtml_Model_System_Config_Source_Nooptreq +class Mage_Backend_Model_Config_Source_Nooptreq implements Mage_Core_Model_Option_ArrayInterface { public function toOptionArray() { return array( - array('value'=>'', 'label'=>Mage::helper('Mage_Adminhtml_Helper_Data')->__('No')), - array('value'=>'opt', 'label'=>Mage::helper('Mage_Adminhtml_Helper_Data')->__('Optional')), - array('value'=>'req', 'label'=>Mage::helper('Mage_Adminhtml_Helper_Data')->__('Required')), + array('value'=>'', 'label'=>Mage::helper('Mage_Backend_Helper_Data')->__('No')), + array('value'=>'opt', 'label'=>Mage::helper('Mage_Backend_Helper_Data')->__('Optional')), + array('value'=>'req', 'label'=>Mage::helper('Mage_Backend_Helper_Data')->__('Required')), ); } diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Reports/Scope.php b/app/code/core/Mage/Backend/Model/Config/Source/Reports/Scope.php similarity index 80% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Reports/Scope.php rename to app/code/core/Mage/Backend/Model/Config/Source/Reports/Scope.php index 2654b32fdbe00739e106e03af418a59e76a8a8d9..4eccfa74ebd9b6e6fe769ae61b6bb4608dc19335 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Reports/Scope.php +++ b/app/code/core/Mage/Backend/Model/Config/Source/Reports/Scope.php @@ -19,19 +19,19 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ /** - * Adminhtml source reports event store filter + * Config source reports event store filter * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Model_System_Config_Source_Reports_Scope +class Mage_Backend_Model_Config_Source_Reports_Scope implements Mage_Core_Model_Option_ArrayInterface { /** * Scope filter @@ -39,9 +39,9 @@ class Mage_Adminhtml_Model_System_Config_Source_Reports_Scope public function toOptionArray() { return array( - array('value'=>'website', 'label'=>Mage::helper('Mage_Adminhtml_Helper_Data')->__('Website')), - array('value'=>'group', 'label'=>Mage::helper('Mage_Adminhtml_Helper_Data')->__('Store')), - array('value'=>'store', 'label'=>Mage::helper('Mage_Adminhtml_Helper_Data')->__('Store View')), + array('value'=>'website', 'label'=>Mage::helper('Mage_Backend_Helper_Data')->__('Website')), + array('value'=>'group', 'label'=>Mage::helper('Mage_Backend_Helper_Data')->__('Store')), + array('value'=>'store', 'label'=>Mage::helper('Mage_Backend_Helper_Data')->__('Store View')), ); } diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Storage/Media/Database.php b/app/code/core/Mage/Backend/Model/Config/Source/Storage/Media/Database.php similarity index 94% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Storage/Media/Database.php rename to app/code/core/Mage/Backend/Model/Config/Source/Storage/Media/Database.php index c2670add3d8dad6b848681b5b351cf9c89abd663..c2c3e1c42ea0a23c00126baf46f4086a3563e0e6 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Storage/Media/Database.php +++ b/app/code/core/Mage/Backend/Model/Config/Source/Storage/Media/Database.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -27,7 +27,7 @@ /** * Generate options for media database selection */ -class Mage_Adminhtml_Model_System_Config_Source_Storage_Media_Database +class Mage_Backend_Model_Config_Source_Storage_Media_Database implements Mage_Core_Model_Option_ArrayInterface { /** * Store all detected connections diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Storage/Media/Storage.php b/app/code/core/Mage/Backend/Model/Config/Source/Storage/Media/Storage.php similarity index 81% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Storage/Media/Storage.php rename to app/code/core/Mage/Backend/Model/Config/Source/Storage/Media/Storage.php index 75d7a2750c0016a4948e52f3908953e799d32d52..313cd9a08c6c709c0bf15889f564b53763b40743 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Storage/Media/Storage.php +++ b/app/code/core/Mage/Backend/Model/Config/Source/Storage/Media/Storage.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -27,7 +27,7 @@ /** * Generate options for media storage selection */ -class Mage_Adminhtml_Model_System_Config_Source_Storage_Media_Storage +class Mage_Backend_Model_Config_Source_Storage_Media_Storage implements Mage_Core_Model_Option_ArrayInterface { /** * Options getter @@ -39,11 +39,11 @@ class Mage_Adminhtml_Model_System_Config_Source_Storage_Media_Storage return array( array( 'value' => Mage_Core_Model_File_Storage::STORAGE_MEDIA_FILE_SYSTEM, - 'label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('File System') + 'label' => Mage::helper('Mage_Backend_Helper_Data')->__('File System') ), array( 'value' => Mage_Core_Model_File_Storage::STORAGE_MEDIA_DATABASE, - 'label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Database') + 'label' => Mage::helper('Mage_Backend_Helper_Data')->__('Database') ) ); } diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Store.php b/app/code/core/Mage/Backend/Model/Config/Source/Store.php similarity index 90% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Store.php rename to app/code/core/Mage/Backend/Model/Config/Source/Store.php index f847b9651e97fcb1b33ebfb8f90d3014c10e56d8..349b762dec3781f3aadf79a052ba85a0e65f5fa9 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Store.php +++ b/app/code/core/Mage/Backend/Model/Config/Source/Store.php @@ -19,13 +19,13 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Adminhtml_Model_System_Config_Source_Store +class Mage_Backend_Model_Config_Source_Store implements Mage_Core_Model_Option_ArrayInterface { protected $_options; diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Web/Protocol.php b/app/code/core/Mage/Backend/Model/Config/Source/Web/Protocol.php similarity index 79% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Web/Protocol.php rename to app/code/core/Mage/Backend/Model/Config/Source/Web/Protocol.php index a647f6d60dbb6a5452b46a1610ff8df3a1f6482b..3bffc23d95fc85d4e05eac3c4f49d1f40dd8243f 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Web/Protocol.php +++ b/app/code/core/Mage/Backend/Model/Config/Source/Web/Protocol.php @@ -19,19 +19,19 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Adminhtml_Model_System_Config_Source_Web_Protocol +class Mage_Backend_Model_Config_Source_Web_Protocol implements Mage_Core_Model_Option_ArrayInterface { public function toOptionArray() { return array( array('value'=>'', 'label'=>''), - array('value'=>'http', 'label'=>Mage::helper('Mage_Adminhtml_Helper_Data')->__('HTTP (unsecure)')), - array('value'=>'https', 'label'=>Mage::helper('Mage_Adminhtml_Helper_Data')->__('HTTPS (SSL)')), + array('value'=>'http', 'label'=>Mage::helper('Mage_Backend_Helper_Data')->__('HTTP (unsecure)')), + array('value'=>'https', 'label'=>Mage::helper('Mage_Backend_Helper_Data')->__('HTTPS (SSL)')), ); } diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Web/Redirect.php b/app/code/core/Mage/Backend/Model/Config/Source/Web/Redirect.php similarity index 69% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Web/Redirect.php rename to app/code/core/Mage/Backend/Model/Config/Source/Web/Redirect.php index a18dc4c7c7d5e83cdd044f25215d48922ddb5d2d..581c4bd3a241f2a4e537115f8eb08ba2277696df 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Web/Redirect.php +++ b/app/code/core/Mage/Backend/Model/Config/Source/Web/Redirect.php @@ -19,19 +19,19 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Adminhtml_Model_System_Config_Source_Web_Redirect +class Mage_Backend_Model_Config_Source_Web_Redirect implements Mage_Core_Model_Option_ArrayInterface { public function toOptionArray() { return array( - array('value' => 0, 'label'=>Mage::helper('Mage_Adminhtml_Helper_Data')->__('No')), - array('value' => 1, 'label'=>Mage::helper('Mage_Adminhtml_Helper_Data')->__('Yes (302 Found)')), - array('value' => 301, 'label'=>Mage::helper('Mage_Adminhtml_Helper_Data')->__('Yes (301 Moved Permanently)')), + array('value' => 0, 'label'=>Mage::helper('Mage_Backend_Helper_Data')->__('No')), + array('value' => 1, 'label'=>Mage::helper('Mage_Backend_Helper_Data')->__('Yes (302 Found)')), + array('value' => 301, 'label'=>Mage::helper('Mage_Backend_Helper_Data')->__('Yes (301 Moved Permanently)')), ); } diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Website.php b/app/code/core/Mage/Backend/Model/Config/Source/Website.php similarity index 91% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Website.php rename to app/code/core/Mage/Backend/Model/Config/Source/Website.php index 1cd91b35bff3fa708c4263abf13edbc80a53099b..c183ea73efc5389b2d846682636461df1e468be1 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Website.php +++ b/app/code/core/Mage/Backend/Model/Config/Source/Website.php @@ -19,13 +19,13 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Adminhtml_Model_System_Config_Source_Website +class Mage_Backend_Model_Config_Source_Website implements Mage_Core_Model_Option_ArrayInterface { protected $_options; diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Yesno.php b/app/code/core/Mage/Backend/Model/Config/Source/Yesno.php similarity index 74% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Yesno.php rename to app/code/core/Mage/Backend/Model/Config/Source/Yesno.php index a427ed5ced8d941d28f67cd3cb992d3793c48050..7a74eb656f26cc29612ba4846d669bcefcb76760 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Yesno.php +++ b/app/code/core/Mage/Backend/Model/Config/Source/Yesno.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -28,7 +28,7 @@ * Used in creating options for Yes|No config value selection * */ -class Mage_Adminhtml_Model_System_Config_Source_Yesno +class Mage_Backend_Model_Config_Source_Yesno implements Mage_Core_Model_Option_ArrayInterface { /** @@ -39,8 +39,8 @@ class Mage_Adminhtml_Model_System_Config_Source_Yesno public function toOptionArray() { return array( - array('value' => 1, 'label'=>Mage::helper('Mage_Adminhtml_Helper_Data')->__('Yes')), - array('value' => 0, 'label'=>Mage::helper('Mage_Adminhtml_Helper_Data')->__('No')), + array('value' => 1, 'label'=>Mage::helper('Mage_Backend_Helper_Data')->__('Yes')), + array('value' => 0, 'label'=>Mage::helper('Mage_Backend_Helper_Data')->__('No')), ); } @@ -52,8 +52,8 @@ class Mage_Adminhtml_Model_System_Config_Source_Yesno public function toArray() { return array( - 0 => Mage::helper('Mage_Adminhtml_Helper_Data')->__('No'), - 1 => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Yes'), + 0 => Mage::helper('Mage_Backend_Helper_Data')->__('No'), + 1 => Mage::helper('Mage_Backend_Helper_Data')->__('Yes'), ); } diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Yesnocustom.php b/app/code/core/Mage/Backend/Model/Config/Source/Yesnocustom.php similarity index 73% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Yesnocustom.php rename to app/code/core/Mage/Backend/Model/Config/Source/Yesnocustom.php index 5144aed6defa5669ec709c30d75547564516120a..3162b33dd9ad871e16a368166c6b4a5d26e59003 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Yesnocustom.php +++ b/app/code/core/Mage/Backend/Model/Config/Source/Yesnocustom.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -28,7 +28,7 @@ * Used in creating options for Yes|No|Specified config value selection * */ -class Mage_Adminhtml_Model_System_Config_Source_Yesnocustom +class Mage_Backend_Model_Config_Source_Yesnocustom implements Mage_Core_Model_Option_ArrayInterface { /** @@ -39,9 +39,9 @@ class Mage_Adminhtml_Model_System_Config_Source_Yesnocustom public function toOptionArray() { return array( - array('value' => 1, 'label'=>Mage::helper('Mage_Adminhtml_Helper_Data')->__('Yes')), - array('value' => 0, 'label'=>Mage::helper('Mage_Adminhtml_Helper_Data')->__('No')), - array('value' => 2, 'label'=>Mage::helper('Mage_Adminhtml_Helper_Data')->__('Specified')) + array('value' => 1, 'label'=>Mage::helper('Mage_Backend_Helper_Data')->__('Yes')), + array('value' => 0, 'label'=>Mage::helper('Mage_Backend_Helper_Data')->__('No')), + array('value' => 2, 'label'=>Mage::helper('Mage_Backend_Helper_Data')->__('Specified')) ); } diff --git a/app/code/core/Mage/Backend/Model/Config/Structure.php b/app/code/core/Mage/Backend/Model/Config/Structure.php new file mode 100644 index 0000000000000000000000000000000000000000..a16b6bfb1989127bd73aa5f7771a71f6ee94f97e --- /dev/null +++ b/app/code/core/Mage/Backend/Model/Config/Structure.php @@ -0,0 +1,345 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Mage_Backend + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +/** + * System configuration structure reader + */ +class Mage_Backend_Model_Config_Structure extends Magento_Config_XmlAbstract + implements Mage_Backend_Model_Config_StructureInterface +{ + /** + * Main Application object + * + * @var Mage_Core_Model_App + */ + protected $_app; + + /** + * Config structure toArray converter + * + * @var Mage_Backend_Model_Config_Structure_Converter + */ + protected $_converter; + + /** + * List of encrypted paths + * + * @var array + */ + protected $_encryptedPaths = array(); + + /** + * @var Mage_Core_Model_Factory_Helper + */ + protected $_helperFactory; + + /** + * @param array $data + */ + public function __construct(array $data = array()) + { + $this->_app = isset($data['app']) ? $data['app'] : Mage::app(); + $this->_converter = isset($data['converter']) + ? $data['converter'] + : Mage::getSingleton('Mage_Backend_Model_Config_Structure_Converter'); + $this->_helperFactory = isset($data['helperFactory']) + ? $data['helperFactory'] + : Mage::getSingleton('Mage_Core_Model_Factory_Helper'); + parent::__construct($data['sourceFiles']); + } + + public function __wakeUp() + { + $this->_app = Mage::app(); + $this->_helperFactory = Mage::getObjectManager()->get('Mage_Core_Model_Factory_Helper'); + } + + /** + * Get absolute path to the XML-schema file + * + * @return string + */ + public function getSchemaFile() + { + return __DIR__ . '/Structure/system.xsd'; + } + + /** + * Get absolute path to the XML-schema file + * + * @return string + */ + public function getPerFileSchemaFile() + { + return __DIR__ . '/Structure/system_file.xsd'; + } + + /** + * Extract configuration data from the DOM structure + * + * @param DOMDocument $dom + * @return array|DOMNodeList + */ + protected function _extractData(DOMDocument $dom) + { + $data = $this->_converter->convert($dom); + return $data['config']['system']; + } + + /** + * Get XML-contents, initial for merging + * + * @return string + */ + protected function _getInitialXml() + { + return '<?xml version="1.0" encoding="utf-8"?><config><system></system></config>'; + } + + /** + * Get list of paths to identifiable nodes + * + * @return array + */ + protected function _getIdAttributes() + { + return array( + '/config/system/tab' => 'id', + '/config/system/section' => 'id', + '/config/system/section/group' => 'id', + '/config/system/section/group/field' => 'id', + ); + } + + /** + * Retrieve all sections system configuration layout + * + * @return array + */ + public function getSections() + { + return $this->_data['sections']; + } + + /** + * Retrieve list of tabs from + * + * @return array + */ + public function getTabs() + { + return $this->_data['tabs']; + } + + /** + * Retrieve defined section + * + * @param string $sectionCode + * @param string $websiteCode + * @param string $storeCode + * @return array + */ + public function getSection($sectionCode=null, $websiteCode=null, $storeCode=null) + { + $key = $sectionCode ?: $websiteCode ?: $storeCode; + return isset($this->_data['sections'][$key]) ? $this->_data['sections'][$key] : null; + } + + /** + * Check whether node has child node that can be shown + * + * @param Varien_Simplexml_Element $node + * @param string $websiteCode + * @param string $storeCode + * @return boolean + */ + public function hasChildren($node, $websiteCode = null, $storeCode = null) + { + if (!$this->_canShowNode($node, $websiteCode, $storeCode)) { + return false; + } + + if (isset($node['groups'])) { + $children = $node['groups']; + } elseif (isset($node['fields'])) { + $children = $node['fields']; + } else { + return true; + } + + foreach ($children as $child) { + if ($this->hasChildren($child, $websiteCode, $storeCode)) { + return true; + } + } + return false; + } + + /** + * Checks whether it is possible to show the node + * + * @param mixed $node + * @param string $websiteCode + * @param string $storeCode + * @return boolean + */ + protected function _canShowNode($node, $websiteCode = null, $storeCode = null) + { + $showTab = false; + if ($storeCode) { + $showTab = isset($node['showInStore']) ? (int)$node['showInStore'] : false; + } elseif ($websiteCode) { + $showTab = isset($node['showInWebsite']) ? (int)$node['showInWebsite'] : false; + } elseif (isset($node['showInDefault']) && $node['showInDefault']) { + $showTab = true; + } + + $showTab = $showTab || $this->_app->isSingleStoreMode(); + $showTab = $showTab && !($this->_app->isSingleStoreMode() + && isset($node['hide_in_single_store_mode']) && $node['hide_in_single_store_mode']); + return $showTab; + } + + /** + * Get translate module name + * + * @param array $sectionNode + * @param array $groupNode + * @param array $fieldNode + * @return string + */ + public function getAttributeModule($sectionNode = null, $groupNode = null, $fieldNode = null) + { + $moduleName = 'Mage_Backend'; + if (isset($sectionNode['module'])) { + $moduleName = (string) $sectionNode['module']; + } + if (isset($groupNode['module'])) { + $moduleName = (string) $groupNode['module']; + } + if (isset($fieldNode['module'])) { + $moduleName = (string) $fieldNode['module']; + } + return $moduleName; + } + + /** + * System configuration section, fieldset or field label getter + * + * @param string $sectionName + * @param string $groupName + * @param string $fieldName + * @throws InvalidArgumentException + * @return string + */ + public function getSystemConfigNodeLabel($sectionName, $groupName = null, $fieldName = null) + { + $sectionName = trim($sectionName, '/'); + $groupNode = $fieldNode = null; + $sectionNode = isset($this->_data['sections'][$sectionName]) ? $this->_data['sections'][$sectionName] : null; + if (!$sectionNode) { + throw new InvalidArgumentException( + $this->_helperFactory->get('Mage_Backend_Helper_Data')->__('Wrong section specified.') + ); + } + $currentNode = $sectionNode; + if (!empty($groupName)) { + $groupName = trim($groupName, '/'); + $groupNode = isset($sectionNode['groups'][$groupName]) ? $sectionNode['groups'][$groupName] : null; + if (!$groupNode) { + throw new InvalidArgumentException( + $this->_helperFactory->get('Mage_Backend_Helper_Data')->__('Wrong group specified.') + ); + } + $currentNode = $groupNode; + } + if (!empty($fieldName)) { + if (!empty($groupNode)) { + $fieldName = trim($fieldName, '/'); + $fieldNode = isset($groupNode['fields'][$fieldName]) ? $groupNode['fields'][$fieldName] : null; + if (!$fieldNode) { + throw new InvalidArgumentException( + $this->_helperFactory->get('Mage_Backend_Helper_Data')->__('Wrong field specified.') + ); + } + $currentNode = $fieldNode; + } else { + Mage::throwException( + $this->_helperFactory->get('Mage_Backend_Helper_Data')->__('The group node name must be specified with field node name.') + ); + } + } + $moduleName = $this->getAttributeModule($sectionNode, $groupNode, $fieldNode); + return isset($currentNode['label']) + ? $this->_helperFactory->get($moduleName)->__((string)$currentNode['label']) + : ''; + } + + /** + * Look for encrypted node entries in all system.xml files and return them + * + * @param bool $explodePathToEntities + * @return array + */ + public function getEncryptedNodeEntriesPaths($explodePathToEntities = false) + { + if (!$this->_encryptedPaths) { + $this->_encryptedPaths = $this->getFieldsByAttribute( + 'backend_model', 'Mage_Backend_Model_Config_Backend_Encrypted', $explodePathToEntities + ); + } + return $this->_encryptedPaths; + } + + public function getFieldsByAttribute($attributeName, $attributeValue, $explodePathToEntities = false) + { + $result = array(); + foreach ($this->_data['sections'] as $section) { + if (!isset($section['groups'])) { + continue; + } + foreach ($section['groups'] as $group) { + if (!isset($group['fields'])) { + continue; + } + foreach ($group['fields'] as $field) { + if (isset($field[$attributeName]) + && $field[$attributeName] == $attributeValue + ) { + if ($explodePathToEntities) { + $result[] = array( + 'section' => $section['id'], 'group' => $group['id'], 'field' => $field['id'] + ); + } else { + $result[] = $section['id'] . '/' . $group['id'] . '/' . $field['id']; + } + } + } + } + } + return $result; + } +} diff --git a/app/code/core/Mage/Backend/Model/Config/Structure/Converter.php b/app/code/core/Mage/Backend/Model/Config/Structure/Converter.php new file mode 100644 index 0000000000000000000000000000000000000000..d27a1ab6b0c083928f5c61428b7d143125598475 --- /dev/null +++ b/app/code/core/Mage/Backend/Model/Config/Structure/Converter.php @@ -0,0 +1,137 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Mage_Backend + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +class Mage_Backend_Model_Config_Structure_Converter +{ + /** + * Map of single=>plural sub-node names per node + * + * E.G. first element makes all 'tab' nodes be renamed to 'tabs' in system node. + * + * @var array + */ + protected $nameMap = array( + 'system' => array('tab' => 'tabs', 'section' => 'sections'), + 'section' => array('group' => 'groups'), + 'group' => array('field' => 'fields'), + 'depends' => array('field' => 'fields'), + ); + + /** + * Retrieve DOMDocument as array + * + * @param DOMNode $root + * @return mixed + */ + public function convert(DOMNode $root) + { + $result = $this->_processAttributes($root); + + $children = $root->childNodes; + + $processedSubLists = array(); + for ($i = 0; $i < $children->length; $i++) { + $child = $children->item($i); + $childName = $child->nodeName; + $convertedChild = array(); + + switch ($child->nodeType) { + case XML_COMMENT_NODE: + continue 2; + break; + + case XML_TEXT_NODE: + if ($children->length && trim($child->nodeValue, "\n ") === '') { + continue 2; + } + $childName = 'value'; + $convertedChild = $child->nodeValue; + break; + + case XML_CDATA_SECTION_NODE: + $childName = 'value'; + $convertedChild = $child->nodeValue; + break; + + default: + /** @var $child DOMElement */ + if ($childName == 'attribute') { + $childName = $child->getAttribute('type'); + } + $convertedChild = $this->convert($child); + break; + } + + if (array_key_exists($root->nodeName, $this->nameMap) + && array_key_exists($child->nodeName, $this->nameMap[$root->nodeName])) { + $childName = $this->nameMap[$root->nodeName][$child->nodeName]; + $processedSubLists[] = $childName; + } + + if (in_array($childName, $processedSubLists)) { + if (is_array($convertedChild) && array_key_exists('id', $convertedChild)) { + $result[$childName][$convertedChild['id']] = $convertedChild; + } else { + $result[$childName][] = $convertedChild; + } + } else if (array_key_exists($childName, $result)) { + $result[$childName] = array($result[$childName], $convertedChild); + $processedSubLists[] = $childName; + } else { + $result[$childName] = $convertedChild; + } + } + + if (count($result) == 1 && array_key_exists('value', $result)) { + $result = $result['value']; + } + + return $result; + } + + /** + * Process element attributes + * + * @param DOMNode $root + * @return array + */ + protected function _processAttributes(DOMNode $root) + { + $result = array(); + + if ($root->hasAttributes()) { + $attributes = $root->attributes; + foreach ($attributes as $attribute) { + if ($root->nodeName == 'attribute' && $attribute->name == 'type') { + continue; + } + $result[$attribute->name] = $attribute->value; + } + return $result; + } + return $result; + } +} diff --git a/app/code/core/Mage/Backend/Model/Config/Structure/Reader.php b/app/code/core/Mage/Backend/Model/Config/Structure/Reader.php new file mode 100644 index 0000000000000000000000000000000000000000..f0af42501289fee35c6e6097e173c5f35f637b08 --- /dev/null +++ b/app/code/core/Mage/Backend/Model/Config/Structure/Reader.php @@ -0,0 +1,89 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Mage_Backend + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + + +/** + * Backend System Configuration reader. + * Retrieves system configuration form layout from system.xml files. Merges configuration and caches it. + * + * @category Mage + * @package Mage_Backend + * @author Magento Core Team <core@magentocommerce.com> + */ +class Mage_Backend_Model_Config_Structure_Reader +{ + const CACHE_SYSTEM_CONFIGURATION_STRUCTURE = 'backend_system_configuration_structure'; + + /** + * @var Mage_Core_Model_Cache + */ + protected $_cache; + + + /** + * @var Mage_Core_Model_Config + */ + protected $_appConfig; + + /** + * @param array $data + */ + public function __construct(array $data = array()) + { + $this->_appConfig = isset($data['config']) ? $data['config'] : Mage::getConfig(); + $this->_cache = isset($data['cache']) ? $data['cache'] : Mage::app()->getCacheInstance(); + } + + /** + * Load system configuration + * + * @return Mage_Backend_Model_Config_Structure + */ + public function getConfiguration() + { + if ($this->_cache->canUse('config')) { + $cache = $this->_cache->load(self::CACHE_SYSTEM_CONFIGURATION_STRUCTURE); + if ($cache) { + return unserialize($cache); + } + } + + $fileNames = $this->_appConfig->getModuleConfigurationFiles('adminhtml' . DIRECTORY_SEPARATOR . 'system.xml'); + $config = $this->_appConfig->getModelInstance( + 'Mage_Backend_Model_Config_Structure', array('sourceFiles' => $fileNames) + ); + + if ($this->_cache->canUse('config')) { + $this->_cache->save( + serialize($config), + self::CACHE_SYSTEM_CONFIGURATION_STRUCTURE, + array(Mage_Core_Model_Config::CACHE_TAG) + ); + } + + return $config; + } +} diff --git a/app/code/core/Mage/Backend/Model/Config/Structure/system.xsd b/app/code/core/Mage/Backend/Model/Config/Structure/system.xsd new file mode 100644 index 0000000000000000000000000000000000000000..0dab4bb7115b441e0b209c31be5c852111a1e271 --- /dev/null +++ b/app/code/core/Mage/Backend/Model/Config/Structure/system.xsd @@ -0,0 +1,393 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +/** + * 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 Mage_Backend + * @subpackage Config + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> + <xs:element name="config"> + <xs:complexType> + <xs:sequence> + <xs:element ref="system" minOccurs="1" maxOccurs="1" /> + </xs:sequence> + </xs:complexType> + </xs:element> + + <xs:element name="system"> + <xs:complexType> + <xs:sequence> + <xs:choice minOccurs="1" maxOccurs="unbounded"> + <xs:element ref="tab" /> + <xs:element ref="section"/> + </xs:choice> + </xs:sequence> + </xs:complexType> + + <xs:unique name="uniqueTabId"> + <xs:annotation> + <xs:documentation> + Attribute id is unique under all tabs + </xs:documentation> + </xs:annotation> + <xs:selector xpath="tab"/> + <xs:field xpath="@id"/> + </xs:unique> + + <xs:unique name="uniqueSectionId"> + <xs:annotation> + <xs:documentation> + Attribute id is unique under all sections + </xs:documentation> + </xs:annotation> + <xs:selector xpath="section"/> + <xs:field xpath="@id"/> + </xs:unique> + </xs:element> + + <xs:attributeGroup name="tabAttributeGroup"> + <xs:attribute name="id" type="typeId" use="required" /> + <xs:attribute name="module" type="typeModule" use="optional" /> + <xs:attribute name="translate" type="xs:string" use="optional" /> + <xs:attribute name="sortOrder" type="xs:int" use="optional" /> + <xs:attribute name="class" type="xs:string" use="optional" /> + </xs:attributeGroup> + + <xs:attributeGroup name="elementsAttributeGroup"> + <xs:attribute name="id" type="typeId" use="required" /> + <xs:attribute name="module" type="typeModule" use="optional" /> + <xs:attribute name="translate" type="xs:string" use="optional" /> + <xs:attribute name="type" type="xs:string" use="optional" /> + <xs:attribute name="sortOrder" type="xs:int" use="optional" /> + <xs:attribute name="showInDefault" type="xs:int" use="optional" /> + <xs:attribute name="showInStore" type="xs:int" use="optional" /> + <xs:attribute name="showInWebsite" type="xs:int" use="optional" /> + </xs:attributeGroup> + + <xs:element name="tab"> + <xs:annotation> + <xs:documentation> + Tab resource. Recursive complex type. + </xs:documentation> + </xs:annotation> + + <xs:complexType> + <xs:sequence> + <xs:element maxOccurs="1" name="label" type="xs:string" /> + </xs:sequence> + <xs:attributeGroup ref="tabAttributeGroup"/> + </xs:complexType> + </xs:element> + + <xs:element name="section"> + <xs:annotation> + <xs:documentation> + Section Resource. Recursive complex type + </xs:documentation> + </xs:annotation> + + <xs:complexType> + <xs:sequence> + <xs:choice minOccurs="2" maxOccurs="unbounded"> + <xs:element name="label" type="xs:string" /> + <xs:element name="class" type="xs:string" /> + <xs:element name="tab" type="typeTabId" /> + <xs:element name="header_css" type="xs:string" /> + <xs:element name="resource" type="typeAclResourceId" /> + <xs:element ref="group" /> + </xs:choice> + </xs:sequence> + <xs:attributeGroup ref="elementsAttributeGroup"/> + </xs:complexType> + + <xs:unique name="uniqueGroupId"> + <xs:annotation> + <xs:documentation> + Attribute id is unique under all groups for each section + </xs:documentation> + </xs:annotation> + <xs:selector xpath="group"/> + <xs:field xpath="@id"/> + </xs:unique> + </xs:element> + + <xs:element name="group"> + <xs:annotation> + <xs:documentation> + Group Resource. Recursive complex type + </xs:documentation> + </xs:annotation> + + <xs:complexType> + <xs:sequence> + <xs:choice minOccurs="1" maxOccurs="unbounded"> + <xs:element name="label" type="xs:string" /> + <xs:element name="fieldset_css" type="xs:string" /> + <xs:element name="frontend_model" type="typeModel" /> + <xs:element name="clone_model" type="typeModel" /> + <xs:element name="clone_fields" type="xs:int" /> + <xs:element name="expanded" type="xs:int" /> + <xs:element name="help_url" type="typeUrl" /> + <xs:element name="comment" type="xs:string" /> + <xs:element name="hide_in_single_store_mode" type="xs:int" /> + <xs:element ref="field" /> + </xs:choice> + </xs:sequence> + + <xs:attributeGroup ref="elementsAttributeGroup"/> + </xs:complexType> + + <xs:unique name="uniqueFieldId"> + <xs:annotation> + <xs:documentation> + Attribute id is unique under all fields for each group + </xs:documentation> + </xs:annotation> + <xs:selector xpath="field"/> + <xs:field xpath="@id"/> + </xs:unique> + </xs:element> + + <xs:element name="field"> + <xs:annotation> + <xs:documentation> + Field Resource. Recursive complex type + </xs:documentation> + </xs:annotation> + + <xs:complexType> + <xs:sequence> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:element name="label" type="xs:string" /> + <xs:element name="comment" type="xs:string" /> + <xs:element name="tooltip" type="xs:string" /> + <xs:element name="hint" type="xs:string" /> + <xs:element name="frontend_class" type="xs:string" /> + <xs:element name="frontend_model" type="typeModel" /> + <xs:element name="backend_model" type="typeModel" /> + <xs:element name="source_model" type="typeModel" /> + <xs:element name="config_path" type="typeConfigPath" /> + <xs:element name="validate" type="xs:string" /> + <xs:element name="can_be_empty" type="xs:int" /> + <xs:element name="if_module_enabled" type="typeModule" /> + <xs:element name="base_url" type="typeUrl" /> + <xs:element name="button_url" type="typeUrl" /> + <xs:element name="more_url" type="typeUrl" /> + <xs:element name="demo_url" type="typeUrl" /> + <xs:element name="button_label" type="xs:string" /> + <xs:element name="hide_in_single_store_mode" type="xs:int" /> + <xs:element name="upload_dir" type="typeUploadDir" /> + <xs:element ref="depends" /> + <xs:element ref="attribute" /> + </xs:choice> + </xs:sequence> + + <xs:attributeGroup ref="elementsAttributeGroup"/> + </xs:complexType> + + <xs:unique name="uniqueAttributeType"> + <xs:annotation> + <xs:documentation> + Attribute type is unique under all node attributes per field + </xs:documentation> + </xs:annotation> + <xs:selector xpath=".//attribute"/> + <xs:field xpath="@type"/> + </xs:unique> + + </xs:element> + + <xs:element name="attribute"> + <xs:annotation> + <xs:documentation> + Attribute Resource. Recursive complex type + </xs:documentation> + </xs:annotation> + + <xs:complexType mixed="true"> + <xs:sequence> + <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax" /> + </xs:sequence> + <xs:attributeGroup ref="attributeAttributeGroup"/> + </xs:complexType> + </xs:element> + + <xs:attributeGroup name="attributeAttributeGroup"> + <xs:attribute name="type" type="xs:string" use="required" /> + <xs:anyAttribute processContents="lax"/> + </xs:attributeGroup> + + <xs:element name="depends"> + <xs:annotation> + <xs:documentation> + Describe which elements are regulator for current field + </xs:documentation> + </xs:annotation> + + <xs:complexType> + <xs:sequence> + <xs:element minOccurs="0" maxOccurs="unbounded" name="field"> + <xs:complexType> + <xs:annotation> + <xs:documentation> + Field resource. Recursive complex type. Define element is influence on current field + </xs:documentation> + </xs:annotation> + + <xs:simpleContent> + <xs:extension base="xs:string"> + <xs:attribute name="id" type="typeId" use="required" /> + <xs:attribute name="separator" type='xs:string' use='optional' /> + </xs:extension> + </xs:simpleContent> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + + <xs:unique name="uniqueDependsFieldId"> + <xs:annotation> + <xs:documentation> + Attribute id is unique under all regulatory elements per section/group/field + </xs:documentation> + </xs:annotation> + <xs:selector xpath=".//field"/> + <xs:field xpath="@id"/> + </xs:unique> + </xs:element> + + <xs:simpleType name="typeTabId"> + <xs:annotation> + <xs:documentation> + Item id attribute for element tab can has only [a-zA-Z0-9/_]. Minimal length 3 symbol. Case sensitive. + </xs:documentation> + </xs:annotation> + + <xs:restriction base="xs:string"> + <xs:pattern value="[a-zA-Z0-9_]{1,}" /> + <xs:minLength value="3" /> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="typeId"> + <xs:annotation> + <xs:documentation> + Item id attribute for elements section, group, field can has only [a-zA-Z0-9/_]. Minimal length 2 symbol. Case sensitive. + </xs:documentation> + </xs:annotation> + + <xs:restriction base="xs:string"> + <xs:pattern value="[a-zA-Z0-9_]{1,}" /> + <xs:minLength value="2" /> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="typeAclResourceId"> + <xs:annotation> + <xs:documentation> + Acl Resource identifier. Item can has only [a-zA-Z0-9/_:]. Minimal length 8 symbol. Case sensitive. + </xs:documentation> + </xs:annotation> + + <xs:restriction base="xs:string"> + <xs:pattern value="[A-Z]+[a-z0-9]{1,}_[A-Z]+[A-Z0-9a-z]{1,}::[A-Za-z_0-9]{1,}" /> + <xs:minLength value="8" /> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="typeModule"> + <xs:annotation> + <xs:documentation> + Item module attribute can has only [a-z0-9_]. Minimal length 5 symbol. Case insensitive. + </xs:documentation> + </xs:annotation> + <xs:restriction base="xs:string"> + <xs:pattern value="[A-Z]+[a-z0-9]{1,}_[A-Z]+[A-Z0-9a-z]{1,}" /> + <xs:minLength value="5" /> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="typeModel"> + <xs:annotation> + <xs:documentation> + Item model attribute can has only [a-zA-Z0-9_]. Minimal length 5 symbol. Case insensitive. + </xs:documentation> + </xs:annotation> + <xs:restriction base="xs:string"> + <xs:pattern value="[A-Z]+[a-z0-9]{1,}(_[A-Z][A-Z0-9a-z]+){1,}(::[A-Z0-9a-z_]+)?" /> + <xs:minLength value="5" /> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="typeConfigPath"> + <xs:annotation> + <xs:documentation> + Item configPath attribute can has only three groups of [a-zA-Z0-9_] characters split by '/'. + Minimal length 5 symbol. Case insensitive. + </xs:documentation> + </xs:annotation> + <xs:restriction base="xs:string"> + <xs:pattern value="[a-zA-Z0-9_]+/[a-zA-Z0-9_]+/[a-zA-Z0-9_]+" /> + <xs:minLength value="5" /> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="typeUploadDirRestriction"> + <xs:restriction base="xs:string"> + <xs:pattern value="([a-zA-Z0-9_]+/{0,1}){1,}" /> + </xs:restriction> + </xs:simpleType> + <xs:complexType name="typeUploadDir"> + <xs:annotation> + <xs:documentation> + Item uploadDir value can has only [a-zA-Z0-9_] characters split by '/'. Case insensitive. + </xs:documentation> + </xs:annotation> + <xs:simpleContent> + <xs:extension base="typeUploadDirRestriction"> + <xs:attribute type="xs:string" name="config" use="optional"/> + <xs:attribute type="xs:string" name="scope_info" use="optional"/> + </xs:extension> + </xs:simpleContent> + </xs:complexType> + + <xs:simpleType name="typeUrlRestriction"> + <xs:restriction base="xs:anyURI"> + <xs:minLength value="3" /> + </xs:restriction> + </xs:simpleType> + <xs:complexType name="typeUrl" mixed="true"> + <xs:annotation> + <xs:documentation> + typeUrl value can contain only valid uri with minimal length 3. + </xs:documentation> + </xs:annotation> + <xs:simpleContent> + <xs:extension base="typeUrlRestriction"> + <xs:attribute type="xs:string" name="type" use="optional"/> + <xs:attribute type="xs:string" name="scope_info" use="optional"/> + </xs:extension> + </xs:simpleContent> + </xs:complexType> +</xs:schema> diff --git a/app/code/core/Mage/Backend/Model/Config/Structure/system_file.xsd b/app/code/core/Mage/Backend/Model/Config/Structure/system_file.xsd new file mode 100644 index 0000000000000000000000000000000000000000..2dfa293e5c9f579d3f45156d8b6eb7ca0079973a --- /dev/null +++ b/app/code/core/Mage/Backend/Model/Config/Structure/system_file.xsd @@ -0,0 +1,394 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +/** + * 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 Mage_Backend + * @subpackage Config + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> + <xs:element name="config"> + <xs:complexType> + <xs:sequence> + <xs:element ref="system" minOccurs="1" maxOccurs="1" /> + </xs:sequence> + </xs:complexType> + </xs:element> + + <xs:element name="system"> + <xs:complexType> + <xs:sequence> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:element ref="tab" /> + <xs:element ref="section"/> + </xs:choice> + </xs:sequence> + </xs:complexType> + + <xs:unique name="uniqueTabId"> + <xs:annotation> + <xs:documentation> + Attribute id is unique under all tabs + </xs:documentation> + </xs:annotation> + <xs:selector xpath="tab"/> + <xs:field xpath="@id"/> + </xs:unique> + + <xs:unique name="uniqueSectionId"> + <xs:annotation> + <xs:documentation> + Attribute id is unique under all sections + </xs:documentation> + </xs:annotation> + <xs:selector xpath="section"/> + <xs:field xpath="@id"/> + </xs:unique> + </xs:element> + + <xs:attributeGroup name="tabAttributeGroup"> + <xs:attribute name="id" type="typeId" use="required" /> + <xs:attribute name="module" type="typeModule" use="optional" /> + <xs:attribute name="translate" type="xs:string" use="optional" /> + <xs:attribute name="sortOrder" type="xs:int" use="optional" /> + <xs:attribute name="class" type="xs:string" use="optional" /> + </xs:attributeGroup> + + <xs:attributeGroup name="elementsAttributeGroup"> + <xs:attribute name="id" type="typeId" use="required" /> + <xs:attribute name="module" type="typeModule" use="optional" /> + <xs:attribute name="translate" type="xs:string" use="optional" /> + <xs:attribute name="type" type="xs:string" use="optional" /> + <xs:attribute name="sortOrder" type="xs:int" use="optional" /> + <xs:attribute name="showInDefault" type="xs:int" use="optional" /> + <xs:attribute name="showInStore" type="xs:int" use="optional" /> + <xs:attribute name="showInWebsite" type="xs:int" use="optional" /> + </xs:attributeGroup> + + <xs:element name="tab"> + <xs:annotation> + <xs:documentation> + Tab resource. Recursive complex type. + </xs:documentation> + </xs:annotation> + + <xs:complexType> + <xs:sequence> + <xs:element maxOccurs="1" name="label" type="xs:string" /> + </xs:sequence> + <xs:attributeGroup ref="tabAttributeGroup"/> + </xs:complexType> + </xs:element> + + <xs:element name="section"> + <xs:annotation> + <xs:documentation> + Section Resource. Recursive complex type + </xs:documentation> + </xs:annotation> + + <xs:complexType> + <xs:sequence> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:element name="label" type="xs:string" /> + <xs:element name="class" type="xs:string" /> + <xs:element name="tab" type="typeTabId" /> + <xs:element name="header_css" type="xs:string" /> + <xs:element name="resource" type="typeAclResourceId" /> + <xs:element ref="group" /> + </xs:choice> + </xs:sequence> + + <xs:attributeGroup ref="elementsAttributeGroup"/> + </xs:complexType> + + <xs:unique name="uniqueGroupId"> + <xs:annotation> + <xs:documentation> + Attribute id is unique under all groups for each section + </xs:documentation> + </xs:annotation> + <xs:selector xpath="group"/> + <xs:field xpath="@id"/> + </xs:unique> + </xs:element> + + <xs:element name="group"> + <xs:annotation> + <xs:documentation> + Group Resource. Recursive complex type + </xs:documentation> + </xs:annotation> + + <xs:complexType> + <xs:sequence> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:element name="label" type="xs:string" /> + <xs:element name="fieldset_css" type="xs:string" /> + <xs:element name="frontend_model" type="typeModel" /> + <xs:element name="clone_model" type="typeModel" /> + <xs:element name="clone_fields" type="xs:int" /> + <xs:element name="expanded" type="xs:int" /> + <xs:element name="help_url" type="typeUrl" /> + <xs:element name="comment" type="xs:string" /> + <xs:element name="hide_in_single_store_mode" type="xs:int" /> + <xs:element ref="field" /> + </xs:choice> + </xs:sequence> + + <xs:attributeGroup ref="elementsAttributeGroup"/> + </xs:complexType> + + <xs:unique name="uniqueFieldId"> + <xs:annotation> + <xs:documentation> + Attribute id is unique under all fields for each group + </xs:documentation> + </xs:annotation> + <xs:selector xpath="field"/> + <xs:field xpath="@id"/> + </xs:unique> + </xs:element> + + <xs:element name="field"> + <xs:annotation> + <xs:documentation> + Field Resource. Recursive complex type + </xs:documentation> + </xs:annotation> + + <xs:complexType> + <xs:sequence> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:element name="label" type="xs:string" /> + <xs:element name="comment" type="xs:string" /> + <xs:element name="tooltip" type="xs:string" /> + <xs:element name="hint" type="xs:string" /> + <xs:element name="frontend_class" type="xs:string" /> + <xs:element name="frontend_model" type="typeModel" /> + <xs:element name="backend_model" type="typeModel" /> + <xs:element name="source_model" type="typeModel" /> + <xs:element name="config_path" type="typeConfigPath" /> + <xs:element name="validate" type="xs:string" /> + <xs:element name="can_be_empty" type="xs:int" /> + <xs:element name="if_module_enabled" type="typeModule" /> + <xs:element name="base_url" type="typeUrl" /> + <xs:element name="button_url" type="typeUrl" /> + <xs:element name="more_url" type="typeUrl" /> + <xs:element name="demo_url" type="typeUrl" /> + <xs:element name="button_label" type="xs:string" /> + <xs:element name="hide_in_single_store_mode" type="xs:int" /> + <xs:element name="upload_dir" type="typeUploadDir" /> + <xs:element ref="depends" /> + <xs:element ref="attribute" /> + </xs:choice> + </xs:sequence> + + <xs:attributeGroup ref="elementsAttributeGroup"/> + </xs:complexType> + + <xs:unique name="uniqueAttributeType"> + <xs:annotation> + <xs:documentation> + Attribute type is unique under all node attributes per field + </xs:documentation> + </xs:annotation> + <xs:selector xpath=".//attribute"/> + <xs:field xpath="@type"/> + </xs:unique> + + </xs:element> + + <xs:element name="attribute"> + <xs:annotation> + <xs:documentation> + Attribute Resource. Recursive complex type + </xs:documentation> + </xs:annotation> + + <xs:complexType mixed="true"> + <xs:sequence> + <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax" /> + </xs:sequence> + <xs:attributeGroup ref="attributeAttributeGroup"/> + </xs:complexType> + </xs:element> + + <xs:attributeGroup name="attributeAttributeGroup"> + <xs:attribute name="type" type="xs:string" use="required" /> + <xs:anyAttribute processContents="lax"/> + </xs:attributeGroup> + + <xs:element name="depends"> + <xs:annotation> + <xs:documentation> + Describe which elements are regulator for current field + </xs:documentation> + </xs:annotation> + + <xs:complexType> + <xs:sequence> + <xs:element minOccurs="0" maxOccurs="unbounded" name="field"> + <xs:complexType> + <xs:annotation> + <xs:documentation> + Field resource. Recursive complex type. Define element is influence on current field + </xs:documentation> + </xs:annotation> + + <xs:simpleContent> + <xs:extension base="xs:string"> + <xs:attribute name="id" type="typeId" use="required" /> + <xs:attribute name="separator" type='xs:string' use='optional' /> + </xs:extension> + </xs:simpleContent> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:complexType> + + <xs:unique name="uniqueDependsFieldId"> + <xs:annotation> + <xs:documentation> + Attribute id is unique under all regulatory elements per section/group/field + </xs:documentation> + </xs:annotation> + <xs:selector xpath=".//field"/> + <xs:field xpath="@id"/> + </xs:unique> + </xs:element> + + <xs:simpleType name="typeTabId"> + <xs:annotation> + <xs:documentation> + Item id attribute for element tab can has only [a-zA-Z0-9/_]. Minimal length 3 symbol. Case sensitive. + </xs:documentation> + </xs:annotation> + + <xs:restriction base="xs:string"> + <xs:pattern value="[a-zA-Z0-9_]{1,}" /> + <xs:minLength value="3" /> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="typeId"> + <xs:annotation> + <xs:documentation> + Item id attribute for elements section, group, field can has only [a-zA-Z0-9/_]. Minimal length 2 symbol. Case sensitive. + </xs:documentation> + </xs:annotation> + + <xs:restriction base="xs:string"> + <xs:pattern value="[a-zA-Z0-9_]{1,}" /> + <xs:minLength value="2" /> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="typeAclResourceId"> + <xs:annotation> + <xs:documentation> + Acl Resource identifier. Item can has only [a-zA-Z0-9/_:]. Minimal length 8 symbol. Case sensitive. + </xs:documentation> + </xs:annotation> + + <xs:restriction base="xs:string"> + <xs:pattern value="[A-Z]+[a-z0-9]{1,}_[A-Z]+[A-Z0-9a-z]{1,}::[A-Za-z_0-9]{1,}" /> + <xs:minLength value="8" /> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="typeModule"> + <xs:annotation> + <xs:documentation> + Item module attribute can has only [a-z0-9_]. Minimal length 5 symbol. Case insensitive. + </xs:documentation> + </xs:annotation> + <xs:restriction base="xs:string"> + <xs:pattern value="[A-Z]+[a-z0-9]{1,}_[A-Z]+[A-Z0-9a-z]{1,}" /> + <xs:minLength value="5" /> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="typeModel"> + <xs:annotation> + <xs:documentation> + Item model attribute can has only [a-zA-Z0-9_]. Minimal length 5 symbol. Case insensitive. + </xs:documentation> + </xs:annotation> + <xs:restriction base="xs:string"> + <xs:pattern value="[A-Z]+[a-z0-9]{1,}(_[A-Z][A-Z0-9a-z]+){1,}(::[A-Z0-9a-z_]+)?" /> + <xs:minLength value="5" /> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="typeConfigPath"> + <xs:annotation> + <xs:documentation> + Item configPath attribute can has only three groups of [a-zA-Z0-9_] characters split by '/'. + Minimal length 5 symbol. Case insensitive. + </xs:documentation> + </xs:annotation> + <xs:restriction base="xs:string"> + <xs:pattern value="[a-zA-Z0-9_]+/[a-zA-Z0-9_]+/[a-zA-Z0-9_]+" /> + <xs:minLength value="5" /> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="typeUploadDirRestriction"> + <xs:restriction base="xs:string"> + <xs:pattern value="([a-zA-Z0-9_]+/{0,1}){1,}" /> + </xs:restriction> + </xs:simpleType> + <xs:complexType name="typeUploadDir"> + <xs:annotation> + <xs:documentation> + Item uploadDir value can has only [a-zA-Z0-9_] characters split by '/'. Case insensitive. + </xs:documentation> + </xs:annotation> + <xs:simpleContent> + <xs:extension base="typeUploadDirRestriction"> + <xs:attribute type="xs:string" name="config" use="optional"/> + <xs:attribute type="xs:string" name="scope_info" use="optional"/> + </xs:extension> + </xs:simpleContent> + </xs:complexType> + + <xs:simpleType name="typeUrlRestriction"> + <xs:restriction base="xs:anyURI"> + <xs:minLength value="3" /> + </xs:restriction> + </xs:simpleType> + <xs:complexType name="typeUrl" mixed="true"> + <xs:annotation> + <xs:documentation> + typeUrl value can contain only valid uri with minimal length 3. + </xs:documentation> + </xs:annotation> + <xs:simpleContent> + <xs:extension base="typeUrlRestriction"> + <xs:attribute type="xs:string" name="type" use="optional"/> + <xs:attribute type="xs:string" name="scope_info" use="optional"/> + </xs:extension> + </xs:simpleContent> + </xs:complexType> +</xs:schema> diff --git a/app/code/core/Mage/Backend/Model/Config/StructureInterface.php b/app/code/core/Mage/Backend/Model/Config/StructureInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..c27c1949d728acd46e74085a346821659d410179 --- /dev/null +++ b/app/code/core/Mage/Backend/Model/Config/StructureInterface.php @@ -0,0 +1,80 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Mage_Backend + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + + +/** + * System configuration interface + * + * @category Mage + * @package Mage_Backend + * @author Magento Core Team <core@magentocommerce.com> + */ +interface Mage_Backend_Model_Config_StructureInterface +{ + /** + * Get all sections configuration + * + * @return array + */ + public function getSections(); + + /** + * Get section configuration + * + * @param string $sectionCode + * @param string $websiteCode + * @param string $storeCode + * @return array + */ + public function getSection($sectionCode = null, $websiteCode = null, $storeCode = null); + + /** + * Get all tabs configuration + * + * @return array + */ + public function getTabs(); + + /** + * Get translate module name + * + * @param array $section + * @param array $group + * @param array $field + * @return string + */ + public function getAttributeModule($section = null, $group = null, $field = null); + + /** + * Check whether node has child node that can be shown + * + * @param array $node + * @param string $websiteCode + * @param string $storeCode + * @return boolean + */ + public function hasChildren($node, $websiteCode = null, $storeCode = null); +} diff --git a/app/code/core/Mage/Adminhtml/controllers/System/ConfigController.php b/app/code/core/Mage/Backend/controllers/Adminhtml/System/ConfigController.php similarity index 80% rename from app/code/core/Mage/Adminhtml/controllers/System/ConfigController.php rename to app/code/core/Mage/Backend/controllers/Adminhtml/System/ConfigController.php index 5f0ddce2ef1ace2d8bf51b496a42a52d3883e365..386a62a96fa972ce6d506c3454799b71792603c7 100644 --- a/app/code/core/Mage/Adminhtml/controllers/System/ConfigController.php +++ b/app/code/core/Mage/Backend/controllers/Adminhtml/System/ConfigController.php @@ -19,15 +19,19 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ /** - * Configuration controller + * System Configuration controller + * + * @category Mage + * @package Mage_Backend + * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_System_ConfigController extends Mage_Adminhtml_Controller_Action +class Mage_Backend_Adminhtml_System_ConfigController extends Mage_Backend_Controller_ActionAbstract { /** * Whether current section is allowed @@ -40,7 +44,7 @@ class Mage_Adminhtml_System_ConfigController extends Mage_Adminhtml_Controller_A * Controller pre-dispatch method * Check if current section is found and is allowed * - * @return Mage_Adminhtml_System_ConfigController + * @return Mage_Backend_Adminhtml_System_ConfigController */ public function preDispatch() { @@ -74,11 +78,12 @@ class Mage_Adminhtml_System_ConfigController extends Mage_Adminhtml_Controller_A $website = $this->getRequest()->getParam('website'); $store = $this->getRequest()->getParam('store'); - $configFields = Mage::getSingleton('Mage_Adminhtml_Model_Config'); + /** @var $systemConfig Mage_Backend_Model_Config_Structure */ + $systemConfig = Mage::getSingleton('Mage_Backend_Model_Config_Structure_Reader')->getConfiguration(); - $sections = $configFields->getSections($current); - $section = $sections->$current; - $hasChildren = $configFields->hasChildren($section, $website, $store); + $sections = $systemConfig->getSections($current); + $section = isset($sections[$current]) ? $sections[$current] : array(); + $hasChildren = $systemConfig->hasChildren($section, $website, $store); if (!$hasChildren && $current) { $this->_redirect('*/*/', array('website'=>$website, 'store'=>$store)); } @@ -89,25 +94,25 @@ class Mage_Adminhtml_System_ConfigController extends Mage_Adminhtml_Controller_A $this->getLayout()->getBlock('menu')->setAdditionalCacheKeyInfo(array($current)); $this->_addBreadcrumb( - Mage::helper('Mage_Adminhtml_Helper_Data')->__('System'), - Mage::helper('Mage_Adminhtml_Helper_Data')->__('System'), + Mage::helper('Mage_Backend_Helper_Data')->__('System'), + Mage::helper('Mage_Backend_Helper_Data')->__('System'), $this->getUrl('*/system') ); - $this->getLayout()->addBlock('Mage_Adminhtml_Block_System_Config_Tabs', '', 'left')->initTabs(); + $this->getLayout()->addBlock('Mage_Backend_Block_System_Config_Tabs', '', 'left')->initTabs(); if ($this->_isSectionAllowed) { - $this->_addContent($this->getLayout()->createBlock('Mage_Adminhtml_Block_System_Config_Edit')->initForm()); + $this->_addContent($this->getLayout()->createBlock('Mage_Backend_Block_System_Config_Edit')->initForm()); $this->_addJs($this->getLayout() - ->createBlock('Mage_Adminhtml_Block_Template') - ->setTemplate('system/shipping/ups.phtml')); + ->createBlock('Mage_Backend_Block_Template') + ->setTemplate('Mage_Adminhtml::system/shipping/ups.phtml')); $this->_addJs($this->getLayout() - ->createBlock('Mage_Adminhtml_Block_Template') + ->createBlock('Mage_Backend_Block_Template') ->setTemplate('system/config/js.phtml')); $this->_addJs($this->getLayout() - ->createBlock('Mage_Adminhtml_Block_Template') - ->setTemplate('system/shipping/applicable_country.phtml')); + ->createBlock('Mage_Backend_Block_Template') + ->setTemplate('Mage_Adminhtml::system/shipping/applicable_country.phtml')); $this->renderLayout(); } @@ -119,11 +124,11 @@ class Mage_Adminhtml_System_ConfigController extends Mage_Adminhtml_Controller_A public function saveAction() { /* @var $session Mage_Adminhtml_Model_Session */ - $session = Mage::getSingleton('Mage_Adminhtml_Model_Session'); + $session = Mage::getSingleton('Mage_Backend_Model_Session'); try { if (!$this->_isSectionAllowed($this->getRequest()->getParam('section'))) { - throw new Exception(Mage::helper('Mage_Adminhtml_Helper_Data')->__('This section is not allowed.')); + throw new Exception(Mage::helper('Mage_Backend_Helper_Data')->__('This section is not allowed.')); } // custom save logic @@ -131,7 +136,7 @@ class Mage_Adminhtml_System_ConfigController extends Mage_Adminhtml_Controller_A $section = $this->getRequest()->getParam('section'); $website = $this->getRequest()->getParam('website'); $store = $this->getRequest()->getParam('store'); - Mage::getModel('Mage_Adminhtml_Model_Config_Data')->setSection($section)->setWebsite($website) + Mage::getModel('Mage_Backend_Model_Config')->setSection($section)->setWebsite($website) ->setStore($store)->setGroups($this->_getGroupsForSave())->save(); // re-init configuration @@ -145,15 +150,15 @@ class Mage_Adminhtml_System_ConfigController extends Mage_Adminhtml_Controller_A Mage::dispatchEvent("admin_system_config_changed_section_{$section}", array( 'website' => $website, 'store' => $store )); - $session->addSuccess(Mage::helper('Mage_Adminhtml_Helper_Data')->__('The configuration has been saved.')); + $session->addSuccess(Mage::helper('Mage_Backend_Helper_Data')->__('The configuration has been saved.')); } catch (Mage_Core_Exception $e) { $messages = explode("\n", $e->getMessage()); array_walk($messages, create_function( - '$message', 'Mage::getSingleton(\'Mage_Adminhtml_Model_Session\')->addError($message);' + '$message', 'Mage::getSingleton(\'Mage_Backend_Model_Session\')->addError($message);' )); } catch (Exception $e) { $session->addException($e, - Mage::helper('Mage_Adminhtml_Helper_Data')->__('An error occurred while saving this configuration:') + Mage::helper('Mage_Backend_Helper_Data')->__('An error occurred while saving this configuration:') . ' ' . $e->getMessage()); } @@ -264,9 +269,10 @@ class Mage_Adminhtml_System_ConfigController extends Mage_Adminhtml_Controller_A protected function _isSectionAllowed($section) { try { - $resourceId = (string) Mage::getSingleton('Mage_Adminhtml_Model_Config') - ->getSection($section)->resource; - if (!Mage::getSingleton('Mage_Core_Model_Authorization')->isAllowed($resourceId)) { + $section = Mage::getSingleton('Mage_Backend_Model_Config_Structure_Reader') + ->getConfiguration() + ->getSection($section); + if (!Mage::getSingleton('Mage_Core_Model_Authorization')->isAllowed($section['resource'])) { throw new Exception(''); } return true; diff --git a/app/code/core/Mage/Adminhtml/controllers/SystemController.php b/app/code/core/Mage/Backend/controllers/Adminhtml/SystemController.php similarity index 76% rename from app/code/core/Mage/Adminhtml/controllers/SystemController.php rename to app/code/core/Mage/Backend/controllers/Adminhtml/SystemController.php index 752829e56dcbe5ee33252c8cfbd24677435b856d..83f3fb546e710675ee520adcb1bfd87dfaf20ba9 100644 --- a/app/code/core/Mage/Adminhtml/controllers/SystemController.php +++ b/app/code/core/Mage/Backend/controllers/Adminhtml/SystemController.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -28,16 +28,19 @@ * System admin controller * * @category Mage - * @package Mage_Adminhtml - * @author Magento Core Team <core@magentocommerce.com> + * @package Mage_Backend + * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_SystemController extends Mage_Adminhtml_Controller_Action +class Mage_Backend_Adminhtml_SystemController extends Mage_Backend_Controller_ActionAbstract { public function indexAction() { $this->loadLayout(); $this->_setActiveMenu('Mage_Adminhtml::system'); - $this->_addBreadcrumb(Mage::helper('Mage_Adminhtml_Helper_Data')->__('System'), Mage::helper('Mage_Adminhtml_Helper_Data')->__('System')); + $this->_addBreadcrumb( + Mage::helper('Mage_Backend_Helper_Data')->__('System'), + Mage::helper('Mage_Backend_Helper_Data')->__('System') + ); $this->renderLayout(); } @@ -45,7 +48,7 @@ class Mage_Adminhtml_SystemController extends Mage_Adminhtml_Controller_Action { $storeId = (int) $this->getRequest()->getParam('store'); if ($storeId) { - Mage::getSingleton('Mage_Adminhtml_Model_Session')->setStoreId($storeId); + Mage::getSingleton('Mage_Backend_Model_Session')->setStoreId($storeId); } $this->_redirectReferer(); } diff --git a/app/code/core/Mage/Backend/view/adminhtml/admin/login.phtml b/app/code/core/Mage/Backend/view/adminhtml/admin/login.phtml index ef3d77dea7fd0095b7277a82b2710ff291808811..994f89b5cb571bb7f212b09f437aef2f3c69547d 100644 --- a/app/code/core/Mage/Backend/view/adminhtml/admin/login.phtml +++ b/app/code/core/Mage/Backend/view/adminhtml/admin/login.phtml @@ -29,26 +29,26 @@ <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title><?php echo Mage::helper('Mage_Backend_Helper_Data')->__('Log into Magento Admin Page') ?></title> - <link type="text/css" rel="stylesheet" href="<?php echo $this->getSkinUrl('reset.css') ?>" media="all" /> - <link type="text/css" rel="stylesheet" href="<?php echo $this->getSkinUrl('boxes.css') ?>" media="all" /> - <link rel="icon" href="<?php echo $this->getSkinUrl('Mage_Page::favicon.ico') ?>" type="image/x-icon" /> - <link rel="shortcut icon" href="<?php echo $this->getSkinUrl('Mage_Page::favicon.ico') ?>" type="image/x-icon" /> + <link type="text/css" rel="stylesheet" href="<?php echo $this->getViewFileUrl('reset.css') ?>" media="all" /> + <link type="text/css" rel="stylesheet" href="<?php echo $this->getViewFileUrl('boxes.css') ?>" media="all" /> + <link rel="icon" href="<?php echo $this->getViewFileUrl('Mage_Page::favicon.ico') ?>" type="image/x-icon" /> + <link rel="shortcut icon" href="<?php echo $this->getViewFileUrl('Mage_Page::favicon.ico') ?>" type="image/x-icon" /> - <script type="text/javascript" src="<?php echo $this->getSkinUrl('jquery/jquery-1.7.1.min.js') ?>"></script> - <script type="text/javascript" src="<?php echo $this->getSkinUrl('mage/jquery-no-conflict.js') ?>"></script> - <script type="text/javascript" src="<?php echo $this->getSkinUrl('jquery/jquery-ui-1.8.18.custom.min.js') ?>"></script> - <script type="text/javascript" src="<?php echo $this->getSkinUrl('jquery/jquery.tmpl.min.js') ?>"></script> - <script type="text/javascript" src="<?php echo $this->getSkinUrl('mage/loader.js') ?>"></script> + <script type="text/javascript" src="<?php echo $this->getViewFileUrl('jquery/jquery-1.7.1.min.js') ?>"></script> + <script type="text/javascript" src="<?php echo $this->getViewFileUrl('mage/jquery-no-conflict.js') ?>"></script> + <script type="text/javascript" src="<?php echo $this->getViewFileUrl('jquery/jquery-ui-1.8.18.custom.min.js') ?>"></script> + <script type="text/javascript" src="<?php echo $this->getViewFileUrl('jquery/jquery.tmpl.min.js') ?>"></script> + <script type="text/javascript" src="<?php echo $this->getViewFileUrl('mage/loader.js') ?>"></script> - <script type="text/javascript" src="<?php echo $this->getSkinUrl('prototype/prototype.js') ?>"></script> - <script type="text/javascript" src="<?php echo $this->getSkinUrl('prototype/validation.js') ?>"></script> - <script type="text/javascript" src="<?php echo $this->getSkinUrl('scriptaculous/effects.js') ?>"></script> - <script type="text/javascript" src="<?php echo $this->getSkinUrl('mage/adminhtml/form.js') ?>"></script> - <script type="text/javascript" src="<?php echo $this->getSkinUrl('mage/captcha.js') ?>"></script> + <script type="text/javascript" src="<?php echo $this->getViewFileUrl('prototype/prototype.js') ?>"></script> + <script type="text/javascript" src="<?php echo $this->getViewFileUrl('prototype/validation.js') ?>"></script> + <script type="text/javascript" src="<?php echo $this->getViewFileUrl('scriptaculous/effects.js') ?>"></script> + <script type="text/javascript" src="<?php echo $this->getViewFileUrl('mage/adminhtml/form.js') ?>"></script> + <script type="text/javascript" src="<?php echo $this->getViewFileUrl('mage/captcha.js') ?>"></script> - <!--[if IE]> <link rel="stylesheet" href="<?php echo $this->getSkinUrl('iestyles.css') ?>" type="text/css" media="all" /> <![endif]--> - <!--[if lt IE 7]> <link rel="stylesheet" href="<?php echo $this->getSkinUrl('below_ie7.css') ?>" type="text/css" media="all" /> <![endif]--> - <!--[if IE 7]> <link rel="stylesheet" href="<?php echo $this->getSkinUrl('ie7.css') ?>" type="text/css" media="all" /> <![endif]--> + <!--[if IE]> <link rel="stylesheet" href="<?php echo $this->getViewFileUrl('iestyles.css') ?>" type="text/css" media="all" /> <![endif]--> + <!--[if lt IE 7]> <link rel="stylesheet" href="<?php echo $this->getViewFileUrl('below_ie7.css') ?>" type="text/css" media="all" /> <![endif]--> + <!--[if IE 7]> <link rel="stylesheet" href="<?php echo $this->getViewFileUrl('ie7.css') ?>" type="text/css" media="all" /> <![endif]--> </head> <body id="page-login" onload="document.forms.loginForm.username.focus();"> <div class="login-container"> diff --git a/app/code/core/Mage/Backend/view/adminhtml/layout.xml b/app/code/core/Mage/Backend/view/adminhtml/layout.xml index e29edd8b97b1b5fa2da37df2694bb6d6407a91c0..ad34d4340a0a460b066cedd66dcd6f0ddd258b60 100644 --- a/app/code/core/Mage/Backend/view/adminhtml/layout.xml +++ b/app/code/core/Mage/Backend/view/adminhtml/layout.xml @@ -42,4 +42,10 @@ </block> </container> </adminhtml_auth_login> + + <adminhtml_system_config_edit> + <reference name="left"> + <block type="Mage_Backend_Block_System_Config_Switcher" name="adminhtml.system.config.switcher" before="-"/> + </reference> + </adminhtml_system_config_edit> </layout> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/store/switcher.phtml b/app/code/core/Mage/Backend/view/adminhtml/store/switcher.phtml similarity index 100% rename from app/code/core/Mage/Adminhtml/view/adminhtml/store/switcher.phtml rename to app/code/core/Mage/Backend/view/adminhtml/store/switcher.phtml diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/store/switcher/form/renderer/fieldset.phtml b/app/code/core/Mage/Backend/view/adminhtml/store/switcher/form/renderer/fieldset.phtml similarity index 90% rename from app/code/core/Mage/Adminhtml/view/adminhtml/store/switcher/form/renderer/fieldset.phtml rename to app/code/core/Mage/Backend/view/adminhtml/store/switcher/form/renderer/fieldset.phtml index 78522356c15e55d0101811d2c6da649f0990d1f1..f551edb7e3b00ca5820ef50699cffd831bc27da0 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/store/switcher/form/renderer/fieldset.phtml +++ b/app/code/core/Mage/Backend/view/adminhtml/store/switcher/form/renderer/fieldset.phtml @@ -18,10 +18,10 @@ * 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_Adminhtml - * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + * @category design + * @package default_default + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> <?php $_element = $this->getElement() ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/store/switcher/form/renderer/fieldset/element.phtml b/app/code/core/Mage/Backend/view/adminhtml/store/switcher/form/renderer/fieldset/element.phtml similarity index 100% rename from app/code/core/Mage/Adminhtml/view/adminhtml/store/switcher/form/renderer/fieldset/element.phtml rename to app/code/core/Mage/Backend/view/adminhtml/store/switcher/form/renderer/fieldset/element.phtml diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/system/config/edit.phtml b/app/code/core/Mage/Backend/view/adminhtml/system/config/edit.phtml similarity index 96% rename from app/code/core/Mage/Adminhtml/view/adminhtml/system/config/edit.phtml rename to app/code/core/Mage/Backend/view/adminhtml/system/config/edit.phtml index 773f37810f3b07f906460d157a173eabdac585e9..944c0942125433335d83bdbcc664682199e6866e 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/system/config/edit.phtml +++ b/app/code/core/Mage/Backend/view/adminhtml/system/config/edit.phtml @@ -38,7 +38,7 @@ <table cellspacing="0"> <tr> <td> - <h3<?php if($this->getHeaderCss()): ?> class="<?php echo $this->getHeaderCss()?>"<?php endif; ?>><?php echo Mage::helper('Mage_Adminhtml_Helper_Data')->__($this->getTitle()) ?></h3> + <h3<?php if($this->getHeaderCss()): ?> class="<?php echo $this->getHeaderCss()?>"<?php endif; ?>><?php echo Mage::helper('Mage_Backend_Helper_Data')->__($this->getTitle()) ?></h3> </td> <td class="form-buttons"><?php echo $this->getSaveButtonHtml() ?></td> </tr> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/system/config/form/field/array.phtml b/app/code/core/Mage/Backend/view/adminhtml/system/config/form/field/array.phtml similarity index 96% rename from app/code/core/Mage/Adminhtml/view/adminhtml/system/config/form/field/array.phtml rename to app/code/core/Mage/Backend/view/adminhtml/system/config/form/field/array.phtml index 2fc0dd12fa27d8db6bf784149f2efba31a4e2481..e61a2a87bdab3ca0851402992546d18edd78581f 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/system/config/form/field/array.phtml +++ b/app/code/core/Mage/Backend/view/adminhtml/system/config/form/field/array.phtml @@ -78,9 +78,9 @@ var arrayRow<?php echo $_htmlId ?> = { +'<\/td>' <?php endforeach;?> <?php if ($this->_addAfter):?> - +'<td><button onclick="" class="scalable add" type="button" id="addAfterBtn#{_id}"><span><span><span><?php echo Mage::helper('Mage_Adminhtml_Helper_Data')->__('Add after') ?><\/span><\/span><\/span><\/button><\/td>' + +'<td><button onclick="" class="scalable add" type="button" id="addAfterBtn#{_id}"><span><span><span><?php echo Mage::helper('Mage_Backend_Helper_Data')->__('Add after') ?><\/span><\/span><\/span><\/button><\/td>' <?php endif;?> - +'<td><button onclick="arrayRow<?php echo $_htmlId ?>.del(\'#{_id}\')" class="scalable delete" type="button"><span><span><span><?php echo Mage::helper('Mage_Adminhtml_Helper_Data')->__('Delete') ?><\/span><\/span><\/span><\/button><\/td>' + +'<td><button onclick="arrayRow<?php echo $_htmlId ?>.del(\'#{_id}\')" class="scalable delete" type="button"><span><span><span><?php echo Mage::helper('Mage_Backend_Helper_Data')->__('Delete') ?><\/span><\/span><\/span><\/button><\/td>' +'<\/tr>' ), diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/system/config/js.phtml b/app/code/core/Mage/Backend/view/adminhtml/system/config/js.phtml similarity index 100% rename from app/code/core/Mage/Adminhtml/view/adminhtml/system/config/js.phtml rename to app/code/core/Mage/Backend/view/adminhtml/system/config/js.phtml diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/system/config/switcher.phtml b/app/code/core/Mage/Backend/view/adminhtml/system/config/switcher.phtml similarity index 100% rename from app/code/core/Mage/Adminhtml/view/adminhtml/system/config/switcher.phtml rename to app/code/core/Mage/Backend/view/adminhtml/system/config/switcher.phtml diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/system/config/system/storage/media/synchronize.phtml b/app/code/core/Mage/Backend/view/adminhtml/system/config/system/storage/media/synchronize.phtml similarity index 97% rename from app/code/core/Mage/Adminhtml/view/adminhtml/system/config/system/storage/media/synchronize.phtml rename to app/code/core/Mage/Backend/view/adminhtml/system/config/system/storage/media/synchronize.phtml index 37c79ece9e48d3eddbec646902e329809244c2a4..8b2e8e1acc0664c3e00b3c1f13c90830529f6f62 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/system/config/system/storage/media/synchronize.phtml +++ b/app/code/core/Mage/Backend/view/adminhtml/system/config/system/storage/media/synchronize.phtml @@ -25,7 +25,7 @@ */ ?> -<?php /* var $this Mage_Adminhtml_Block_System_Config_System_Storage_Media_Synchronize */ ?> +<?php /* @var $this Mage_Backend_Block_System_Config_System_Storage_Media_Synchronize */ ?> <script type="text/javascript"> //<![CDATA[ @@ -194,5 +194,5 @@ //]]> </script> -<?php echo $this->getButtonHtml() ?><span class="sync-indicator no-display" id="sync_span"><img alt="Synchronize" style="margin:0 5px" src="<?php echo $this->getSkinUrl('images/process_spinner.gif') ?>"/><span id="sync_message_span"></span></span> +<?php echo $this->getButtonHtml() ?><span class="sync-indicator no-display" id="sync_span"><img alt="Synchronize" style="margin:0 5px" src="<?php echo $this->getViewFileUrl('images/process_spinner.gif') ?>"/><span id="sync_message_span"></span></span> <input type="hidden" id="synchronize-validation-input" class="required-synchronize no-display"/> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/system/config/tabs.phtml b/app/code/core/Mage/Backend/view/adminhtml/system/config/tabs.phtml similarity index 100% rename from app/code/core/Mage/Adminhtml/view/adminhtml/system/config/tabs.phtml rename to app/code/core/Mage/Backend/view/adminhtml/system/config/tabs.phtml diff --git a/app/code/core/Mage/Backend/view/adminhtml/widget/form/element.phtml b/app/code/core/Mage/Backend/view/adminhtml/widget/form/element.phtml index 4e11452918d54e3030d722189f0d256fe374d590..0b5450e10fdcaf220f2a597fc3fa5c04167a37f1 100644 --- a/app/code/core/Mage/Backend/view/adminhtml/widget/form/element.phtml +++ b/app/code/core/Mage/Backend/view/adminhtml/widget/form/element.phtml @@ -78,7 +78,7 @@ case 'wysiwyg': ?> <span class="form_row"> <label for="<?php echo $element->getHtmlId() ?>"><?php echo $element->getLabel() ?>:</label> - <script type="text/javascript" src="<?php echo $this->getSkinUrl('tiny_mce/tiny_mce.js') ?>"></script> + <script type="text/javascript" src="<?php echo $this->getViewFileUrl('tiny_mce/tiny_mce.js') ?>"></script> <script type="text/javascript"> //<![CDATA[ tinyMCE.init({ diff --git a/app/code/core/Mage/Backend/view/adminhtml/widget/grid.phtml b/app/code/core/Mage/Backend/view/adminhtml/widget/grid.phtml index 3c4457cf2c1c76a4e36b349f27dc8b7337a96113..ca7d89a988382974e070a95b1f20141e5f0b70a3 100644 --- a/app/code/core/Mage/Backend/view/adminhtml/widget/grid.phtml +++ b/app/code/core/Mage/Backend/view/adminhtml/widget/grid.phtml @@ -54,7 +54,7 @@ $numColumns = sizeof($this->getColumns()); <?php else: ?> <?php echo $this->getMessagesBlock()->getGroupedHtml() ?> <?php endif; ?> -<?php if($this->getPagerVisibility() || $this->getExportTypes() || $this->getFilterVisibility()): ?> +<?php if($this->getPagerVisibility() || $this->getExportTypes() || $this->getChildBlock('grid.columnSet')->getFilterVisibility()): ?> <table cellspacing="0" class="actions"> <tr> <?php if($this->getPagerVisibility()): ?> @@ -64,17 +64,17 @@ $numColumns = sizeof($this->getColumns()); <?php $_curPage = $this->getCollection()->getCurPage() ?> <?php $_lastPage = $this->getCollection()->getLastPageNumber() ?> <?php if($_curPage>1): ?> - <a href="#" title="<?php echo $this->__('Previous page') ?>" onclick="<?php echo $this->getJsObjectName() ?>.setPage('<?php echo ($_curPage-1) ?>');return false;" <?php echo $this->getUiId('previous') ?>><img src="<?php echo $this->getSkinUrl('images/pager_arrow_left.gif') ?>" alt="Go to Previous page" class="arrow"/></a> + <a href="#" title="<?php echo $this->__('Previous page') ?>" onclick="<?php echo $this->getJsObjectName() ?>.setPage('<?php echo ($_curPage-1) ?>');return false;" <?php echo $this->getUiId('previous') ?>><img src="<?php echo $this->getViewFileUrl('images/pager_arrow_left.gif') ?>" alt="Go to Previous page" class="arrow"/></a> <?php else: ?> - <img src="<?php echo $this->getSkinUrl('images/pager_arrow_left_off.gif') ?>" alt="Go to Previous page" class="arrow"/> + <img src="<?php echo $this->getViewFileUrl('images/pager_arrow_left_off.gif') ?>" alt="Go to Previous page" class="arrow"/> <?php endif; ?> <input type="text" name="<?php echo $this->getVarNamePage() ?>" value="<?php echo $_curPage ?>" class="input-text page" onkeypress="<?php echo $this->getJsObjectName() ?>.inputPage(event, '<?php echo $_lastPage ?>')" <?php echo $this->getUiId('current-page') ?>/> <?php if($_curPage < $_lastPage): ?> - <a href="#" title="<?php echo $this->__('Next page') ?>" onclick="<?php echo $this->getJsObjectName() ?>.setPage('<?php echo ($_curPage+1) ?>');return false;"<?php echo $this->getUiId('next') ?>><img src="<?php echo $this->getSkinUrl('images/pager_arrow_right.gif') ?>" alt="Go to Next page" class="arrow"/></a> + <a href="#" title="<?php echo $this->__('Next page') ?>" onclick="<?php echo $this->getJsObjectName() ?>.setPage('<?php echo ($_curPage+1) ?>');return false;"<?php echo $this->getUiId('next') ?>><img src="<?php echo $this->getViewFileUrl('images/pager_arrow_right.gif') ?>" alt="Go to Next page" class="arrow"/></a> <?php else: ?> - <img src="<?php echo $this->getSkinUrl('images/pager_arrow_right_off.gif') ?>" alt="Go to Previous page" class="arrow"/> + <img src="<?php echo $this->getViewFileUrl('images/pager_arrow_right_off.gif') ?>" alt="Go to Previous page" class="arrow"/> <?php endif; ?> <?php echo $this->__('of %s pages', $this->getCollection()->getLastPageNumber()) ?> diff --git a/app/code/core/Mage/Backend/view/adminhtml/widget/grid/export.phtml b/app/code/core/Mage/Backend/view/adminhtml/widget/grid/export.phtml index d53170a5822b5f4b87b5a62b102bab8b39a0973f..3264795109a55952ed2a79843616b66bac3f3e43 100644 --- a/app/code/core/Mage/Backend/view/adminhtml/widget/grid/export.phtml +++ b/app/code/core/Mage/Backend/view/adminhtml/widget/grid/export.phtml @@ -25,7 +25,7 @@ */ ?> -<img src="<?php echo $this->getSkinUrl('images/icon_export.gif') ?>" alt="" class="v-middle"/> <?php echo $this->__('Export to:') ?> +<img src="<?php echo $this->getViewFileUrl('images/icon_export.gif') ?>" alt="" class="v-middle"/> <?php echo $this->__('Export to:') ?> <select name="<?php echo $this->getId() ?>_export" id="<?php echo $this->getId() ?>_export" style="width:8em;"> <?php foreach ($this->getExportTypes() as $_type): ?> <option value="<?php echo $_type->getUrl() ?>"><?php echo $_type->getLabel() ?></option> diff --git a/app/code/core/Mage/Backend/view/adminhtml/widget/grid/extended.phtml b/app/code/core/Mage/Backend/view/adminhtml/widget/grid/extended.phtml index 2719a2efa7c91c7884455245feda8eb8e015a2bb..721767433d376148344cb59973263c6fbfc6603b 100644 --- a/app/code/core/Mage/Backend/view/adminhtml/widget/grid/extended.phtml +++ b/app/code/core/Mage/Backend/view/adminhtml/widget/grid/extended.phtml @@ -66,17 +66,17 @@ $numColumns = sizeof($this->getColumns()); <?php $_curPage = $this->getCollection()->getCurPage() ?> <?php $_lastPage = $this->getCollection()->getLastPageNumber() ?> <?php if($_curPage>1): ?> - <a href="#" title="<?php echo $this->__('Previous page') ?>" onclick="<?php echo $this->getJsObjectName() ?>.setPage('<?php echo ($_curPage-1) ?>');return false;"><img src="<?php echo $this->getSkinUrl('images/pager_arrow_left.gif') ?>" alt="Go to Previous page" class="arrow"/></a> + <a href="#" title="<?php echo $this->__('Previous page') ?>" onclick="<?php echo $this->getJsObjectName() ?>.setPage('<?php echo ($_curPage-1) ?>');return false;"><img src="<?php echo $this->getViewFileUrl('images/pager_arrow_left.gif') ?>" alt="Go to Previous page" class="arrow"/></a> <?php else: ?> - <img src="<?php echo $this->getSkinUrl('images/pager_arrow_left_off.gif') ?>" alt="Go to Previous page" class="arrow"/> + <img src="<?php echo $this->getViewFileUrl('images/pager_arrow_left_off.gif') ?>" alt="Go to Previous page" class="arrow"/> <?php endif; ?> <input type="text" name="<?php echo $this->getVarNamePage() ?>" value="<?php echo $_curPage ?>" class="input-text page" onkeypress="<?php echo $this->getJsObjectName() ?>.inputPage(event, '<?php echo $_lastPage ?>')"/> <?php if($_curPage < $_lastPage): ?> - <a href="#" title="<?php echo $this->__('Next page') ?>" onclick="<?php echo $this->getJsObjectName() ?>.setPage('<?php echo ($_curPage+1) ?>');return false;"><img src="<?php echo $this->getSkinUrl('images/pager_arrow_right.gif') ?>" alt="Go to Next page" class="arrow"/></a> + <a href="#" title="<?php echo $this->__('Next page') ?>" onclick="<?php echo $this->getJsObjectName() ?>.setPage('<?php echo ($_curPage+1) ?>');return false;"><img src="<?php echo $this->getViewFileUrl('images/pager_arrow_right.gif') ?>" alt="Go to Next page" class="arrow"/></a> <?php else: ?> - <img src="<?php echo $this->getSkinUrl('images/pager_arrow_right_off.gif') ?>" alt="Go to Previous page" class="arrow"/> + <img src="<?php echo $this->getViewFileUrl('images/pager_arrow_right_off.gif') ?>" alt="Go to Previous page" class="arrow"/> <?php endif; ?> <?php echo $this->__('of %s pages', $this->getCollection()->getLastPageNumber()) ?> @@ -101,7 +101,7 @@ $numColumns = sizeof($this->getColumns()); <?php endif ?> <?php if($this->getExportTypes()): ?> <td class="export a-right"> - <img src="<?php echo $this->getSkinUrl('images/icon_export.gif') ?>" alt="" class="v-middle"/> <?php echo $this->__('Export to:') ?> + <img src="<?php echo $this->getViewFileUrl('images/icon_export.gif') ?>" alt="" class="v-middle"/> <?php echo $this->__('Export to:') ?> <select name="<?php echo $this->getId() ?>_export" id="<?php echo $this->getId() ?>_export" style="width:8em;"> <?php foreach ($this->getExportTypes() as $_type): ?> <option value="<?php echo $_type->getUrl() ?>"><?php echo $_type->getLabel() ?></option> diff --git a/app/code/core/Mage/Backup/Model/Config/Backend/Cron.php b/app/code/core/Mage/Backup/Model/Config/Backend/Cron.php index 023b3a2fcfb85232713792998f6943201b33543e..699de1438cb887d5fd6c8d3a3f1e48bb178d56c9 100644 --- a/app/code/core/Mage/Backup/Model/Config/Backend/Cron.php +++ b/app/code/core/Mage/Backup/Model/Config/Backend/Cron.php @@ -44,7 +44,7 @@ class Mage_Backup_Model_Config_Backend_Cron extends Mage_Core_Model_Config_Data /** * Cron settings after save * - * @return Mage_Adminhtml_Model_System_Config_Backend_Log_Cron + * @return Mage_Backend_Model_Config_Backend_Log_Cron */ protected function _afterSave() { @@ -52,8 +52,8 @@ class Mage_Backup_Model_Config_Backend_Cron extends Mage_Core_Model_Config_Data $time = $this->getData(self::XML_PATH_BACKUP_TIME); $frequency = $this->getData(self::XML_PATH_BACKUP_FREQUENCY); - $frequencyWeekly = Mage_Adminhtml_Model_System_Config_Source_Cron_Frequency::CRON_WEEKLY; - $frequencyMonthly = Mage_Adminhtml_Model_System_Config_Source_Cron_Frequency::CRON_MONTHLY; + $frequencyWeekly = Mage_Cron_Model_Config_Source_Frequency::CRON_WEEKLY; + $frequencyMonthly = Mage_Cron_Model_Config_Source_Frequency::CRON_MONTHLY; if ($enabled) { $cronExprArray = array( diff --git a/app/code/core/Mage/Backup/Model/Config/Source/Type.php b/app/code/core/Mage/Backup/Model/Config/Source/Type.php index abace0ebe8951fad9e4f718ceca01ec67bfc36d8..b176a87e9903c512e24b491629d34f1b4cd3c62f 100644 --- a/app/code/core/Mage/Backup/Model/Config/Source/Type.php +++ b/app/code/core/Mage/Backup/Model/Config/Source/Type.php @@ -31,7 +31,7 @@ * @package Mage_Backup * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Backup_Model_Config_Source_Type +class Mage_Backup_Model_Config_Source_Type implements Mage_Core_Model_Option_ArrayInterface { /** * return possible options diff --git a/app/code/core/Mage/Backup/etc/adminhtml/system.xml b/app/code/core/Mage/Backup/etc/adminhtml/system.xml new file mode 100644 index 0000000000000000000000000000000000000000..fb51ba668f51c55a78f5a41c8c741300fab50ca5 --- /dev/null +++ b/app/code/core/Mage/Backup/etc/adminhtml/system.xml @@ -0,0 +1,69 @@ +<?xml version="1.0"?> +<!-- +/** + * 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 Mage_Backup + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> + <system> + <section id="system"> + <group id="backup" translate="label" module="Mage_Backup" type="text" sortOrder="500" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Scheduled Backup Settings</label> + <field id="enabled" translate="label" module="Mage_Backup" type="select" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Enable Scheduled Backup</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="type" translate="label" module="Mage_Backup" type="select" sortOrder="20" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Backup Type</label> + <depends> + <field id="enabled">1</field> + </depends> + <source_model>Mage_Backup_Model_Config_Source_Type</source_model> + </field> + <field id="time" translate="label" module="Mage_Backup" type="time" sortOrder="30" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Start Time</label> + <depends> + <field id="enabled">1</field> + </depends> + </field> + <field id="frequency" translate="label" module="Mage_Backup" type="select" sortOrder="40" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Frequency</label> + <depends> + <field id="enabled">1</field> + </depends> + <source_model>Mage_Cron_Model_Config_Source_Frequency</source_model> + <backend_model>Mage_Backup_Model_Config_Backend_Cron</backend_model> + </field> + <field id="maintenance" translate="label comment" module="Mage_Backup" type="select" sortOrder="50" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Maintenance Mode</label> + <comment>Put store on the maintenance mode while backup's creation</comment> + <depends> + <field id="enabled">1</field> + </depends> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + </group> + </section> + </system> +</config> diff --git a/app/code/core/Mage/Backup/etc/system.xml b/app/code/core/Mage/Backup/etc/system.xml deleted file mode 100644 index f0e0a6f229bbf8bd29b4dedac35b4f3815c5fa4f..0000000000000000000000000000000000000000 --- a/app/code/core/Mage/Backup/etc/system.xml +++ /dev/null @@ -1,95 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * 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 Mage_Backup - * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<config> - <sections> - <system> - <groups> - <backup translate="label" module="Mage_Backup"> - <label>Scheduled Backup Settings</label> - <frontend_type>text</frontend_type> - <sort_order>500</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - <fields> - <enabled translate="label" module="Mage_Backup"> - <label>Enable Scheduled Backup</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>10</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </enabled> - <type translate="label" module="Mage_Backup"> - <label>Backup Type</label> - <frontend_type>select</frontend_type> - <depends><enabled>1</enabled></depends> - <source_model>Mage_Backup_Model_Config_Source_Type</source_model> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </type> - <time translate="label" module="Mage_Backup"> - <label>Start Time</label> - <frontend_type>time</frontend_type> - <depends><enabled>1</enabled></depends> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </time> - <frequency translate="label" module="Mage_Backup"> - <label>Frequency</label> - <frontend_type>select</frontend_type> - <depends><enabled>1</enabled></depends> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Cron_Frequency</source_model> - <backend_model>Mage_Backup_Model_Config_Backend_Cron</backend_model> - <sort_order>40</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </frequency> - <maintenance translate="label comment" module="Mage_Backup"> - <label>Maintenance Mode</label> - <comment>Put store on the maintenance mode while backup's creation</comment> - <frontend_type>select</frontend_type> - <depends><enabled>1</enabled></depends> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>50</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </maintenance> - </fields> - </backup> - </groups> - </system> - </sections> -</config> diff --git a/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option.php b/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option.php index babc09a578b98e92983bd7f90fc99d95c46e3ea9..ab60354d6252668669a266267d9bfc7985348edf 100644 --- a/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option.php +++ b/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option.php @@ -237,7 +237,7 @@ class Mage_Bundle_Block_Adminhtml_Catalog_Product_Edit_Tab_Bundle_Option extends 'class' => 'select' )) ->setName($this->getFieldName().'[{{index}}][required]') - ->setOptions(Mage::getSingleton('Mage_Adminhtml_Model_System_Config_Source_Yesno')->toOptionArray()); + ->setOptions(Mage::getSingleton('Mage_Backend_Model_Config_Source_Yesno')->toOptionArray()); return $select->getHtml(); } diff --git a/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Selection.php b/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Selection.php index 6a25fe5292184cfec84dfea4853fad5c5a9a8855..9dab183a03968150b6195d67f33a4a39e2acbb8a 100644 --- a/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Selection.php +++ b/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Selection.php @@ -123,7 +123,7 @@ class Mage_Bundle_Block_Adminhtml_Catalog_Product_Edit_Tab_Bundle_Option_Selecti 'class' => 'select' )) ->setName($this->getFieldName().'[{{parentIndex}}][{{index}}][selection_can_change_qty]') - ->setOptions(Mage::getSingleton('Mage_Adminhtml_Model_System_Config_Source_Yesno')->toOptionArray()); + ->setOptions(Mage::getSingleton('Mage_Backend_Model_Config_Source_Yesno')->toOptionArray()); return $select->getHtml(); } diff --git a/app/code/core/Mage/Captcha/etc/adminhtml/system.xml b/app/code/core/Mage/Captcha/etc/adminhtml/system.xml new file mode 100644 index 0000000000000000000000000000000000000000..a505fcb778447310e615ac9fdf3d454028c363b1 --- /dev/null +++ b/app/code/core/Mage/Captcha/etc/adminhtml/system.xml @@ -0,0 +1,174 @@ +<?xml version="1.0"?> +<!-- +/** + * 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 Mage_Captcha + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> + <system> + <section id="admin"> + <group id="captcha" translate="label" type="text" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>CAPTCHA</label> + <field id="enable" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Enable CAPTCHA in Admin</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="font" translate="label" type="select" sortOrder="2" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Font</label> + <source_model>Mage_Captcha_Model_Config_Font</source_model> + <depends> + <field id="enable">1</field> + </depends> + </field> + <field id="forms" translate="label" type="multiselect" sortOrder="3" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Forms</label> + <source_model>Mage_Captcha_Model_Config_Form_Backend</source_model> + <depends> + <field id="enable">1</field> + </depends> + </field> + <field id="mode" translate="label" type="select" sortOrder="4" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Displaying Mode</label> + <source_model>Mage_Captcha_Model_Config_Mode</source_model> + <depends> + <field id="enable">1</field> + </depends> + </field> + <field id="failed_attempts_login" translate="label comment" type="text" sortOrder="5" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Number of Unsuccessful Attempts to Login</label> + <comment>If 0 is specified, CAPTCHA on the Login form will be always available.</comment> + <depends> + <field id="mode">after_fail</field> + <field id="enable">1</field> + </depends> + <frontend_class>required-entry validate-digits</frontend_class> + </field> + <field id="timeout" translate="label" type="text" sortOrder="6" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>CAPTCHA Timeout (minutes)</label> + <depends> + <field id="enable">1</field> + </depends> + <frontend_class>required-entry validate-digits</frontend_class> + </field> + <field id="length" translate="label comment" type="text" sortOrder="7" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Number of Symbols</label> + <comment>Please specify 8 symbols at the most. Range allowed (e.g. 3-5)</comment> + <depends> + <field id="enable">1</field> + </depends> + <frontend_class>required-entry</frontend_class> + </field> + <field id="symbols" translate="label comment" type="text" sortOrder="8" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Symbols Used in CAPTCHA</label> + <comment> + <![CDATA[Please use only letters (a-z or A-Z) or numbers (0-9) in this field. No spaces or other characters are allowed.<br />Similar looking characters (e.g. "i", "l", "1") decrease chance of correct recognition by customer.]]> +</comment> + <depends> + <field id="enable">1</field> + </depends> + <frontend_class>required-entry validate-alphanum</frontend_class> + </field> + <field id="case_sensitive" translate="label" type="select" sortOrder="9" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Case Sensitive</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + <depends> + <field id="enable">1</field> + </depends> + </field> + </group> + </section> + <section id="customer"> + <group id="captcha" translate="label" type="text" sortOrder="110" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>CAPTCHA</label> + <field id="enable" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Enable CAPTCHA on Frontend</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="font" translate="label" type="select" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Font</label> + <source_model>Mage_Captcha_Model_Config_Font</source_model> + <depends> + <field id="enable">1</field> + </depends> + </field> + <field id="forms" translate="label comment" type="multiselect" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Forms</label> + <source_model>Mage_Captcha_Model_Config_Form_Frontend</source_model> + <comment>CAPTCHA for "Create user" and "Forgot password" forms is always enabled if chosen</comment> + <depends> + <field id="enable">1</field> + </depends> + </field> + <field id="mode" translate="label" type="select" sortOrder="4" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Displaying Mode</label> + <source_model>Mage_Captcha_Model_Config_Mode</source_model> + <depends> + <field id="enable">1</field> + </depends> + </field> + <field id="failed_attempts_login" translate="label comment" type="text" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Number of Unsuccessful Attempts to Login</label> + <comment>If 0 is specified, CAPTCHA on the Login form will be always available.</comment> + <depends> + <field id="enable">1</field> + <field id="mode">after_fail</field> + </depends> + <frontend_class>required-entry validate-digits</frontend_class> + </field> + <field id="timeout" translate="label" type="text" sortOrder="6" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>CAPTCHA Timeout (minutes)</label> + <depends> + <field id="enable">1</field> + </depends> + <frontend_class>required-entry validate-digits</frontend_class> + </field> + <field id="length" translate="label comment" type="text" sortOrder="7" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Number of Symbols</label> + <comment>Please specify 8 symbols at the most. Range allowed (e.g. 3-5)</comment> + <depends> + <field id="enable">1</field> + </depends> + <frontend_class>required-entry validate-range range-1-8</frontend_class> + </field> + <field id="symbols" translate="label comment" type="text" sortOrder="8" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Symbols Used in CAPTCHA</label> + <comment> + <![CDATA[Please use only letters (a-z or A-Z) or numbers (0-9) in this field. No spaces or other characters are allowed.<br />Similar looking characters (e.g. "i", "l", "1") decrease chance of correct recognition by customer.]]> +</comment> + <depends> + <field id="enable">1</field> + </depends> + <frontend_class>required-entry validate-alphanum</frontend_class> + </field> + <field id="case_sensitive" translate="label" type="select" sortOrder="9" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Case Sensitive</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + <depends> + <field id="enable">1</field> + </depends> + </field> + </group> + </section> + </system> +</config> diff --git a/app/code/core/Mage/Captcha/etc/system.xml b/app/code/core/Mage/Captcha/etc/system.xml deleted file mode 100755 index 29be5f3c66e5ba16e94b287f006c48918015f9d9..0000000000000000000000000000000000000000 --- a/app/code/core/Mage/Captcha/etc/system.xml +++ /dev/null @@ -1,250 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * 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 Mage_Captcha - * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<config> - <sections> - <admin> - <groups> - <captcha translate="label"> - <label>CAPTCHA</label> - <frontend_type>text</frontend_type> - <sort_order>50</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <fields> - <enable translate="label"> - <label>Enable CAPTCHA in Admin</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </enable> - <font translate="label"> - <label>Font</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Captcha_Model_Config_Font</source_model> - <sort_order>2</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - <depends><enable>1</enable></depends> - </font> - <forms translate="label"> - <label>Forms</label> - <frontend_type>multiselect</frontend_type> - <source_model>Mage_Captcha_Model_Config_Form_Backend</source_model> - <sort_order>3</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - <depends><enable>1</enable></depends> - </forms> - <mode translate="label"> - <label>Displaying Mode</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Captcha_Model_Config_Mode</source_model> - <sort_order>4</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - <depends><enable>1</enable></depends> - </mode> - <failed_attempts_login translate="label comment"> - <label>Number of Unsuccessful Attempts to Login</label> - <frontend_type>text</frontend_type> - <comment>If 0 is specified, CAPTCHA on the Login form will be always available.</comment> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - <depends> - <mode>after_fail</mode> - <enable>1</enable> - </depends> - <frontend_class>required-entry validate-digits</frontend_class> - </failed_attempts_login> - <timeout translate="label"> - <label>CAPTCHA Timeout (minutes)</label> - <frontend_type>text</frontend_type> - <sort_order>6</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - <depends><enable>1</enable></depends> - <frontend_class>required-entry validate-digits</frontend_class> - </timeout> - <length translate="label comment"> - <label>Number of Symbols</label> - <frontend_type>text</frontend_type> - <comment>Please specify 8 symbols at the most. Range allowed (e.g. 3-5)</comment> - <sort_order>7</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - <depends><enable>1</enable></depends> - <frontend_class>required-entry</frontend_class> - </length> - <symbols translate="label comment"> - <label>Symbols Used in CAPTCHA</label> - <frontend_type>text</frontend_type> - <comment><![CDATA[Please use only letters (a-z or A-Z) or numbers (0-9) in this field. No spaces or other characters are allowed.<br />Similar looking characters (e.g. "i", "l", "1") decrease chance of correct recognition by customer.]]></comment> - <sort_order>8</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - <depends><enable>1</enable></depends> - <frontend_class>required-entry validate-alphanum</frontend_class> - </symbols> - <case_sensitive translate="label"> - <label>Case Sensitive</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>9</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - <depends><enable>1</enable></depends> - </case_sensitive> - </fields> - </captcha> - </groups> - </admin> - <customer> - <groups> - <captcha translate="label"> - <label>CAPTCHA</label> - <frontend_type>text</frontend_type> - <sort_order>110</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <fields> - <enable translate="label"> - <label>Enable CAPTCHA on Frontend</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </enable> - <font translate="label"> - <label>Font</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Captcha_Model_Config_Font</source_model> - <sort_order>2</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <depends><enable>1</enable></depends> - </font> - <forms translate="label comment"> - <label>Forms</label> - <frontend_type>multiselect</frontend_type> - <source_model>Mage_Captcha_Model_Config_Form_Frontend</source_model> - <comment>CAPTCHA for "Create user" and "Forgot password" forms is always enabled if chosen</comment> - <sort_order>3</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <depends><enable>1</enable></depends> - </forms> - <mode translate="label"> - <label>Displaying Mode</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Captcha_Model_Config_Mode</source_model> - <sort_order>4</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <depends><enable>1</enable></depends> - </mode> - <failed_attempts_login translate="label comment"> - <label>Number of Unsuccessful Attempts to Login</label> - <frontend_type>text</frontend_type> - <comment>If 0 is specified, CAPTCHA on the Login form will be always available.</comment> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <depends> - <enable>1</enable> - <mode>after_fail</mode> - </depends> - <frontend_class>required-entry validate-digits</frontend_class> - </failed_attempts_login> - <timeout translate="label"> - <label>CAPTCHA Timeout (minutes)</label> - <frontend_type>text</frontend_type> - <sort_order>6</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <depends><enable>1</enable></depends> - <frontend_class>required-entry validate-digits</frontend_class> - </timeout> - <length translate="label comment"> - <label>Number of Symbols</label> - <frontend_type>text</frontend_type> - <comment>Please specify 8 symbols at the most. Range allowed (e.g. 3-5)</comment> - <sort_order>7</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <depends><enable>1</enable></depends> - <frontend_class>required-entry validate-range range-1-8</frontend_class> - </length> - <symbols translate="label comment"> - <label>Symbols Used in CAPTCHA</label> - <frontend_type>text</frontend_type> - <comment><![CDATA[Please use only letters (a-z or A-Z) or numbers (0-9) in this field. No spaces or other characters are allowed.<br />Similar looking characters (e.g. "i", "l", "1") decrease chance of correct recognition by customer.]]></comment> - <sort_order>8</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <depends><enable>1</enable></depends> - <frontend_class>required-entry validate-alphanum</frontend_class> - </symbols> - <case_sensitive translate="label"> - <label>Case Sensitive</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>9</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <depends><enable>1</enable></depends> - </case_sensitive> - </fields> - </captcha> - </groups> - </customer> - </sections> -</config> diff --git a/app/code/core/Mage/Captcha/view/adminhtml/zend.phtml b/app/code/core/Mage/Captcha/view/adminhtml/zend.phtml index 19717fe5717135ef2125376b5c1be1ef5f9866ec..c0cb037b7314d529226565cafe9f8ebb3ddd9620 100644 --- a/app/code/core/Mage/Captcha/view/adminhtml/zend.phtml +++ b/app/code/core/Mage/Captcha/view/adminhtml/zend.phtml @@ -33,7 +33,7 @@ <input type="text" name="<?php echo Mage_Captcha_Helper_Data::INPUT_NAME_FIELD_VALUE ?>[<?php echo $this->getFormId()?>]" id="captcha" class="required-entry input-text validation-failed"/> </div> <div class="captcha-image input-right"> - <img id="captcha-reload" class="captcha-reload" src="<?php echo $this->getSkinUrl('Mage_Captcha::reload.png') ?>" alt="<?php echo $this->__('Reload captcha') ?>"/> + <img id="captcha-reload" class="captcha-reload" src="<?php echo $this->getViewFileUrl('Mage_Captcha::reload.png') ?>" alt="<?php echo $this->__('Reload captcha') ?>"/> <img id="<?php echo $this->getFormId() ?>" width="<?php echo $this->getImgWidth() ?>" height="<?php echo $this->getImgHeight() ?>" src="<?php echo $captcha->getImgSrc() ?>" /> </div> </div> diff --git a/app/code/core/Mage/Captcha/view/frontend/zend.phtml b/app/code/core/Mage/Captcha/view/frontend/zend.phtml index 64af9f3326b87d5811d317d1f519c8b53f7a3ae1..2f338bfdbf4ea88164968bfe792e4385d4bbc2bc 100644 --- a/app/code/core/Mage/Captcha/view/frontend/zend.phtml +++ b/app/code/core/Mage/Captcha/view/frontend/zend.phtml @@ -36,7 +36,7 @@ </li> <li id="captcha-image-box-<?php echo $this->getFormId()?>"> <div class="captcha-image"> - <img id="captcha-reload" class="captcha-reload" src="<?php echo $this->getSkinUrl('Mage_Captcha::reload.png') ?>" alt="<?php echo $this->__('Reload captcha') ?>"> + <img id="captcha-reload" class="captcha-reload" src="<?php echo $this->getViewFileUrl('Mage_Captcha::reload.png') ?>" alt="<?php echo $this->__('Reload captcha') ?>"> <img id="<?php echo $this->getFormId() ?>" class="captcha-img" height="<?php echo $this->getImgHeight() ?>" src="<?php echo $captcha->getImgSrc() ?>"/> <?php if ($captcha->isCaseSensitive()) :?> <div class="captcha-note"> @@ -46,7 +46,7 @@ </div> <script type="text/javascript">//<![CDATA[ (function ($) { - head.js("<?php echo $this->getSkinUrl('Mage_Captcha::captcha.js') ?>",function() { + head.js("<?php echo $this->getViewFileUrl('Mage_Captcha::captcha.js') ?>",function() { $('#captcha-reload').captcha({ url: '<?php echo $this->getRefreshUrl()?>', formSelector: '#<?php echo $this->getFormId()?>' diff --git a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Select/Flatcatalog.php b/app/code/core/Mage/Catalog/Block/Adminhtml/System/Config/Form/Field/Select/Flatcatalog.php similarity index 75% rename from app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Select/Flatcatalog.php rename to app/code/core/Mage/Catalog/Block/Adminhtml/System/Config/Form/Field/Select/Flatcatalog.php index db7d7e814f4ad1d05f758293c725e540817cede6..e0695f01a3711a6188324bb293b43bd701a57d66 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Select/Flatcatalog.php +++ b/app/code/core/Mage/Catalog/Block/Adminhtml/System/Config/Form/Field/Select/Flatcatalog.php @@ -19,25 +19,25 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Catalog * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ /** - * System congifuration shipping methods allow all countries selec + * System configuration shipping methods allow all countries selec * * @category Mage - * @package Mage_Adminhtml - * @author Magento Core Team <core@magentocommerce.com> + * @package Mage_Catalog + * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Block_System_Config_Form_Field_Select_Flatcatalog - extends Mage_Adminhtml_Block_System_Config_Form_Field +class Mage_Catalog_Block_Adminhtml_System_Config_Form_Field_Select_Flatcatalog + extends Mage_Backend_Block_System_Config_Form_Field { protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) { - if (!Mage::helper('Mage_Catalog_Helper_Category_Flat')->isBuilt()) { + if (!$this->helper('Mage_Catalog_Helper_Category_Flat')->isBuilt()) { $element->setDisabled(true) ->setValue(0); } diff --git a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Select/Flatproduct.php b/app/code/core/Mage/Catalog/Block/Adminhtml/System/Config/Form/Field/Select/Flatproduct.php similarity index 81% rename from app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Select/Flatproduct.php rename to app/code/core/Mage/Catalog/Block/Adminhtml/System/Config/Form/Field/Select/Flatproduct.php index 576da571c143a9915893d50c8beed61a4616a005..22d4ac57b2fde9218910ac85ca6e1a393d4bf1fb 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Select/Flatproduct.php +++ b/app/code/core/Mage/Catalog/Block/Adminhtml/System/Config/Form/Field/Select/Flatproduct.php @@ -19,21 +19,21 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Catalog * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ /** - * Adminhtml Config Field Select Flat Product Block + * Catalog Config Field Select Flat Product Block * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Catalog * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Block_System_Config_Form_Field_Select_Flatproduct - extends Mage_Adminhtml_Block_System_Config_Form_Field +class Mage_Catalog_Block_Adminhtml_System_Config_Form_Field_Select_Flatproduct + extends Mage_Backend_Block_System_Config_Form_Field { /** * Retrieve Element HTML @@ -42,7 +42,7 @@ class Mage_Adminhtml_Block_System_Config_Form_Field_Select_Flatproduct * @return string */ protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) { - if (!Mage::helper('Mage_Catalog_Helper_Product_Flat')->isBuilt()) { + if (!$this->helper('Mage_Catalog_Helper_Product_Flat')->isBuilt()) { $element->setDisabled(true) ->setValue(0); } diff --git a/app/code/core/Mage/Catalog/Block/Product/View/Options/Type/Date.php b/app/code/core/Mage/Catalog/Block/Product/View/Options/Type/Date.php index 4e92d20850c207bc1a34c0098546f346e1a65b9d..f8136dd58e7789556492d6017b4648b8bcbc7722 100644 --- a/app/code/core/Mage/Catalog/Block/Product/View/Options/Type/Date.php +++ b/app/code/core/Mage/Catalog/Block/Product/View/Options/Type/Date.php @@ -92,7 +92,7 @@ class Mage_Catalog_Block_Product_View_Options_Type_Date extends Mage_Catalog_Blo ->setId('options_'.$this->getOption()->getId().'_date') ->setName('options['.$this->getOption()->getId().'][date]') ->setClass('product-custom-option datetime-picker input-text') - ->setImage($this->getSkinUrl('Mage_Core::calendar.gif')) + ->setImage($this->getViewFileUrl('Mage_Core::calendar.gif')) ->setDateFormat(Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT)) ->setValue($value) ->setYearsRange($yearStart . ':' . $yearEnd); diff --git a/app/code/core/Mage/Catalog/Helper/Image.php b/app/code/core/Mage/Catalog/Helper/Image.php index fe59a8d7194f71d3907e9843bf422dde26a62400..ccff6dbc09ec213c325de62c5998e19d1bf9e726 100644 --- a/app/code/core/Mage/Catalog/Helper/Image.php +++ b/app/code/core/Mage/Catalog/Helper/Image.php @@ -370,7 +370,7 @@ class Mage_Catalog_Helper_Image extends Mage_Core_Helper_Abstract $url = $model->saveFile()->getUrl(); } } catch (Exception $e) { - $url = Mage::getDesign()->getSkinUrl($this->getPlaceholder()); + $url = Mage::getDesign()->getViewFileUrl($this->getPlaceholder()); } return $url; } diff --git a/app/code/core/Mage/Catalog/Helper/Product.php b/app/code/core/Mage/Catalog/Helper/Product.php index 03c764a5b25faf218fc26c98ee13e6d8d8e01d07..9df5c99bb25be37a44298b06adfe3d818ceb1d78 100644 --- a/app/code/core/Mage/Catalog/Helper/Product.php +++ b/app/code/core/Mage/Catalog/Helper/Product.php @@ -105,7 +105,7 @@ class Mage_Catalog_Helper_Product extends Mage_Core_Helper_Url { $url = false; if (!$product->getImage()) { - $url = Mage::getDesign()->getSkinUrl('Mage_Catalog::images/product/placeholder/image.jpg'); + $url = Mage::getDesign()->getViewFileUrl('Mage_Catalog::images/product/placeholder/image.jpg'); } elseif ($attribute = $product->getResource()->getAttribute('image')) { $url = $attribute->getFrontend()->getUrl($product); @@ -122,7 +122,7 @@ class Mage_Catalog_Helper_Product extends Mage_Core_Helper_Url { $url = false; if (!$product->getSmallImage()) { - $url = Mage::getDesign()->getSkinUrl('Mage_Catalog::images/product/placeholder/small_image.jpg'); + $url = Mage::getDesign()->getViewFileUrl('Mage_Catalog::images/product/placeholder/small_image.jpg'); } elseif ($attribute = $product->getResource()->getAttribute('small_image')) { $url = $attribute->getFrontend()->getUrl($product); diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Category.php b/app/code/core/Mage/Catalog/Model/Config/Backend/Category.php similarity index 92% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Category.php rename to app/code/core/Mage/Catalog/Model/Config/Backend/Category.php index 80ac66c3b43a8ad208054d0cf6cae0d3da5a025f..548edb21492023507bb6a0b5d8c5a5536165936e 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Category.php +++ b/app/code/core/Mage/Catalog/Model/Config/Backend/Category.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Catalog * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -28,10 +28,10 @@ * Config category field backend * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Catalog * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Model_System_Config_Backend_Category extends Mage_Core_Model_Config_Data +class Mage_Catalog_Model_Config_Backend_Category extends Mage_Core_Model_Config_Data { protected function _afterSave() { diff --git a/app/code/core/Mage/Catalog/Model/Config/Backend/Seo/Product.php b/app/code/core/Mage/Catalog/Model/Config/Backend/Seo/Product.php new file mode 100644 index 0000000000000000000000000000000000000000..3a00f360c8edc818539db06dd00abae807f370cc --- /dev/null +++ b/app/code/core/Mage/Catalog/Model/Config/Backend/Seo/Product.php @@ -0,0 +1,39 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Mage_Catalog + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + + +class Mage_Catalog_Model_Config_Backend_Seo_Product extends Mage_Core_Model_Config_Data +{ + /** + * Refresh category url rewrites if configuration was changed + * + * @return Mage_Catalog_Model_Config_Backend_Seo_Product + */ + protected function _afterSave() + { + return $this; + } +} diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Clone/Media/Image.php b/app/code/core/Mage/Catalog/Model/Config/Clone/Media/Image.php similarity index 84% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Clone/Media/Image.php rename to app/code/core/Mage/Catalog/Model/Config/Clone/Media/Image.php index e19c2ea81e593d54dfb18d7f520f585ad287d997..5c6713b4b38d591f43dc44d2e167f9f8caa0cf61 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Clone/Media/Image.php +++ b/app/code/core/Mage/Catalog/Model/Config/Clone/Media/Image.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Catalog * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -29,10 +29,10 @@ * Clone model for media images related config fields * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Catalog * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Model_System_Config_Clone_Media_Image extends Mage_Core_Model_Config_Data +class Mage_Catalog_Model_Config_Clone_Media_Image extends Mage_Core_Model_Config_Data { /** @@ -42,10 +42,6 @@ class Mage_Adminhtml_Model_System_Config_Clone_Media_Image extends Mage_Core_Mod */ public function getPrefixes() { - //$entityType = Mage::getModel('Mage_Eav_Model_Entity_Type'); - /* @var $entityType Mage_Eav_Model_Entity_Type */ - //$entityTypeId = $entityType->loadByCode('catalog_product')->getEntityTypeId(); - // use cached eav config $entityTypeId = Mage::getSingleton('Mage_Eav_Model_Config')->getEntityType(Mage_Catalog_Model_Product::ENTITY)->getId(); diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Category.php b/app/code/core/Mage/Catalog/Model/Config/Source/Category.php similarity index 87% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Category.php rename to app/code/core/Mage/Catalog/Model/Config/Source/Category.php index 20494281f94f75bc42af2a671748f5a0666b8447..fb98d7bb97ac3e0d102587d5fbca2efe31aed464 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Category.php +++ b/app/code/core/Mage/Catalog/Model/Config/Source/Category.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -28,10 +28,10 @@ * Config category source * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Model_System_Config_Source_Category +class Mage_Catalog_Model_Config_Source_Category implements Mage_Core_Model_Option_ArrayInterface { public function toOptionArray($addEmpty = true) { @@ -47,7 +47,7 @@ class Mage_Adminhtml_Model_System_Config_Source_Category if ($addEmpty) { $options[] = array( - 'label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('-- Please Select a Category --'), + 'label' => Mage::helper('Mage_Backend_Helper_Data')->__('-- Please Select a Category --'), 'value' => '' ); } diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Catalog/GridPerPage.php b/app/code/core/Mage/Catalog/Model/Config/Source/GridPerPage.php similarity index 85% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Catalog/GridPerPage.php rename to app/code/core/Mage/Catalog/Model/Config/Source/GridPerPage.php index c99eb155663047f109d17fb67f339993e9ef2a75..4d3a1ead400a1d389a808ad81670fa060075228f 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Catalog/GridPerPage.php +++ b/app/code/core/Mage/Catalog/Model/Config/Source/GridPerPage.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Catalog * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -29,10 +29,10 @@ * Catalog products per page on Grid mode source * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Catalog * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Model_System_Config_Source_Catalog_GridPerPage +class Mage_Catalog_Model_Config_Source_GridPerPage implements Mage_Core_Model_Option_ArrayInterface { public function toOptionArray() { @@ -42,7 +42,6 @@ class Mage_Adminhtml_Model_System_Config_Source_Catalog_GridPerPage foreach ($perPageValues as $option) { $result[] = array('value' => $option, 'label' => $option); } - //$result[] = array('value' => 'all', 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('All')); return $result; } } diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Catalog/ListMode.php b/app/code/core/Mage/Catalog/Model/Config/Source/ListMode.php similarity index 70% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Catalog/ListMode.php rename to app/code/core/Mage/Catalog/Model/Config/Source/ListMode.php index 7caeb03bd5de5c04dfdd1459ec2f91c1819f9c8d..72c25f42c52b75291fdc3546fca84fd85764eea9 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Catalog/ListMode.php +++ b/app/code/core/Mage/Catalog/Model/Config/Source/ListMode.php @@ -19,22 +19,21 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Catalog * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Adminhtml_Model_System_Config_Source_Catalog_ListMode +class Mage_Catalog_Model_Config_Source_ListMode implements Mage_Core_Model_Option_ArrayInterface { public function toOptionArray() { return array( - //array('value'=>'', 'label'=>''), - array('value'=>'grid', 'label'=>Mage::helper('Mage_Adminhtml_Helper_Data')->__('Grid Only')), - array('value'=>'list', 'label'=>Mage::helper('Mage_Adminhtml_Helper_Data')->__('List Only')), - array('value'=>'grid-list', 'label'=>Mage::helper('Mage_Adminhtml_Helper_Data')->__('Grid (default) / List')), - array('value'=>'list-grid', 'label'=>Mage::helper('Mage_Adminhtml_Helper_Data')->__('List (default) / Grid')), + array('value'=>'grid', 'label'=>Mage::helper('Mage_Catalog_Helper_Data')->__('Grid Only')), + array('value'=>'list', 'label'=>Mage::helper('Mage_Catalog_Helper_Data')->__('List Only')), + array('value'=>'grid-list', 'label'=>Mage::helper('Mage_Catalog_Helper_Data')->__('Grid (default) / List')), + array('value'=>'list-grid', 'label'=>Mage::helper('Mage_Catalog_Helper_Data')->__('List (default) / Grid')), ); } } diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Catalog/ListPerPage.php b/app/code/core/Mage/Catalog/Model/Config/Source/ListPerPage.php similarity index 85% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Catalog/ListPerPage.php rename to app/code/core/Mage/Catalog/Model/Config/Source/ListPerPage.php index bf66a4285a62bb0005e02350834117949c87ec1f..4cd337add5b3f3af91e52fcb5b2cce9bd146ab39 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Catalog/ListPerPage.php +++ b/app/code/core/Mage/Catalog/Model/Config/Source/ListPerPage.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Catalog * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -29,10 +29,10 @@ * Catalog products per page on List mode source * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Catalog * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Model_System_Config_Source_Catalog_ListPerPage +class Mage_Catalog_Model_Config_Source_ListPerPage implements Mage_Core_Model_Option_ArrayInterface { public function toOptionArray() @@ -43,7 +43,6 @@ class Mage_Adminhtml_Model_System_Config_Source_Catalog_ListPerPage foreach ($perPageValues as $option) { $result[] = array('value' => $option, 'label' => $option); } - //$result[] = array('value' => 'all', 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('All')); return $result; } diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Catalog/ListSort.php b/app/code/core/Mage/Catalog/Model/Config/Source/ListSort.php similarity index 89% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Catalog/ListSort.php rename to app/code/core/Mage/Catalog/Model/Config/Source/ListSort.php index cdc3000b29503c1fc4233adb4e27bde7e979524b..e1f5651ce976e1b89b20c9b920da6e4fa60d4da8 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Catalog/ListSort.php +++ b/app/code/core/Mage/Catalog/Model/Config/Source/ListSort.php @@ -19,20 +19,20 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Catalog * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ /** - * Adminhtml Catalog Product List Sortable allowed sortable attributes source + * Catalog Product List Sortable allowed sortable attributes source * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Catalog * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Model_System_Config_Source_Catalog_ListSort +class Mage_Catalog_Model_Config_Source_ListSort implements Mage_Core_Model_Option_ArrayInterface { /** * Retrieve option values array diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Price/Scope.php b/app/code/core/Mage/Catalog/Model/Config/Source/Price/Scope.php similarity index 90% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Price/Scope.php rename to app/code/core/Mage/Catalog/Model/Config/Source/Price/Scope.php index c171c71a3c5a4297b79e0b31ca159173e3c83e59..63aa5ba4b6f426f02a17981846aff95f789ad06e 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Price/Scope.php +++ b/app/code/core/Mage/Catalog/Model/Config/Source/Price/Scope.php @@ -19,13 +19,13 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Catalog * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Adminhtml_Model_System_Config_Source_Price_Scope +class Mage_Catalog_Model_Config_Source_Price_Scope implements Mage_Core_Model_Option_ArrayInterface { public function toOptionArray() { diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Price/Step.php b/app/code/core/Mage/Catalog/Model/Config/Source/Price/Step.php similarity index 76% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Price/Step.php rename to app/code/core/Mage/Catalog/Model/Config/Source/Price/Step.php index 025b1ae4ab7beeab27779287760f26e483871155..107457fb17024489ce9d154dd89dea45ba976372 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Price/Step.php +++ b/app/code/core/Mage/Catalog/Model/Config/Source/Price/Step.php @@ -19,27 +19,27 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Catalog * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Adminhtml_Model_System_Config_Source_Price_Step +class Mage_Catalog_Model_Config_Source_Price_Step implements Mage_Core_Model_Option_ArrayInterface { public function toOptionArray() { return array( array( 'value' => Mage_Catalog_Model_Layer_Filter_Price::RANGE_CALCULATION_AUTO, - 'label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Automatic (equalize price ranges)') + 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Automatic (equalize price ranges)') ), array( 'value' => Mage_Catalog_Model_Layer_Filter_Price::RANGE_CALCULATION_IMPROVED, - 'label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Automatic (equalize product counts)') + 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Automatic (equalize product counts)') ), array( 'value' => Mage_Catalog_Model_Layer_Filter_Price::RANGE_CALCULATION_MANUAL, - 'label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Manual') + 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Manual') ), ); } diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Product/Options/Price.php b/app/code/core/Mage/Catalog/Model/Config/Source/Product/Options/Price.php similarity index 83% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Product/Options/Price.php rename to app/code/core/Mage/Catalog/Model/Config/Source/Product/Options/Price.php index ae3a07fc5de38e3eb7ec47ab171a542658ffe40e..207a3a9ba5964f3ec67395e41b35f352c69a18e5 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Product/Options/Price.php +++ b/app/code/core/Mage/Catalog/Model/Config/Source/Product/Options/Price.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Catalog * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -28,16 +28,16 @@ * Price types mode source * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Catalog * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Model_System_Config_Source_Product_Options_Price +class Mage_Catalog_Model_Config_Source_Product_Options_Price implements Mage_Core_Model_Option_ArrayInterface { public function toOptionArray() { return array( - array('value' => 'fixed', 'label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Fixed')), - array('value' => 'percent', 'label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Percent')) + array('value' => 'fixed', 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Fixed')), + array('value' => 'percent', 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Percent')) ); } } diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Product/Options/Type.php b/app/code/core/Mage/Catalog/Model/Config/Source/Product/Options/Type.php similarity index 89% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Product/Options/Type.php rename to app/code/core/Mage/Catalog/Model/Config/Source/Product/Options/Type.php index 9563ca278e78ed7e42bccb875b5b545be8fdf16b..bf23444276c875ac8a2ebf7e23acb79f1da9ce40 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Product/Options/Type.php +++ b/app/code/core/Mage/Catalog/Model/Config/Source/Product/Options/Type.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Catalog * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -28,17 +28,17 @@ * Product option types mode source * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Catalog * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Model_System_Config_Source_Product_Options_Type +class Mage_Catalog_Model_Config_Source_Product_Options_Type implements Mage_Core_Model_Option_ArrayInterface { const PRODUCT_OPTIONS_GROUPS_PATH = 'global/catalog/product/options/custom/groups'; public function toOptionArray() { $groups = array( - array('value' => '', 'label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('-- Please select --')) + array('value' => '', 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('-- Please select --')) ); $helper = Mage::helper('Mage_Catalog_Helper_Data'); diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Product/Thumbnail.php b/app/code/core/Mage/Catalog/Model/Config/Source/Product/Thumbnail.php similarity index 81% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Product/Thumbnail.php rename to app/code/core/Mage/Catalog/Model/Config/Source/Product/Thumbnail.php index 8e22dbf982a37e366adda12da2dbc6ace38a15c7..bfcc7260ee9318071d2d4421b903af71f42bd860 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Product/Thumbnail.php +++ b/app/code/core/Mage/Catalog/Model/Config/Source/Product/Thumbnail.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Catalog * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -29,15 +29,15 @@ * Catalog products per page on Grid mode source * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Catalog */ -class Mage_Adminhtml_Model_System_Config_Source_Product_Thumbnail +class Mage_Catalog_Model_Config_Source_Product_Thumbnail implements Mage_Core_Model_Option_ArrayInterface { public function toOptionArray() { return array( - array('value'=>'itself', 'label'=>Mage::helper('Mage_Adminhtml_Helper_Data')->__('Product Thumbnail Itself')), - array('value'=>'parent', 'label'=>Mage::helper('Mage_Adminhtml_Helper_Data')->__('Parent Product Thumbnail')), + array('value'=>'itself', 'label'=>Mage::helper('Mage_Catalog_Helper_Data')->__('Product Thumbnail Itself')), + array('value'=>'parent', 'label'=>Mage::helper('Mage_Catalog_Helper_Data')->__('Parent Product Thumbnail')), ); } } diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Catalog/TimeFormat.php b/app/code/core/Mage/Catalog/Model/Config/Source/TimeFormat.php similarity index 84% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Catalog/TimeFormat.php rename to app/code/core/Mage/Catalog/Model/Config/Source/TimeFormat.php index 0769b1d537a6f79f564e2855b0e108de2267413d..56d50ac4010d1f9b5aeff0f88f2d3d589ca02352 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Catalog/TimeFormat.php +++ b/app/code/core/Mage/Catalog/Model/Config/Source/TimeFormat.php @@ -19,18 +19,18 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Catalog * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Adminhtml_Model_System_Config_Source_Catalog_TimeFormat +class Mage_Catalog_Model_Config_Source_TimeFormat implements Mage_Core_Model_Option_ArrayInterface { public function toOptionArray() { return array( - array('value' => '12h', 'label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('12h AM/PM')), - array('value' => '24h', 'label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('24h')), + array('value' => '12h', 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('12h AM/PM')), + array('value' => '24h', 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('24h')), ); } } diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Watermark/Position.php b/app/code/core/Mage/Catalog/Model/Config/Source/Watermark/Position.php similarity index 92% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Watermark/Position.php rename to app/code/core/Mage/Catalog/Model/Config/Source/Watermark/Position.php index 43e15984d5736455fc67e16e3303b9c5a3cfbd37..96fc1ccf33562f88387f6e4fc3da46db2ab4d75c 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Watermark/Position.php +++ b/app/code/core/Mage/Catalog/Model/Config/Source/Watermark/Position.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Catalog * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -29,10 +29,10 @@ * Watermark position config source model * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Catalog * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Model_System_Config_Source_Watermark_Position +class Mage_Catalog_Model_Config_Source_Watermark_Position implements Mage_Core_Model_Option_ArrayInterface { /** diff --git a/app/code/core/Mage/Catalog/Model/Product/Image.php b/app/code/core/Mage/Catalog/Model/Product/Image.php index b19185b986deb6fb9225386bf88f383bcfada30f..42e4f8d53376ea5577dd23113ef65a7c042fcda4 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Image.php +++ b/app/code/core/Mage/Catalog/Model/Product/Image.php @@ -480,7 +480,7 @@ class Mage_Catalog_Model_Product_Image extends Mage_Core_Model_Abstract public function getUrl() { if ($this->_newFile === true) { - $url = Mage::getDesign()->getSkinUrl( + $url = Mage::getDesign()->getViewFileUrl( "Mage_Catalog::images/product/placeholder/{$this->getDestinationSubdir()}.jpg" ); } else { @@ -562,9 +562,9 @@ class Mage_Catalog_Model_Product_Image extends Mage_Core_Model_Abstract } elseif ( $this->_fileExists($baseDir . '/watermark/' . $file) ) { $filePath = $baseDir . '/watermark/' . $file; } else { - $skinFile = Mage::getDesign()->getSkinFile($file); - if (file_exists($skinFile)) { - $filePath = $skinFile; + $viewFile = Mage::getDesign()->getViewFile($file); + if (file_exists($viewFile)) { + $filePath = $viewFile; } } diff --git a/app/code/core/Mage/Catalog/Model/Product/Option/Api.php b/app/code/core/Mage/Catalog/Model/Product/Option/Api.php index 5077e60cc6f425cff9e71afe2ba0e609d1bbbbbb..f8fb432fdb1bd7cc83a9650a7d29f732b46fa62a 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Option/Api.php +++ b/app/code/core/Mage/Catalog/Model/Product/Option/Api.php @@ -180,7 +180,7 @@ class Mage_Catalog_Model_Product_Option_Api extends Mage_Catalog_Model_Api_Resou */ public function types() { - $path = Mage_Adminhtml_Model_System_Config_Source_Product_Options_Type::PRODUCT_OPTIONS_GROUPS_PATH; + $path = Mage_Catalog_Model_Config_Source_Product_Options_Type::PRODUCT_OPTIONS_GROUPS_PATH; $types = array(); foreach (Mage::getConfig()->getNode($path)->children() as $group) { $groupTypes = Mage::getConfig()->getNode($path . '/' . $group->getName() . '/types')->children(); diff --git a/app/code/core/Mage/Catalog/Model/Product/Option/Type/File.php b/app/code/core/Mage/Catalog/Model/Product/Option/Type/File.php index 7061ebbb7063683cd1acc9c3fb9224568bf7cfb9..ba77b88e5375b7dc733e033c2163ea5c625b5287 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Option/Type/File.php +++ b/app/code/core/Mage/Catalog/Model/Product/Option/Type/File.php @@ -182,6 +182,7 @@ class Mage_Catalog_Model_Product_Option_Type_File extends Mage_Catalog_Model_Pro */ $upload = new Zend_File_Transfer_Adapter_Http(); $file = $processingParams->getFilesPrefix() . 'options_' . $option->getId() . '_file'; + $maxFileSize = $this->getFileStorageHelper()->getMaxFileSize(); try { $runValidation = $option->getIsRequire() || $upload->isUploaded($file); if (!$runValidation) { @@ -195,9 +196,9 @@ class Mage_Catalog_Model_Product_Option_Type_File extends Mage_Catalog_Model_Pro } catch (Exception $e) { // when file exceeds the upload_max_filesize, $_FILES is empty - if (isset($_SERVER['CONTENT_LENGTH']) && $_SERVER['CONTENT_LENGTH'] > $this->_getUploadMaxFilesize()) { + if (isset($_SERVER['CONTENT_LENGTH']) && $_SERVER['CONTENT_LENGTH'] > $maxFileSize) { $this->setIsValid(false); - $value = $this->_bytesToMbytes($this->_getUploadMaxFilesize()); + $value = $this->getFileStorageHelper()->getMaxFileSizeInMb(); Mage::throwException( Mage::helper('Mage_Catalog_Helper_Data')->__("The file you uploaded is larger than %s Megabytes allowed by server", $value) ); @@ -245,7 +246,7 @@ class Mage_Catalog_Model_Product_Option_Type_File extends Mage_Catalog_Model_Pro } // Maximum filesize - $upload->addValidator('FilesSize', false, array('max' => $this->_getUploadMaxFilesize())); + $upload->addValidator('FilesSize', false, array('max' => $maxFileSize)); /** * Upload process @@ -383,9 +384,10 @@ class Mage_Catalog_Model_Product_Option_Type_File extends Mage_Catalog_Model_Pro } } - // Maximum filesize + // Maximum file size + $maxFileSize = $this->getFileStorageHelper()->getMaxFileSize(); $validatorChain->addValidator( - new Zend_Validate_File_FilesSize(array('max' => $this->_getUploadMaxFilesize())) + new Zend_Validate_File_FilesSize(array('max' => $maxFileSize)) ); @@ -424,11 +426,11 @@ class Mage_Catalog_Model_Product_Option_Type_File extends Mage_Catalog_Model_Pro } elseif ($errorCode == Zend_Validate_File_Extension::FALSE_EXTENSION) { $result[] = Mage::helper('Mage_Catalog_Helper_Data')->__("The file '%s' for '%s' has an invalid extension", $fileInfo['title'], $option->getTitle()); } elseif ($errorCode == Zend_Validate_File_ImageSize::WIDTH_TOO_BIG - || $errorCode == Zend_Validate_File_ImageSize::HEIGHT_TOO_BIG) - { + || $errorCode == Zend_Validate_File_ImageSize::HEIGHT_TOO_BIG) { $result[] = Mage::helper('Mage_Catalog_Helper_Data')->__("Maximum allowed image size for '%s' is %sx%s px.", $option->getTitle(), $option->getImageSizeX(), $option->getImageSizeY()); } elseif ($errorCode == Zend_Validate_File_FilesSize::TOO_BIG) { - $result[] = Mage::helper('Mage_Catalog_Helper_Data')->__("The file '%s' you uploaded is larger than %s Megabytes allowed by server", $fileInfo['title'], $this->_bytesToMbytes($this->_getUploadMaxFilesize())); + $maxFileSize = $this->getFileStorageHelper()->getMaxFileSizeInMb(); + $result[] = Mage::helper('Mage_Catalog_Helper_Data')->__("The file '%s' you uploaded is larger than %s Megabytes allowed by server", $fileInfo['title'], $maxFileSize); } } return $result; @@ -783,46 +785,12 @@ class Mage_Catalog_Model_Product_Option_Type_File extends Mage_Catalog_Model_Pro } /** - * Max upload filesize in bytes - * - * @return int - */ - protected function _getUploadMaxFilesize() - { - return min($this->_getBytesIniValue('upload_max_filesize'), $this->_getBytesIniValue('post_max_size')); - } - - /** - * Return php.ini setting value in bytes - * - * @param string $ini_key php.ini Var name - * @return int Setting value - */ - protected function _getBytesIniValue($ini_key) - { - $_bytes = @ini_get($ini_key); - - // kilobytes - if (stristr($_bytes, 'k')) { - $_bytes = intval($_bytes) * 1024; - // megabytes - } elseif (stristr($_bytes, 'm')) { - $_bytes = intval($_bytes) * 1024 * 1024; - // gigabytes - } elseif (stristr($_bytes, 'g')) { - $_bytes = intval($_bytes) * 1024 * 1024 * 1024; - } - return (int)$_bytes; - } - - /** - * Simple converrt bytes to Megabytes + * Get file storage helper * - * @param int $bytes - * @return int + * @return Mage_Core_Helper_File_Storage */ - protected function _bytesToMbytes($bytes) + public function getFileStorageHelper() { - return round($bytes / (1024 * 1024)); + return Mage::helper('Mage_Core_Helper_File_Storage'); } } diff --git a/app/code/core/Mage/Catalog/Model/Template/Filter.php b/app/code/core/Mage/Catalog/Model/Template/Filter.php index 5112981988ea350081579cc12222643b111c86a0..21190cd1616882ba4f95048aa2d61c983a9c2afb 100644 --- a/app/code/core/Mage/Catalog/Model/Template/Filter.php +++ b/app/code/core/Mage/Catalog/Model/Template/Filter.php @@ -75,18 +75,18 @@ class Mage_Catalog_Model_Template_Filter extends Varien_Filter_Template } /** - * Retrieve Skin URL directive + * Retrieve View URL directive * * @param array $construction * @return string - * @see Mage_Core_Model_Email_Template_Filter::skinDirective() method has been copypasted + * @see Mage_Core_Model_Email_Template_Filter::viewDirective() method has been copypasted */ - public function skinDirective($construction) + public function viewDirective($construction) { $params = $this->_getIncludeParameters($construction[2]); $params['_absolute'] = $this->_useAbsoluteLinks; - $url = Mage::getDesign()->getSkinUrl($params['url'], $params); + $url = Mage::getDesign()->getViewFileUrl($params['url'], $params); return $url; } diff --git a/app/code/core/Mage/Catalog/etc/adminhtml/system.xml b/app/code/core/Mage/Catalog/etc/adminhtml/system.xml new file mode 100644 index 0000000000000000000000000000000000000000..7d80b77262c6fa905867e99c421fb4ff5f0b97b4 --- /dev/null +++ b/app/code/core/Mage/Catalog/etc/adminhtml/system.xml @@ -0,0 +1,293 @@ +<?xml version="1.0"?> +<!-- +/** + * 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 Mage_Catalog + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> + <system> + <tab id="catalog" translate="label" module="Mage_Catalog" sortOrder="200"> + <label>Catalog</label> + </tab> + <section id="catalog" translate="label" module="Mage_Catalog" type="text" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1"> + <class>separator-top</class> + <label>Catalog</label> + <tab>catalog</tab> + <resource>Mage_Catalog::config_catalog</resource> + <group id="fields_masks" translate="label" type="text" sortOrder="90" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Product Fields Auto-Generation</label> + <field id="sku" translate="label comment" type="text" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Mask for SKU</label> + <comment>Use {{name}} as Product Name placeholder</comment> + </field> + <field id="meta_title" translate="label comment" type="text" sortOrder="20" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Mask for Meta Title</label> + <comment>Use {{name}} as Product Name placeholder</comment> + </field> + <field id="meta_keyword" translate="label comment" type="text" sortOrder="30" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Mask for Meta Keywords</label> + <comment>Use {{name}} and {{sku}} as Product Name and Product SKU placeholders</comment> + </field> + <field id="meta_description" translate="label comment" type="text" sortOrder="40" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Mask for Meta Description</label> + <comment>Use {{name}} and {{description}} as Product Name and Product Description placeholders</comment> + </field> + </group> + <group id="frontend" translate="label" type="text" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Frontend</label> + <field id="list_mode" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>List Mode</label> + <source_model>Mage_Catalog_Model_Config_Source_ListMode</source_model> + </field> + <field id="grid_per_page_values" translate="label comment" type="text" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Products per Page on Grid Allowed Values</label> + <comment>Comma-separated.</comment> + <validate>validate-per-page-value-list</validate> + </field> + <field id="grid_per_page" translate="label comment" type="text" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Products per Page on Grid Default Value</label> + <comment>Must be in the allowed values list.</comment> + <validate>validate-per-page-value</validate> + </field> + <field id="list_per_page_values" translate="label comment" type="text" sortOrder="4" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Products per Page on List Allowed Values</label> + <comment>Comma-separated.</comment> + <validate>validate-per-page-value-list</validate> + </field> + <field id="list_per_page" translate="label comment" type="text" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Products per Page on List Default Value</label> + <comment>Must be in the allowed values list.</comment> + <validate>validate-per-page-value</validate> + </field> + <field id="flat_catalog_category" translate="label" type="select" sortOrder="100" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Use Flat Catalog Category</label> + <frontend_model>Mage_Catalog_Block_Adminhtml_System_Config_Form_Field_Select_Flatcatalog</frontend_model> + <backend_model>Mage_Catalog_Model_System_Config_Backend_Catalog_Category_Flat</backend_model> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="flat_catalog_product" translate="label" type="select" sortOrder="100" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Use Flat Catalog Product</label> + <frontend_model>Mage_Catalog_Block_Adminhtml_System_Config_Form_Field_Select_Flatproduct</frontend_model> + <backend_model>Mage_Catalog_Model_System_Config_Backend_Catalog_Product_Flat</backend_model> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="default_sort_by" translate="label comment" type="select" sortOrder="6" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Product Listing Sort by</label> + <source_model>Mage_Catalog_Model_Config_Source_ListSort</source_model> + </field> + <field id="list_allow_all" translate="label comment" type="select" sortOrder="6" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Allow All Products per Page</label> + <comment>Whether to show "All" option in the "Show X Per Page" dropdown.</comment> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="parse_url_directives" translate="label comment" type="select" sortOrder="200" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Allow Dynamic Media URLs in Products and Categories</label> + <comment>E.g. {{media url="path/to/image.jpg"}} {{skin url="path/to/picture.gif"}}. Dynamic directives parsing impacts catalog performance.</comment> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + </group> + <group id="placeholder" translate="label" sortOrder="300" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Product Image Placeholders</label> + <clone_fields>1</clone_fields> + <clone_model>Mage_Catalog_Model_Config_Clone_Media_Image</clone_model> + <field id="placeholder" type="image" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label></label> + <backend_model>Mage_Backend_Model_Config_Backend_Image</backend_model> + <upload_dir config="system/filesystem/media" scope_info="1">catalog/product/placeholder</upload_dir> + <base_url type="media" scope_info="1">catalog/product/placeholder</base_url> + </field> + </group> + <group id="seo" translate="label" type="text" sortOrder="500" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Search Engine Optimizations</label> + <field id="category_url_suffix" translate="label comment" type="text" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Category URL Suffix</label> + <backend_model>Mage_Catalog_Model_System_Config_Backend_Catalog_Url_Rewrite_Suffix</backend_model> + <comment>Cache refresh needed.</comment> + </field> + <field id="product_url_suffix" translate="label comment" type="text" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Product URL Suffix</label> + <backend_model>Mage_Catalog_Model_System_Config_Backend_Catalog_Url_Rewrite_Suffix</backend_model> + <comment>Cache refresh needed.</comment> + </field> + <field id="product_use_categories" translate="label" type="select" sortOrder="4" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Use Categories Path for Product URLs</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + <backend_model>Mage_Catalog_Model_Config_Backend_Seo_Product</backend_model> + </field> + <field id="save_rewrites_history" translate="label" type="select" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Create Permanent Redirect for URLs if URL Key Changed</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="title_separator" translate="label" type="text" sortOrder="6" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Page Title Separator</label> + </field> + <field id="category_canonical_tag" translate="label" type="select" sortOrder="7" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Use Canonical Link Meta Tag For Categories</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="product_canonical_tag" translate="label" type="select" sortOrder="8" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Use Canonical Link Meta Tag For Products</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + </group> + <group id="price" translate="label" type="text" sortOrder="400" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Price</label> + <field id="scope" translate="label comment" type="select" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Catalog Price Scope</label> + <comment><![CDATA[Defines the base currency scope ("Currency Setup" > "Currency Options" > "Base Currency").]]></comment> + <source_model>Mage_Catalog_Model_Config_Source_Price_Scope</source_model> + <hide_in_single_store_mode>1</hide_in_single_store_mode> + </field> + </group> + <group id="layered_navigation" translate="label" sortOrder="490" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Layered Navigation</label> + <field id="display_product_count" translate="label" type="select" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Display Product Count</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="price_range_calculation" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Price Navigation Step Calculation</label> + <source_model>Mage_Catalog_Model_Config_Source_Price_Step</source_model> + </field> + <field id="price_range_step" translate="label" type="text" sortOrder="15" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Default Price Navigation Step</label> + <validate>validate-number validate-number-range number-range-0.01-1000000000</validate> + <depends> + <field id="price_range_calculation">manual</field> + </depends> + </field> + <field id="price_range_max_intervals" translate="label comment" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Maximum Number of Price Intervals</label> + <comment>Maximum number of price intervals is 100</comment> + <validate>validate-digits validate-digits-range digits-range-2-100</validate> + <depends> + <field id="price_range_calculation">manual</field> + </depends> + </field> + <field id="one_price_interval" translate="label comment" type="select" sortOrder="15" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Display Price Interval as One Price</label> + <comment>This setting will be applied when all prices in the specific price interval are equal.</comment> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + <depends> + <field id="price_range_calculation">improved</field> + </depends> + </field> + <field id="interval_division_limit" translate="label comment" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Interval Division Limit</label> + <comment>Please specify the number of products, that will not be divided into subintervals.</comment> + <validate>validate-digits validate-digits-range digits-range-1-10000</validate> + <depends> + <field id="price_range_calculation">improved</field> + </depends> + </field> + </group> + <group id="navigation" translate="label" type="text" sortOrder="500" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Category Top Navigation</label> + <field id="max_depth" translate="label" type="text" sortOrder="1" showInDefault="1"> + <label>Maximal Depth</label> + </field> + </group> + <group id="custom_options" translate="label" type="text" sortOrder="700" showInDefault="1" showInWebsite="1" showInStore="1"> + <label><![CDATA[Date & Time Custom Options]]></label> + <field id="use_calendar" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Use JavaScript Calendar</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="date_fields_order" translate="label" type="select" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Date Fields Order</label> + <frontend_model>Mage_Adminhtml_Block_Catalog_Form_Renderer_Config_DateFieldsOrder</frontend_model> + </field> + <field id="time_format" translate="label" type="select" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Time Format</label> + <source_model>Mage_Catalog_Model_Config_Source_TimeFormat</source_model> + </field> + <field id="year_range" translate="label comment" type="text" sortOrder="4" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Year Range</label> + <comment>Use four-digit year format.</comment> + <frontend_model>Mage_Adminhtml_Block_Catalog_Form_Renderer_Config_YearRange</frontend_model> + </field> + </group> + </section> + <section id="design"> + <group id="watermark" translate="label" sortOrder="400" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Product Image Watermarks</label> + <clone_fields>1</clone_fields> + <clone_model>Mage_Catalog_Model_Config_Clone_Media_Image</clone_model> + <field id="size" translate="label" type="text" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Watermark Default Size</label> + <comment>Example format: 200x300.</comment> + </field> + <field id="imageOpacity" translate="label" type="text" sortOrder="150" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Watermark Opacity, Percent</label> + </field> + <field id="image" translate="label" type="image" sortOrder="200" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Watermark</label> + <backend_model>Mage_Backend_Model_Config_Backend_Image</backend_model> + <upload_dir config="system/filesystem/media" scope_info="1">catalog/product/watermark</upload_dir> + <base_url type="media" scope_info="1">catalog/product/watermark</base_url> + <comment>Allowed file types: jpeg, gif, png.</comment> + </field> + <field id="position" translate="label" type="select" sortOrder="300" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Watermark Position</label> + <source_model>Mage_Catalog_Model_Config_Source_Watermark_Position</source_model> + </field> + </group> + </section> + <section id="cms"> + <group id="wysiwyg"> + <field id="use_static_urls_in_catalog" translate="label comment" type="select" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Use Static URLs for Media Content in WYSIWYG for Catalog</label> + <comment>Applicable to catalog products and categories only. Any media content will be inserted into editor as a static URL. It is not updated if the system configuration base URL changes.</comment> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + </group> + </section> + <section id="sales"> + <group id="msrp" translate="label" type="text" sortOrder="110" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Minimum Advertised Price</label> + <field id="enabled" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Enable MAP</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="apply_for_all" translate="label comment" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Apply MAP (Default Value)</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + <comment> + <![CDATA[<strong style="color:red">Warning!</strong> Applying MAP by default will hide all product prices on the frontend.]]> +</comment> + </field> + <field id="display_price_type" translate="label" type="select" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Display Actual Price</label> + <source_model>Mage_Catalog_Model_Product_Attribute_Source_Msrp_Type</source_model> + </field> + <field id="explanation_message" translate="label" type="textarea" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Default Popup Text Message</label> + </field> + <field id="explanation_message_whats_this" translate="label" type="textarea" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Default "What's This" Text Message</label> + </field> + </group> + </section> + </system> +</config> diff --git a/app/code/core/Mage/Catalog/etc/system.xml b/app/code/core/Mage/Catalog/etc/system.xml deleted file mode 100644 index bb50a315356b029ea288761441c88a76cc705b00..0000000000000000000000000000000000000000 --- a/app/code/core/Mage/Catalog/etc/system.xml +++ /dev/null @@ -1,594 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * 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 Mage_Catalog - * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<config> - <tabs> - <catalog translate="label" module="Mage_Catalog"> - <label>Catalog</label> - <sort_order>200</sort_order> - </catalog> - </tabs> - <sections> - <catalog translate="label" module="Mage_Catalog"> - <class>separator-top</class> - <label>Catalog</label> - <tab>catalog</tab> - <frontend_type>text</frontend_type> - <sort_order>40</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <resource>Mage_Catalog::config_catalog</resource> - <groups> - <fields_masks translate="label"> - <label>Product Fields Auto-Generation</label> - <frontend_type>text</frontend_type> - <sort_order>90</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <sku translate="label comment"> - <label>Mask for SKU</label> - <comment>Use {{name}} as Product Name placeholder</comment> - <frontend_type>text</frontend_type> - <sort_order>10</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </sku> - <meta_title translate="label comment"> - <label>Mask for Meta Title</label> - <comment>Use {{name}} as Product Name placeholder</comment> - <frontend_type>text</frontend_type> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </meta_title> - <meta_keyword translate="label comment"> - <label>Mask for Meta Keywords</label> - <comment>Use {{name}} and {{sku}} as Product Name and Product SKU placeholders</comment> - <frontend_type>text</frontend_type> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </meta_keyword> - <meta_description translate="label comment"> - <label>Mask for Meta Description</label> - <comment>Use {{name}} and {{description}} as Product Name and Product Description placeholders</comment> - <frontend_type>text</frontend_type> - <sort_order>40</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </meta_description> - </fields> - </fields_masks> - <frontend translate="label"> - <label>Frontend</label> - <frontend_type>text</frontend_type> - <sort_order>100</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <list_mode translate="label"> - <label>List Mode</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Catalog_ListMode</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </list_mode> - <grid_per_page_values translate="label comment"> - <label>Products per Page on Grid Allowed Values</label> - <comment>Comma-separated.</comment> - <frontend_type>text</frontend_type> - <validate>validate-per-page-value-list</validate> - <!--<source_model>Mage_Adminhtml_Model_System_Config_Source_Catalog_GridPerPage</source_model>--> - <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> - </grid_per_page_values> - <grid_per_page translate="label comment"> - <label>Products per Page on Grid Default Value</label> - <comment>Must be in the allowed values list.</comment> - <frontend_type>text</frontend_type> - <validate>validate-per-page-value</validate> - <!--<source_model>Mage_Adminhtml_Model_System_Config_Source_Catalog_GridPerPage</source_model>--> - <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> - </grid_per_page> - <list_per_page_values translate="label comment"> - <label>Products per Page on List Allowed Values</label> - <comment>Comma-separated.</comment> - <frontend_type>text</frontend_type> - <validate>validate-per-page-value-list</validate> - <!--<source_model>Mage_Adminhtml_Model_System_Config_Source_Catalog_GridPerPage</source_model>--> - <sort_order>4</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </list_per_page_values> - <list_per_page translate="label comment"> - <label>Products per Page on List Default Value</label> - <comment>Must be in the allowed values list.</comment> - <frontend_type>text</frontend_type> - <validate>validate-per-page-value</validate> - <!--<source_model>Mage_Adminhtml_Model_System_Config_Source_Catalog_ListPerPage</source_model>--> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </list_per_page> - <flat_catalog_category translate="label"> - <label>Use Flat Catalog Category</label> - <frontend_type>select</frontend_type> - <frontend_model>Mage_Adminhtml_Block_System_Config_Form_Field_Select_Flatcatalog</frontend_model> - <backend_model>Mage_Catalog_Model_System_Config_Backend_Catalog_Category_Flat</backend_model> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>100</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </flat_catalog_category> - - <flat_catalog_product translate="label"> - <label>Use Flat Catalog Product</label> - <frontend_type>select</frontend_type> - <frontend_model>Mage_Adminhtml_Block_System_Config_Form_Field_Select_Flatproduct</frontend_model> - <backend_model>Mage_Catalog_Model_System_Config_Backend_Catalog_Product_Flat</backend_model> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>100</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </flat_catalog_product> - <default_sort_by translate="label comment"> - <label>Product Listing Sort by</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Catalog_ListSort</source_model> - <sort_order>6</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </default_sort_by> - <list_allow_all translate="label comment"> - <label>Allow All Products per Page</label> - <comment>Whether to show "All" option in the "Show X Per Page" dropdown.</comment> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>6</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </list_allow_all> - <parse_url_directives translate="label comment"> - <label>Allow Dynamic Media URLs in Products and Categories</label> - <comment>E.g. {{media url="path/to/image.jpg"}} {{skin url="path/to/picture.gif"}}. Dynamic directives parsing impacts catalog performance.</comment> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>200</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </parse_url_directives> - </fields> - </frontend> - <placeholder translate="label"> - <label>Product Image Placeholders</label> - <clone_fields>1</clone_fields> - <clone_model>Mage_Adminhtml_Model_System_Config_Clone_Media_Image</clone_model> - <sort_order>300</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <placeholder> - <label></label> - <frontend_type>image</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Image</backend_model> - <upload_dir config="system/filesystem/media" scope_info="1">catalog/product/placeholder</upload_dir> - <base_url type="media" scope_info="1">catalog/product/placeholder</base_url> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </placeholder> - </fields> - </placeholder> - - <seo translate="label"> - <label>Search Engine Optimizations</label> - <frontend_type>text</frontend_type> - <sort_order>500</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <category_url_suffix translate="label comment"> - <label>Category URL Suffix</label> - <frontend_type>text</frontend_type> - <backend_model>Mage_Catalog_Model_System_Config_Backend_Catalog_Url_Rewrite_Suffix</backend_model> - <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> - <comment>Cache refresh needed.</comment> - </category_url_suffix> - <product_url_suffix translate="label comment"> - <label>Product URL Suffix</label> - <frontend_type>text</frontend_type> - <backend_model>Mage_Catalog_Model_System_Config_Backend_Catalog_Url_Rewrite_Suffix</backend_model> - <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> - <comment>Cache refresh needed.</comment> - </product_url_suffix> - <product_use_categories translate="label"> - <label>Use Categories Path for Product URLs</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Seo_Product</backend_model> - <sort_order>4</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </product_use_categories> - <save_rewrites_history translate="label"> - <label>Create Permanent Redirect for URLs if URL Key Changed</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </save_rewrites_history> - <title_separator translate="label"> - <label>Page Title Separator</label> - <frontend_type>text</frontend_type> - <sort_order>6</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </title_separator> - <category_canonical_tag translate="label"> - <label>Use Canonical Link Meta Tag For Categories</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>7</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </category_canonical_tag> - <product_canonical_tag translate="label"> - <label>Use Canonical Link Meta Tag For Products</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>8</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </product_canonical_tag> - </fields> - </seo> - - <price translate="label"> - <label>Price</label> - <frontend_type>text</frontend_type> - <sort_order>400</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - <fields> - <scope translate="label comment"> - <label>Catalog Price Scope</label> - <comment><![CDATA[Defines the base currency scope ("Currency Setup" > "Currency Options" > "Base Currency")]]>.</comment> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Price_Scope</source_model> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Price_Scope</backend_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - <hide_in_single_store_mode>1</hide_in_single_store_mode> - </scope> - </fields> - </price> - <layered_navigation translate="label"> - <label>Layered Navigation</label> - <sort_order>490</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <display_product_count translate="label"> - <label>Display Product Count</label> - <frontend_type>select</frontend_type> - <sort_order>5</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </display_product_count> - <price_range_calculation translate="label"> - <label>Price Navigation Step Calculation</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Price_Step</source_model> - <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> - </price_range_calculation> - <price_range_step translate="label"> - <label>Default Price Navigation Step</label> - <frontend_type>text</frontend_type> - <validate>validate-number validate-number-range number-range-0.01-1000000000</validate> - <sort_order>15</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <depends><price_range_calculation>manual</price_range_calculation></depends> - </price_range_step> - <price_range_max_intervals translate="label comment"> - <label>Maximum Number of Price Intervals</label> - <comment>Maximum number of price intervals is 100</comment> - <frontend_type>text</frontend_type> - <validate>validate-digits validate-digits-range digits-range-2-100</validate> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <depends><price_range_calculation>manual</price_range_calculation></depends> - </price_range_max_intervals> - <one_price_interval translate="label comment"> - <label>Display Price Interval as One Price</label> - <comment>This setting will be applied when all prices in the specific price interval are equal.</comment> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>15</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <depends><price_range_calculation>improved</price_range_calculation></depends> - </one_price_interval> - <interval_division_limit translate="label comment"> - <label>Interval Division Limit</label> - <comment>Please specify the number of products, that will not be divided into subintervals.</comment> - <frontend_type>text</frontend_type> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <validate>validate-digits validate-digits-range digits-range-1-10000</validate> - <depends><price_range_calculation>improved</price_range_calculation></depends> - </interval_division_limit> - </fields> - </layered_navigation> - <navigation translate="label"> - <label>Category Top Navigation</label> - <frontend_type>text</frontend_type> - <sort_order>500</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <max_depth translate="label"> - <label>Maximal Depth</label> - <frontend_type>text</frontend_type> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - </max_depth> - </fields> - </navigation> - <custom_options translate="label"> - <label>Date & Time Custom Options</label> - <frontend_type>text</frontend_type> - <sort_order>700</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <use_calendar translate="label"> - <label>Use JavaScript Calendar</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </use_calendar> - <date_fields_order translate="label"> - <label>Date Fields Order</label> - <frontend_type>select</frontend_type> - <frontend_model>Mage_Adminhtml_Block_Catalog_Form_Renderer_Config_DateFieldsOrder</frontend_model> - <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> - </date_fields_order> - <time_format translate="label"> - <label>Time Format</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Catalog_TimeFormat</source_model> - <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> - </time_format> - <year_range translate="label comment"> - <label>Year Range</label> - <comment>Use four-digit year format.</comment> - <frontend_type>text</frontend_type> - <frontend_model>Mage_Adminhtml_Block_Catalog_Form_Renderer_Config_YearRange</frontend_model> - <sort_order>4</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </year_range> - </fields> - </custom_options> - </groups> - </catalog> - <design> - <groups> - <watermark translate="label"> - <label>Product Image Watermarks</label> - <clone_fields>1</clone_fields> - <clone_model>Mage_Adminhtml_Model_System_Config_Clone_Media_Image</clone_model> - <sort_order>400</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <size translate="label"> - <label>Watermark Default Size</label> - <frontend_type>text</frontend_type> - <sort_order>100</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <comment>Example format: 200x300.</comment> - </size> - <imageOpacity translate="label"> - <label>Watermark Opacity, Percent</label> - <frontend_type>text</frontend_type> - <sort_order>150</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </imageOpacity> - <image translate="label"> - <label>Watermark</label> - <frontend_type>image</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Image</backend_model> - <upload_dir config="system/filesystem/media" scope_info="1">catalog/product/watermark</upload_dir> - <base_url type="media" scope_info="1">catalog/product/watermark</base_url> - <sort_order>200</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <comment>Allowed file types: jpeg, gif, png.</comment> - </image> - <position translate="label"> - <label>Watermark Position</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Watermark_Position</source_model> - <sort_order>300</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </position> - </fields> - </watermark> - </groups> - </design> - <cms> - <groups> - <wysiwyg> - <fields> - <use_static_urls_in_catalog translate="label comment"> - <label>Use Static URLs for Media Content in WYSIWYG for Catalog</label> - <comment>Applicable to catalog products and categories only. Any media content will be inserted into editor as a static URL. It is not updated if the system configuration base URL changes.</comment> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <frontend_type>select</frontend_type> - <sort_order>10</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </use_static_urls_in_catalog> - </fields> - </wysiwyg> - </groups> - </cms> - <sales> - <groups> - <msrp translate="label"> - <label>Minimum Advertised Price</label> - <frontend_type>text</frontend_type> - <sort_order>110</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <fields> - <enabled translate="label"> - <label>Enable MAP</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>10</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </enabled> - <apply_for_all translate="label comment"> - <label>Apply MAP (Default Value)</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <comment><![CDATA[<strong style="color:red">Warning!</strong> Applying MAP by default will hide all product prices on the frontend.]]></comment> - </apply_for_all> - <display_price_type translate="label"> - <label>Display Actual Price</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Catalog_Model_Product_Attribute_Source_Msrp_Type</source_model> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </display_price_type> - <explanation_message translate="label"> - <label>Default Popup Text Message</label> - <frontend_type>textarea</frontend_type> - <sort_order>40</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </explanation_message> - <explanation_message_whats_this translate="label"> - <label>Default "What's This" Text Message</label> - <frontend_type>textarea</frontend_type> - <sort_order>50</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </explanation_message_whats_this> - </fields> - </msrp> - </groups> - </sales> - </sections> -</config> diff --git a/app/code/core/Mage/Catalog/etc/widget.xml b/app/code/core/Mage/Catalog/etc/widget.xml index 05e60b8d43597174edf5d3519123c847aa758fae..a273173a0d2546a293caa3769a99fe3138b72af9 100644 --- a/app/code/core/Mage/Catalog/etc/widget.xml +++ b/app/code/core/Mage/Catalog/etc/widget.xml @@ -54,7 +54,7 @@ <visible>1</visible> <label>Display Page Control</label> <type>select</type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> </show_pager> <products_per_page translate="label"> <required>1</required> diff --git a/app/code/core/Mage/Catalog/locale/de_DE/Mage_Catalog.csv b/app/code/core/Mage/Catalog/locale/de_DE/Mage_Catalog.csv index 48dfedf37c7d282570b4f12fc91298acfd8e8582..1eac4bca6c60543f1892abe2b096920d44da9fda 100644 --- a/app/code/core/Mage/Catalog/locale/de_DE/Mage_Catalog.csv +++ b/app/code/core/Mage/Catalog/locale/de_DE/Mage_Catalog.csv @@ -264,7 +264,7 @@ "Duplicate website group price customer group.","Webseite Gruppenpreis Kundengruppe duplizieren." "Duplicate website tier price customer group and quantity.","Preisstruktur, Kundengruppe und Menge duplizieren." "Duplicate website, country and state tax found.","Dupliziere die gefundene Website, Land und Gebühr." -"E.g. {{media url=""path/to/image.jpg""}} {{skin url=""path/to/picture.gif""}}. Dynamic directives parsing impacts catalog performance.","Zum Beispiel: {{media url=""path/to/image.jpg""}} {{skin url=""path/to/picture.gif""}}. Dynamische Richtlinien-Analyse wirkt sich auf die Katalogleistung aus." +"E.g. {{media url=""path/to/image.jpg""}} {{view url=""path/to/picture.gif""}}. Dynamic directives parsing impacts catalog performance.","Zum Beispiel: {{media url=""path/to/image.jpg""}} {{view url=""path/to/picture.gif""}}. Dynamische Richtlinien-Analyse wirkt sich auf die Katalogleistung aus." "Edit","Bearbeiten" "Edit Attribute Set '%s'","Eigenschaftensatz '%s' bearbeiten" "Edit Product Attribute","Produkteigenschaften bearbeiten" diff --git a/app/code/core/Mage/Catalog/locale/en_US/Mage_Catalog.csv b/app/code/core/Mage/Catalog/locale/en_US/Mage_Catalog.csv index ec2550f79623ebe97699c07d0128b6f0764b5501..c70d761215a191371f8551dd0100ec6ac5340684 100644 --- a/app/code/core/Mage/Catalog/locale/en_US/Mage_Catalog.csv +++ b/app/code/core/Mage/Catalog/locale/en_US/Mage_Catalog.csv @@ -265,7 +265,7 @@ "Duplicate website group price customer group.","Duplicate website group price customer group." "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." -"E.g. {{media url=""path/to/image.jpg""}} {{skin url=""path/to/picture.gif""}}. Dynamic directives parsing impacts catalog performance.","E.g. {{media url=""path/to/image.jpg""}} {{skin url=""path/to/picture.gif""}}. Dynamic directives parsing impacts catalog performance." +"E.g. {{media url=""path/to/image.jpg""}} {{view url=""path/to/picture.gif""}}. Dynamic directives parsing impacts catalog performance.","E.g. {{media url=""path/to/image.jpg""}} {{view url=""path/to/picture.gif""}}. Dynamic directives parsing impacts catalog performance." "Edit","Edit" "Edit Attribute Set '%s'","Edit Attribute Set '%s'" "Edit Product Attribute","Edit Product Attribute" diff --git a/app/code/core/Mage/Catalog/locale/es_ES/Mage_Catalog.csv b/app/code/core/Mage/Catalog/locale/es_ES/Mage_Catalog.csv index 498d45861a757281274e57a457cef16267dc9b2d..c59705eee50c82da229156e1591843385cfd41e1 100644 --- a/app/code/core/Mage/Catalog/locale/es_ES/Mage_Catalog.csv +++ b/app/code/core/Mage/Catalog/locale/es_ES/Mage_Catalog.csv @@ -264,7 +264,7 @@ "Duplicate website group price customer group.","Duplicar grupo de cliente precio de grupo de sitio web" "Duplicate website tier price customer group and quantity.","Duplicar precio de nivel de página web grupo de cliente y cantidad." "Duplicate website, country and state tax found.","Encontrados página web duplicada, impuesto de paÃs y estado" -"E.g. {{media url=""path/to/image.jpg""}} {{skin url=""path/to/picture.gif""}}. Dynamic directives parsing impacts catalog performance.","P. ej. {{media url=""path/to/image.jpg""}} {{skin url=""path/to/picture.gif""}}. Rendimiento de catálogo de impactos de análisis de directivas dinámicas." +"E.g. {{media url=""path/to/image.jpg""}} {{view url=""path/to/picture.gif""}}. Dynamic directives parsing impacts catalog performance.","P. ej. {{media url=""path/to/image.jpg""}} {{view url=""path/to/picture.gif""}}. Rendimiento de catálogo de impactos de análisis de directivas dinámicas." "Edit","Editar" "Edit Attribute Set '%s'","Editar el conjunto de caracterÃsticas ""%s""" "Edit Product Attribute","Editar caracterÃstica de producto" diff --git a/app/code/core/Mage/Catalog/locale/fr_FR/Mage_Catalog.csv b/app/code/core/Mage/Catalog/locale/fr_FR/Mage_Catalog.csv index 8567afe313e3d0ff84af45850fdf80380a1af9aa..f7b9ed30f75f641e051d18740bdfdf8f81d78fd5 100644 --- a/app/code/core/Mage/Catalog/locale/fr_FR/Mage_Catalog.csv +++ b/app/code/core/Mage/Catalog/locale/fr_FR/Mage_Catalog.csv @@ -264,7 +264,7 @@ "Duplicate website group price customer group.","Copier le site internet prix de groupe clientèle." "Duplicate website tier price customer group and quantity.","Dupliquer le prix de groupe client du site et la quantité." "Duplicate website, country and state tax found.","Copie du site web, du pays et de la région trouvée." -"E.g. {{media url=""path/to/image.jpg""}} {{skin url=""path/to/picture.gif""}}. Dynamic directives parsing impacts catalog performance.","E.g. {{media url=""path/to/image.jpg""}} {{skin url=""path/to/picture.gif""}}.Des chemins dynamiques ont un impact sur les performances du catalogue." +"E.g. {{media url=""path/to/image.jpg""}} {{view url=""path/to/picture.gif""}}. Dynamic directives parsing impacts catalog performance.","E.g. {{media url=""path/to/image.jpg""}} {{view url=""path/to/picture.gif""}}.Des chemins dynamiques ont un impact sur les performances du catalogue." "Edit","Éditer" "Edit Attribute Set '%s'","Modifier le jeu d'attributs : '%s'" "Edit Product Attribute","Modifier l'attribut du produit" diff --git a/app/code/core/Mage/Catalog/locale/nl_NL/Mage_Catalog.csv b/app/code/core/Mage/Catalog/locale/nl_NL/Mage_Catalog.csv index a5f50ff8110a2a789047d9d01138e85c650f032f..34279d08521d8a7165b888ff5687e8858681a521 100644 --- a/app/code/core/Mage/Catalog/locale/nl_NL/Mage_Catalog.csv +++ b/app/code/core/Mage/Catalog/locale/nl_NL/Mage_Catalog.csv @@ -264,7 +264,7 @@ "Duplicate website group price customer group.","Dubbele website groep prijs klantengroep." "Duplicate website tier price customer group and quantity.","Dupliceer website prijs klantengroep en hoeveelheid." "Duplicate website, country and state tax found.","Dupliceer gevonden belasting van website, land en staat." -"E.g. {{media url=""path/to/image.jpg""}} {{skin url=""path/to/picture.gif""}}. Dynamic directives parsing impacts catalog performance.","Bijvoorbeeld {{media url=""pad/naar/plaatje.jpg""}} {{skin url=""pad/naar/plaatje.gif""}}. Dynamische opdrachtenverwerking heeft invloed op de performantie van de catalogus." +"E.g. {{media url=""path/to/image.jpg""}} {{view url=""path/to/picture.gif""}}. Dynamic directives parsing impacts catalog performance.","Bijvoorbeeld {{media url=""pad/naar/plaatje.jpg""}} {{view url=""pad/naar/plaatje.gif""}}. Dynamische opdrachtenverwerking heeft invloed op de performantie van de catalogus." "Edit","Bewerken" "Edit Attribute Set '%s'","Bewerken attribuutset '%s'" "Edit Product Attribute","Bewerken productattribuut" diff --git a/app/code/core/Mage/Catalog/locale/pt_BR/Mage_Catalog.csv b/app/code/core/Mage/Catalog/locale/pt_BR/Mage_Catalog.csv index b651805c140a88a60aa9ab7f491bce9ef2fe525b..42ea1836dcf90cb8185c2ed974ba849835a86c49 100644 --- a/app/code/core/Mage/Catalog/locale/pt_BR/Mage_Catalog.csv +++ b/app/code/core/Mage/Catalog/locale/pt_BR/Mage_Catalog.csv @@ -264,7 +264,7 @@ "Duplicate website group price customer group.","Duplicar preço de grupo do website grupo do cliente." "Duplicate website tier price customer group and quantity.","Preço nÃvel do sÃtio Web de grupo de clientes e quantidade duplicados." "Duplicate website, country and state tax found.","SÃtio Web, paÃs e taxa de estado encontrados duplicados." -"E.g. {{media url=""path/to/image.jpg""}} {{skin url=""path/to/picture.gif""}}. Dynamic directives parsing impacts catalog performance.","Por exemplo, {{url mÃdia=""caminho/para/imagem.jpg""}} {{skin url=""caminho/para/picture.gif""}}. Análise dinâmica de directivas afeta o desempenho do catálogo." +"E.g. {{media url=""path/to/image.jpg""}} {{view url=""path/to/picture.gif""}}. Dynamic directives parsing impacts catalog performance.","Por exemplo, {{url mÃdia=""caminho/para/imagem.jpg""}} {{view url=""caminho/para/picture.gif""}}. Análise dinâmica de directivas afeta o desempenho do catálogo." "Edit","Editar" "Edit Attribute Set '%s'","Editar Conjunto de Atributos ""%s""" "Edit Product Attribute","Editar Atributo do Produto" diff --git a/app/code/core/Mage/Catalog/locale/zh_CN/Mage_Catalog.csv b/app/code/core/Mage/Catalog/locale/zh_CN/Mage_Catalog.csv index 6edcdbba441e972043289de1062ccbfaf038c774..43d60b1f2bd6bf4c591088b5f35ed8e415e33c6f 100644 --- a/app/code/core/Mage/Catalog/locale/zh_CN/Mage_Catalog.csv +++ b/app/code/core/Mage/Catalog/locale/zh_CN/Mage_Catalog.csv @@ -264,7 +264,7 @@ "Duplicate website group price customer group.","é‡å¤ç½‘ç«™ 团体价 客户群。" "Duplicate website tier price customer group and quantity.","å‰¯æœ¬ç½‘ç«™å±‚ä»·æ ¼å®¢æˆ·åˆ†ç»„å’Œæ•°é‡ã€‚" "Duplicate website, country and state tax found.","找到副本网站ã€å›½å®¶ï¼Œä»¥åŠå·žç¨ŽçŽ‡ã€‚" -"E.g. {{media url=""path/to/image.jpg""}} {{skin url=""path/to/picture.gif""}}. Dynamic directives parsing impacts catalog performance.","例如, {{media url=""path/to/image.jpg""}} {{skin url=""path/to/picture.gif""}}ã€‚åŠ¨æ€æŒ‡ä»¤è§£æžå°†å½±å“到分类的性能。" +"E.g. {{media url=""path/to/image.jpg""}} {{view url=""path/to/picture.gif""}}. Dynamic directives parsing impacts catalog performance.","例如, {{media url=""path/to/image.jpg""}} {{view url=""path/to/picture.gif""}}ã€‚åŠ¨æ€æŒ‡ä»¤è§£æžå°†å½±å“到分类的性能。" "Edit","编辑" "Edit Attribute Set '%s'","编辑属性集 '%s'" "Edit Product Attribute","编辑产å“属性" diff --git a/app/code/core/Mage/Catalog/view/frontend/product/compare/list.phtml b/app/code/core/Mage/Catalog/view/frontend/product/compare/list.phtml index cbb443d2d34a88d4fbe9da37090eebc86776d4d8..1ee187715e096098eb13408eb8d992201432570c 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/compare/list.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/compare/list.phtml @@ -135,7 +135,7 @@ <div class="buttons-set"> <button id="window-close" type="button" title="<?php echo $this->__('Close Window') ?>" class="button"><span><span><?php echo $this->__('Close Window') ?></span></span></button> <span class="please-wait" id="compare-list-please-wait" style="display:none;"> - <img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo $this->__('Please wait...') ?>" title="<?php echo $this->__('Please wait...') ?>" class="v-middle" /> <?php echo $this->__('Please wait...') ?> + <img src="<?php echo $this->getViewFileUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo $this->__('Please wait...') ?>" title="<?php echo $this->__('Please wait...') ?>" class="v-middle" /> <?php echo $this->__('Please wait...') ?> </span> </div> <script type="text/javascript"> @@ -151,7 +151,7 @@ o.windowCloseSelector = '#window-close', o.printSelector = '.link-print' }); - $.mage.load.jsSync("<?php echo $this->getSkinUrl('Mage_Catalog::js/list.js')?>"); + $.mage.load.jsSync("<?php echo $this->getViewFileUrl('Mage_Catalog::js/list.js')?>"); })(jQuery); </script> <?php else: ?> diff --git a/app/code/core/Mage/Catalog/view/frontend/product/compare/sidebar.phtml b/app/code/core/Mage/Catalog/view/frontend/product/compare/sidebar.phtml index eb485a9a9b4b81e962069c82b07d66fd59dc730d..98561a51c8dd81802748c03b336d06ea2ddcbd25 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/compare/sidebar.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/compare/sidebar.phtml @@ -61,9 +61,9 @@ $_items = $_helper->getItemCount() > 0 ? $_helper->getItemCollection() : null; o.clearAllConfirmMessage = '<?php echo $this->__('Are you sure you would like to remove all products from your comparison?') ?>', o.clearAllSelector = '#compare-clear-all' }); - $.mage.load.jsSync("<?php echo $this->getSkinUrl('jquery/jquery.popupwindow.js') ?>"); - $.mage.load.jsSync("<?php echo $this->getSkinUrl('mage/popup-window.js') ?>"); - $.mage.load.jsSync("<?php echo $this->getSkinUrl('Mage_Catalog::js/compare.js') ?>"); + $.mage.load.jsSync("<?php echo $this->getViewFileUrl('jquery/jquery.popupwindow.js') ?>"); + $.mage.load.jsSync("<?php echo $this->getViewFileUrl('mage/popup-window.js') ?>"); + $.mage.load.jsSync("<?php echo $this->getViewFileUrl('Mage_Catalog::js/compare.js') ?>"); })(jQuery); </script> <?php else: ?> diff --git a/app/code/core/Mage/Catalog/view/frontend/product/list.phtml b/app/code/core/Mage/Catalog/view/frontend/product/list.phtml index 8543904c7ef07e733d6886c2e046556d467822b1..16483760e4b70384ffa04a7862f4bfc38ffe0335 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/list.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/list.phtml @@ -101,8 +101,8 @@ $_helper = $this->helper('Mage_Catalog_Helper_Output'); $.mage.event.observe('mage.grid.initialize', function (event, initData) { initData.listId = '#products-list'; }); - $.mage.load.js("<?php echo $this->getSkinUrl('Mage_Catalog::js/grid.js') ?>"); - $.mage.load.js("<?php echo $this->getSkinUrl('Mage_Catalog::js/mage-attributes-processing.js') ?>"); + $.mage.load.js("<?php echo $this->getViewFileUrl('Mage_Catalog::js/grid.js') ?>"); + $.mage.load.js("<?php echo $this->getViewFileUrl('Mage_Catalog::js/mage-attributes-processing.js') ?>"); })(jQuery); //]]> </script> @@ -165,8 +165,8 @@ $_helper = $this->helper('Mage_Catalog_Helper_Output'); initData.genericSelector = 'ul.products-grid > li'; initData.decoratorParam = ['odd', 'even', 'first', 'last']; }); - $.mage.load.js("<?php echo $this->getSkinUrl('Mage_Catalog::js/grid.js') ?>"); - $.mage.load.js("<?php echo $this->getSkinUrl('Mage_Catalog::js/mage-attributes-processing.js') ?>"); + $.mage.load.js("<?php echo $this->getViewFileUrl('Mage_Catalog::js/grid.js') ?>"); + $.mage.load.js("<?php echo $this->getViewFileUrl('Mage_Catalog::js/mage-attributes-processing.js') ?>"); })(jQuery); //]]> </script> diff --git a/app/code/core/Mage/Catalog/view/frontend/product/list/toolbar.phtml b/app/code/core/Mage/Catalog/view/frontend/product/list/toolbar.phtml index d01c370f6a7a48ec5a882690a2493d64739f0bc4..03d112946a10c2d281567f629466e1a1eae658b4 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/list/toolbar.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/list/toolbar.phtml @@ -92,12 +92,12 @@ <?php if ($this->getCurrentDirection() == 'desc'): ?> <a href="<?php echo $this->getOrderUrl(null, 'asc') ?>" title="<?php echo $this->__('Set Ascending Direction') ?>"><img - src="<?php echo $this->getSkinUrl('images/i_desc_arrow.gif') ?>" + src="<?php echo $this->getViewFileUrl('images/i_desc_arrow.gif') ?>" alt="<?php echo $this->__('Set Ascending Direction') ?>" class="v-middle"/></a> <?php else: ?> <a href="<?php echo $this->getOrderUrl(null, 'desc') ?>" title="<?php echo $this->__('Set Descending Direction') ?>"><img - src="<?php echo $this->getSkinUrl('images/i_asc_arrow.gif') ?>" + src="<?php echo $this->getViewFileUrl('images/i_asc_arrow.gif') ?>" alt="<?php echo $this->__('Set Descending Direction') ?>" class="v-middle"/></a> <?php endif; ?> </div> @@ -106,7 +106,7 @@ <script type="text/javascript"> //<![CDATA[ (function($) { - $.mage.load.js("<?php echo $this->getSkinUrl('Mage_Catalog::js/mage-attributes-processing.js') ?>"); + $.mage.load.js("<?php echo $this->getViewFileUrl('Mage_Catalog::js/mage-attributes-processing.js') ?>"); })(jQuery); //]]> </script> diff --git a/app/code/core/Mage/Catalog/view/frontend/product/price_msrp.phtml b/app/code/core/Mage/Catalog/view/frontend/product/price_msrp.phtml index 068d1ebe14d097fb32f3e310f202765cfc584340..e44a339bfd0a814fdabe094d92ce136b4053ddee 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/price_msrp.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/price_msrp.phtml @@ -81,9 +81,9 @@ }); <?php endif; ?> - $.mage.load.js("<?php echo $this->getSkinUrl('jquery/jquery.metadata.js')?>"); - $.mage.load.js("<?php echo $this->getSkinUrl('jquery/jquery.hook.js')?>"); - $.mage.load.jsSync("<?php echo $this->getSkinUrl('Mage_Catalog::js/msrp.js') ?>"); + $.mage.load.js("<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js')?>"); + $.mage.load.js("<?php echo $this->getViewFileUrl('jquery/jquery.hook.js')?>"); + $.mage.load.jsSync("<?php echo $this->getViewFileUrl('Mage_Catalog::js/msrp.js') ?>"); })(jQuery); //]]> diff --git a/app/code/core/Mage/Catalog/view/frontend/product/price_msrp_item.phtml b/app/code/core/Mage/Catalog/view/frontend/product/price_msrp_item.phtml index 53c08c67c2d0fe209423633b861a2fc51a494e26..9b8803b8d80ed2ec91b6cd50c519d7b19daa4a58 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/price_msrp_item.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/price_msrp_item.phtml @@ -86,9 +86,9 @@ $priceElementIdPrefix = $this->getPriceElementIdPrefix() ? $this->getPriceElemen <?php endif; ?> - $.mage.load.js("<?php echo $this->getSkinUrl('jquery/jquery.metadata.js')?>"); - $.mage.load.js("<?php echo $this->getSkinUrl('jquery/jquery.hook.js')?>"); - $.mage.load.jsSync("<?php echo $this->getSkinUrl('Mage_Catalog::js/msrp.js') ?>"); + $.mage.load.js("<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js')?>"); + $.mage.load.js("<?php echo $this->getViewFileUrl('jquery/jquery.hook.js')?>"); + $.mage.load.jsSync("<?php echo $this->getViewFileUrl('Mage_Catalog::js/msrp.js') ?>"); })(jQuery); //]]> </script> diff --git a/app/code/core/Mage/Catalog/view/frontend/product/price_msrp_noform.phtml b/app/code/core/Mage/Catalog/view/frontend/product/price_msrp_noform.phtml index c177f4249e9e876263097f025458af1792a7c3e3..e518f4feca6cc4f0fa3523a47b8734ca2ee11998 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/price_msrp_noform.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/price_msrp_noform.phtml @@ -81,9 +81,9 @@ }); <?php endif; ?> - $.mage.load.js("<?php echo $this->getSkinUrl('jquery/jquery.metadata.js')?>"); - $.mage.load.js("<?php echo $this->getSkinUrl('jquery/jquery.hook.js')?>"); - $.mage.load.jsSync("<?php echo $this->getSkinUrl('Mage_Catalog::js/msrp.js') ?>"); + $.mage.load.js("<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js')?>"); + $.mage.load.js("<?php echo $this->getViewFileUrl('jquery/jquery.hook.js')?>"); + $.mage.load.jsSync("<?php echo $this->getViewFileUrl('Mage_Catalog::js/msrp.js') ?>"); })(jQuery); //]]> diff --git a/app/code/core/Mage/Catalog/view/frontend/product/view.phtml b/app/code/core/Mage/Catalog/view/frontend/product/view.phtml index 960103c3bf2f56bbce4a036ad5048a6d2885995c..cbb6536172c122705f57c184a1e19f294c6a889a 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/view.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/view.phtml @@ -35,7 +35,7 @@ <?php $_product = $this->getProduct(); ?> <script type="text/javascript"> (function ($) { - head.js("<?php echo $this->getSkinUrl('Mage_Catalog::js/price-option.js') ?>", function () { + head.js("<?php echo $this->getViewFileUrl('Mage_Catalog::js/price-option.js') ?>", function () { priceOptionInstance = $.mage.priceOption({"priceConfig":<?php echo $this->getJsonConfig() ?>}); }); })(jQuery); diff --git a/app/code/core/Mage/Catalog/view/frontend/product/view/addtocart.phtml b/app/code/core/Mage/Catalog/view/frontend/product/view/addtocart.phtml index 472facec9f75c27da81e5560173b8dd625f16fb0..4d4004b5e2e3939f337a6a005b23abd0c15d5f41 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/view/addtocart.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/view/addtocart.phtml @@ -49,9 +49,9 @@ }; cartData.cartFormData.push(initData); }); - $.mage.load.js("<?php echo $this->getSkinUrl('jquery/jquery.metadata.js')?>"); - $.mage.load.js("<?php echo $this->getSkinUrl('jquery/jquery.hook.js')?>"); - $.mage.load.jsSync("<?php echo $this->getSkinUrl('Mage_Catalog::js/msrp.js') ?>"); + $.mage.load.js("<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js')?>"); + $.mage.load.js("<?php echo $this->getViewFileUrl('jquery/jquery.hook.js')?>"); + $.mage.load.jsSync("<?php echo $this->getViewFileUrl('Mage_Catalog::js/msrp.js') ?>"); })(jQuery); //]]> </script> diff --git a/app/code/core/Mage/Catalog/view/frontend/product/view/media.phtml b/app/code/core/Mage/Catalog/view/frontend/product/view/media.phtml index 7275293abf2dcb0d5867700e209ff40d9d51a71d..4f0a482bcd64bc78e15a769b7f206f3a5f3196aa 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/view/media.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/view/media.phtml @@ -43,14 +43,14 @@ </p> <p class="zoom-notice" id="track_hint"><?php echo $this->__('Double click on above image to view full picture') ?></p> <div class="zoom no-bg"> - <img id="zoom_out" src="<?php echo $this->getSkinUrl('images/slider_btn_zoom_out.gif') ?>" alt="<?php echo $this->__('Zoom Out') ?>" title="<?php echo $this->__('Zoom Out') ?>" class="btn-zoom-out" /> + <img id="zoom_out" src="<?php echo $this->getViewFileUrl('images/slider_btn_zoom_out.gif') ?>" alt="<?php echo $this->__('Zoom Out') ?>" title="<?php echo $this->__('Zoom Out') ?>" class="btn-zoom-out" /> <div id="slider"></div> - <img id="zoom_in" src="<?php echo $this->getSkinUrl('images/slider_btn_zoom_in.gif') ?>" alt="<?php echo $this->__('Zoom In') ?>" title="<?php echo $this->__('Zoom In') ?>" class="btn-zoom-in" /> + <img id="zoom_in" src="<?php echo $this->getViewFileUrl('images/slider_btn_zoom_in.gif') ?>" alt="<?php echo $this->__('Zoom In') ?>" title="<?php echo $this->__('Zoom In') ?>" class="btn-zoom-in" /> </div> <script type="text/javascript"> //<![CDATA[ (function ($) { - $.mage.load.css("<?php echo $this->getSkinUrl('Mage_Catalog::zoom.css') ?>"); + $.mage.load.css("<?php echo $this->getViewFileUrl('Mage_Catalog::zoom.css') ?>"); $.mage.event.observe('mage.zoom.initialize', function (event, initData) { initData.imageSelector = '#image', initData.sliderSelector = '#slider', @@ -58,7 +58,7 @@ initData.zoomInSelector = '#zoom_in', initData.zoomOutSelector = '#zoom_out' }); - $.mage.load.js("<?php echo $this->getSkinUrl('Mage_Catalog::js/zoom.js') ?>"); + $.mage.load.js("<?php echo $this->getViewFileUrl('Mage_Catalog::js/zoom.js') ?>"); })(jQuery); //]]> </script> @@ -84,8 +84,8 @@ </div> <script type="text/javascript"> (function($) { - $.mage.load.jsSync("<?php echo $this->getSkinUrl('jquery/jquery.popupwindow.js')?>"); - $.mage.load.jsSync("<?php echo $this->getSkinUrl('mage/popup-window.js')?>"); + $.mage.load.jsSync("<?php echo $this->getViewFileUrl('jquery/jquery.popupwindow.js')?>"); + $.mage.load.jsSync("<?php echo $this->getViewFileUrl('mage/popup-window.js')?>"); })(jQuery); </script> <?php endif; ?> diff --git a/app/code/core/Mage/Catalog/view/frontend/product/view/options.phtml b/app/code/core/Mage/Catalog/view/frontend/product/view/options.phtml index 539971be7e81361fe43fb0deb5c918e56b79a301..796c9f10d23f09f3c752ff3418392dec907b62db 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/view/options.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/view/options.phtml @@ -30,7 +30,7 @@ <?php if (count($_options)):?> <script type="text/javascript"> (function ($) { - head.js("<?php echo $this->getSkinUrl('Mage_Catalog::js/price-option.js') ?>", function () { + head.js("<?php echo $this->getViewFileUrl('Mage_Catalog::js/price-option.js') ?>", function () { priceOptionInstance.options.optionConfig = <?php echo $this->getJsonConfig()?>; priceOptionInstance.reloadPrice(); }); diff --git a/app/code/core/Mage/Catalog/view/frontend/product/view/options/type/file.phtml b/app/code/core/Mage/Catalog/view/frontend/product/view/options/type/file.phtml index 33363e007c4c73917c70bfb4701e07e553415b58..86c0d0aa4de4f5eec9430acddfac7b520087a2d8 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/view/options/type/file.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/view/options/type/file.phtml @@ -35,7 +35,7 @@ <script type="text/javascript"> //<![CDATA[ (function($) { - head.js("<?php echo $this->getSkinUrl('Mage_Catalog::js/file-option.js')?>", function() { + head.js("<?php echo $this->getViewFileUrl('Mage_Catalog::js/file-option.js')?>", function() { $('#input-box-<?php echo $_fileName ?>').fileOption({ fileName: '<?php echo $_fileName ?>', fileNamed: '<?php echo $_fileNamed ?>', diff --git a/app/code/core/Mage/Catalog/view/frontend/product/view/type/options/configurable.phtml b/app/code/core/Mage/Catalog/view/frontend/product/view/type/options/configurable.phtml index c22555b47220bc4ee4ddd0c1a0cc8b6cda4ee6cd..5166082f6fa507355ed18ca2d0c0dfcc1f823612 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/view/type/options/configurable.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/view/type/options/configurable.phtml @@ -44,7 +44,7 @@ $_attributes = Mage::helper('Mage_Core_Helper_Data')->decorateArray($this->getAl </dl> <script type="text/javascript"> (function ($) { - head.js("<?php echo $this->getSkinUrl('Mage_Catalog::js/configurable.js') ?>", function () { + head.js("<?php echo $this->getViewFileUrl('Mage_Catalog::js/configurable.js') ?>", function () { $.mage.configurable({"spConfig":<?php echo $this->getJsonConfig() ?>, "priceOptionInstance": priceOptionInstance}); }) })(jQuery); diff --git a/app/code/core/Mage/CatalogInventory/Block/Adminhtml/Form/Field/Minsaleqty.php b/app/code/core/Mage/CatalogInventory/Block/Adminhtml/Form/Field/Minsaleqty.php index 6bc28ac25303adcb38ee387f1de3420400f4ba56..cfb9dedb7e4e58c8a8e321ba3a4b22efaf9e6bdc 100644 --- a/app/code/core/Mage/CatalogInventory/Block/Adminhtml/Form/Field/Minsaleqty.php +++ b/app/code/core/Mage/CatalogInventory/Block/Adminhtml/Form/Field/Minsaleqty.php @@ -31,7 +31,8 @@ * @package Mage_CatalogInventory * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_CatalogInventory_Block_Adminhtml_Form_Field_Minsaleqty extends Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract +class Mage_CatalogInventory_Block_Adminhtml_Form_Field_Minsaleqty + extends Mage_Backend_Block_System_Config_Form_Field_Array_Abstract { /** * @var Mage_CatalogInventory_Block_Adminhtml_Form_Field_Customergroup diff --git a/app/code/core/Mage/CatalogInventory/Helper/Minsaleqty.php b/app/code/core/Mage/CatalogInventory/Helper/Minsaleqty.php index 18de40959e1ed1ab845e25bdc76a27667156f93d..3b4557f7afbc2fcb01d7351032307e547a7fe900 100644 --- a/app/code/core/Mage/CatalogInventory/Helper/Minsaleqty.php +++ b/app/code/core/Mage/CatalogInventory/Helper/Minsaleqty.php @@ -107,7 +107,7 @@ class Mage_CatalogInventory_Helper_Minsaleqty } /** - * Encode value to be used in Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract + * Encode value to be used in Mage_Backend_Block_System_Config_Form_Field_Array_Abstract * * @param array * @return array @@ -126,7 +126,7 @@ class Mage_CatalogInventory_Helper_Minsaleqty } /** - * Decode value from used in Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract + * Decode value from used in Mage_Backend_Block_System_Config_Form_Field_Array_Abstract * * @param array * @return array @@ -173,7 +173,7 @@ class Mage_CatalogInventory_Helper_Minsaleqty } /** - * Make value readable by Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract + * Make value readable by Mage_Backend_Block_System_Config_Form_Field_Array_Abstract * * @param mixed $value * @return array diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Catalog/Inventory/Managestock.php b/app/code/core/Mage/CatalogInventory/Model/Config/Backend/Managestock.php similarity index 84% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Catalog/Inventory/Managestock.php rename to app/code/core/Mage/CatalogInventory/Model/Config/Backend/Managestock.php index d54f4121f9843395b9c4f140e675a6925d64d114..06456ec2ad0a19ac5f075104fac05e08f3336efe 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Catalog/Inventory/Managestock.php +++ b/app/code/core/Mage/CatalogInventory/Model/Config/Backend/Managestock.php @@ -19,26 +19,26 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_CatalogInventory * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ /** - * Adminhtml Catalog Inventory Manage Stock Config Backend Model + * Catalog Inventory Manage Stock Config Backend Model * * @category Mage - * @package Mage_Adminhtml + * @package Mage_CatalogInventory * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Model_System_Config_Backend_Catalog_Inventory_Managestock +class Mage_CatalogInventory_Model_Config_Backend_Managestock extends Mage_Core_Model_Config_Data { /** * After change Catalog Inventory Manage value process * - * @return Mage_Adminhtml_Model_System_Config_Backend_Catalog_Inventory_Managestock + * @return Mage_CatalogInventory_Model_Config_Backend_Managestock */ protected function _afterSave() { diff --git a/app/code/core/Mage/CatalogInventory/etc/adminhtml/system.xml b/app/code/core/Mage/CatalogInventory/etc/adminhtml/system.xml new file mode 100644 index 0000000000000000000000000000000000000000..e7f58fdcd2d92966b167514b26cd1705c3d71af3 --- /dev/null +++ b/app/code/core/Mage/CatalogInventory/etc/adminhtml/system.xml @@ -0,0 +1,109 @@ +<?xml version="1.0"?> +<!-- +/** + * 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 Mage_CatalogInventory + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> + <system> + <section id="cataloginventory" translate="label" module="Mage_CatalogInventory" type="text" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Inventory</label> + <tab>catalog</tab> + <resource>Mage_CatalogInventory::cataloginventory</resource> + <group id="options" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Stock Options</label> + <field id="can_subtract" translate="label" type="select" sortOrder="2" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Decrease Stock When Order is Placed</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="can_back_in_stock" translate="label" type="select" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Set Items' Status to be In Stock When Order is Cancelled</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="show_out_of_stock" translate="label comment" type="select" sortOrder="3" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Display Out of Stock Products</label> + <comment>Products will still be shown by direct product URLs.</comment> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="stock_threshold_qty" translate="label" type="text" sortOrder="4" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Only X left Threshold</label> + <validate>validate-number</validate> + </field> + <field id="display_product_stock_status" translate="label" type="select" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Display products availability in stock in the frontend</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + </group> + <group id="item_options" translate="label comment" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> + <comment> + <![CDATA[<strong>Note</strong> that these settings are applicable to cart line items, not the whole cart.]]> +</comment> + <label>Product Stock Options</label> + <field id="manage_stock" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Manage Stock</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + <backend_model>Mage_CatalogInventory_Model_Config_Backend_Managestock</backend_model> + </field> + <field id="backorders" translate="label" type="select" sortOrder="3" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Backorders</label> + <source_model>Mage_CatalogInventory_Model_Source_Backorders</source_model> + </field> + <field id="max_sale_qty" translate="label" type="text" sortOrder="4" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Maximum Qty Allowed in Shopping Cart</label> + <validate>validate-number</validate> + </field> + <field id="min_qty" translate="label" type="text" sortOrder="5" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Qty for Item's Status to Become Out of Stock</label> + <validate>validate-number</validate> + <backend_model>Mage_CatalogInventory_Model_System_Config_Backend_Minqty</backend_model> + </field> + <field id="min_sale_qty" translate="label" sortOrder="6" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Minimum Qty Allowed in Shopping Cart</label> + <frontend_model>Mage_CatalogInventory_Block_Adminhtml_Form_Field_Minsaleqty</frontend_model> + <backend_model>Mage_CatalogInventory_Model_System_Config_Backend_Minsaleqty</backend_model> + </field> + <field id="notify_stock_qty" translate="label" type="text" sortOrder="7" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Notify for Quantity Below</label> + <validate>validate-number</validate> + </field> + <field id="auto_return" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Automatically Return Credit Memo Item to Stock</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="enable_qty_increments" translate="label" type="select" sortOrder="8" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Enable Qty Increments</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="qty_increments" translate="label" type="text" sortOrder="9" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Qty Increments</label> + <validate>validate-number validate-greater-than-zero</validate> + <backend_model>Mage_CatalogInventory_Model_System_Config_Backend_Qtyincrements</backend_model> + <depends> + <field id="enable_qty_increments">1</field> + </depends> + </field> + </group> + </section> + </system> +</config> diff --git a/app/code/core/Mage/CatalogInventory/etc/system.xml b/app/code/core/Mage/CatalogInventory/etc/system.xml deleted file mode 100644 index d8794a20c357c1074830a041f4675abb7b15b09c..0000000000000000000000000000000000000000 --- a/app/code/core/Mage/CatalogInventory/etc/system.xml +++ /dev/null @@ -1,195 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * 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 Mage_CatalogInventory - * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<config> - <sections> - <cataloginventory translate="label" module="Mage_CatalogInventory"> - <label>Inventory</label> - <tab>catalog</tab> - <frontend_type>text</frontend_type> - <sort_order>50</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <resource>Mage_CatalogInventory::cataloginventory</resource> - <groups> - <options translate="label"> - <label>Stock Options</label> - <frontend_type>text</frontend_type> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <can_subtract translate="label"> - <label>Decrease Stock When Order is Placed</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>2</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </can_subtract> - <can_back_in_stock translate="label"> - <label>Set Items' Status to be In Stock When Order is Cancelled</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <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> - </can_back_in_stock> - <show_out_of_stock translate="label comment"> - <label>Display Out of Stock Products</label> - <comment>Products will still be shown by direct product URLs.</comment> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>3</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </show_out_of_stock> - <stock_threshold_qty translate="label"> - <label>Only X left Threshold</label> - <frontend_type>text</frontend_type> - <validate>validate-number</validate> - <sort_order>4</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </stock_threshold_qty> - <display_product_stock_status translate="label"> - <label>Display products availability in stock in the frontend</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>50</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </display_product_stock_status> - </fields> - </options> - <item_options translate="label comment"> - <comment><![CDATA[<strong>Note</strong> that these settings are applicable to cart line items, not the whole cart.]]></comment> - <label>Product Stock Options</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> - <fields> - <manage_stock translate="label"> - <label>Manage Stock</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Catalog_Inventory_Managestock</backend_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </manage_stock> - <backorders translate="label"> - <label>Backorders</label> - <frontend_type>select</frontend_type> - <source_model>Mage_CatalogInventory_Model_Source_Backorders</source_model> - <sort_order>3</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </backorders> - <max_sale_qty translate="label"> - <label>Maximum Qty Allowed in Shopping Cart</label> - <frontend_type>text</frontend_type> - <validate>validate-number</validate> - <sort_order>4</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </max_sale_qty> - <min_qty translate="label"> - <label>Qty for Item's Status to Become Out of Stock</label> - <frontend_type>text</frontend_type> - <validate>validate-number</validate> - <backend_model>Mage_CatalogInventory_Model_System_Config_Backend_Minqty</backend_model> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </min_qty> - <min_sale_qty translate="label"> - <label>Minimum Qty Allowed in Shopping Cart</label> - <frontend_model>Mage_CatalogInventory_Block_Adminhtml_Form_Field_Minsaleqty</frontend_model> - <backend_model>Mage_CatalogInventory_Model_System_Config_Backend_Minsaleqty</backend_model> - <sort_order>6</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </min_sale_qty> - <notify_stock_qty translate="label"> - <label>Notify for Quantity Below</label> - <frontend_type>text</frontend_type> - <validate>validate-number</validate> - <sort_order>7</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </notify_stock_qty> - <auto_return translate="label"> - <label>Automatically Return Credit Memo Item to Stock</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>10</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </auto_return> - <enable_qty_increments translate="label"> - <label>Enable Qty Increments</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>8</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </enable_qty_increments> - <qty_increments translate="label"> - <label>Qty Increments</label> - <frontend_type>text</frontend_type> - <validate>validate-number validate-greater-than-zero</validate> - <backend_model>Mage_CatalogInventory_Model_System_Config_Backend_Qtyincrements</backend_model> - <sort_order>9</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - <depends><enable_qty_increments>1</enable_qty_increments></depends> - </qty_increments> - </fields> - </item_options> - </groups> - </cataloginventory> - </sections> -</config> diff --git a/app/code/core/Mage/CatalogSearch/Block/Advanced/Form.php b/app/code/core/Mage/CatalogSearch/Block/Advanced/Form.php index d86cd47f99662859e447ceee0f2f68fd5aab7fca..aea91416d4b24ea5e3d46bcb717eed8be0795973 100644 --- a/app/code/core/Mage/CatalogSearch/Block/Advanced/Form.php +++ b/app/code/core/Mage/CatalogSearch/Block/Advanced/Form.php @@ -304,7 +304,7 @@ class Mage_CatalogSearch_Block_Advanced_Form extends Mage_Core_Block_Template ->setId($attribute->getAttributeCode() . ($part == 'from' ? '' : '_' . $part)) ->setTitle($this->getAttributeLabel($attribute)) ->setValue($value) - ->setImage($this->getSkinUrl('Mage_Core::calendar.gif')) + ->setImage($this->getViewFileUrl('Mage_Core::calendar.gif')) ->setDateFormat(Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT)) ->setClass('input-text') ->getHtml(); diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Catalog/Search/Type.php b/app/code/core/Mage/CatalogSearch/Model/Config/Backend/Search/Type.php similarity index 86% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Catalog/Search/Type.php rename to app/code/core/Mage/CatalogSearch/Model/Config/Backend/Search/Type.php index 92c220973c3f9a004e470945f2806aa3433c03a2..6cc9510a37846f0988a9e99f4dcf9accc80d4aca 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Catalog/Search/Type.php +++ b/app/code/core/Mage/CatalogSearch/Model/Config/Backend/Search/Type.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_CatalogSearch * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -29,15 +29,15 @@ * Catalog Search change Search Type backend model * * @category Mage - * @package Mage_Adminhtml + * @package Mage_CatalogSearch * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Model_System_Config_Backend_Catalog_Search_Type extends Mage_Core_Model_Config_Data +class Mage_CatalogSearch_Model_Config_Backend_Search_Type extends Mage_Core_Model_Config_Data { /** * After change Catalog Search Type process * - * @return Mage_Adminhtml_Model_System_Config_Catalog_Search_Type + * @return Mage_CatalogSearch_Model_Config_Backend_Search_Type|Mage_Core_Model_Abstract */ protected function _afterSave() { diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Catalog/Search/Type.php b/app/code/core/Mage/CatalogSearch/Model/Config/Source/Search/Type.php similarity index 90% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Catalog/Search/Type.php rename to app/code/core/Mage/CatalogSearch/Model/Config/Source/Search/Type.php index 594837eeb4bdb7210eaac57eb156347d09fdf2e4..5c6b7d68c021522b50a6f62d4c4dc74e8490183d 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Catalog/Search/Type.php +++ b/app/code/core/Mage/CatalogSearch/Model/Config/Source/Search/Type.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_CatalogSearch * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -29,10 +29,10 @@ * Catalog search types * * @category Mage - * @package Mage_Adminhtml + * @package Mage_CatalogSearch * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Model_System_Config_Source_Catalog_Search_Type +class Mage_CatalogSearch_Model_Config_Source_Search_Type implements Mage_Core_Model_Option_ArrayInterface { public function toOptionArray() { diff --git a/app/code/core/Mage/CatalogSearch/Model/Fulltext/Observer.php b/app/code/core/Mage/CatalogSearch/Model/Fulltext/Observer.php index f8ecdcdf54ccf0e1258ae29a759ed45b970ea118..8cf4fd2fb2a9518a31c052658e368c30b827a391 100644 --- a/app/code/core/Mage/CatalogSearch/Model/Fulltext/Observer.php +++ b/app/code/core/Mage/CatalogSearch/Model/Fulltext/Observer.php @@ -110,7 +110,7 @@ class Mage_CatalogSearch_Model_Fulltext_Observer } if ($showNotice) { - $url = Mage::getSingleton('Mage_Adminhtml_Model_Url')->getUrl('adminhtml/system_cache'); + $url = Mage::getSingleton('Mage_Backend_Model_Url')->getUrl('adminhtml/system_cache'); Mage::getSingleton('Mage_Adminhtml_Model_Session')->addNotice( Mage::helper('Mage_CatalogSearch_Helper_Data')->__('Attribute setting change related with Search Index. Please run <a href="%s">Rebuild Search Index</a> process.', $url) ); diff --git a/app/code/core/Mage/CatalogSearch/etc/adminhtml/system.xml b/app/code/core/Mage/CatalogSearch/etc/adminhtml/system.xml new file mode 100644 index 0000000000000000000000000000000000000000..32240ac7fd3a2394a38cb03ca3eab2bf93405a57 --- /dev/null +++ b/app/code/core/Mage/CatalogSearch/etc/adminhtml/system.xml @@ -0,0 +1,65 @@ +<?xml version="1.0"?> +<!-- +/** + * 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 Mage_CatalogSearch + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> + <system> + <section id="catalog"> + <group id="seo"> + <field id="search_terms" translate="label" module="Mage_CatalogSearch" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Popular Search Terms</label> + <source_model>Mage_Backend_Model_Config_Source_Enabledisable</source_model> + </field> + </group> + <group id="search" translate="label" module="Mage_CatalogSearch" type="text" sortOrder="500" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Catalog Search</label> + <field id="min_query_length" translate="label" type="text" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Minimal Query Length</label> + <validate>validate-digits</validate> + </field> + <field id="max_query_length" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Maximum Query Length</label> + <validate>validate-digits</validate> + </field> + <field id="max_query_words" translate="label comment" type="text" sortOrder="15" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Maximum Query Words Count</label> + <validate>validate-digits</validate> + <comment>Applies for "Like" search type only.</comment> + </field> + <field id="search_type" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Search Type</label> + <backend_model>Mage_CatalogSearch_Model_Config_Backend_Search_Type</backend_model> + <source_model>Mage_CatalogSearch_Model_Config_Source_Search_Type</source_model> + </field> + <field id="use_layered_navigation_count" translate="label comment" type="text" sortOrder="25" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Apply Layered Navigation if Search Results are Less Than</label> + <validate>validate-digits</validate> + <comment>Enter "0" to enable layered navigation for any number of results.</comment> + </field> + </group> + </section> + </system> +</config> diff --git a/app/code/core/Mage/CatalogSearch/etc/system.xml b/app/code/core/Mage/CatalogSearch/etc/system.xml deleted file mode 100644 index dd07e3d35d36b21a4fdc6c3f94fe52ffd7dbc8fb..0000000000000000000000000000000000000000 --- a/app/code/core/Mage/CatalogSearch/etc/system.xml +++ /dev/null @@ -1,106 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * 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 Mage_CatalogSearch - * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<config> - <sections> - <catalog> - <groups> - <seo> - <fields> - <search_terms translate="label" module="Mage_CatalogSearch"> - <label>Popular Search Terms</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Enabledisable</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </search_terms> - </fields> - </seo> - <search translate="label" module="Mage_CatalogSearch"> - <label>Catalog Search</label> - <frontend_type>text</frontend_type> - <sort_order>500</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <min_query_length translate="label"> - <label>Minimal Query Length</label> - <frontend_type>text</frontend_type> - <validate>validate-digits</validate> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </min_query_length> - <max_query_length translate="label"> - <label>Maximum Query Length</label> - <frontend_type>text</frontend_type> - <validate>validate-digits</validate> - <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> - </max_query_length> - <max_query_words translate="label comment"> - <label>Maximum Query Words Count</label> - <frontend_type>text</frontend_type> - <validate>validate-digits</validate> - <sort_order>15</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <comment>Applies for "Like" search type only.</comment> - </max_query_words> - <search_type translate="label"> - <label>Search Type</label> - <frontend_type>select</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Catalog_Search_Type</backend_model> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Catalog_Search_Type</source_model> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </search_type> - <use_layered_navigation_count translate="label comment"> - <label>Apply Layered Navigation if Search Results are Less Than</label> - <frontend_type>text</frontend_type> - <validate>validate-digits</validate> - <sort_order>25</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <comment>Enter "0" to enable layered navigation for any number of results.</comment> - </use_layered_navigation_count> - </fields> - </search> - </groups> - </catalog> - </sections> -</config> diff --git a/app/code/core/Mage/CatalogSearch/view/frontend/form.mini.phtml b/app/code/core/Mage/CatalogSearch/view/frontend/form.mini.phtml index 0ed773da2c059572bd32ca870aa40191ac253eea..9fe57ce2fa496c95ef7046a89ab00f72665d2554 100644 --- a/app/code/core/Mage/CatalogSearch/view/frontend/form.mini.phtml +++ b/app/code/core/Mage/CatalogSearch/view/frontend/form.mini.phtml @@ -37,7 +37,7 @@ $helper = $this->helper('Mage_CatalogSearch_Helper_Data'); <script type="text/javascript"> //<![CDATA[ (function($) { - head.js("<?php echo $this->getSkinUrl('Mage_CatalogSearch::form-mini.js')?>", function() { + head.js("<?php echo $this->getViewFileUrl('Mage_CatalogSearch::form-mini.js')?>", function() { $('#search').catalogSearch({ formSelector: '#search_mini_form', placeholder: '<?php echo $helper->__('Search entire store here...') ?>', diff --git a/app/code/core/Mage/Centinel/Model/Service.php b/app/code/core/Mage/Centinel/Model/Service.php index ea93cc9b7d73e00973c97f61a77c6c3a78525c31..b1ea83d5aa6a89d0654160485e6ee8b58ecc53e5 100644 --- a/app/code/core/Mage/Centinel/Model/Service.php +++ b/app/code/core/Mage/Centinel/Model/Service.php @@ -120,7 +120,7 @@ class Mage_Centinel_Model_Service extends Varien_Object 'isIframe' => true ); if (Mage::app()->getStore()->isAdmin()) { - return Mage::getSingleton('Mage_Adminhtml_Model_Url')->getUrl('*/centinel_index/' . $suffix, $params); + return Mage::getSingleton('Mage_Backend_Model_Url')->getUrl('*/centinel_index/' . $suffix, $params); } else { return Mage::getUrl('centinel/index/' . $suffix, $params); } diff --git a/app/code/core/Mage/Centinel/etc/adminhtml/system.xml b/app/code/core/Mage/Centinel/etc/adminhtml/system.xml new file mode 100644 index 0000000000000000000000000000000000000000..6afd60132acdd51b63071da2b58ea56c8a88463b --- /dev/null +++ b/app/code/core/Mage/Centinel/etc/adminhtml/system.xml @@ -0,0 +1,58 @@ +<?xml version="1.0"?> +<!-- +/** + * 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 Mage_Centinel + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> + <system> + <section id="payment_services" translate="label" module="Mage_Payment" type="text" sortOrder="450" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Payment Services</label> + <tab>sales</tab> + <resource>Mage_Payment::payment_services</resource> + <group id="centinel" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>3D Secure Credit Card Validation</label> + <field id="processor_id" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Processor ID</label> + </field> + <field id="merchant_id" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Merchant ID</label> + </field> + <field id="password" translate="label" type="obscure" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Password</label> + <backend_model>Mage_Backend_Model_Config_Backend_Encrypted</backend_model> + </field> + <field id="test_mode" translate="label comment" type="select" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Test Mode</label> + <comment>Overrides API URL that may be specified by a payment method.</comment> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="debug" translate="label" type="select" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Debug Mode</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + </group> + </section> + </system> +</config> diff --git a/app/code/core/Mage/Centinel/etc/system.xml b/app/code/core/Mage/Centinel/etc/system.xml deleted file mode 100644 index ef8664762520d1f7dc25f822eb18383c5bfb9b2b..0000000000000000000000000000000000000000 --- a/app/code/core/Mage/Centinel/etc/system.xml +++ /dev/null @@ -1,97 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * 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 Mage_Centinel - * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<config> - <sections> - <payment_services translate="label" module="Mage_Payment"> - <label>Payment Services</label> - <tab>sales</tab> - <frontend_type>text</frontend_type> - <sort_order>450</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <resource>Mage_Payment::payment_services</resource> - <groups> - <centinel translate="label"> - <label>3D Secure Credit Card Validation</label> - <frontend_type>text</frontend_type> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <fields> - <processor_id translate="label"> - <label>Processor ID</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>0</show_in_store> - </processor_id> - <merchant_id translate="label"> - <label>Merchant ID</label> - <frontend_type>text</frontend_type> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </merchant_id> - <password translate="label"> - <label>Password</label> - <frontend_type>obscure</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Encrypted</backend_model> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </password> - <test_mode translate="label comment"> - <label>Test Mode</label> - <comment>Overrides API URL that may be specified by a payment method.</comment> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>40</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </test_mode> - <debug translate="label"> - <label>Debug Mode</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>50</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </debug> - </fields> - </centinel> - </groups> - </payment_services> - </sections> -</config> diff --git a/app/code/core/Mage/Centinel/view/frontend/logo.phtml b/app/code/core/Mage/Centinel/view/frontend/logo.phtml index 4533d21288df661972cc3c83dfbf1c482919ac65..1249652c02b057387bcc09604c276cccdc1d1159 100644 --- a/app/code/core/Mage/Centinel/view/frontend/logo.phtml +++ b/app/code/core/Mage/Centinel/view/frontend/logo.phtml @@ -27,7 +27,7 @@ <li class="centinel-logos" id="<?php echo $this->getCode() ?>_centinel_logo"> <label><?php echo $this->__('To ensure the security of your transactions') ?></label> <div class="input-box"> - <a href="#" title="<?php echo $this->__('Verified by Visa') ?> "onclick="popWin('<?php echo $this->helper('Mage_Centinel_Helper_Data')->getVisaLearnMorePageUrl()?>', 'verifiedByVisa', 'width=815,height=600,left=0,top=0,location=no,status=yes,scrollbars=yes,resizable=yes'); return false;"><img src="<?php echo $this->getSkinUrl('Mage_Centinel::images/vbv_ltbg_71x57.gif'); ?>" alt="<?php echo $this->__('Verified by Visa') ?>" /></a> - <a href="#" title="<?php echo $this->__('MasterCard SecureCode'); ?>" onclick="popWin('<?php echo $this->helper('Mage_Centinel_Helper_Data')->getMastercardLearnMorePageUrl()?>', 'secureCode', 'width=600,height=403,left=0,top=0,location=no,status=yes,scrollbars=yes,resizable=yes'); return false;"><img src="<?php echo $this->getSkinUrl('Mage_Centinel::images/sc_learn_62x34.gif'); ?>" alt="<?php echo $this->__('MasterCard SecureCode') ?>" /></a> + <a href="#" title="<?php echo $this->__('Verified by Visa') ?> "onclick="popWin('<?php echo $this->helper('Mage_Centinel_Helper_Data')->getVisaLearnMorePageUrl()?>', 'verifiedByVisa', 'width=815,height=600,left=0,top=0,location=no,status=yes,scrollbars=yes,resizable=yes'); return false;"><img src="<?php echo $this->getViewFileUrl('Mage_Centinel::images/vbv_ltbg_71x57.gif'); ?>" alt="<?php echo $this->__('Verified by Visa') ?>" /></a> + <a href="#" title="<?php echo $this->__('MasterCard SecureCode'); ?>" onclick="popWin('<?php echo $this->helper('Mage_Centinel_Helper_Data')->getMastercardLearnMorePageUrl()?>', 'secureCode', 'width=600,height=403,left=0,top=0,location=no,status=yes,scrollbars=yes,resizable=yes'); return false;"><img src="<?php echo $this->getViewFileUrl('Mage_Centinel::images/sc_learn_62x34.gif'); ?>" alt="<?php echo $this->__('MasterCard SecureCode') ?>" /></a> </div> </li> diff --git a/app/code/core/Mage/Checkout/Model/Config/Source/Cart/Summary.php b/app/code/core/Mage/Checkout/Model/Config/Source/Cart/Summary.php index 658a86b573f1c750399ad3f0089f7a880c4b5f4f..449eb4b2c9858dd4500b3f12cb9e4a7fa4289899 100644 --- a/app/code/core/Mage/Checkout/Model/Config/Source/Cart/Summary.php +++ b/app/code/core/Mage/Checkout/Model/Config/Source/Cart/Summary.php @@ -23,7 +23,7 @@ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Checkout_Model_Config_Source_Cart_Summary +class Mage_Checkout_Model_Config_Source_Cart_Summary implements Mage_Core_Model_Option_ArrayInterface { public function toOptionArray() { diff --git a/app/code/core/Mage/Checkout/etc/adminhtml/system.xml b/app/code/core/Mage/Checkout/etc/adminhtml/system.xml new file mode 100644 index 0000000000000000000000000000000000000000..67f2770eab49d36c6aa2bfd1de0eedf6e803c7a6 --- /dev/null +++ b/app/code/core/Mage/Checkout/etc/adminhtml/system.xml @@ -0,0 +1,116 @@ +<?xml version="1.0"?> +<!-- +/** + * 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 Mage_Checkout + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> + <system> + <section id="checkout" translate="label" module="Mage_Checkout" type="text" sortOrder="305" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Checkout</label> + <tab>sales</tab> + <resource>Mage_Checkout::checkout</resource> + <group id="options" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Checkout Options</label> + <field id="onepage_checkout_enabled" translate="label" type="select" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Enable Onepage Checkout</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="guest_checkout" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Allow Guest Checkout</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="customer_must_be_logged" translate="label" type="select" sortOrder="15" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Require Customer To Be Logged In To Checkout</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + <depends> + <field id="guest_checkout">0</field> + </depends> + </field> + <field id="enable_agreements" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Enable Terms and Conditions</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + </group> + <group id="cart" translate="label" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Shopping Cart</label> + <field id="delete_quote_after" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Quote Lifetime (days)</label> + </field> + <field id="redirect_to_cart" translate="label" type="select" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>After Adding a Product Redirect to Shopping Cart</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="grouped_product_image" translate="label" type="select" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Grouped Product Image</label> + <source_model>Mage_Catalog_Model_Config_Source_Product_Thumbnail</source_model> + </field> + <field id="configurable_product_image" translate="label" type="select" sortOrder="4" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Configurable Product Image</label> + <source_model>Mage_Catalog_Model_Config_Source_Product_Thumbnail</source_model> + </field> + </group> + <group id="cart_link" translate="label" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>My Cart Link</label> + <field id="use_qty" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Display Cart Summary</label> + <source_model>Mage_Checkout_Model_Config_Source_Cart_Summary</source_model> + </field> + </group> + <group id="sidebar" translate="label" sortOrder="4" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Shopping Cart Sidebar</label> + <field id="display" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Display Shopping Cart Sidebar</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="count" translate="label" type="text" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Maximum Display Recently Added Item(s)</label> + </field> + </group> + <group id="payment_failed" translate="label" type="text" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Payment Failed Emails</label> + <field id="identity" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Payment Failed Email Sender</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Identity</source_model> + </field> + <field id="reciever" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Payment Failed Email Reciever</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Identity</source_model> + </field> + <field id="template" translate="label" type="select" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Payment Failed Template</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Template</source_model> + </field> + <field id="copy_to" translate="label comment" type="text" sortOrder="4" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Send Payment Failed Email Copy To</label> + <comment>Separate by ",".</comment> + </field> + <field id="copy_method" translate="label" type="select" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Send Payment Failed Email Copy Method</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Method</source_model> + </field> + </group> + </section> + </system> +</config> diff --git a/app/code/core/Mage/Checkout/etc/system.xml b/app/code/core/Mage/Checkout/etc/system.xml deleted file mode 100644 index 481c0b6e7930e04d753f631bab1ce0b20df412a5..0000000000000000000000000000000000000000 --- a/app/code/core/Mage/Checkout/etc/system.xml +++ /dev/null @@ -1,237 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * 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 Mage_Checkout - * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<config> - <sections> - <checkout translate="label" module="Mage_Checkout"> - <label>Checkout</label> - <tab>sales</tab> - <frontend_type>text</frontend_type> - <sort_order>305</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <resource>Mage_Checkout::checkout</resource> - <groups> - <options translate="label"> - <label>Checkout Options</label> - <frontend_type>text</frontend_type> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <onepage_checkout_enabled translate="label"> - <label>Enable Onepage Checkout</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </onepage_checkout_enabled> - <guest_checkout translate="label"> - <label>Allow Guest Checkout</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <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> - </guest_checkout> - <customer_must_be_logged translate="label"> - <label>Require Customer To Be Logged In To Checkout</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <depends><guest_checkout>0</guest_checkout></depends> - <sort_order>15</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </customer_must_be_logged> - <enable_agreements translate="label"> - <label>Enable Terms and Conditions</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </enable_agreements> - </fields> - </options> - - <cart translate="label"> - <label>Shopping Cart</label> - <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> - <fields> - <delete_quote_after translate="label"> - <label>Quote Lifetime (days)</label> - <frontend_type>text</frontend_type> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </delete_quote_after> - <redirect_to_cart translate="label"> - <label>After Adding a Product Redirect to Shopping Cart</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <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> - </redirect_to_cart> - <grouped_product_image translate="label"> - <label>Grouped Product Image</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Product_Thumbnail</source_model> - <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> - </grouped_product_image> - <configurable_product_image translate="label"> - <label>Configurable Product Image</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Product_Thumbnail</source_model> - <sort_order>4</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </configurable_product_image> - </fields> - </cart> - - <cart_link translate="label"> - <label>My Cart Link</label> - <sort_order>3</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <fields> - <use_qty translate="label"> - <label>Display Cart Summary</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Checkout_Model_Config_Source_Cart_Summary</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </use_qty> - </fields> - </cart_link> - - <sidebar translate="label"> - <label>Shopping Cart Sidebar</label> - <sort_order>4</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <display translate="label"> - <label>Display Shopping Cart Sidebar</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </display> - <count translate="label"> - <label>Maximum Display Recently Added Item(s)</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> - </count> - </fields> - </sidebar> - - <payment_failed translate="label"> - <label>Payment Failed Emails</label> - <frontend_type>text</frontend_type> - <sort_order>100</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <identity translate="label"> - <label>Payment Failed Email Sender</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Identity</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </identity> - <reciever translate="label"> - <label>Payment Failed Email Reciever</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Identity</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </reciever> - <template translate="label"> - <label>Payment Failed Template</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Template</source_model> - <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> - </template> - <copy_to translate="label comment"> - <label>Send Payment Failed Email Copy To</label> - <frontend_type>text</frontend_type> - <sort_order>4</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <comment>Separate by ",".</comment> - </copy_to> - <copy_method translate="label"> - <label>Send Payment Failed Email Copy Method</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Method</source_model> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </copy_method> - </fields> - </payment_failed> - </groups> - </checkout> - </sections> -</config> diff --git a/app/code/core/Mage/Checkout/view/frontend/cart.phtml b/app/code/core/Mage/Checkout/view/frontend/cart.phtml index a04f35412d2f9d432a0b678f89d567e48cccfefd..d4e87aea5da0c118bc903ed6316f3afeac8197f5 100644 --- a/app/code/core/Mage/Checkout/view/frontend/cart.phtml +++ b/app/code/core/Mage/Checkout/view/frontend/cart.phtml @@ -107,7 +107,7 @@ <script type="text/javascript"> //<![CDATA[ (function($) { - head.js("<?php echo $this->getSkinUrl('Mage_Checkout::js/shopping-cart.js')?>", + head.js("<?php echo $this->getViewFileUrl('Mage_Checkout::js/shopping-cart.js')?>", function() { // Internet Explorer (lt 8) does not support value attribute in button elements $('#shopping-cart-table').shoppingCart({ diff --git a/app/code/core/Mage/Checkout/view/frontend/cart/coupon.phtml b/app/code/core/Mage/Checkout/view/frontend/cart/coupon.phtml index 0d9f7ca71f9f245b7c322ac4dd1cb632d276d2c9..f3763590e2bdff3897c1474cda43ef0ae07465f2 100644 --- a/app/code/core/Mage/Checkout/view/frontend/cart/coupon.phtml +++ b/app/code/core/Mage/Checkout/view/frontend/cart/coupon.phtml @@ -45,12 +45,12 @@ <script type="text/javascript"> //<![CDATA[ (function($) { - head.js("<?php echo $this->getSkinUrl('jquery/jquery.validate.js')?>", - "<?php echo $this->getSkinUrl('jquery/additional-methods.js')?>", - "<?php echo $this->getSkinUrl('jquery/jquery.metadata.js')?>", - "<?php echo $this->getSkinUrl('jquery/jquery.hook.js')?>", - "<?php echo $this->getSkinUrl('mage/validation/validate.js')?>", - "<?php echo $this->getSkinUrl('Mage_Checkout::js/discount-codes.js')?>", function() { + head.js("<?php echo $this->getViewFileUrl('jquery/jquery.validate.js')?>", + "<?php echo $this->getViewFileUrl('jquery/additional-methods.js')?>", + "<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js')?>", + "<?php echo $this->getViewFileUrl('jquery/jquery.hook.js')?>", + "<?php echo $this->getViewFileUrl('mage/validation/validate.js')?>", + "<?php echo $this->getViewFileUrl('Mage_Checkout::js/discount-codes.js')?>", function() { $('#discount-coupon-form').discountCode({ couponCodeSelector: '#coupon_code', removeCouponSelector: '#remove-coupon', applyButton: 'button.apply-coupon', cancelButton: 'button.cancel-coupon' diff --git a/app/code/core/Mage/Checkout/view/frontend/cart/item/configure/updatecart.phtml b/app/code/core/Mage/Checkout/view/frontend/cart/item/configure/updatecart.phtml index 5ea7ae3f03564ff3ab010200ae11b53e1d1ca9c3..87ce4d9eb1a85d77500e31b6353f0c4da9a0277a 100644 --- a/app/code/core/Mage/Checkout/view/frontend/cart/item/configure/updatecart.phtml +++ b/app/code/core/Mage/Checkout/view/frontend/cart/item/configure/updatecart.phtml @@ -47,11 +47,11 @@ }; cartData.cartFormData.push(initData); }); - $.mage.load.js("<?php echo $this->getSkinUrl('jquery/jquery.validate.js')?>"); - $.mage.load.js("<?php echo $this->getSkinUrl('jquery/jquery.metadata.js')?>"); - $.mage.load.js("<?php echo $this->getSkinUrl('jquery/jquery.hook.js')?>"); - $.mage.load.jsSync("<?php echo $this->getSkinUrl('Mage_Catalog::js/msrp.js') ?>"); - $.mage.load.js("<?php echo $this->getSkinUrl('mage/validation/validate.js')?>"); + $.mage.load.js("<?php echo $this->getViewFileUrl('jquery/jquery.validate.js')?>"); + $.mage.load.js("<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js')?>"); + $.mage.load.js("<?php echo $this->getViewFileUrl('jquery/jquery.hook.js')?>"); + $.mage.load.jsSync("<?php echo $this->getViewFileUrl('Mage_Catalog::js/msrp.js') ?>"); + $.mage.load.js("<?php echo $this->getViewFileUrl('mage/validation/validate.js')?>"); })(jQuery); //]]> diff --git a/app/code/core/Mage/Checkout/view/frontend/cart/shipping.phtml b/app/code/core/Mage/Checkout/view/frontend/cart/shipping.phtml index 2ee2edb6703d8a1e75acb4951b75edab653fb360..12b6e9796af309261da71dfc3737694d732f3d53 100644 --- a/app/code/core/Mage/Checkout/view/frontend/cart/shipping.phtml +++ b/app/code/core/Mage/Checkout/view/frontend/cart/shipping.phtml @@ -70,12 +70,12 @@ <script type="text/javascript"> (function ($) { head.js( - "<?php echo $this->getSkinUrl('jquery/jquery.validate.js') ?>", - "<?php echo $this->getSkinUrl('jquery/additional-methods.js') ?>", - "<?php echo $this->getSkinUrl('jquery/jquery.metadata.js') ?>", - "<?php echo $this->getSkinUrl('jquery/jquery.hook.js') ?>", - "<?php echo $this->getSkinUrl('mage/validation/validate.js') ?>", - "<?php echo $this->getSkinUrl('Mage_Checkout::js/region-updater.js') ?>", + "<?php echo $this->getViewFileUrl('jquery/jquery.validate.js') ?>", + "<?php echo $this->getViewFileUrl('jquery/additional-methods.js') ?>", + "<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js') ?>", + "<?php echo $this->getViewFileUrl('jquery/jquery.hook.js') ?>", + "<?php echo $this->getViewFileUrl('mage/validation/validate.js') ?>", + "<?php echo $this->getViewFileUrl('Mage_Checkout::js/region-updater.js') ?>", function() { $('#country').regionUpdater({ regionListId: '#region_id', diff --git a/app/code/core/Mage/Checkout/view/frontend/cart/sidebar.phtml b/app/code/core/Mage/Checkout/view/frontend/cart/sidebar.phtml index d9a533e3eeabead22fbf32c8e84b3e58efb03bc4..8331a82bc2fc8e1c84079a775612465e011fbe57 100644 --- a/app/code/core/Mage/Checkout/view/frontend/cart/sidebar.phtml +++ b/app/code/core/Mage/Checkout/view/frontend/cart/sidebar.phtml @@ -86,7 +86,7 @@ o.confirmMessage = '<?php echo $this->__('Are you sure you would like to remove this item from the shopping cart?') ?>', o.closeList = '#cart-sidebar a.btn-remove' }); - $.mage.load.jsSync("<?php echo $this->getSkinUrl('Mage_Checkout::js/sidebar.js') ?>"); + $.mage.load.jsSync("<?php echo $this->getViewFileUrl('Mage_Checkout::js/sidebar.js') ?>"); })(jQuery); </script> <?php else: ?> diff --git a/app/code/core/Mage/Checkout/view/frontend/multishipping/billing.phtml b/app/code/core/Mage/Checkout/view/frontend/multishipping/billing.phtml index f1a77560f88a7bb9cd52501096a8bf6a429d2873..bb4ef7b36347828793878dbc19bd3732fab3a8ba 100644 --- a/app/code/core/Mage/Checkout/view/frontend/multishipping/billing.phtml +++ b/app/code/core/Mage/Checkout/view/frontend/multishipping/billing.phtml @@ -36,7 +36,7 @@ <h1><?php echo $this->__('Billing Information') ?></h1> </div> <?php echo $this->getMessagesBlock()->getGroupedHtml() ?> - <script src="<?php echo $this->getSkinUrl('Mage_Checkout::multishipping/payment.js') ?>" type="text/javascript"></script> + <script src="<?php echo $this->getViewFileUrl('Mage_Checkout::multishipping/payment.js') ?>" type="text/javascript"></script> <form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="multishipping-billing-form"> <div class="col2-set"> <div class="col-1 col-narrow"> @@ -58,7 +58,7 @@ <div class="box-content"> <div class="tool-tip" id="payment-tool-tip" style="display:none;"> <div class="btn-close"><a href="#" id="payment-tool-tip-close" title="<?php echo $this->__('Close') ?>"><?php echo $this->__('Close') ?></a></div> - <div class="tool-tip-content"><img src="<?php echo $this->getSkinUrl('Mage_Checkout::cvv.gif') ?>" alt="<?php echo $this->__('Card Verification Number Visual Reference') ?>" title="<?php echo $this->__('Card Verification Number Visual Reference') ?>" /></div> + <div class="tool-tip-content"><img src="<?php echo $this->getViewFileUrl('Mage_Checkout::cvv.gif') ?>" alt="<?php echo $this->__('Card Verification Number Visual Reference') ?>" title="<?php echo $this->__('Card Verification Number Visual Reference') ?>" /></div> </div> <!-- Payment methods forms list --> <dl class="sp-methods"> diff --git a/app/code/core/Mage/Checkout/view/frontend/multishipping/overview.phtml b/app/code/core/Mage/Checkout/view/frontend/multishipping/overview.phtml index 5361887ecf3023ca6ae0a3b944e71390da6c30bf..bc5e519baa9e0d708738316c72534055d2490ccf 100644 --- a/app/code/core/Mage/Checkout/view/frontend/multishipping/overview.phtml +++ b/app/code/core/Mage/Checkout/view/frontend/multishipping/overview.phtml @@ -201,7 +201,7 @@ </div> </div> <span class="please-wait" id="review-please-wait" style="display:none;"> - <img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo $this->__('Submitting order information...') ?>" title="<?php echo $this->__('Submitting order information...') ?>" class="v-middle" /> <?php echo $this->__('Submitting order information...') ?> + <img src="<?php echo $this->getViewFileUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo $this->__('Submitting order information...') ?>" title="<?php echo $this->__('Submitting order information...') ?>" class="v-middle" /> <?php echo $this->__('Submitting order information...') ?> </span> </div> </div> diff --git a/app/code/core/Mage/Checkout/view/frontend/onepage.phtml b/app/code/core/Mage/Checkout/view/frontend/onepage.phtml index 6f6cf8ca1df2dca6c49bb85b8c73760769b725ab..b9fad9e51c7678594dadda76f4ac0d9cf5c3ad6c 100644 --- a/app/code/core/Mage/Checkout/view/frontend/onepage.phtml +++ b/app/code/core/Mage/Checkout/view/frontend/onepage.phtml @@ -27,8 +27,8 @@ <div class="page-title"> <h1><?php echo $this->__('Checkout') ?></h1> </div> -<script type="text/javascript" src="<?php echo $this->getSkinUrl('Mage_Checkout::onepage/accordion.js') ?>"></script> -<script type="text/javascript" src="<?php echo $this->getSkinUrl('Mage_Checkout::opcheckout.js') ?>"></script> +<script type="text/javascript" src="<?php echo $this->getViewFileUrl('Mage_Checkout::onepage/accordion.js') ?>"></script> +<script type="text/javascript" src="<?php echo $this->getViewFileUrl('Mage_Checkout::opcheckout.js') ?>"></script> <ol class="opc" id="checkoutSteps"> <?php $i=0; foreach($this->getSteps() as $_stepId => $_stepInfo): ?> <?php if (!$this->getChildBlock($_stepId) || !$this->getChildBlock($_stepId)->isShow()): continue; endif; $i++ ?> diff --git a/app/code/core/Mage/Checkout/view/frontend/onepage/billing.phtml b/app/code/core/Mage/Checkout/view/frontend/onepage/billing.phtml index 14f44063f305130283d3f1a0ad7ac4bb4a77ff5c..e7200deea7c70017d65e6af2a278c83a0f67aff1 100644 --- a/app/code/core/Mage/Checkout/view/frontend/onepage/billing.phtml +++ b/app/code/core/Mage/Checkout/view/frontend/onepage/billing.phtml @@ -198,7 +198,7 @@ <p class="required"><?php echo $this->__('* Required Fields') ?></p> <button type="button" title="<?php echo $this->__('Continue') ?>" class="button" onclick="billing.save()"><span><span><?php echo $this->__('Continue') ?></span></span></button> <span class="please-wait" id="billing-please-wait" style="display:none;"> - <img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo $this->__('Loading next step...') ?>" title="<?php echo $this->__('Loading next step...') ?>" class="v-middle" /> <?php echo $this->__('Loading next step...') ?> + <img src="<?php echo $this->getViewFileUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo $this->__('Loading next step...') ?>" title="<?php echo $this->__('Loading next step...') ?>" class="v-middle" /> <?php echo $this->__('Loading next step...') ?> </span> </div> </fieldset> diff --git a/app/code/core/Mage/Checkout/view/frontend/onepage/payment.phtml b/app/code/core/Mage/Checkout/view/frontend/onepage/payment.phtml index 23b2413774f451ccd7611a9d6b4eeed2a2361675..286ab317ea8cd830951ad0b16962a0be2e853794 100644 --- a/app/code/core/Mage/Checkout/view/frontend/onepage/payment.phtml +++ b/app/code/core/Mage/Checkout/view/frontend/onepage/payment.phtml @@ -39,14 +39,14 @@ </form> <div class="tool-tip" id="payment-tool-tip" style="display:none;"> <div class="btn-close"><a href="#" id="payment-tool-tip-close" title="<?php echo $this->__('Close') ?>"><?php echo $this->__('Close') ?></a></div> - <div class="tool-tip-content"><img src="<?php echo $this->getSkinUrl('Mage_Checkout::cvv.gif') ?>" alt="<?php echo $this->__('Card Verification Number Visual Reference') ?>" title="<?php echo $this->__('Card Verification Number Visual Reference') ?>" /></div> + <div class="tool-tip-content"><img src="<?php echo $this->getViewFileUrl('Mage_Checkout::cvv.gif') ?>" alt="<?php echo $this->__('Card Verification Number Visual Reference') ?>" title="<?php echo $this->__('Card Verification Number Visual Reference') ?>" /></div> </div> <div class="buttons-set" id="payment-buttons-container"> <p class="required"><?php echo $this->__('* Required Fields') ?></p> <p class="back-link"><a href="#" onclick="checkout.back(); return false;"><small>« </small><?php echo $this->__('Back') ?></a></p> <button type="button" class="button" onclick="payment.save()"><span><span><?php echo $this->__('Continue') ?></span></span></button> <span class="please-wait" id="payment-please-wait" style="display:none;"> - <img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo $this->__('Loading next step...') ?>" title="<?php echo $this->__('Loading next step...') ?>" class="v-middle" /> <?php echo $this->__('Loading next step...') ?> + <img src="<?php echo $this->getViewFileUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo $this->__('Loading next step...') ?>" title="<?php echo $this->__('Loading next step...') ?>" class="v-middle" /> <?php echo $this->__('Loading next step...') ?> </span> </div> <script type="text/javascript"> diff --git a/app/code/core/Mage/Checkout/view/frontend/onepage/review/info.phtml b/app/code/core/Mage/Checkout/view/frontend/onepage/review/info.phtml index 4ed6474be9dfae5cdaa0d53cf2586604c8fa5f13..84488c8be75cfa6426f34930c7d4687d51eb90c7 100644 --- a/app/code/core/Mage/Checkout/view/frontend/onepage/review/info.phtml +++ b/app/code/core/Mage/Checkout/view/frontend/onepage/review/info.phtml @@ -73,7 +73,7 @@ <p class="f-left"><?php echo $this->__('Forgot an Item?') ?> <a href="<?php echo $this->getUrl('checkout/cart') ?>"><?php echo $this->__('Edit Your Cart') ?></a></p> <?php echo $this->getChildHtml('button') ?> <span class="please-wait" id="review-please-wait" style="display:none;"> - <img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo $this->__('Submitting order information...') ?>" title="<?php echo $this->__('Submitting order information...') ?>" class="v-middle" /> <?php echo $this->__('Submitting order information...') ?> + <img src="<?php echo $this->getViewFileUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo $this->__('Submitting order information...') ?>" title="<?php echo $this->__('Submitting order information...') ?>" class="v-middle" /> <?php echo $this->__('Submitting order information...') ?> </span> </div> <script type="text/javascript"> diff --git a/app/code/core/Mage/Checkout/view/frontend/onepage/shipping.phtml b/app/code/core/Mage/Checkout/view/frontend/onepage/shipping.phtml index 315f2b2ac1bc50bcc8e4363f57cbe12e1113619e..01f5165a747ca308f0191bc9021fbd7aeb82988d 100644 --- a/app/code/core/Mage/Checkout/view/frontend/onepage/shipping.phtml +++ b/app/code/core/Mage/Checkout/view/frontend/onepage/shipping.phtml @@ -138,7 +138,7 @@ <p class="back-link"><a href="#" onclick="checkout.back(); return false;"><small>« </small><?php echo $this->__('Back') ?></a></p> <button type="button" class="button" title="<?php echo $this->__('Continue') ?>" onclick="shipping.save()"><span><span><?php echo $this->__('Continue') ?></span></span></button> <span id="shipping-please-wait" class="please-wait" style="display:none;"> - <img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo $this->__('Loading next step...') ?>" title="<?php echo $this->__('Loading next step...') ?>" class="v-middle" /> <?php echo $this->__('Loading next step...') ?> + <img src="<?php echo $this->getViewFileUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo $this->__('Loading next step...') ?>" title="<?php echo $this->__('Loading next step...') ?>" class="v-middle" /> <?php echo $this->__('Loading next step...') ?> </span> </div> </form> diff --git a/app/code/core/Mage/Checkout/view/frontend/onepage/shipping_method.phtml b/app/code/core/Mage/Checkout/view/frontend/onepage/shipping_method.phtml index cbaaa6a0899adde3df9f0a93356860b372a25623..b8d9e00f3ec68389be99611072078e42be916d97 100644 --- a/app/code/core/Mage/Checkout/view/frontend/onepage/shipping_method.phtml +++ b/app/code/core/Mage/Checkout/view/frontend/onepage/shipping_method.phtml @@ -40,7 +40,7 @@ <p class="back-link"><a href="#" onclick="checkout.back(); return false;"><small>« </small><?php echo $this->__('Back') ?></a></p> <button type="button" class="button" onclick="shippingMethod.save()"><span><span><?php echo $this->__('Continue') ?></span></span></button> <span id="shipping-method-please-wait" class="please-wait" style="display:none;"> - <img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo $this->__('Loading next step...') ?>" title="<?php echo $this->__('Loading next step...') ?>" class="v-middle" /> <?php echo $this->__('Loading next step...') ?> + <img src="<?php echo $this->getViewFileUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo $this->__('Loading next step...') ?>" title="<?php echo $this->__('Loading next step...') ?>" class="v-middle" /> <?php echo $this->__('Loading next step...') ?> </span> </div> </form> diff --git a/app/code/core/Mage/Cms/Controller/Router.php b/app/code/core/Mage/Cms/Controller/Router.php index 9674e0fae008bc05b80ec5019de08c49e87eef38..879848be5e29d20377bb0eed736e6d27415a69df 100644 --- a/app/code/core/Mage/Cms/Controller/Router.php +++ b/app/code/core/Mage/Cms/Controller/Router.php @@ -34,6 +34,23 @@ */ class Mage_Cms_Controller_Router extends Mage_Core_Controller_Varien_Router_Abstract { + /** + * Event manager + * + * @var Mage_Core_Model_Event_Manager + */ + protected $_eventManager; + + /** + * Class constructor + * + * @param Mage_Core_Model_Event_Manager $eventManager + */ + public function __construct(Mage_Core_Model_Event_Manager $eventManager) + { + $this->_eventManager = $eventManager; + } + /** * Initialize Controller Router * @@ -70,7 +87,7 @@ class Mage_Cms_Controller_Router extends Mage_Core_Controller_Varien_Router_Abst 'identifier' => $identifier, 'continue' => true )); - Mage::dispatchEvent('cms_controller_router_match_before', array( + $this->_eventManager->dispatch('cms_controller_router_match_before', array( 'router' => $this, 'condition' => $condition )); @@ -81,7 +98,7 @@ class Mage_Cms_Controller_Router extends Mage_Core_Controller_Varien_Router_Abst ->setRedirect($condition->getRedirectUrl()) ->sendResponse(); $request->setDispatched(true); - return Mage::getControllerInstance('Mage_Core_Controller_Varien_Action_Forward', + return Mage::getControllerInstance('Mage_Core_Controller_Varien_Action_Redirect', $request, Mage::app()->getFrontController()->getResponse() ); diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Cms/Page.php b/app/code/core/Mage/Cms/Model/Config/Source/Page.php similarity index 91% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Cms/Page.php rename to app/code/core/Mage/Cms/Model/Config/Source/Page.php index 107c8986834d1754450a9813b682d4d879b25a70..67c2ff6f54544ede586f8406a2042736f8055527 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Cms/Page.php +++ b/app/code/core/Mage/Cms/Model/Config/Source/Page.php @@ -19,11 +19,11 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Cms * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Adminhtml_Model_System_Config_Source_Cms_Page +class Mage_Cms_Model_Config_Source_Page implements Mage_Core_Model_Option_ArrayInterface { protected $_options; diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Cms/Wysiwyg/Enabled.php b/app/code/core/Mage/Cms/Model/Config/Source/Wysiwyg/Enabled.php similarity index 93% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Cms/Wysiwyg/Enabled.php rename to app/code/core/Mage/Cms/Model/Config/Source/Wysiwyg/Enabled.php index 4e18f373a30d8cf67988e56280d5ef6418785fa7..36e3071809ab06b7ae364a27cf07990933587ffa 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Cms/Wysiwyg/Enabled.php +++ b/app/code/core/Mage/Cms/Model/Config/Source/Wysiwyg/Enabled.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Cms * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -31,7 +31,7 @@ * @package Mage_Cms * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Model_System_Config_Source_Cms_Wysiwyg_Enabled +class Mage_Cms_Model_Config_Source_Wysiwyg_Enabled implements Mage_Core_Model_Option_ArrayInterface { public function toOptionArray() { diff --git a/app/code/core/Mage/Cms/Model/Wysiwyg/Config.php b/app/code/core/Mage/Cms/Model/Wysiwyg/Config.php index 77730d49bb1af614059165292ec4b2d3b01d8496..93df9243b007a197143bba48f0098200020c9601 100644 --- a/app/code/core/Mage/Cms/Model/Wysiwyg/Config.php +++ b/app/code/core/Mage/Cms/Model/Wysiwyg/Config.php @@ -71,11 +71,11 @@ class Mage_Cms_Model_Wysiwyg_Config extends Varien_Object 'no_display' => false, 'translator' => Mage::helper('Mage_Cms_Helper_Data'), 'encode_directives' => true, - 'directives_url' => Mage::getSingleton('Mage_Adminhtml_Model_Url')->getUrl('*/cms_wysiwyg/directive'), + 'directives_url' => Mage::getSingleton('Mage_Backend_Model_Url')->getUrl('*/cms_wysiwyg/directive'), 'popup_css' => - $design->getSkinUrl('mage/adminhtml/wysiwyg/tiny_mce/themes/advanced/skins/default/dialog.css'), + $design->getViewFileUrl('mage/adminhtml/wysiwyg/tiny_mce/themes/advanced/skins/default/dialog.css'), 'content_css' => - $design->getSkinUrl('mage/adminhtml/wysiwyg/tiny_mce/themes/advanced/skins/default/content.css'), + $design->getViewFileUrl('mage/adminhtml/wysiwyg/tiny_mce/themes/advanced/skins/default/content.css'), 'width' => '100%', 'plugins' => array() )); @@ -85,7 +85,7 @@ class Mage_Cms_Model_Wysiwyg_Config extends Varien_Object if (Mage::getSingleton('Mage_Core_Model_Authorization')->isAllowed('Mage_Cms::media_gallery')) { $config->addData(array( 'add_images' => true, - 'files_browser_window_url' => Mage::getSingleton('Mage_Adminhtml_Model_Url')->getUrl('*/cms_wysiwyg_images/index'), + 'files_browser_window_url' => Mage::getSingleton('Mage_Backend_Model_Url')->getUrl('*/cms_wysiwyg_images/index'), 'files_browser_window_width' => (int) Mage::getConfig()->getNode('adminhtml/cms/browser/window_width'), 'files_browser_window_height'=> (int) Mage::getConfig()->getNode('adminhtml/cms/browser/window_height'), )); @@ -107,7 +107,7 @@ class Mage_Cms_Model_Wysiwyg_Config extends Varien_Object */ public function getSkinImagePlaceholderUrl() { - return Mage::getDesign()->getSkinUrl('Mage_Cms::images/wysiwyg_skin_image.png'); + return Mage::getDesign()->getViewFileUrl('Mage_Cms::images/wysiwyg_skin_image.png'); } /** diff --git a/app/code/core/Mage/Cms/Model/Wysiwyg/Images/Storage.php b/app/code/core/Mage/Cms/Model/Wysiwyg/Images/Storage.php index c34bde0bf51258b0305210fd6bc0e9dffdfdc2ea..b05dfb66eef8e4ad8032689e440d9d5f1d3df46f 100644 --- a/app/code/core/Mage/Cms/Model/Wysiwyg/Images/Storage.php +++ b/app/code/core/Mage/Cms/Model/Wysiwyg/Images/Storage.php @@ -140,7 +140,7 @@ class Mage_Cms_Model_Wysiwyg_Images_Storage extends Varien_Object $thumbUrl = $this->getThumbnailUrl($item->getFilename(), true); // generate thumbnail "on the fly" if it does not exists if(! $thumbUrl) { - $thumbUrl = Mage::getSingleton('Mage_Adminhtml_Model_Url')->getUrl('*/*/thumbnail', array('file' => $item->getId())); + $thumbUrl = Mage::getSingleton('Mage_Backend_Model_Url')->getUrl('*/*/thumbnail', array('file' => $item->getId())); } $size = @getimagesize($item->getFilename()); @@ -150,7 +150,7 @@ class Mage_Cms_Model_Wysiwyg_Images_Storage extends Varien_Object $item->setHeight($size[1]); } } else { - $thumbUrl = Mage::getDesign()->getSkinUrl(self::THUMB_PLACEHOLDER_PATH_SUFFIX); + $thumbUrl = Mage::getDesign()->getViewFileUrl(self::THUMB_PLACEHOLDER_PATH_SUFFIX); } $item->setThumbUrl($thumbUrl); diff --git a/app/code/core/Mage/Cms/data/cms_setup/data-install-1.6.0.0.php b/app/code/core/Mage/Cms/data/cms_setup/data-install-1.6.0.0.php index 1dcb908372da7b223540f6dbbd2e4676b331d139..369073f18295f8a54d5f46834008cd4b1784f282 100644 --- a/app/code/core/Mage/Cms/data/cms_setup/data-install-1.6.0.0.php +++ b/app/code/core/Mage/Cms/data/cms_setup/data-install-1.6.0.0.php @@ -60,7 +60,7 @@ $cmsPages = array( 'title' => 'About Us', 'root_template' => 'two_columns_right', 'identifier' => 'about-magento-demo-store', - 'content' => "<div class=\"page-title\">\r\n<h1>About Magento Store</h1>\r\n</div>\r\n<div class=\"col3-set\">\r\n<div class=\"col-1\"><p><a href=\"http://www.magento.com/\"><img src=\"{{skin url='Mage_Cms::images/about_us_img.jpg'}}\" title=\"Varien\" alt=\"Varien\" /></a></p><p style=\"line-height:1.2em;\"><small>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.</small></p>\r\n<p style=\"color:#888; font:1.2em/1.4em georgia, serif;\">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.</p></div>\r\n<div class=\"col-2\">\r\n<p><strong style=\"color:#de036f;\">Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi luctus. Duis lobortis. Nulla nec velit.</strong></p>\r\n<p>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. </p>\r\n<p>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.</p></div>\r\n<div class=\"col-3\">\r\n<p>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 </p>\r\n<p><strong style=\"color:#de036f;\">Maecenas ullamcorper, odio vel tempus egestas, dui orci faucibus orci, sit amet aliquet lectus dolor et quam. Pellentesque consequat luctus purus.</strong></p>\r\n<p>Nunc et risus. Etiam a nibh. Phasellus dignissim metus eget nisi.</p>\r\n<div class=\"divider\"></div>\r\n<p>To all of you, from all of us at Magento Store - Thank you and Happy eCommerce!</p>\r\n<p style=\"line-height:1.2em;\"><strong style=\"font:italic 2em Georgia, serif;\">John Doe</strong><br /><small>Some important guy</small></p></div>\r\n</div>", + 'content' => "<div class=\"page-title\">\r\n<h1>About Magento Store</h1>\r\n</div>\r\n<div class=\"col3-set\">\r\n<div class=\"col-1\"><p><a href=\"http://www.magento.com/\"><img src=\"{{view url='Mage_Cms::images/about_us_img.jpg'}}\" title=\"Varien\" alt=\"Varien\" /></a></p><p style=\"line-height:1.2em;\"><small>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.</small></p>\r\n<p style=\"color:#888; font:1.2em/1.4em georgia, serif;\">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.</p></div>\r\n<div class=\"col-2\">\r\n<p><strong style=\"color:#de036f;\">Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi luctus. Duis lobortis. Nulla nec velit.</strong></p>\r\n<p>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. </p>\r\n<p>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.</p></div>\r\n<div class=\"col-3\">\r\n<p>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 </p>\r\n<p><strong style=\"color:#de036f;\">Maecenas ullamcorper, odio vel tempus egestas, dui orci faucibus orci, sit amet aliquet lectus dolor et quam. Pellentesque consequat luctus purus.</strong></p>\r\n<p>Nunc et risus. Etiam a nibh. Phasellus dignissim metus eget nisi.</p>\r\n<div class=\"divider\"></div>\r\n<p>To all of you, from all of us at Magento Store - Thank you and Happy eCommerce!</p>\r\n<p style=\"line-height:1.2em;\"><strong style=\"font:italic 2em Georgia, serif;\">John Doe</strong><br /><small>Some important guy</small></p></div>\r\n</div>", 'is_active' => 1, 'stores' => array(0), 'sort_order' => 0 @@ -78,7 +78,7 @@ $cmsPages = array( 'title' => 'Enable Cookies', 'root_template' => 'one_column', 'identifier' => 'enable-cookies', - 'content' => "<div class=\"std\">\r\n <ul class=\"messages\">\r\n <li class=\"notice-msg\">\r\n <ul>\r\n <li>Please enable cookies in your web browser to continue.</li>\r\n </ul>\r\n </li>\r\n </ul>\r\n <div class=\"page-title\">\r\n <h1><a name=\"top\"></a>What are Cookies?</h1>\r\n </div>\r\n <p>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.</p>\r\n <h2 class=\"subtitle\">Enabling Cookies</h2>\r\n <ul class=\"disc\">\r\n <li><a href=\"#ie7\">Internet Explorer 7.x</a></li>\r\n <li><a href=\"#ie6\">Internet Explorer 6.x</a></li>\r\n <li><a href=\"#firefox\">Mozilla/Firefox</a></li>\r\n <li><a href=\"#opera\">Opera 7.x</a></li>\r\n </ul>\r\n <h3><a name=\"ie7\"></a>Internet Explorer 7.x</h3>\r\n <ol>\r\n <li>\r\n <p>Start Internet Explorer</p>\r\n </li>\r\n <li>\r\n <p>Under the <strong>Tools</strong> menu, click <strong>Internet Options</strong></p>\r\n <p><img src=\"{{skin url=\"Mage_Cms::images/cookies/ie7-1.gif\"}}\" alt=\"\" /></p>\r\n </li>\r\n <li>\r\n <p>Click the <strong>Privacy</strong> tab</p>\r\n <p><img src=\"{{skin url=\"Mage_Cms::images/cookies/ie7-2.gif\"}}\" alt=\"\" /></p>\r\n </li>\r\n <li>\r\n <p>Click the <strong>Advanced</strong> button</p>\r\n <p><img src=\"{{skin url=\"Mage_Cms::images/cookies/ie7-3.gif\"}}\" alt=\"\" /></p>\r\n </li>\r\n <li>\r\n <p>Put a check mark in the box for <strong>Override Automatic Cookie Handling</strong>, put another check mark in the <strong>Always accept session cookies </strong>box</p>\r\n <p><img src=\"{{skin url=\"Mage_Cms::images/cookies/ie7-4.gif\"}}\" alt=\"\" /></p>\r\n </li>\r\n <li>\r\n <p>Click <strong>OK</strong></p>\r\n <p><img src=\"{{skin url=\"Mage_Cms::images/cookies/ie7-5.gif\"}}\" alt=\"\" /></p>\r\n </li>\r\n <li>\r\n <p>Click <strong>OK</strong></p>\r\n <p><img src=\"{{skin url=\"Mage_Cms::images/cookies/ie7-6.gif\"}}\" alt=\"\" /></p>\r\n </li>\r\n <li>\r\n <p>Restart Internet Explore</p>\r\n </li>\r\n </ol>\r\n <p class=\"a-top\"><a href=\"#top\">Back to Top</a></p>\r\n <h3><a name=\"ie6\"></a>Internet Explorer 6.x</h3>\r\n <ol>\r\n <li>\r\n <p>Select <strong>Internet Options</strong> from the Tools menu</p>\r\n <p><img src=\"{{skin url=\"Mage_Cms::images/cookies/ie6-1.gif\"}}\" alt=\"\" /></p>\r\n </li>\r\n <li>\r\n <p>Click on the <strong>Privacy</strong> tab</p>\r\n </li>\r\n <li>\r\n <p>Click the <strong>Default</strong> button (or manually slide the bar down to <strong>Medium</strong>) under <strong>Settings</strong>. Click <strong>OK</strong></p>\r\n <p><img src=\"{{skin url=\"Mage_Cms::images/cookies/ie6-2.gif\"}}\" alt=\"\" /></p>\r\n </li>\r\n </ol>\r\n <p class=\"a-top\"><a href=\"#top\">Back to Top</a></p>\r\n <h3><a name=\"firefox\"></a>Mozilla/Firefox</h3>\r\n <ol>\r\n <li>\r\n <p>Click on the <strong>Tools</strong>-menu in Mozilla</p>\r\n </li>\r\n <li>\r\n <p>Click on the <strong>Options...</strong> item in the menu - a new window open</p>\r\n </li>\r\n <li>\r\n <p>Click on the <strong>Privacy</strong> selection in the left part of the window. (See image below)</p>\r\n <p><img src=\"{{skin url=\"Mage_Cms::images/cookies/firefox.png\"}}\" alt=\"\" /></p>\r\n </li>\r\n <li>\r\n <p>Expand the <strong>Cookies</strong> section</p>\r\n </li>\r\n <li>\r\n <p>Check the <strong>Enable cookies</strong> and <strong>Accept cookies normally</strong> checkboxes</p>\r\n </li>\r\n <li>\r\n <p>Save changes by clicking <strong>Ok</strong>.</p>\r\n </li>\r\n </ol>\r\n <p class=\"a-top\"><a href=\"#top\">Back to Top</a></p>\r\n <h3><a name=\"opera\"></a>Opera 7.x</h3>\r\n <ol>\r\n <li>\r\n <p>Click on the <strong>Tools</strong> menu in Opera</p>\r\n </li>\r\n <li>\r\n <p>Click on the <strong>Preferences...</strong> item in the menu - a new window open</p>\r\n </li>\r\n <li>\r\n <p>Click on the <strong>Privacy</strong> selection near the bottom left of the window. (See image below)</p>\r\n <p><img src=\"{{skin url=\"Mage_Cms::images/cookies/opera.png\"}}\" alt=\"\" /></p>\r\n </li>\r\n <li>\r\n <p>The <strong>Enable cookies</strong> checkbox must be checked, and <strong>Accept all cookies</strong> should be selected in the "<strong>Normal cookies</strong>" drop-down</p>\r\n </li>\r\n <li>\r\n <p>Save changes by clicking <strong>Ok</strong></p>\r\n </li>\r\n </ol>\r\n <p class=\"a-top\"><a href=\"#top\">Back to Top</a></p>\r\n</div>\r\n", + 'content' => "<div class=\"std\">\r\n <ul class=\"messages\">\r\n <li class=\"notice-msg\">\r\n <ul>\r\n <li>Please enable cookies in your web browser to continue.</li>\r\n </ul>\r\n </li>\r\n </ul>\r\n <div class=\"page-title\">\r\n <h1><a name=\"top\"></a>What are Cookies?</h1>\r\n </div>\r\n <p>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.</p>\r\n <h2 class=\"subtitle\">Enabling Cookies</h2>\r\n <ul class=\"disc\">\r\n <li><a href=\"#ie7\">Internet Explorer 7.x</a></li>\r\n <li><a href=\"#ie6\">Internet Explorer 6.x</a></li>\r\n <li><a href=\"#firefox\">Mozilla/Firefox</a></li>\r\n <li><a href=\"#opera\">Opera 7.x</a></li>\r\n </ul>\r\n <h3><a name=\"ie7\"></a>Internet Explorer 7.x</h3>\r\n <ol>\r\n <li>\r\n <p>Start Internet Explorer</p>\r\n </li>\r\n <li>\r\n <p>Under the <strong>Tools</strong> menu, click <strong>Internet Options</strong></p>\r\n <p><img src=\"{{view url=\"Mage_Cms::images/cookies/ie7-1.gif\"}}\" alt=\"\" /></p>\r\n </li>\r\n <li>\r\n <p>Click the <strong>Privacy</strong> tab</p>\r\n <p><img src=\"{{view url=\"Mage_Cms::images/cookies/ie7-2.gif\"}}\" alt=\"\" /></p>\r\n </li>\r\n <li>\r\n <p>Click the <strong>Advanced</strong> button</p>\r\n <p><img src=\"{{view url=\"Mage_Cms::images/cookies/ie7-3.gif\"}}\" alt=\"\" /></p>\r\n </li>\r\n <li>\r\n <p>Put a check mark in the box for <strong>Override Automatic Cookie Handling</strong>, put another check mark in the <strong>Always accept session cookies </strong>box</p>\r\n <p><img src=\"{{view url=\"Mage_Cms::images/cookies/ie7-4.gif\"}}\" alt=\"\" /></p>\r\n </li>\r\n <li>\r\n <p>Click <strong>OK</strong></p>\r\n <p><img src=\"{{view url=\"Mage_Cms::images/cookies/ie7-5.gif\"}}\" alt=\"\" /></p>\r\n </li>\r\n <li>\r\n <p>Click <strong>OK</strong></p>\r\n <p><img src=\"{{view url=\"Mage_Cms::images/cookies/ie7-6.gif\"}}\" alt=\"\" /></p>\r\n </li>\r\n <li>\r\n <p>Restart Internet Explore</p>\r\n </li>\r\n </ol>\r\n <p class=\"a-top\"><a href=\"#top\">Back to Top</a></p>\r\n <h3><a name=\"ie6\"></a>Internet Explorer 6.x</h3>\r\n <ol>\r\n <li>\r\n <p>Select <strong>Internet Options</strong> from the Tools menu</p>\r\n <p><img src=\"{{view url=\"Mage_Cms::images/cookies/ie6-1.gif\"}}\" alt=\"\" /></p>\r\n </li>\r\n <li>\r\n <p>Click on the <strong>Privacy</strong> tab</p>\r\n </li>\r\n <li>\r\n <p>Click the <strong>Default</strong> button (or manually slide the bar down to <strong>Medium</strong>) under <strong>Settings</strong>. Click <strong>OK</strong></p>\r\n <p><img src=\"{{view url=\"Mage_Cms::images/cookies/ie6-2.gif\"}}\" alt=\"\" /></p>\r\n </li>\r\n </ol>\r\n <p class=\"a-top\"><a href=\"#top\">Back to Top</a></p>\r\n <h3><a name=\"firefox\"></a>Mozilla/Firefox</h3>\r\n <ol>\r\n <li>\r\n <p>Click on the <strong>Tools</strong>-menu in Mozilla</p>\r\n </li>\r\n <li>\r\n <p>Click on the <strong>Options...</strong> item in the menu - a new window open</p>\r\n </li>\r\n <li>\r\n <p>Click on the <strong>Privacy</strong> selection in the left part of the window. (See image below)</p>\r\n <p><img src=\"{{view url=\"Mage_Cms::images/cookies/firefox.png\"}}\" alt=\"\" /></p>\r\n </li>\r\n <li>\r\n <p>Expand the <strong>Cookies</strong> section</p>\r\n </li>\r\n <li>\r\n <p>Check the <strong>Enable cookies</strong> and <strong>Accept cookies normally</strong> checkboxes</p>\r\n </li>\r\n <li>\r\n <p>Save changes by clicking <strong>Ok</strong>.</p>\r\n </li>\r\n </ol>\r\n <p class=\"a-top\"><a href=\"#top\">Back to Top</a></p>\r\n <h3><a name=\"opera\"></a>Opera 7.x</h3>\r\n <ol>\r\n <li>\r\n <p>Click on the <strong>Tools</strong> menu in Opera</p>\r\n </li>\r\n <li>\r\n <p>Click on the <strong>Preferences...</strong> item in the menu - a new window open</p>\r\n </li>\r\n <li>\r\n <p>Click on the <strong>Privacy</strong> selection near the bottom left of the window. (See image below)</p>\r\n <p><img src=\"{{view url=\"Mage_Cms::images/cookies/opera.png\"}}\" alt=\"\" /></p>\r\n </li>\r\n <li>\r\n <p>The <strong>Enable cookies</strong> checkbox must be checked, and <strong>Accept all cookies</strong> should be selected in the "<strong>Normal cookies</strong>" drop-down</p>\r\n </li>\r\n <li>\r\n <p>Save changes by clicking <strong>Ok</strong></p>\r\n </li>\r\n </ol>\r\n <p class=\"a-top\"><a href=\"#top\">Back to Top</a></p>\r\n</div>\r\n", 'is_active' => 1, 'stores' => array(0) ) diff --git a/app/code/core/Mage/Cms/etc/adminhtml/system.xml b/app/code/core/Mage/Cms/etc/adminhtml/system.xml new file mode 100644 index 0000000000000000000000000000000000000000..53f50efd0c7515c07a962740ce657c1acf326d2a --- /dev/null +++ b/app/code/core/Mage/Cms/etc/adminhtml/system.xml @@ -0,0 +1,63 @@ +<?xml version="1.0"?> +<!-- +/** + * 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 Mage_Cms + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> + <system> + <section id="web"> + <group id="default"> + <field id="cms_home_page" translate="label" module="Mage_Cms" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>CMS Home Page</label> + <source_model>Mage_Cms_Model_Config_Source_Page</source_model> + </field> + <field id="cms_no_route" translate="label" module="Mage_Cms" type="select" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>CMS No Route Page</label> + <source_model>Mage_Cms_Model_Config_Source_Page</source_model> + </field> + <field id="cms_no_cookies" translate="label" module="Mage_Cms" type="select" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>CMS No Cookies Page</label> + <source_model>Mage_Cms_Model_Config_Source_Page</source_model> + </field> + <field id="show_cms_breadcrumbs" translate="label" module="Mage_Cms" type="select" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Show Breadcrumbs for CMS Pages</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + </group> + </section> + <section id="cms" translate="label" module="Mage_Cms" type="text" sortOrder="1001" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Content Management</label> + <tab>general</tab> + <resource>Mage_Cms::config_cms</resource> + <group id="wysiwyg" translate="label" type="text" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>WYSIWYG Options</label> + <field id="enabled" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Enable WYSIWYG Editor</label> + <source_model>Mage_Cms_Model_Config_Source_Wysiwyg_Enabled</source_model> + </field> + </group> + </section> + </system> +</config> diff --git a/app/code/core/Mage/Cms/etc/system.xml b/app/code/core/Mage/Cms/etc/system.xml deleted file mode 100644 index 2787b3c08da39120148192437889280d96e82c18..0000000000000000000000000000000000000000 --- a/app/code/core/Mage/Cms/etc/system.xml +++ /dev/null @@ -1,106 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * 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 Mage_Cms - * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<config> - <sections> - <web> - <groups> - <default> - <fields> - <cms_home_page translate="label" module="Mage_Cms"> - <label>CMS Home Page</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Cms_Page</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </cms_home_page> - <cms_no_route translate="label" module="Mage_Cms"> - <label>CMS No Route Page</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Cms_Page</source_model> - <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> - </cms_no_route> - <cms_no_cookies translate="label" module="Mage_Cms"> - <label>CMS No Cookies Page</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Cms_Page</source_model> - <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> - </cms_no_cookies> - <show_cms_breadcrumbs translate="label" module="Mage_Cms"> - <label>Show Breadcrumbs for CMS Pages</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </show_cms_breadcrumbs> - </fields> - </default> - </groups> - </web> - <cms translate="label" module="Mage_Cms"> - <label>Content Management</label> - <tab>general</tab> - <frontend_type>text</frontend_type> - <sort_order>1001</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <resource>Mage_Cms::config_cms</resource> - <groups> - <wysiwyg translate="label"> - <label>WYSIWYG Options</label> - <frontend_type>text</frontend_type> - <sort_order>100</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <enabled translate="label"> - <label>Enable WYSIWYG Editor</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Cms_Wysiwyg_Enabled</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </enabled> - </fields> - </wysiwyg> - </groups> - </cms> - </sections> -</config> diff --git a/app/code/core/Mage/Contacts/Model/System/Config/Backend/Links.php b/app/code/core/Mage/Contacts/Model/System/Config/Backend/Links.php index b4a5bb953173cc8a47c08c6fd3bd685fb50362d2..680debbab66e01aa81352600c29d20883c2bf8dc 100644 --- a/app/code/core/Mage/Contacts/Model/System/Config/Backend/Links.php +++ b/app/code/core/Mage/Contacts/Model/System/Config/Backend/Links.php @@ -28,7 +28,7 @@ * Cache cleaner backend model * */ -class Mage_Contacts_Model_System_Config_Backend_Links extends Mage_Adminhtml_Model_System_Config_Backend_Cache +class Mage_Contacts_Model_System_Config_Backend_Links extends Mage_Backend_Model_Config_Backend_Cache { /** * Cache tags to clean diff --git a/app/code/core/Mage/Contacts/etc/adminhtml/system.xml b/app/code/core/Mage/Contacts/etc/adminhtml/system.xml new file mode 100644 index 0000000000000000000000000000000000000000..66383135d386ac4f56ed4af41b5d8af4088c0bee --- /dev/null +++ b/app/code/core/Mage/Contacts/etc/adminhtml/system.xml @@ -0,0 +1,59 @@ +<?xml version="1.0"?> +<!-- +/** + * 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 Mage_Contacts + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> + <system> + <section id="contacts" translate="label" module="Mage_Contacts" type="text" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Contacts</label> + <tab>general</tab> + <resource>Mage_Contacts::contacts</resource> + <group id="contacts" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Contact Us</label> + <field id="enabled" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Enable Contact Us</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + <backend_model>Mage_Contacts_Model_System_Config_Backend_Links</backend_model> + </field> + </group> + <group id="email" translate="label" type="text" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Email Options</label> + <field id="recipient_email" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Send Emails To</label> + <validate>validate-email</validate> + </field> + <field id="sender_email_identity" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Email Sender</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Identity</source_model> + </field> + <field id="email_template" translate="label" type="select" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Email Template</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Template</source_model> + </field> + </group> + </section> + </system> +</config> diff --git a/app/code/core/Mage/Contacts/etc/system.xml b/app/code/core/Mage/Contacts/etc/system.xml deleted file mode 100644 index 582978272260effe1c13a1761dbf65f37f8d0504..0000000000000000000000000000000000000000 --- a/app/code/core/Mage/Contacts/etc/system.xml +++ /dev/null @@ -1,100 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * 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 Mage_Contacts - * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<config> - <sections> - <contacts translate="label" module="Mage_Contacts"> - <label>Contacts</label> - <tab>general</tab> - <frontend_type>text</frontend_type> - <sort_order>100</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <resource>Mage_Contacts::contacts</resource> - <groups> - <contacts translate="label"> - <label>Contact Us</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> - <fields> - <enabled translate="label"> - <label>Enable Contact Us</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <backend_model>Mage_Contacts_Model_System_Config_Backend_Links</backend_model> - <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> - </enabled> - </fields> - </contacts> - <email translate="label"> - <label>Email Options</label> - <frontend_type>text</frontend_type> - <sort_order>50</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <recipient_email translate="label"> - <label>Send Emails To</label> - <frontend_type>text</frontend_type> - <validate>validate-email</validate> - <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> - </recipient_email> - <sender_email_identity translate="label"> - <label>Email Sender</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Identity</source_model> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </sender_email_identity> - <email_template translate="label"> - <label>Email Template</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Template</source_model> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </email_template> - </fields> - </email> - </groups> - </contacts> - </sections> -</config> diff --git a/app/code/core/Mage/Core/Block/Abstract.php b/app/code/core/Mage/Core/Block/Abstract.php index 8b41c91b9d50f3b057b0f2d035b4f3f598f5f153..8c79d34a655f59c9e8279926fcc47d880ecbdeb2 100644 --- a/app/code/core/Mage/Core/Block/Abstract.php +++ b/app/code/core/Mage/Core/Block/Abstract.php @@ -100,13 +100,16 @@ abstract class Mage_Core_Block_Abstract extends Varien_Object protected $_frameCloseTag; /** - * Url object + * Url Builder * * @var Mage_Core_Model_Url */ - protected static $_urlModel; + protected $_urlBuilder; /** + * System event manager + * + * * @var Mage_Core_Model_Event_Manager */ protected $_eventManager; @@ -122,12 +125,14 @@ abstract class Mage_Core_Block_Abstract extends Varien_Object * @param Mage_Core_Controller_Request_Http $request * @param Mage_Core_Model_Layout $layout * @param Mage_Core_Model_Event_Manager $eventManager + * @param Mage_Core_Model_Url $urlBuilder * @param Mage_Core_Model_Translate $translator * @param Mage_Core_Model_Cache $cache * @param Mage_Core_Model_Design_Package $designPackage * @param Mage_Core_Model_Session $session * @param Mage_Core_Model_Store_Config $storeConfig * @param Mage_Core_Controller_Varien_Front $frontController + * @param Mage_Core_Model_Factory_Helper $helperFactory * @param array $data * * @SuppressWarnings(PHPMD.ExcessiveParameterList) @@ -136,23 +141,27 @@ abstract class Mage_Core_Block_Abstract extends Varien_Object Mage_Core_Controller_Request_Http $request, Mage_Core_Model_Layout $layout, Mage_Core_Model_Event_Manager $eventManager, + Mage_Core_Model_Url $urlBuilder, Mage_Core_Model_Translate $translator, Mage_Core_Model_Cache $cache, Mage_Core_Model_Design_Package $designPackage, Mage_Core_Model_Session $session, Mage_Core_Model_Store_Config $storeConfig, Mage_Core_Controller_Varien_Front $frontController, + Mage_Core_Model_Factory_Helper $helperFactory, array $data = array() ) { $this->_request = $request; $this->_layout = $layout; $this->_eventManager = $eventManager; + $this->_urlBuilder = $urlBuilder; $this->_translator = $translator; $this->_cache = $cache; $this->_designPackage = $designPackage; $this->_session = $session; $this->_storeConfig = $storeConfig; $this->_frontController = $frontController; + $this->_helperFactory = $helperFactory; parent::__construct($data); $this->_construct(); @@ -688,26 +697,6 @@ abstract class Mage_Core_Block_Abstract extends Varien_Object return trim(preg_replace('/[^a-z0-9]+/', '-', strtolower($rawId)), '-'); } - /** - * Returns url model class name - * - * @return string - */ - protected function _getUrlModelClass() - { - return 'Mage_Core_Model_Url'; - } - - /** - * Create and return url object - * - * @return Mage_Core_Model_Url - */ - protected function _getUrlModel() - { - return Mage::getModel($this->_getUrlModelClass()); - } - /** * Generate url by route and parameters * @@ -717,7 +706,7 @@ abstract class Mage_Core_Block_Abstract extends Varien_Object */ public function getUrl($route = '', $params = array()) { - return $this->_getUrlModel()->getUrl($route, $params); + return $this->_urlBuilder->getUrl($route, $params); } /** @@ -745,15 +734,15 @@ abstract class Mage_Core_Block_Abstract extends Varien_Object } /** - * Retrieve url of skins file + * Retrieve url of themes file * - * @param string $file path to file in skin - * @param array $params - * @return string + * @param string $file path to file in theme + * @param array $params + * @return string */ - public function getSkinUrl($file = null, array $params = array()) + public function getViewFileUrl($file = null, array $params = array()) { - return $this->_designPackage->getSkinUrl($file, $params); + return Mage::getDesign()->getViewFileUrl($file, $params); } /** @@ -792,7 +781,7 @@ abstract class Mage_Core_Block_Abstract extends Varien_Object if ($this->getLayout()) { return $this->getLayout()->helper($name); } - return Mage::helper($name); + return $this->_helperFactory->get($name); } /** @@ -954,7 +943,7 @@ abstract class Mage_Core_Block_Abstract extends Varien_Object if ($this->_cache->canUse(self::CACHE_GROUP)) { Mage::app()->setUseSessionVar(false); Magento_Profiler::start('CACHE_URL'); - $html = Mage::getSingleton($this->_getUrlModelClass())->sessionUrlVar($html); + $html = $this->_urlBuilder->sessionUrlVar($html); Magento_Profiler::stop('CACHE_URL'); } return $html; diff --git a/app/code/core/Mage/Core/Block/Html/Date/Jquery/Calendar.php b/app/code/core/Mage/Core/Block/Html/Date/Jquery/Calendar.php new file mode 100644 index 0000000000000000000000000000000000000000..db3a819fa611a96f30606d6e150ff1d7260bc859 --- /dev/null +++ b/app/code/core/Mage/Core/Block/Html/Date/Jquery/Calendar.php @@ -0,0 +1,137 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Mage_Core + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + + +/** + * HTML calendar element block implemented using the jQuery datepicker widget. + * + * @category Mage + * @package Mage_Core + * @author Magento Core Team <core@magentocommerce.com> + */ +class Mage_Core_Block_Html_Date_Jquery_Calendar extends Mage_Core_Block_Html_Date +{ + /** + * File path for the regional localized Javascript file. + */ + const LOCALIZED_URL_PATH = 'jquery/ui/i18n/jquery.ui.datepicker-%s.js'; + + /** + * Return the path to the localized Javascript file given the locale or null if it doesn't exist. + * + * @param string $locale - The locale (e.g. en-US or just en) + * @return string - Url path to the localized Javascript file + * + * @SuppressWarnings(PHPMD.UnusedLocalVariable) + */ + private function _getUrlPathByLocale($locale) + { + $urlPath = sprintf(self::LOCALIZED_URL_PATH, $locale); + try { + $urlPath = $this->getViewFileUrl($urlPath); + } catch (Magento_Exception $e) { + $urlPath = null; + } + return $urlPath; + } + + /** + * Generate HTML containing a Javascript <script> tag for creating a calendar instance implemented + * using the jQuery datepicker. + * + * @return string + */ + protected function _toHtml() + { + $displayFormat = Magento_Date_Jquery_Calendar::convertToDateTimeFormat( + $this->getFormat(), true, (bool)$this->getTime() + ); + + $html = '<input type="text" name="' . $this->getName() . '" id="' . $this->getId() . '" '; + $html .= 'value="' . $this->escapeHtml($this->getValue()) . '" class="' . $this->getClass() . '" ' + . $this->getExtraParams() . '/> '; + + $yearRange = "c-10:c+10"; /* Default the range to the current year + or - 10 years. */ + $calendarYearsRange = $this->getYearsRange(); + if ($calendarYearsRange) { + /* Convert to the year range format that the jQuery datepicker understands. */ + sscanf($calendarYearsRange, "[%[0-9], %[0-9]]", $yearStart, $yearEnd); + $yearRange = "$yearStart:$yearEnd"; + } + + /* First include jquery-ui. */ + $jsFiles = '"' . $this->getViewFileUrl("jquery/ui/jquery-ui.js") . '", '; + + /* There are a small handful of localized files that use the 5 character locale. */ + $locale = str_replace('_', '-', Mage::app()->getLocale()->getLocaleCode()); + $localizedJsFilePath = $this->_getUrlPathByLocale($locale); + + if ($localizedJsFilePath == null) { + /* Most localized files use the 2 character locale. */ + $locale = substr($locale, 0, 2); + $localizedJsFilePath = $this->_getUrlPathByLocale($locale); + if ($localizedJsFilePath == null) { + /* Localized Javascript file doesn't exist. Default locale to empty string (English). */ + $locale = ''; + } else { + /* Include the regional localized Javascript file. */ + $jsFiles .= '"' . $localizedJsFilePath . '", '; + } + } else { + /* Include the regional localized Javascript file. */ + $jsFiles .= '"' . $localizedJsFilePath . '", '; + } + + $jsFiles .= '"' . $this->getViewFileUrl("mage/calendar/calendar.js") . '"'; /* Lastly, the datepicker. */ + $cssFile = '"' . $this->getViewFileUrl("mage/calendar/css/calendar.css") . '"'; + + $html + .= ' + <script type="text/javascript"> + //<![CDATA[ + (function($) { + $.mage.event.observe("mage.calendar.initialize", function (event, initData) { + var datepicker = { + inputSelector: "#' . $this->getId() . '", + locale: "' . $locale . '", + options: { + buttonImage: "' . $this->getImage() . '", + buttonText: "' . $this->helper("Mage_Core_Helper_Data")->__("Select Date") . '", + dateFormat: "' . $displayFormat . '", + yearRange: "' . $yearRange . '" + } + }; + initData.datepicker.push(datepicker); + }); + $.mage.load.css( ' . $cssFile . ' ); + $.mage.load.jsSync(' . $jsFiles . '); + })(jQuery); + //]]> + </script>'; + + return $html; + } +} diff --git a/app/code/core/Mage/Core/Block/Template.php b/app/code/core/Mage/Core/Block/Template.php index 606620b43a4dd23803d333c55136d9c2dcfdb7a1..bfa0553df72f49ebe954c56adb6fa80f5068c112 100644 --- a/app/code/core/Mage/Core/Block/Template.php +++ b/app/code/core/Mage/Core/Block/Template.php @@ -300,7 +300,7 @@ HTML; public function getBaseUrl() { if (!$this->_baseUrl) { - $this->_baseUrl = $this->_getUrlModel()->getBaseUrl(); + $this->_baseUrl = $this->_urlBuilder->getBaseUrl(); } return $this->_baseUrl; } diff --git a/app/code/core/Mage/Core/Controller/Varien/Action/Forward.php b/app/code/core/Mage/Core/Controller/Varien/Action/Forward.php index 04980b024edb59e8178f14449b8798842ec86da8..c92dc1df448c1c51f15650f1a042aab528378fe7 100644 --- a/app/code/core/Mage/Core/Controller/Varien/Action/Forward.php +++ b/app/code/core/Mage/Core/Controller/Varien/Action/Forward.php @@ -32,51 +32,14 @@ * @package Mage_Core * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Core_Controller_Varien_Action_Forward implements Mage_Core_Controller_Varien_DispatchableInterface +class Mage_Core_Controller_Varien_Action_Forward extends Mage_Core_Controller_Varien_Action_RedirectAbstract { - /** - * Request object - * - * @var Zend_Controller_Request_Abstract - */ - protected $_request; - - /** - * Response object - * - * @var Zend_Controller_Response_Abstract - */ - protected $_response; - - /** - * Currently used area - * - * @var string - */ - protected $_currentArea; - - /** - * Constructor - * - * @param Zend_Controller_Request_Abstract $request - * @param Zend_Controller_Response_Abstract $response - * @param array $invokeArgs - */ - public function __construct(Zend_Controller_Request_Abstract $request, - Zend_Controller_Response_Abstract $response, array $invokeArgs = array() - ) { - $this->_request = $request; - $this->_response = $response; - if (false == isset($this->_currentArea)) { - $this->_currentArea = isset($invokeArgs['areaCode']) ? $invokeArgs['areaCode'] : null; - } - } - /** * Dispatch controller action * * @param string $action action name * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function dispatch($action) { diff --git a/app/code/core/Mage/Core/Model/Config/System.php b/app/code/core/Mage/Core/Controller/Varien/Action/Redirect.php similarity index 69% rename from app/code/core/Mage/Core/Model/Config/System.php rename to app/code/core/Mage/Core/Controller/Varien/Action/Redirect.php index 31ed4824d852d54cc8cfc25e885a40271036b901..7516cca392b579ca6481399da16eb92fe751339b 100644 --- a/app/code/core/Mage/Core/Model/Config/System.php +++ b/app/code/core/Mage/Core/Controller/Varien/Action/Redirect.php @@ -24,24 +24,24 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ + /** - * Model for working with system.xml module files + * Redirect controller * * @category Mage * @package Mage_Core - * @author Magento Core Team <core@magentocommerce.com> + * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Core_Model_Config_System extends Mage_Core_Model_Config_Base +class Mage_Core_Controller_Varien_Action_Redirect extends Mage_Core_Controller_Varien_Action_RedirectAbstract { - function __construct($sourceData=null) - { - parent::__construct($sourceData); - } - - public function load($module) + /** + * Dispatch controller action + * + * @param string $action action name + * @return void + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + public function dispatch($action) { - $file = Mage::getConfig()->getModuleDir('etc', $module).DS.'system.xml'; - $this->loadFile($file); - return $this; } } diff --git a/app/code/core/Mage/Core/Controller/Varien/Action/RedirectAbstract.php b/app/code/core/Mage/Core/Controller/Varien/Action/RedirectAbstract.php new file mode 100644 index 0000000000000000000000000000000000000000..7d3c863324ffdafdd26e28c4cbc1862cd58b655b --- /dev/null +++ b/app/code/core/Mage/Core/Controller/Varien/Action/RedirectAbstract.php @@ -0,0 +1,73 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Mage_Core + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +/** + * Abstract redirect/forward action class + * + * @category Mage + * @package Mage_Core + * @author Magento Core Team <core@magentocommerce.com> + */ +abstract class Mage_Core_Controller_Varien_Action_RedirectAbstract implements Mage_Core_Controller_Varien_DispatchableInterface +{ + /** + * Request object + * + * @var Zend_Controller_Request_Abstract + */ + protected $_request; + + /** + * Response object + * + * @var Zend_Controller_Response_Abstract + */ + protected $_response; + + /** + * Currently used area + * + * @var string + */ + protected $_currentArea; + + /** + * Constructor + * + * @param Zend_Controller_Request_Abstract $request + * @param Zend_Controller_Response_Abstract $response + * @param array $invokeArgs + */ + public function __construct(Zend_Controller_Request_Abstract $request, + Zend_Controller_Response_Abstract $response, array $invokeArgs = array() + ) { + $this->_request = $request; + $this->_response = $response; + if (false == isset($this->_currentArea)) { + $this->_currentArea = isset($invokeArgs['areaCode']) ? $invokeArgs['areaCode'] : null; + } + } +} diff --git a/app/code/core/Mage/Core/Helper/File/Storage.php b/app/code/core/Mage/Core/Helper/File/Storage.php index 51d25e0fc38b62b39d14457d2b060450aad9b8ce..7ac6e362979311a00ff2a4340280f4e58dae910e 100644 --- a/app/code/core/Mage/Core/Helper/File/Storage.php +++ b/app/code/core/Mage/Core/Helper/File/Storage.php @@ -33,6 +33,14 @@ */ class Mage_Core_Helper_File_Storage extends Mage_Core_Helper_Abstract { + /** + * Maximum file size for MAX_FILE_SIZE attribute of a form + * + * @link http://www.php.net/manual/en/features.file-upload.post-method.php + * @var integer + */ + protected static $_maxFileSize = -1; + /** * Current storage code * @@ -134,4 +142,106 @@ class Mage_Core_Helper_File_Storage extends Mage_Core_Helper_Abstract { return $this->getStorageFileModel()->saveFile($file, true); } + + /** + * Get post max size + * + * @return string + */ + public function getPostMaxSize() + { + return $this->_iniGet('post_max_size'); + } + + /** + * Get upload max size + * + * @return string + */ + public function getUploadMaxSize() + { + return $this->_iniGet('upload_max_filesize'); + } + + /** + * Gets the value of a configuration option + * + * @link http://php.net/manual/en/function.ini-get.php + * @param string $param The configuration option name + * @return string + */ + protected function _iniGet($param) + { + return trim(ini_get($param)); + } + + /** + * Get max file size in megabytes + * + * @param int $precision + * @param int $mode + * @return float + */ + public function getMaxFileSizeInMb($precision = 0, $mode = PHP_ROUND_HALF_DOWN) + { + return round($this->getMaxFileSize() / (1024 * 1024), $precision, $mode); + } + + /** + * Get the maximum file size of the a form in bytes + * + * @return integer + */ + public function getMaxFileSize() + { + if (self::$_maxFileSize < 0) { + $postMaxSize = $this->_convertIniToInteger($this->getPostMaxSize()); + $uploadMaxSize = $this->_convertIniToInteger($this->getUploadMaxSize()); + $min = max($postMaxSize, $uploadMaxSize); + + if ($postMaxSize > 0) { + $min = min($min, $postMaxSize); + } + + if ($uploadMaxSize > 0) { + $min = min($min, $uploadMaxSize); + } + + self::$_maxFileSize = $min; + } + + return self::$_maxFileSize; + } + + /** + * Converts a ini setting to a integer value + * + * @param string $setting + * @return integer + */ + protected function _convertIniToInteger($setting) + { + if (!is_numeric($setting)) { + $type = strtoupper(substr($setting, -1)); + $setting = (integer)$setting; + + switch ($type) { + case 'K': + $setting *= 1024; + break; + + case 'M': + $setting *= 1024 * 1024; + break; + + case 'G': + $setting *= 1024 * 1024 * 1024; + break; + + default: + break; + } + } + return (integer)$setting; + } } diff --git a/app/code/core/Mage/Core/Helper/Js.php b/app/code/core/Mage/Core/Helper/Js.php index 65e6a0d6bfb9aeef2f965cb4a871f2a5de9cadcc..9056a2e6b8825b86ce341bd0950e52c98a9e55d6 100644 --- a/app/code/core/Mage/Core/Helper/Js.php +++ b/app/code/core/Mage/Core/Helper/Js.php @@ -95,7 +95,7 @@ class Mage_Core_Helper_Js extends Mage_Core_Helper_Abstract */ public function includeScript($file) { - return '<script type="text/javascript" src="' . Mage::getDesign()->getSkinUrl($file) . '"></script>' . "\n"; + return '<script type="text/javascript" src="' . Mage::getDesign()->getViewFileUrl($file) . '"></script>' . "\n"; } /** diff --git a/app/code/core/Mage/Core/Model/App.php b/app/code/core/Mage/Core/Model/App.php index 9cd8a20e012eee3e2689b813230d775b5bbdd50a..99e38a167fb1739afdc9019680f9a43c57a313fb 100644 --- a/app/code/core/Mage/Core/Model/App.php +++ b/app/code/core/Mage/Core/Model/App.php @@ -1256,7 +1256,7 @@ class Mage_Core_Model_App public function getRequest() { if (empty($this->_request)) { - $this->_request = $this->_objectManager->create('Mage_Core_Controller_Request_Http'); + $this->_request = $this->_objectManager->get('Mage_Core_Controller_Request_Http'); } return $this->_request; } @@ -1281,7 +1281,7 @@ class Mage_Core_Model_App public function getResponse() { if (empty($this->_response)) { - $this->_response = $this->_objectManager->create('Mage_Core_Controller_Response_Http'); + $this->_response = $this->_objectManager->get('Mage_Core_Controller_Response_Http'); $this->_response->headersSentThrowsException = Mage::$headersSentThrowsException; $this->_response->setHeader("Content-Type", "text/html; charset=UTF-8"); } diff --git a/app/code/core/Mage/Core/Model/App/Area.php b/app/code/core/Mage/Core/Model/App/Area.php index 09c68ac703bc9bd5b2bd62652307580309181731..4aca418a65c3e7ef2ff6e02d71c1dc20c6187d02 100644 --- a/app/code/core/Mage/Core/Model/App/Area.php +++ b/app/code/core/Mage/Core/Model/App/Area.php @@ -78,8 +78,7 @@ class Mage_Core_Model_App_Area ->_loadPart(self::PART_EVENTS) ->_loadPart(self::PART_DESIGN) ->_loadPart(self::PART_TRANSLATE); - } - else { + } else { $this->_loadPart($part); } return $this; @@ -102,10 +101,7 @@ class Mage_Core_Model_App_Area ->changeDesign($this->_getDesign()); } } else { - $areaDesign = (string)Mage::getConfig()->getNode( - $this->_code . '/' . Mage_Core_Model_Design_Package::XML_PATH_THEME - ) ?: 'default/default/default'; - $this->_getDesign()->setDesignTheme($areaDesign, $this->_code); + $this->_getDesign()->setArea($this->_code); } } @@ -209,6 +205,6 @@ class Mage_Core_Model_App_Area if (Mage::app()->getRequest()->isStraight()) { return; } - Mage::getDesign()->setDesignTheme('default/default/default', $this->_code); + $this->_getDesign()->setArea($this->_code); } } diff --git a/app/code/core/Mage/Core/Model/Config.php b/app/code/core/Mage/Core/Model/Config.php index a2475be6766d1d07a4922b406639508cb07a871a..84ceed06973321cfa312ea90e35bf99d82790de9 100644 --- a/app/code/core/Mage/Core/Model/Config.php +++ b/app/code/core/Mage/Core/Model/Config.php @@ -389,7 +389,7 @@ class Mage_Core_Model_Config extends Mage_Core_Model_Config_Base Magento_Profiler::start('load_modules_configuration'); $resourceConfig = sprintf('config.%s.xml', $this->getResourceConnectionModel('core')); $this->loadModulesConfiguration(array('config.xml',$resourceConfig), $this); - Magento_Profiler::start('load_modules_configuration'); + Magento_Profiler::stop('load_modules_configuration'); /** * Prevent local.xml directives overwriting @@ -1666,4 +1666,17 @@ class Mage_Core_Model_Config extends Mage_Core_Model_Config_Base $this->_currentAreaCode = $areaCode; return $this; } + + /** + * Cleanup circular references + * + * Destructor should be called explicitly in order to work around the PHP bug + * https://bugs.php.net/bug.php?id=62468 + */ + public function __destruct() + { + $this->_cacheLoadedSections = array(); + + parent::__destruct(); + } } diff --git a/app/code/core/Mage/Core/Model/Design/Backend/Exceptions.php b/app/code/core/Mage/Core/Model/Design/Backend/Exceptions.php index 436d2e422b09801988d3f6cce7c7ca47dfc41a3f..6eaeaea045e6d8af2583efdeee9068ba5476f51e 100644 --- a/app/code/core/Mage/Core/Model/Design/Backend/Exceptions.php +++ b/app/code/core/Mage/Core/Model/Design/Backend/Exceptions.php @@ -24,7 +24,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Core_Model_Design_Backend_Exceptions extends Mage_Adminhtml_Model_System_Config_Backend_Serialized_Array +class Mage_Core_Model_Design_Backend_Exceptions extends Mage_Backend_Model_Config_Backend_Serialized_Array { /** * Validate value diff --git a/app/code/core/Mage/Core/Model/Design/Fallback.php b/app/code/core/Mage/Core/Model/Design/Fallback.php index e135cb1d56765fd4c68eadca6b60b083353dfec7..01421230ea66dfe1e98a9ac808b1b1af1d14b798 100644 --- a/app/code/core/Mage/Core/Model/Design/Fallback.php +++ b/app/code/core/Mage/Core/Model/Design/Fallback.php @@ -44,11 +44,6 @@ class Mage_Core_Model_Design_Fallback implements Mage_Core_Model_Design_Fallback */ protected $_theme; - /** - * @var string|null - */ - protected $_skin; - /** * @var string|null */ @@ -66,7 +61,7 @@ class Mage_Core_Model_Design_Fallback implements Mage_Core_Model_Design_Fallback /** * Constructor. - * Following entries in $params are required: 'area', 'package', 'theme', 'skin', 'locale'. The 'appConfig' and + * Following entries in $params are required: 'area', 'package', 'theme', 'locale'. The 'appConfig' and * 'themeConfig' may contain application config and theme config, respectively. If these these entries are not * present or null, then they will be retrieved from global application instance. * @@ -77,7 +72,6 @@ class Mage_Core_Model_Design_Fallback implements Mage_Core_Model_Design_Fallback $this->_area = $data['area']; $this->_package = $data['package']; $this->_theme = $data['theme']; - $this->_skin = $data['skin']; $this->_locale = $data['locale']; $this->_appConfig = isset($data['appConfig']) ? $data['appConfig'] : Mage::getConfig(); $this->_themeConfig = isset($data['themeConfig']) ? $data['themeConfig'] @@ -127,28 +121,23 @@ class Mage_Core_Model_Design_Fallback implements Mage_Core_Model_Design_Fallback } /** - * Get skin file name, using fallback mechanism + * Get theme file name, using fallback mechanism * * @param string $file * @param string|null $module * @return string */ - public function getSkinFile($file, $module = null) + public function getViewFile($file, $module = null) { $dir = $this->_appConfig->getOptions()->getDesignDir(); $moduleDir = $module ? $this->_appConfig->getModuleDir('view', $module) : ''; - $defaultSkin = Mage_Core_Model_Design_Package::DEFAULT_SKIN_NAME; $dirs = array(); $theme = $this->_theme; $package = $this->_package; while ($theme) { - $dirs[] = "{$dir}/{$this->_area}/{$package}/{$theme}/skin/{$this->_skin}/locale/{$this->_locale}"; - $dirs[] = "{$dir}/{$this->_area}/{$package}/{$theme}/skin/{$this->_skin}"; - if ($this->_skin != $defaultSkin) { - $dirs[] = "{$dir}/{$this->_area}/{$package}/{$theme}/skin/{$defaultSkin}/locale/{$this->_locale}"; - $dirs[] = "{$dir}/{$this->_area}/{$package}/{$theme}/skin/{$defaultSkin}"; - } + $dirs[] = "{$dir}/{$this->_area}/{$package}/{$theme}/locale/{$this->_locale}"; + $dirs[] = "{$dir}/{$this->_area}/{$package}/{$theme}"; list($package, $theme) = $this->_getInheritedTheme($package, $theme); } @@ -211,14 +200,14 @@ class Mage_Core_Model_Design_Fallback implements Mage_Core_Model_Design_Fallback } /** - * Object notified, that skin file was published, thus it can return published file name on next calls + * Object notified, that theme file was published, thus it can return published file name on next calls * * @param string $publicFilePath * @param string $file * @param string|null $module * @return Mage_Core_Model_Design_FallbackInterface */ - public function notifySkinFilePublished($publicFilePath, $file, $module = null) + public function notifyViewFilePublished($publicFilePath, $file, $module = null) { // Do nothing - we don't cache file paths in real fallback return $this; diff --git a/app/code/core/Mage/Core/Model/Design/Fallback/CachingProxy.php b/app/code/core/Mage/Core/Model/Design/Fallback/CachingProxy.php index 17452259d226d569c0f932c01a3cd57541406924..0d6bf196ccf5e8b9ff1a297c38152731104702e6 100644 --- a/app/code/core/Mage/Core/Model/Design/Fallback/CachingProxy.php +++ b/app/code/core/Mage/Core/Model/Design/Fallback/CachingProxy.php @@ -45,11 +45,6 @@ class Mage_Core_Model_Design_Fallback_CachingProxy implements Mage_Core_Model_De */ protected $_theme; - /** - * @var string|null - */ - protected $_skin; - /** * @var string|null */ @@ -106,7 +101,7 @@ class Mage_Core_Model_Design_Fallback_CachingProxy implements Mage_Core_Model_De /** * Constructor. - * Following entries in $params are required: 'area', 'package', 'theme', 'skin', 'locale', 'canSaveMap', + * Following entries in $params are required: 'area', 'package', 'theme', 'locale', 'canSaveMap', * 'mapDir', 'baseDir'. * * @param array $data @@ -116,14 +111,13 @@ class Mage_Core_Model_Design_Fallback_CachingProxy implements Mage_Core_Model_De $this->_area = $data['area']; $this->_package = $data['package']; $this->_theme = $data['theme']; - $this->_skin = $data['skin']; $this->_locale = $data['locale']; $this->_canSaveMap = $data['canSaveMap']; $this->_mapDir = $data['mapDir']; $this->_basePath = $data['baseDir'] ? $data['baseDir'] . DIRECTORY_SEPARATOR : ''; $this->_mapFile = - "{$this->_mapDir}/{$this->_area}_{$this->_package}_{$this->_theme}_{$this->_skin}_{$this->_locale}.ser"; + "{$this->_mapDir}/{$this->_area}_{$this->_package}_{$this->_theme}_{$this->_locale}.ser"; $this->_map = file_exists($this->_mapFile) ? unserialize(file_get_contents($this->_mapFile)) : array(); } @@ -149,7 +143,6 @@ class Mage_Core_Model_Design_Fallback_CachingProxy implements Mage_Core_Model_De 'data' => array('area' => $this->_area, 'package' => $this->_package, 'theme' => $this->_theme, - 'skin' => $this->_skin, 'locale' => $this->_locale) )); } @@ -238,32 +231,32 @@ class Mage_Core_Model_Design_Fallback_CachingProxy implements Mage_Core_Model_De } /** - * Get skin file name, using map and fallback mechanism + * Get Theme file name, using map and fallback mechanism * * @param string $file * @param string|null $module * @return string */ - public function getSkinFile($file, $module = null) + public function getViewFile($file, $module = null) { - $result = $this->_getFromMap('skin', $file, $module); + $result = $this->_getFromMap('view', $file, $module); if (!$result) { - $result = $this->_getFallback()->getSkinFile($file, $module); - $this->_setToMap('skin', $file, $module, $result); + $result = $this->_getFallback()->getViewFile($file, $module); + $this->_setToMap('view', $file, $module, $result); } return $result; } /** - * Object notified, that skin file was published, thus it can return published file name on next calls + * Object notified, that theme file was published, thus it can return published file name on next calls * * @param string $publicFilePath * @param string $file * @param string|null $module * @return Mage_Core_Model_Design_FallbackInterface */ - public function notifySkinFilePublished($publicFilePath, $file, $module = null) + public function notifyViewFilePublished($publicFilePath, $file, $module = null) { - return $this->_setToMap('skin', $file, $module, $publicFilePath); + return $this->_setToMap('view', $file, $module, $publicFilePath); } } diff --git a/app/code/core/Mage/Core/Model/Design/FallbackInterface.php b/app/code/core/Mage/Core/Model/Design/FallbackInterface.php index 1b4c6b38ffbc5103330b0f0add49d465a0897312..a1d12eea82b290d2b79dc166fe75b903c8773171 100644 --- a/app/code/core/Mage/Core/Model/Design/FallbackInterface.php +++ b/app/code/core/Mage/Core/Model/Design/FallbackInterface.php @@ -47,21 +47,21 @@ interface Mage_Core_Model_Design_FallbackInterface public function getLocaleFile($file); /** - * Get skin file name, using fallback mechanism + * Get view file name, using fallback mechanism * * @param string $file * @param string|null $module * @return string */ - public function getSkinFile($file, $module = null); + public function getViewFile($file, $module = null); /** - * Object notified, that skin file was published, thus it can return published file name on next calls + * Object notified, that theme file was published, thus it can return published file name on next calls * * @param string $publicFilePath * @param string $file * @param string|null $module * @return Mage_Core_Model_Design_FallbackInterface */ - public function notifySkinFilePublished($publicFilePath, $file, $module = null); + public function notifyViewFilePublished($publicFilePath, $file, $module = null); } diff --git a/app/code/core/Mage/Core/Model/Design/Package.php b/app/code/core/Mage/Core/Model/Design/Package.php index ea724d651989fe5a980a57956dc6a7ff6d0d169d..59dc33aee8543dfd7b61e1b1c9beb47be454d9b4 100644 --- a/app/code/core/Mage/Core/Model/Design/Package.php +++ b/app/code/core/Mage/Core/Model/Design/Package.php @@ -29,20 +29,27 @@ class Mage_Core_Model_Design_Package { const DEFAULT_AREA = 'frontend'; const DEFAULT_PACKAGE = 'default'; - const DEFAULT_THEME = 'default'; + const DEFAULT_THEME = 'demo'; const SCOPE_SEPARATOR = '::'; const PUBLIC_MERGE_DIR = '_merged'; const PUBLIC_MODULE_DIR = '_module'; + /**#@+ + * Extensions group for static files + */ const CONTENT_TYPE_CSS = 'css'; const CONTENT_TYPE_JS = 'js'; + /**#@-*/ - /** - * The name of the default skins in the context of a theme + /**#@+ + * Protected extensions group for publication mechanism */ - const DEFAULT_SKIN_NAME = 'default'; + const CONTENT_TYPE_PHP = 'php'; + const CONTENT_TYPE_PHTML = 'phtml'; + const CONTENT_TYPE_XML = 'xml'; + /**#@-*/ /** * The name of the default theme in the context of a package @@ -54,8 +61,16 @@ class Mage_Core_Model_Design_Package */ const PUBLIC_CACHE_TAG = 'design_public'; + /** + * Common node path to theme design configuration + */ const XML_PATH_THEME = 'design/theme/full_name'; + /** + * Path to configuration node for file duplication + */ + const XML_PATH_ALLOW_DUPLICATION = 'default/design/theme/allow_view_files_duplication'; + /** * PCRE that matches non-absolute URLs in CSS content */ @@ -86,13 +101,6 @@ class Mage_Core_Model_Design_Package */ protected $_theme; - /** - * Package skin - * - * @var string - */ - protected $_skin; - /** * Package root directory * @@ -132,7 +140,7 @@ class Mage_Core_Model_Design_Package /** * Array of fallback model, controlling rules of fallback and inheritance for appropriate - * area, package, theme, skin, locale + * area, package, theme, locale * * @var array */ @@ -147,13 +155,15 @@ class Mage_Core_Model_Design_Package public function setArea($area) { $this->_area = $area; + $this->_name = null; + $this->_theme = null; return $this; } /** * Retrieve package area * - * @return unknown + * @return string */ public function getArea() { @@ -171,7 +181,7 @@ class Mage_Core_Model_Design_Package public function getPackageName() { if (!$this->_name) { - $this->_name = self::DEFAULT_PACKAGE; + $this->_setDefaultDesignTheme(); } return $this->_name; } @@ -184,29 +194,42 @@ class Mage_Core_Model_Design_Package public function getTheme() { if (!$this->_theme) { - $this->_theme = self::DEFAULT_THEME; + $this->_setDefaultDesignTheme(); } return $this->_theme; } /** - * Skin getter + * Set default theme and package which were loaded from configuration file * - * @return string + * @return Mage_Core_Model_Design_Package + */ + protected function _setDefaultDesignTheme() + { + list($this->_name, $this->_theme) = $this->_getDefaultDesignTheme($this->getArea()); + return $this; + } + + /** + * Get default theme and package which were loaded from configuration file + * + * @param string $area + * @return Mage_Core_Model_Design_Package */ - public function getSkin() + protected function _getDefaultDesignTheme($area) { - if (!$this->_skin) { - $this->_skin = self::DEFAULT_SKIN_NAME; + $themeParts = explode('/', (string)Mage::getConfig()->getNode("{$area}/design/theme/full_name")); + if (2 !== count($themeParts)) { + $themeParts = array(self::DEFAULT_PACKAGE, self::DEFAULT_THEME); } - return $this->_skin; + return $themeParts; } /** - * Set package, theme and skin for current area + * Set package and theme for current area * - * $themePath name must contain package, theme and skin names separated by "/" + * $themePath name must contain package and theme names separated by "/" * * @param string $themePath * @param string $area @@ -215,19 +238,18 @@ class Mage_Core_Model_Design_Package public function setDesignTheme($themePath, $area = null) { $parts = explode('/', $themePath); - if (3 !== count($parts)) { + if (2 !== count($parts)) { Mage::throwException( Mage::helper('Mage_Core_Helper_Data')->__('Invalid fully qualified design name: "%s".', $themePath) ); } - list($package, $theme, $skin) = $parts; + list($package, $theme) = $parts; if ($area) { $this->setArea($area); } $this->_name = $package; $this->_theme = $theme; - $this->_skin = $skin; return $this; } @@ -238,7 +260,7 @@ class Mage_Core_Model_Design_Package */ public function getDesignTheme() { - return $this->getPackageName() . '/' . $this->getTheme() . '/' . $this->getSkin(); + return $this->getPackageName() . '/' . $this->getTheme(); } /** @@ -249,18 +271,22 @@ class Mage_Core_Model_Design_Package */ protected function _updateParamDefaults(array &$params) { - if (empty($params['area'])) { - $params['area'] = $this->getArea(); - } - if (empty($params['package'])) { - $params['package'] = $this->getPackageName(); - } - if (!array_key_exists('theme', $params)) { - $params['theme'] = $this->getTheme(); - } - if (!array_key_exists('skin', $params)) { - $params['skin'] = $this->getSkin(); + if (!empty($params['area']) && $params['area'] !== $this->getArea() + && (empty($params['package']) || !array_key_exists('theme', $params)) + ) { + list($params['package'], $params['theme']) = $this->_getDefaultDesignTheme($params['area']); + } else { + if (empty($params['area'])) { + $params['area'] = $this->getArea(); + } + if (empty($params['package'])) { + $params['package'] = $this->getPackageName(); + } + if (!array_key_exists('theme', $params)) { + $params['theme'] = $this->getTheme(); + } } + if (!array_key_exists('module', $params)) { $params['module'] = false; } @@ -298,17 +324,17 @@ class Mage_Core_Model_Design_Package } /** - * Find a skin file using fallback mechanism + * Find a view file using fallback mechanism * * @param string $file * @param array $params * @return string */ - public function getSkinFile($file, array $params = array()) + public function getViewFile($file, array $params = array()) { $file = $this->_extractScope($file, $params); $this->_updateParamDefaults($params); - return $this->_getFallback($params)->getSkinFile($file, $params['module']); + return $this->_getFallback($params)->getViewFile($file, $params['module']); } /** @@ -343,7 +369,7 @@ class Mage_Core_Model_Design_Package */ protected function _getFallback($params) { - $cacheKey = "{$params['area']}|{$params['package']}|{$params['theme']}|{$params['skin']}|{$params['locale']}"; + $cacheKey = "{$params['area']}|{$params['package']}|{$params['theme']}|{$params['locale']}"; if (!isset($this->_fallback[$cacheKey])) { $params['canSaveMap'] = (bool) (string) Mage::app()->getConfig() ->getNode('global/dev/design_fallback/allow_map_update'); @@ -463,27 +489,27 @@ class Mage_Core_Model_Design_Package */ public function cleanMergedJsCss() { - $dir = $this->_buildPublicSkinFilename(self::PUBLIC_MERGE_DIR); + $dir = $this->_buildPublicViewFilename(self::PUBLIC_MERGE_DIR); $result = Varien_Io_File::rmdirRecursive($dir); $result = $result && Mage::helper('Mage_Core_Helper_File_Storage_Database')->deleteFolder($dir); return $result; } /** - * Get url to file base on skin file identifier. + * Get url to file base on theme file identifier. * Publishes file there, if needed. * * @param string $file * @param array $params * @return string */ - public function getSkinUrl($file, array $params = array()) + public function getViewFileUrl($file, array $params = array()) { $isSecure = isset($params['_secure']) ? (bool) $params['_secure'] : null; unset($params['_secure']); $this->_updateParamDefaults($params); /* Identify public file */ - $publicFile = $this->_publishSkinFile($file, $params); + $publicFile = $this->_publishViewFile($file, $params); /* Build url to public file */ if (Mage::helper('Mage_Core_Helper_Data')->isStaticFilesSigned()) { $fileMTime = filemtime($publicFile); @@ -506,7 +532,7 @@ class Mage_Core_Model_Design_Package protected function _getPublicFileUrl($file, $isSecure = null) { $publicDirUrlTypes = array( - Mage_Core_Model_Store::URL_TYPE_SKIN => Mage::getBaseDir('media') . DIRECTORY_SEPARATOR . 'skin', + Mage_Core_Model_Store::URL_TYPE_THEME => Mage::getBaseDir('media') . DIRECTORY_SEPARATOR . 'theme', Mage_Core_Model_Store::URL_TYPE_JS => Mage::getBaseDir('js'), ); foreach ($publicDirUrlTypes as $publicUrlType => $publicDir) { @@ -575,62 +601,55 @@ class Mage_Core_Model_Design_Package } } else { foreach ($files as $file) { - $urls[] = $this->getSkinUrl($file); + $urls[] = $this->getViewFileUrl($file); } } return $urls; } /** - * Check, if requested skin file has public access, and move it to public folder, if the file has no public access + * Check, if requested theme file has public access, and move it to public folder, if the file has no public access * - * @param string $skinFile + * @param string $themeFile * @param array $params * @return string * @throws Magento_Exception */ - protected function _publishSkinFile($skinFile, $params) + protected function _publishViewFile($themeFile, $params) { - $skinFile = $this->_extractScope($skinFile, $params); + $themeFile = $this->_extractScope($themeFile, $params); + $file = $this->getViewFile($themeFile, $params); - $file = $this->getSkinFile($skinFile, $params); - - $dotPosition = strrpos($skinFile, '.'); - $extension = strtolower(substr($skinFile, $dotPosition + 1)); - $staticContentTypes = array( - Mage_Core_Model_Design_Package::CONTENT_TYPE_JS, - Mage_Core_Model_Design_Package::CONTENT_TYPE_CSS, - ); - if (!Mage::getIsDeveloperMode() && !empty($extension) && - in_array($extension, $staticContentTypes) + $extension = $this->_getExtension($themeFile); + if (!Mage::getIsDeveloperMode() && !empty($extension) + && in_array($extension, array(self::CONTENT_TYPE_JS, self::CONTENT_TYPE_CSS)) ) { $minifiedPath = str_replace('.' . $extension, '.min.' . $extension, $file); if (file_exists($minifiedPath)) { $file = $minifiedPath; - $skinFile = str_replace('.' . $extension, '.min.' . $extension, $skinFile); + $themeFile = str_replace('.' . $extension, '.min.' . $extension, $themeFile); } } if (!file_exists($file)) { - throw new Magento_Exception("Unable to locate skin file '{$file}'."); + throw new Magento_Exception("Unable to locate theme file '{$file}'."); } if (!$this->_needToProcessFile($file)) { return $file; } - $isDuplicationAllowed = (string)Mage::getConfig()->getNode('default/design/theme/allow_skin_files_duplication'); - $isCssFile = ($extension === Mage_Core_Model_Design_Package::CONTENT_TYPE_CSS); + $isCssFile = $this->_isCssFile($themeFile); + $isDuplicationAllowed = (string)Mage::getConfig()->getNode(self::XML_PATH_ALLOW_DUPLICATION); if ($isDuplicationAllowed || $isCssFile) { - $publicFile = $this->_buildPublicSkinRedundantFilename($skinFile, $params); + $publicFile = $this->_buildPublicViewRedundantFilename($themeFile, $params); } else { - $publicFile = $this->_buildPublicSkinSufficientFilename($file, $params); - $this->_setPublicFileIntoCache($skinFile, $params, $publicFile); + $publicFile = $this->_buildPublicViewSufficientFilename($file, $params); + $this->_setPublicFileIntoCache($themeFile, $params, $publicFile); } - $fileMTime = filemtime($file); - /* Validate whether file needs to be published */ + $fileMTime = filemtime($file); if (!file_exists($publicFile) || $fileMTime != filemtime($publicFile)) { $publicDir = dirname($publicFile); if (!is_dir($publicDir)) { @@ -639,7 +658,7 @@ class Mage_Core_Model_Design_Package /* Process relative urls for CSS files */ if ($isCssFile) { - $content = $this->_getPublicCssContent($file, dirname($publicFile), $skinFile, $params); + $content = $this->_getPublicCssContent($file, dirname($publicFile), $themeFile, $params); file_put_contents($publicFile, $content); } else { if (is_file($file)) { @@ -651,12 +670,12 @@ class Mage_Core_Model_Design_Package if (is_file($publicFile)) { touch($publicFile, $fileMTime); } - } else if ($isCssFile) { - // Trigger related skin files publication, if CSS file itself has not been changed - $this->_getPublicCssContent($file, dirname($publicFile), $skinFile, $params); + } elseif ($isCssFile) { + // Trigger related theme files publication, if CSS file itself has not been changed + $this->_getPublicCssContent($file, dirname($publicFile), $themeFile, $params); } - $this->_getFallback($params)->notifySkinFilePublished($publicFile, $skinFile, $params['module']); + $this->_getFallback($params)->notifyViewFilePublished($publicFile, $themeFile, $params['module']); return $publicFile; } @@ -675,8 +694,13 @@ class Mage_Core_Model_Design_Package return false; } - $skinPath = $this->getPublicSkinDir() . DIRECTORY_SEPARATOR; - if (strncmp($filePath, $skinPath, strlen($skinPath)) !== 0) { + $protectedExtensions = array(self::CONTENT_TYPE_PHP, self::CONTENT_TYPE_PHTML, self::CONTENT_TYPE_XML); + if (in_array($this->_getExtension($filePath), $protectedExtensions)) { + return false; + } + + $themePath = $this->getPublicDir() . DIRECTORY_SEPARATOR; + if (strncmp($filePath, $themePath, strlen($themePath)) !== 0) { return true; } @@ -686,12 +710,24 @@ class Mage_Core_Model_Design_Package /** * Check whether $file is a CSS-file * - * @param string $file + * @param string $filePath * @return bool */ - protected function _isCssFile($file) + protected function _isCssFile($filePath) + { + return $this->_getExtension($filePath) == self::CONTENT_TYPE_CSS; + } + + /** + * Get file extension by file path + * + * @param string $filePath + * @return string + */ + protected function _getExtension($filePath) { - return (bool) preg_match('/\.css$/', $file); + $dotPosition = strrpos($filePath, '.'); + return strtolower(substr($filePath, $dotPosition + 1)); } /** @@ -700,50 +736,49 @@ class Mage_Core_Model_Design_Package * @param string $file * @return string */ - protected function _buildPublicSkinFilename($file) + protected function _buildPublicViewFilename($file) { - return $this->getPublicSkinDir() . DIRECTORY_SEPARATOR . $file; + return $this->getPublicDir() . DIRECTORY_SEPARATOR . $file; } /** - * Return directory for skin files publication + * Return directory for theme files publication * * @return string */ - public function getPublicSkinDir() + public function getPublicDir() { - return Mage::getBaseDir('media') . DIRECTORY_SEPARATOR . 'skin'; + return Mage::getBaseDir('media') . DIRECTORY_SEPARATOR . 'theme'; } /** - * Build public filename for a skin file that always includes area/package/theme/skin/locate parameters + * Build public filename for a theme file that always includes area/package/theme/locate parameters * * @param string $file * @param array $params * @return string */ - protected function _buildPublicSkinRedundantFilename($file, array $params) + protected function _buildPublicViewRedundantFilename($file, array $params) { $publicFile = $params['area'] . DIRECTORY_SEPARATOR . $params['package'] . DIRECTORY_SEPARATOR . $params['theme'] - . DIRECTORY_SEPARATOR . $params['skin'] . DIRECTORY_SEPARATOR . $params['locale'] . ($params['module'] ? DIRECTORY_SEPARATOR . $params['module'] : '') . DIRECTORY_SEPARATOR . $file ; - $publicFile = $this->_buildPublicSkinFilename($publicFile); + $publicFile = $this->_buildPublicViewFilename($publicFile); return $publicFile; } /** - * Build public filename for a skin file that sufficiently depends on the passed parameters + * Build public filename for a view file that sufficiently depends on the passed parameters * * @param string $filename * @param array $params * @return string */ - protected function _buildPublicSkinSufficientFilename($filename, array $params) + protected function _buildPublicViewSufficientFilename($filename, array $params) { $designDir = Mage::getBaseDir('design') . DIRECTORY_SEPARATOR; if (0 === strpos($filename, $designDir)) { @@ -752,11 +787,11 @@ class Mage_Core_Model_Design_Package } else { // modular file $module = $params['module']; - $moduleDir = Mage::getModuleDir('skin', $module) . DIRECTORY_SEPARATOR; + $moduleDir = Mage::getModuleDir('theme', $module) . DIRECTORY_SEPARATOR; $publicFile = substr($filename, strlen($moduleDir)); $publicFile = self::PUBLIC_MODULE_DIR . DIRECTORY_SEPARATOR . $module . DIRECTORY_SEPARATOR . $publicFile; } - $publicFile = $this->_buildPublicSkinFilename($publicFile); + $publicFile = $this->_buildPublicViewFilename($publicFile); return $publicFile; } @@ -789,7 +824,7 @@ class Mage_Core_Model_Design_Package $content = file_get_contents($filePath); $relativeUrls = $this->_extractCssRelativeUrls($content); foreach ($relativeUrls as $urlNotation => $fileUrl) { - $relatedFilePathPublic = $this->_publishRelatedSkinFile($fileUrl, $filePath, $fileName, $params); + $relatedFilePathPublic = $this->_publishRelatedViewFile($fileUrl, $filePath, $fileName, $params); $fileUrlNew = basename($relatedFilePathPublic); $offset = $this->_getFilesOffset($relatedFilePathPublic, $publicDir); if ($offset) { @@ -807,30 +842,30 @@ class Mage_Core_Model_Design_Package * @param string $fileUrl URL to the file that was extracted from $parentFilePath * @param string $parentFilePath path to the file * @param string $parentFileName original file name identifier that was requested for processing - * @param array $params theme/skin/module parameters array + * @param array $params theme/module parameters array * @return string */ - protected function _publishRelatedSkinFile($fileUrl, $parentFilePath, $parentFileName, $params) + protected function _publishRelatedViewFile($fileUrl, $parentFilePath, $parentFileName, $params) { if (strpos($fileUrl, self::SCOPE_SEPARATOR)) { - $relativeSkinFile = $fileUrl; + $relativeThemeFile = $fileUrl; } else { /* Check if module file overridden on theme level based on _module property and file path */ if ($params['module'] && strpos($parentFilePath, Mage::getBaseDir('design')) === 0) { /* Add module directory to relative URL for canonization */ - $relativeSkinFile = dirname($params['module'] . DIRECTORY_SEPARATOR . $parentFileName) + $relativeThemeFile = dirname($params['module'] . DIRECTORY_SEPARATOR . $parentFileName) . DIRECTORY_SEPARATOR . $fileUrl; - $relativeSkinFile = $this->_canonize($relativeSkinFile); - if (strpos($relativeSkinFile, $params['module']) === 0) { - $relativeSkinFile = str_replace($params['module'], '', $relativeSkinFile); + $relativeThemeFile = $this->_canonize($relativeThemeFile); + if (strpos($relativeThemeFile, $params['module']) === 0) { + $relativeThemeFile = str_replace($params['module'], '', $relativeThemeFile); } else { $params['module'] = false; } } else { - $relativeSkinFile = $this->_canonize(dirname($parentFileName) . DIRECTORY_SEPARATOR . $fileUrl); + $relativeThemeFile = $this->_canonize(dirname($parentFileName) . DIRECTORY_SEPARATOR . $fileUrl); } } - return $this->_publishSkinFile($relativeSkinFile, $params); + return $this->_publishViewFile($relativeThemeFile, $params); } /** @@ -884,15 +919,15 @@ class Mage_Core_Model_Design_Package $filesToMerge = array(); $mergedFile = array(); $jsDir = Mage::getBaseDir('js'); - $publicDir = $this->_buildPublicSkinFilename(''); + $publicDir = $this->_buildPublicViewFilename(''); foreach ($files as $file) { $params = array(); $this->_updateParamDefaults($params); - $filesToMerge[$file] = $this->_publishSkinFile($file, $params); + $filesToMerge[$file] = $this->_publishViewFile($file, $params); $mergedFile[] = str_replace('\\', '/', str_replace(array($jsDir, $publicDir), '', $filesToMerge[$file])); } $mergedFile = self::PUBLIC_MERGE_DIR . DIRECTORY_SEPARATOR . md5(implode('|', $mergedFile)) . ".{$contentType}"; - $mergedFile = $this->_buildPublicSkinFilename($mergedFile); + $mergedFile = $this->_buildPublicViewFilename($mergedFile); $mergedMTimeFile = $mergedFile . '.dat'; $filesMTimeData = ''; foreach ($filesToMerge as $file) { @@ -956,12 +991,12 @@ class Mage_Core_Model_Design_Package * Calculate offset between public file and public directory * * Case 1: private file to public folder - Exception; - * app/design/frontend/default/default/skin/default/style.css - * pub/skin/frontend/default/default/skin/default/style.css + * app/design/frontend/default/default/default/style.css + * pub/theme/frontend/default/default/default/style.css * - * Case 2: public file to public folder - $fileOffset = '../frontend/default/default/skin/default'; - * pub/skin/frontend/default/default/skin/default/style.css -> img/empty.gif - * pub/skin/_merged/hash.css -> ../frontend/default/default/skin/default/img/empty.gif + * Case 2: public file to public folder - $fileOffset = '../frontend/default/default/default'; + * pub/theme/frontend/default/default/default/style.css -> img/empty.gif + * pub/theme/_merged/hash.css -> ../frontend/default/default/default/img/empty.gif * * @throws Magento_Exception * @param string $originalFile path to original file @@ -1035,8 +1070,7 @@ class Mage_Core_Model_Design_Package */ protected function _getRequestedFileCacheKey($params) { - return $params['area'] . '/' . $params['package'] . '/' . $params['theme'] . '/' - . $params['skin'] . '/' . $params['locale']; + return $params['area'] . '/' . $params['package'] . '/' . $params['theme'] . '/' . $params['locale']; } /** @@ -1079,106 +1113,28 @@ class Mage_Core_Model_Design_Package * The format of the result is a multidimensional array with following structure * array ( * 'package_name' => array ( - * 'theme_name' => array ( - * 'skin_name' => true - * ) + * '0' => 'theme_name_1', + * '1' => 'theme_name_2', * ) * ) * * @param string $area - * @param bool $addInheritedSkins * @return array */ - public function getDesignEntitiesStructure($area, $addInheritedSkins = true) + public function getDesignEntitiesStructure($area) { - $areaThemeConfig = $this->getThemeConfig($area); - $areaStructure = $this->_getDesignEntitiesFilesystemStructure($area); - - foreach ($areaStructure as $packageName => &$themes) { - foreach ($themes as $themeName => &$skins) { - - /** - * Join to theme inherited skins - */ - if ($addInheritedSkins) { - $currentPackage = $packageName; - $currentTheme = $themeName; - while ($inheritedPackageTheme = $areaThemeConfig->getParentTheme($currentPackage, $currentTheme)) { - list($inheritedPackage, $inheritedTheme) = $inheritedPackageTheme; - if (!isset($areaStructure[$inheritedPackage][$inheritedTheme])) { - break; - } - $areaStructure[$packageName][$themeName] = array_merge( - $areaStructure[$packageName][$themeName], - $areaStructure[$inheritedPackage][$inheritedTheme] - ); - $currentPackage = $inheritedPackage; - $currentTheme = $inheritedTheme; - } - } - - /** - * Delete themes without skins or sort skins - */ - if (empty($areaStructure[$packageName][$themeName])) { - unset($areaStructure[$packageName][$themeName]); - } else { - ksort($skins); - } - } - /** - * Delete packages without themes or sort themes - */ - if (empty($areaStructure[$packageName])) { - unset($areaStructure[$packageName]); - } - ksort($themes); - } + $areaStructure = array(); - ksort($areaStructure); - return $areaStructure; - } + /** @var $themeCollection Mage_Core_Model_Theme_Collection */ + $themeCollection = Mage::getModel('Mage_Core_Model_Theme_Collection'); + $themeCollection->addDefaultPattern($area); - /** - * Get entities file system structure of area - * - * The format of the result is a multidimensional array with following structure - * array ( - * 'package_name' => array ( - * 'theme_name' => array ( - * 'skin_name' => true - * ) - * ) - * ) - * - * @param string $area - * @return array - */ - protected function _getDesignEntitiesFilesystemStructure($area) - { - $areaDirPath = Mage::app()->getConfig()->getOptions()->getDesignDir() . DIRECTORY_SEPARATOR . $area; - $structure = array(); - - $themePaths = glob($areaDirPath . DIRECTORY_SEPARATOR . '*' . DIRECTORY_SEPARATOR . '*', GLOB_ONLYDIR); - foreach ($themePaths as $themePath) { - $themePath = str_replace(DIRECTORY_SEPARATOR, '/', $themePath); - if (preg_match('/\/([^\/.]+)\/([^\/.]+)\/([^\/.]+)$/i', $themePath, $packageThemeMatches)) { - list (, , $packageName, $themeName) = $packageThemeMatches; - $structure[$packageName][$themeName] = array(); - } else { - continue; - } - $skinPaths = glob($areaDirPath . DIRECTORY_SEPARATOR . $packageName . DIRECTORY_SEPARATOR . - $themeName . DIRECTORY_SEPARATOR . 'skin' . DIRECTORY_SEPARATOR . '*', GLOB_ONLYDIR); - foreach ($skinPaths as $skinPath) { - $skinPath = str_replace(DIRECTORY_SEPARATOR, '/', $skinPath); - if (preg_match('/\/([^\/.]+)$/i', $skinPath, $skinMatches)) { - $structure[$packageName][$themeName][$skinMatches[1]] = true; - } - } + /** @var $theme Mage_Core_Model_Theme */ + foreach ($themeCollection as $theme) { + list($package, $theme) = explode('/', $theme->getThemePath()); + $areaStructure[$package][] = $theme; } - - return $structure; + return $areaStructure; } /** diff --git a/app/code/core/Mage/Core/Model/Design/Source/Design.php b/app/code/core/Mage/Core/Model/Design/Source/Design.php index f5130c95185c5e4331cb7a4d38338a5e3c7877ca..7962e86742b63a93c6261b06ce03589cdcebcc28 100644 --- a/app/code/core/Mage/Core/Model/Design/Source/Design.php +++ b/app/code/core/Mage/Core/Model/Design/Source/Design.php @@ -57,29 +57,29 @@ class Mage_Core_Model_Design_Source_Design extends Mage_Eav_Model_Entity_Attribu $this->_options = array(); foreach ($designEntitiesStructure as $packageCode => $themes) { - foreach ($themes as $themeCode => $skins) { - $optGroup = array( - 'label' => $config->getPackageTitle($packageCode) - . ' / ' . $config->getThemeTitle($packageCode, $themeCode), - 'value' => array() + $optGroup = array( + 'label' => $config->getPackageTitle($packageCode), + 'value' => array() + ); + + foreach ($themes as $themeCode) { + $themeTitle = $config->getThemeTitle($packageCode, $themeCode); + $optGroup['value'][] = array( + 'label' => $this->_prepareLabel($themeTitle, $packageCode, $themeCode), + 'value' => $packageCode . '/' . $themeCode, ); - foreach ($skins as $skinName => $value) { - $label = $this->_prepareLabel($skinName, $packageCode, $themeCode); - $optGroup['value'][] = array( - 'label' => $label, - 'value' => $packageCode . '/' . $themeCode . '/' . $skinName, - ); - } - $this->_options[] = $optGroup; } + $this->_sortByKey($optGroup['value'], 'label'); // order by theme title + $this->_options[] = $optGroup; } + $this->_sortByKey($this->_options, 'label'); // order by package title $options = $this->_options; if ($withEmpty) { array_unshift($options, array( - 'value'=>'', - 'label'=>Mage::helper('Mage_Core_Helper_Data')->__('-- Please Select --')) + 'value' => '', + 'label' => Mage::helper('Mage_Core_Helper_Data')->__('-- Please Select --')) ); } return $options; @@ -104,11 +104,12 @@ class Mage_Core_Model_Design_Source_Design extends Mage_Eav_Model_Entity_Attribu { $options = array(); $config = Mage::getDesign()->getThemeConfig('frontend'); - foreach (Mage::getDesign()->getDesignEntitiesStructure('frontend') as $package => $themes) { - $optGroup = array('label' => $config->getPackageTitle($package), 'value' => array()); - foreach (array_keys($themes) as $theme) { - $label = $this->_prepareLabel($config->getThemeTitle($package, $theme), $package, $theme); - $optGroup['value'][] = array('label' => $label, 'value' => "{$package}/{$theme}"); + foreach (Mage::getDesign()->getDesignEntitiesStructure('frontend') as $packageCode => $themes) { + $optGroup = array('label' => $config->getPackageTitle($packageCode), 'value' => array()); + foreach ($themes as $themeCode) { + $themeTitle = $config->getThemeTitle($packageCode, $themeCode); + $label = $this->_prepareLabel($themeTitle, $packageCode, $themeCode); + $optGroup['value'][] = array('label' => $label, 'value' => "{$packageCode}/{$themeCode}"); } $this->_sortByKey($optGroup['value'], 'label'); // order by theme title $options[] = $optGroup; diff --git a/app/code/core/Mage/Core/Model/Email/Template.php b/app/code/core/Mage/Core/Model/Email/Template.php index ab973ca5e6d6f57dabfd2c855e937a0684d21c54..39b30b967193ad2de8dfb0fbe5ef7b68db04b463 100644 --- a/app/code/core/Mage/Core/Model/Email/Template.php +++ b/app/code/core/Mage/Core/Model/Email/Template.php @@ -102,7 +102,7 @@ class Mage_Core_Model_Email_Template extends Mage_Core_Model_Template /** * Return logo URL for emails - * Take logo from skin if custom logo is undefined + * Take logo from theme if custom logo is undefined * * @param Mage_Core_Model_Store|int|string $store * @return string @@ -112,13 +112,13 @@ class Mage_Core_Model_Email_Template extends Mage_Core_Model_Template $store = Mage::app()->getStore($store); $fileName = $store->getConfig(self::XML_PATH_DESIGN_EMAIL_LOGO); if ($fileName) { - $uploadDir = Mage_Adminhtml_Model_System_Config_Backend_Email_Logo::UPLOAD_DIR; + $uploadDir = Mage_Backend_Model_Config_Backend_Email_Logo::UPLOAD_DIR; $fullFileName = Mage::getBaseDir('media') . DS . $uploadDir . DS . $fileName; if (file_exists($fullFileName)) { return Mage::getBaseUrl('media') . $uploadDir . '/' . $fileName; } } - return Mage::getDesign()->getSkinUrl('Mage_Core::logo_email.gif'); + return Mage::getDesign()->getViewFileUrl('Mage_Core::logo_email.gif'); } /** diff --git a/app/code/core/Mage/Core/Model/Email/Template/Filter.php b/app/code/core/Mage/Core/Model/Email/Template/Filter.php index b037bc045432f4a2eaff3065d7bd48efc433d8ff..761018c456fe9f9c65026cad9571fdb4cf046ffa 100644 --- a/app/code/core/Mage/Core/Model/Email/Template/Filter.php +++ b/app/code/core/Mage/Core/Model/Email/Template/Filter.php @@ -250,15 +250,15 @@ class Mage_Core_Model_Email_Template_Filter extends Varien_Filter_Template } /** - * Retrieve Skin URL directive + * Retrieve View URL directive * * @param array $construction * @return string */ - public function skinDirective($construction) + public function viewDirective($construction) { $params = $this->_getIncludeParameters($construction[2]); - $url = Mage::getDesign()->getSkinUrl($params['url'], $params); + $url = Mage::getDesign()->getViewFileUrl($params['url'], $params); return $url; } diff --git a/app/code/core/Mage/Core/Model/Helper/Registry.php b/app/code/core/Mage/Core/Model/Factory/Helper.php similarity index 84% rename from app/code/core/Mage/Core/Model/Helper/Registry.php rename to app/code/core/Mage/Core/Model/Factory/Helper.php index 31ca928a15cc9019a880d7bdd6088ed4751639cd..08d265ada696ae2df6afcf5b5640385beebf06d5 100644 --- a/app/code/core/Mage/Core/Model/Helper/Registry.php +++ b/app/code/core/Mage/Core/Model/Factory/Helper.php @@ -25,18 +25,18 @@ */ /** - * Helper registry model. Used to get helper objects + * Helper factory model. Used to get helper objects */ -class Mage_Core_Model_Helper_Registry +class Mage_Core_Model_Factory_Helper { /** * Get helper object * - * @param string $moduleName + * @param string $className * @return Mage_Core_Helper_Abstract */ - public function get($moduleName) + public function get($className) { - return Mage::helper($moduleName); + return Mage::helper($className); } } diff --git a/app/code/core/Mage/Core/Model/Layout.php b/app/code/core/Mage/Core/Model/Layout.php index 738b3f74eab82129ae777677af41008c3717b7e7..7cf32306c152df91800b8778a98472604cd520b9 100644 --- a/app/code/core/Mage/Core/Model/Layout.php +++ b/app/code/core/Mage/Core/Model/Layout.php @@ -212,7 +212,12 @@ class Mage_Core_Model_Layout extends Varien_Simplexml_Config */ public function __destruct() { + if (isset($this->_update) && is_object($this->_update)) { + $this->_update->__destruct(); + $this->_update = null; + } $this->_blocks = array(); + $this->_xml = null; } /** diff --git a/app/code/core/Mage/Core/Model/Layout/Merge.php b/app/code/core/Mage/Core/Model/Layout/Merge.php index 28d983651103fa6494c409f4ed9fadcc8a1d5498..fe502d30a71ba84a5bb90f81b66a3a86c36e4307 100644 --- a/app/code/core/Mage/Core/Model/Layout/Merge.php +++ b/app/code/core/Mage/Core/Model/Layout/Merge.php @@ -671,4 +671,16 @@ class Mage_Core_Model_Layout_Merge } return $result; } + + /** + * Cleanup circular references + * + * Destructor should be called explicitly in order to work around the PHP bug + * https://bugs.php.net/bug.php?id=62468 + */ + public function __destruct() + { + $this->_updates = array(); + $this->_layoutUpdatesCache = null; + } } diff --git a/app/code/core/Mage/Core/Model/Layout/ScheduledStructure.php b/app/code/core/Mage/Core/Model/Layout/ScheduledStructure.php index 6ccda25440b96ff0c7757412618f4083d5c530f1..d7f61bbbeebdbf37c888a642407765dc5c284218 100644 --- a/app/code/core/Mage/Core/Model/Layout/ScheduledStructure.php +++ b/app/code/core/Mage/Core/Model/Layout/ScheduledStructure.php @@ -339,4 +339,19 @@ class Mage_Core_Model_Layout_ScheduledStructure $this->_scheduledElements = array(); $this->_scheduledStructure = array(); } + + /** + * Cleanup circular references + * + * Destructor should be called explicitly in order to work around the PHP bug + * https://bugs.php.net/bug.php?id=62468 + */ + public function __destruct() + { + $this->_scheduledStructure = array(); + $this->_scheduledElements = array(); + $this->_scheduledMoves = array(); + $this->_scheduledRemoves = array(); + $this->_scheduledPaths = array(); + } } diff --git a/app/code/core/Mage/Core/Model/Layout/Translator.php b/app/code/core/Mage/Core/Model/Layout/Translator.php index be3c7111f9a6b39cce23b2a8708a7b2633461b62..47ca2843d6c6ec72c487c32a59bc84eb59c5677d 100644 --- a/app/code/core/Mage/Core/Model/Layout/Translator.php +++ b/app/code/core/Mage/Core/Model/Layout/Translator.php @@ -27,9 +27,9 @@ class Mage_Core_Model_Layout_Translator { /** - * @var Mage_Core_Model_Helper_Registry + * @var Mage_Core_Model_Factory_Helper */ - protected $_helperRegistry; + protected $_helperFactory; /** * @param array $data @@ -37,13 +37,13 @@ class Mage_Core_Model_Layout_Translator */ public function __construct(array $data = array()) { - $this->_helperRegistry = isset($data['helperRegistry']) ? + $this->_helperFactory = isset($data['helperRegistry']) ? $data['helperRegistry'] : - Mage::getSingleton('Mage_Core_Model_Helper_Registry'); + Mage::getSingleton('Mage_Core_Model_Factory_Helper'); - if (false === ($this->_helperRegistry instanceof Mage_Core_Model_Helper_Registry)) { + if (false === ($this->_helperFactory instanceof Mage_Core_Model_Factory_Helper)) { throw new InvalidArgumentException( - 'helperRegistry object has to instance of Mage_Core_Model_Helper_Registry' + 'helperFactory object has to instance of Mage_Core_Model_Factory_Helper' ); } } @@ -182,6 +182,6 @@ class Mage_Core_Model_Layout_Translator */ protected function _translateValue($value, $moduleName) { - return $this->_helperRegistry->get($moduleName)->__($value); + return $this->_helperFactory->get($moduleName)->__($value); } } diff --git a/app/code/core/Mage/Core/Model/Observer.php b/app/code/core/Mage/Core/Model/Observer.php index e298e5d864f925d23395a33cd277b563276df75c..78472858cd3e9e0dd29e2200377b881a72faa88b 100644 --- a/app/code/core/Mage/Core/Model/Observer.php +++ b/app/code/core/Mage/Core/Model/Observer.php @@ -34,13 +34,6 @@ */ class Mage_Core_Model_Observer { - /** - * Theme list - * - * @var array - */ - protected $_themeList = array(); - /** * Check if synchronize process is finished and generate notification message * @@ -122,116 +115,12 @@ class Mage_Core_Model_Observer public function themeRegistration(Varien_Event_Observer $observer) { $pathPattern = $observer->getEvent()->getPathPattern(); - /** @var $themeCollection Mage_Core_Model_Theme_Collection */ - $themeCollection = Mage::getModel('Mage_Core_Model_Theme_Collection'); try { - if ($pathPattern) { - $themeCollection->addTargetPattern($pathPattern); - } else { - $themeCollection->addDefaultPattern(); - } - foreach ($themeCollection as $theme) { - $this->_saveThemeRecursively($theme, $themeCollection); - } + Mage::getModel('Mage_Core_Model_Theme')->themeRegistration($pathPattern); } catch (Mage_Core_Exception $e) { Mage::logException($e); } return $this; } - - /** - * Save theme recursively - * - * @throws Mage_Core_Exception - * @param Mage_Core_Model_Theme $theme - * @param Mage_Core_Model_Theme_Collection $collection - * @return Mage_Core_Model_Observer - */ - protected function _saveThemeRecursively($theme, $collection) - { - $themeModel = $this->_loadThemeByPath($theme->getThemePath()); - if ($themeModel->getId()) { - return $this; - } - - $this->_addThemeToList($theme->getThemePath()); - if ($theme->getParentTheme()) { - $parentTheme = $this->_prepareParentTheme($theme, $collection); - if (!$parentTheme->getId()) { - Mage::throwException('Invalid parent theme path'); - } - $theme->setParentId($parentTheme->getId()); - } - - $theme->savePreviewImage()->save(); - $this->_emptyThemeList(); - return $this; - } - - /** - * Prepare parent theme - * - * @param Mage_Core_Model_Theme $theme - * @param Mage_Core_Model_Theme_Collection $collection - * @return Mage_Core_Model_Theme - */ - protected function _prepareParentTheme($theme, $collection) - { - $parentThemePath = implode('/', $theme->getParentTheme()); - $themeModel = $this->_loadThemeByPath($parentThemePath); - - if (!$themeModel->getId()) { - /** - * Find theme model in file system collection - */ - $filesystemThemeModel = $collection->getItemByColumnValue('theme_path', $parentThemePath); - if ($filesystemThemeModel !== null) { - $this->_saveThemeRecursively($filesystemThemeModel, $collection); - return $filesystemThemeModel; - } - } - - return $themeModel; - } - - /** - * Add theme path to list - * - * @throws Mage_Core_Exception - * @param string $themePath - * @return Mage_Core_Model_Observer - */ - protected function _addThemeToList($themePath) - { - if (in_array($themePath, $this->_themeList)) { - Mage::throwException('Invalid parent theme (Ñross-references) leads to an infinite loop.'); - } - array_push($this->_themeList, $themePath); - return $this; - } - - /** - * Clear theme list - * - * @return Mage_Core_Model_Observer - */ - protected function _emptyThemeList() - { - $this->_themeList = array(); - return $this; - } - - /** - * Load theme by path - * - * @param string $themePath - * @return Mage_Core_Model_Theme - */ - protected function _loadThemeByPath($themePath) - { - /** @var $themeModel Mage_Core_Model_Theme */ - $themeModel = Mage::getModel('Mage_Core_Model_Theme'); - return $themeModel->load($themePath, 'theme_path'); - } } diff --git a/app/code/core/Mage/Core/Model/Resource/Session.php b/app/code/core/Mage/Core/Model/Resource/Session.php index 4aac11080c235fc50a78bf9ea9855ba7fb292e23..fced3db7a26f5bcc209c5e8fb0808eaf63b15ea2 100644 --- a/app/code/core/Mage/Core/Model/Resource/Session.php +++ b/app/code/core/Mage/Core/Model/Resource/Session.php @@ -48,13 +48,6 @@ class Mage_Core_Model_Resource_Session implements Zend_Session_SaveHandler_Inter */ protected $_sessionTable; - /** - * Database read connection - * - * @var Varien_Db_Adapter_Interface - */ - protected $_read; - /** * Database write connection * @@ -65,18 +58,16 @@ class Mage_Core_Model_Resource_Session implements Zend_Session_SaveHandler_Inter /** * Constructor * + * @param Mage_Core_Model_Resource $resource */ - public function __construct() + public function __construct(Mage_Core_Model_Resource $resource) { - $resource = Mage::getSingleton('Mage_Core_Model_Resource'); $this->_sessionTable = $resource->getTableName('core_session'); - $this->_read = $resource->getConnection('core_read'); $this->_write = $resource->getConnection('core_write'); } /** - * Destrucor - * + * Destructor */ public function __destruct() { @@ -90,10 +81,10 @@ class Mage_Core_Model_Resource_Session implements Zend_Session_SaveHandler_Inter */ public function hasConnection() { - if (!$this->_read) { + if (!$this->_write) { return false; } - if (!$this->_read->isTableExists($this->_sessionTable)) { + if (!$this->_write->isTableExists($this->_sessionTable)) { return false; } @@ -147,46 +138,51 @@ class Mage_Core_Model_Resource_Session implements Zend_Session_SaveHandler_Inter /** * Fetch session data * - * @param string $sessId + * @param string $sessionId * @return string */ - public function read($sessId) + public function read($sessionId) { - $select = $this->_read->select() - ->from($this->_sessionTable, array('session_data')) - ->where('session_id = :session_id'); - $bind = array( - 'session_id' => $sessId, - ); - - $data = $this->_read->fetchOne($select, $bind); + // need to use write connection to get the most fresh DB sessions + $select = $this->_write->select() + ->from($this->_sessionTable, array('session_data')) + ->where('session_id = :session_id'); + $bind = array('session_id' => $sessionId); + $data = $this->_write->fetchOne($select, $bind); + + // if session data is a base64 encoded string + if (base64_decode($data, true) !== false) { + $data = base64_decode($data); + } return $data; } /** * Update session * - * @param string $sessId - * @param string $sessData + * @param string $sessionId + * @param string $sessionData * @return boolean */ - public function write($sessId, $sessData) + public function write($sessionId, $sessionData) { - $bindValues = array('session_id' => $sessId); + // need to use write connection to get the most fresh DB sessions + $bindValues = array('session_id' => $sessionId); $select = $this->_write->select() - ->from($this->_sessionTable) - ->where('session_id = :session_id'); - $exists = $this->_read->fetchOne($select, $bindValues); + ->from($this->_sessionTable) + ->where('session_id = :session_id'); + $exists = $this->_write->fetchOne($select, $bindValues); + // encode session serialized data to prevent insertion of incorrect symbols $bind = array( 'session_expires' => time(), - 'session_data' => $sessData + 'session_data' => base64_encode($sessionData), ); if ($exists) { - $this->_write->update($this->_sessionTable, $bind, array('session_id=?' => $sessId)); + $this->_write->update($this->_sessionTable, $bind, array('session_id=?' => $sessionId)); } else { - $bind['session_id'] = $sessId; + $bind['session_id'] = $sessionId; $this->_write->insert($this->_sessionTable, $bind); } return true; diff --git a/app/code/core/Mage/Core/Model/Resource/Theme/Collection.php b/app/code/core/Mage/Core/Model/Resource/Theme/Collection.php index acaf965112fcb070ed17a4e44a6c7b591a11a46c..da569c28829109bbdff94eb8e8e08d4c12881527 100644 --- a/app/code/core/Mage/Core/Model/Resource/Theme/Collection.php +++ b/app/code/core/Mage/Core/Model/Resource/Theme/Collection.php @@ -61,4 +61,39 @@ class Mage_Core_Model_Resource_Theme_Collection extends Mage_Core_Model_Resource { return array('' => '') + $this->_toOptionArray('theme_id', 'theme_title'); } + + /** + * Check whether all themes have non virtual parent theme + * + * @return Mage_Core_Model_Resource_Theme_Collection + */ + public function checkParentInThemes() + { + /** @var $theme Mage_Core_Model_Theme */ + foreach ($this as $theme) { + if ($theme->getParentId()) { + $theme->setParentId($this->_getParentThemeRecursively($theme->getParentId())); + $theme->save(); + } + } + return $this; + } + + /** + * Get parent non virtual theme recursively + * + * @param int $parentId + * @return int|null + */ + protected function _getParentThemeRecursively($parentId) + { + /** @var $parentTheme Mage_Core_Model_Theme */ + $parentTheme = $this->getItemById($parentId); + if (!$parentTheme->getId() || ($parentTheme->isVirtual() && !$parentTheme->getParentId())) { + $parentId = null; + } else if ($parentTheme->isVirtual()) { + $parentId = $this->_getParentThemeRecursively($parentTheme->getParentId()); + } + return $parentId; + } } diff --git a/app/code/core/Mage/Core/Model/Resource/Transaction/Factory.php b/app/code/core/Mage/Core/Model/Resource/Transaction/Factory.php new file mode 100644 index 0000000000000000000000000000000000000000..5a0669ba82c2e8b0c67042d31dbf63047578311e --- /dev/null +++ b/app/code/core/Mage/Core/Model/Resource/Transaction/Factory.php @@ -0,0 +1,45 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Mage_Core + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +class Mage_Core_Model_Resource_Transaction_Factory +{ + /** + * Global factory + * + * @var Mage_Core_Model_Config + */ + protected $_objectFactory; + + public function __construct(array $data = array()) + { + $this->_objectFactory = isset($data['objectFactory']) ? $data['objectFactory'] : Mage::getConfig(); + } + + public function create() + { + return $this->_objectFactory->getModelInstance('Mage_Core_Model_Resource_Transaction'); + } +} diff --git a/app/code/core/Mage/Core/Model/Store.php b/app/code/core/Mage/Core/Model/Store.php index 97a0801f75fc2aa13ef00edea2ad197830f069e9..ca9fbc2d0d3e0e859b07126c4a1053b8cf455138 100644 --- a/app/code/core/Mage/Core/Model/Store.php +++ b/app/code/core/Mage/Core/Model/Store.php @@ -78,7 +78,7 @@ class Mage_Core_Model_Store extends Mage_Core_Model_Abstract const URL_TYPE_WEB = 'web'; const URL_TYPE_JS = 'js'; const URL_TYPE_MEDIA = 'media'; - const URL_TYPE_SKIN = 'skin'; + const URL_TYPE_THEME = 'theme'; /** * Code constants @@ -552,10 +552,10 @@ class Mage_Core_Model_Store extends Mage_Core_Model_Abstract $url = $this->getConfig('web/' . ($secure ? 'secure' : 'unsecure') . '/base_public_url') . 'lib/'; break; - case self::URL_TYPE_SKIN: + case self::URL_TYPE_THEME: $secure = is_null($secure) ? $this->isCurrentlySecure() : (bool) $secure; $url = $this->getConfig('web/' . ($secure ? 'secure' : 'unsecure') . '/base_public_url') - . 'media/skin/'; + . 'media/theme/'; break; case self::URL_TYPE_MEDIA: diff --git a/app/code/core/Mage/Core/Model/Store/Config.php b/app/code/core/Mage/Core/Model/Store/Config.php index 964c7f281aaddf0e12668806b1b6e39c1c322259..6551a5350ae3f6a199650a126d9e1c3ca40d0a32 100644 --- a/app/code/core/Mage/Core/Model/Store/Config.php +++ b/app/code/core/Mage/Core/Model/Store/Config.php @@ -30,21 +30,23 @@ class Mage_Core_Model_Store_Config * Retrieve store config value * * @param string $path + * @param mixed $store * @return mixed */ - public function getConfig($path) + public function getConfig($path, $store = null) { - return Mage::getStoreConfig($path); + return Mage::getStoreConfig($path, $store); } /** * Retrieve store config flag * * @param string $path + * @param mixed $store * @return bool */ - public function getConfigFlag($path) + public function getConfigFlag($path, $store = null) { - return Mage::getStoreConfigFlag($path); + return Mage::getStoreConfigFlag($path, $store); } } diff --git a/app/code/core/Mage/Core/Model/Store/Group/Factory.php b/app/code/core/Mage/Core/Model/Store/Group/Factory.php new file mode 100644 index 0000000000000000000000000000000000000000..df5b0e98ca9bb72364eb8711e87297c1ce018ef7 --- /dev/null +++ b/app/code/core/Mage/Core/Model/Store/Group/Factory.php @@ -0,0 +1,52 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Mage_Core + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +/** + * Store Group factory + */ +class Mage_Core_Model_Store_Group_Factory +{ + /** + * Object Manager + * + * @var Magento_ObjectManager + */ + protected $_objectManager; + + public function __construct(Magento_ObjectManager $objectManager) + { + $this->_objectManager = $objectManager; + } + + /** + * @param array $data + * @return Mage_Core_Model_Store_Group + */ + public function create(array $data = array()) + { + return $this->_objectManager->create('Mage_Core_Model_Store_Group', $data); + } +} diff --git a/app/code/core/Mage/Core/Model/Theme.php b/app/code/core/Mage/Core/Model/Theme.php index 6a2660cce4dcae62bbaebd2bf7f96ded458e5de7..c4d1694a8708abd9006a7a5063da5de4b1af5559 100644 --- a/app/code/core/Mage/Core/Model/Theme.php +++ b/app/code/core/Mage/Core/Model/Theme.php @@ -95,7 +95,7 @@ class Mage_Core_Model_Theme extends Mage_Core_Model_Abstract */ public function getCollectionFromFilesystem() { - return Mage::getModel('Mage_Core_Model_Theme_Collection'); + return Mage::getSingleton('Mage_Core_Model_Theme_Collection'); } /** @@ -159,16 +159,37 @@ class Mage_Core_Model_Theme extends Mage_Core_Model_Abstract } /** - * Check theme is existing in filesystem + * Check is theme deletable * * @return bool */ public function isDeletable() + { + return $this->isVirtual(); + } + + /** + * Check theme is existing in filesystem + * + * @return bool + */ + public function isVirtual() { $collection = $this->getCollectionFromFilesystem()->addDefaultPattern()->getItems(); return !($this->getThemePath() && isset($collection[$this->getThemePath()])); } + /** + * Check is theme has child themes + * + * @return bool + */ + public function hasChildThemes() + { + $childThemes = $this->getCollection()->addFieldToFilter('parent_id', array('eq' => $this->getId()))->load(); + return count($childThemes) > 0; + } + /** * Update all child themes relations * @@ -416,44 +437,25 @@ class Mage_Core_Model_Theme extends Mage_Core_Model_Abstract */ protected function _getPreviewImageDefaultUrl() { - return Mage::getDesign()->getSkinUrl('Mage_Core::theme/default_preview.jpg'); + return Mage::getDesign()->getViewFileUrl('Mage_Core::theme/default_preview.jpg'); } /** - * Get skin list + * Theme registration * - * @return array + * @param string $pathPattern + * @return Mage_Core_Model_Theme */ - public function getSkinList() + public function themeRegistration($pathPattern) { - $result = array(); - $skinPaths = glob($this->_getSkinFolderPattern(), GLOB_ONLYDIR); - - foreach ($skinPaths as $skinPath) { - $skinPath = str_replace(DS, '/', $skinPath); - if (preg_match('/\/(?P<skin>[^\/.]+)$/i', $skinPath, $skinMatches)) { - $result[$skinMatches['skin']] = implode('/', array( - $this->getThemePath(), - $skinMatches['skin'] - )); - } + if ($pathPattern) { + $this->getCollectionFromFilesystem()->addTargetPattern($pathPattern); + } else { + $this->getCollectionFromFilesystem()->addDefaultPattern(); } - return $result; - } + $this->getCollectionFromFilesystem()->themeRegistration(); + $this->getCollection()->checkParentInThemes(); - /** - * Get skin folder pattern - * - * @return string - */ - protected function _getSkinFolderPattern() - { - return implode(DS, array( - Mage::getBaseDir('design'), - Mage_Core_Model_Design_Package::DEFAULT_AREA, - $this->getThemePath(), - 'skin', - '*' - )); + return $this; } } diff --git a/app/code/core/Mage/Core/Model/Theme/Collection.php b/app/code/core/Mage/Core/Model/Theme/Collection.php index c83d9183d4708112097f2ba88b53796724b85480..4faf7c80b498586d252212b9333d77c09add4046 100644 --- a/app/code/core/Mage/Core/Model/Theme/Collection.php +++ b/app/code/core/Mage/Core/Model/Theme/Collection.php @@ -43,6 +43,13 @@ class Mage_Core_Model_Theme_Collection extends Varien_Data_Collection */ protected $_targetDirs = array(); + /** + * Theme list + * + * @var array + */ + protected $_themeList = array(); + /** * Retrieve collection empty item * @@ -156,4 +163,122 @@ class Mage_Core_Model_Theme_Collection extends Varien_Data_Collection } return $items; } + + /** + * Return array for select field + * + * @param bool $addEmptyField + * @return array + */ + public function toOptionArray($addEmptyField = false) + { + $optionArray = $addEmptyField ? array('' => '') : array(); + return $optionArray + $this->_toOptionArray('theme_id', 'theme_title'); + } + + /** + * Register all themes in file system + * + * @return Mage_Core_Model_Theme_Collection + */ + public function themeRegistration() + { + foreach ($this as $theme) { + $this->_saveThemeRecursively($theme); + } + return $this; + } + + /** + * Save theme recursively + * + * @throws Mage_Core_Exception + * @param Mage_Core_Model_Theme $theme + * @return Mage_Core_Model_Theme_Collection + */ + protected function _saveThemeRecursively($theme) + { + $themeModel = $this->_loadThemeByPath($theme->getThemePath()); + if ($themeModel->getId()) { + return $this; + } + + $this->_addThemeToList($theme->getThemePath()); + if ($theme->getParentTheme()) { + $parentTheme = $this->_prepareParentTheme($theme); + if (!$parentTheme->getId()) { + Mage::throwException(Mage::helper('Mage_Core_Helper_Data')->__('Invalid parent theme path')); + } + $theme->setParentId($parentTheme->getId()); + } + + $theme->savePreviewImage()->save(); + $this->_emptyThemeList(); + return $this; + } + + /** + * Prepare parent theme + * + * @param Mage_Core_Model_Theme $theme + * @return Mage_Core_Model_Theme + */ + protected function _prepareParentTheme($theme) + { + $parentThemePath = implode('/', $theme->getParentTheme()); + $themeModel = $this->_loadThemeByPath($parentThemePath); + + if (!$themeModel->getId()) { + /** + * Find theme model in file system collection + */ + $filesystemThemeModel = $this->getItemByColumnValue('theme_path', $parentThemePath); + if ($filesystemThemeModel !== null) { + $this->_saveThemeRecursively($filesystemThemeModel); + return $filesystemThemeModel; + } + } + + return $themeModel; + } + + /** + * Add theme path to list + * + * @throws Mage_Core_Exception + * @param string $themePath + * @return Mage_Core_Model_Theme_Collection + */ + protected function _addThemeToList($themePath) + { + if (in_array($themePath, $this->_themeList)) { + Mage::throwException( + Mage::helper('Mage_Core_Helper_Data')->__('Invalid parent theme (Ñross-references) leads to an infinite loop.') + ); + } + array_push($this->_themeList, $themePath); + return $this; + } + + /** + * Clear theme list + * + * @return Mage_Core_Model_Theme_Collection + */ + protected function _emptyThemeList() + { + $this->_themeList = array(); + return $this; + } + + /** + * Load theme by path + * + * @param string $themePath + * @return Mage_Core_Model_Theme + */ + protected function _loadThemeByPath($themePath) + { + return $this->getNewEmptyItem()->load($themePath, 'theme_path'); + } } diff --git a/app/code/core/Mage/Core/Model/Translate.php b/app/code/core/Mage/Core/Model/Translate.php index dac9f88926ed53a8929eec77793c6d699ae5ef89..3b587c348ca2143b004b67a30cd3de752794059c 100644 --- a/app/code/core/Mage/Core/Model/Translate.php +++ b/app/code/core/Mage/Core/Model/Translate.php @@ -436,10 +436,10 @@ class Mage_Core_Model_Translate { $text = array_shift($args); - if (is_string($text) && ''==$text + if (is_string($text) && '' == $text || is_null($text) - || is_bool($text) && false===$text - || is_object($text) && ''==$text->getText()) { + || is_bool($text) && false === $text + || is_object($text) && '' == $text->getText()) { return ''; } if ($text instanceof Mage_Core_Model_Translate_Expr) { @@ -450,9 +450,9 @@ class Mage_Core_Model_Translate } else { if (!empty($_REQUEST['theme'])) { - $module = 'frontend/default/'.$_REQUEST['theme']; + $module = 'frontend/default/' . $_REQUEST['theme']; } else { - $module = 'frontend/default/default'; + $module = 'frontend/default/demo'; } $code = $module.self::SCOPE_SEPARATOR.$text; $translated = $this->_getTranslatedString($text, $code); diff --git a/app/code/core/Mage/Core/Model/Translate/Inline.php b/app/code/core/Mage/Core/Model/Translate/Inline.php index fa3818843ad453ff83b2ec9ca738b69401b14b8e..8aa1717018c8b34db27f7e593a4391849adf8282 100644 --- a/app/code/core/Mage/Core/Model/Translate/Inline.php +++ b/app/code/core/Mage/Core/Model/Translate/Inline.php @@ -260,17 +260,17 @@ class Mage_Core_Model_Translate_Inline } $ajaxUrl = $urlModel->getUrl($urlPrefix . '/ajax/translate', array('_secure'=>Mage::app()->getStore()->isCurrentlySecure())); - $trigImg = Mage::getDesign()->getSkinUrl('Mage_Core::fam_book_open.png'); + $trigImg = Mage::getDesign()->getViewFileUrl('Mage_Core::fam_book_open.png'); ob_start(); $design = Mage::getDesign(); ?> -<script type="text/javascript" src="<?php echo $design->getSkinUrl('prototype/window.js') ?>"></script> -<link rel="stylesheet" type="text/css" href="<?php echo $design->getSkinUrl('prototype/windows/themes/default.css') ?>"/> -<link rel="stylesheet" type="text/css" href="<?php echo $design->getSkinUrl('Mage_Core::prototype/magento.css') ?>"/> -<script type="text/javascript" src="<?php echo $design->getSkinUrl('mage/edit-trigger.js') ?>"></script> -<script type="text/javascript" src="<?php echo $design->getSkinUrl('mage/translate-inline.js') ?>"></script> -<link rel="stylesheet" type="text/css" href="<?php echo $design->getSkinUrl('mage/translate-inline.css') ?>"/> +<script type="text/javascript" src="<?php echo $design->getViewFileUrl('prototype/window.js') ?>"></script> +<link rel="stylesheet" type="text/css" href="<?php echo $design->getViewFileUrl('prototype/windows/themes/default.css') ?>"/> +<link rel="stylesheet" type="text/css" href="<?php echo $design->getViewFileUrl('Mage_Core::prototype/magento.css') ?>"/> +<script type="text/javascript" src="<?php echo $design->getViewFileUrl('mage/edit-trigger.js') ?>"></script> +<script type="text/javascript" src="<?php echo $design->getViewFileUrl('mage/translate-inline.js') ?>"></script> +<link rel="stylesheet" type="text/css" href="<?php echo $design->getViewFileUrl('mage/translate-inline.css') ?>"/> <script type="text/javascript"> (function($){ diff --git a/app/code/core/Mage/Core/Model/Url.php b/app/code/core/Mage/Core/Model/Url.php index 671ddeb8b8a40ed329a87c054251451b4f2b3dfc..c6c68bc31dff0ad5c7d1d58dc467fff65e3824a8 100644 --- a/app/code/core/Mage/Core/Model/Url.php +++ b/app/code/core/Mage/Core/Model/Url.php @@ -997,6 +997,8 @@ class Mage_Core_Model_Url extends Varien_Object if ($query) { $mark = (strpos($url, '?') === false) ? '?' : ($escapeQuery ? '&' : '&'); $url .= $mark . $query; + $this->unsetData('query'); + $this->unsetData('query_params'); } if ($this->getFragment()) { diff --git a/app/code/core/Mage/Core/Model/Variable/Config.php b/app/code/core/Mage/Core/Model/Variable/Config.php index 3bbb732ab951df70544a91e028c64d4ab31da1c2..89ef8b2d7ea50c4d874b74dfa4177d69eb2e6aac 100644 --- a/app/code/core/Mage/Core/Model/Variable/Config.php +++ b/app/code/core/Mage/Core/Model/Variable/Config.php @@ -67,7 +67,7 @@ class Mage_Core_Model_Variable_Config public function getWysiwygJsPluginSrc() { $editorPluginJs = 'mage/adminhtml/wysiwyg/tiny_mce/plugins/magentovariable/editor_plugin.js'; - return Mage::getDesign()->getSkinUrl($editorPluginJs); + return Mage::getDesign()->getViewFileUrl($editorPluginJs); } /** @@ -77,6 +77,6 @@ class Mage_Core_Model_Variable_Config */ public function getVariablesWysiwygActionUrl() { - return Mage::getSingleton('Mage_Adminhtml_Model_Url')->getUrl('*/system_variable/wysiwygPlugin'); + return Mage::getSingleton('Mage_Backend_Model_Url')->getUrl('*/system_variable/wysiwygPlugin'); } } diff --git a/app/code/core/Mage/Core/Model/Website/Factory.php b/app/code/core/Mage/Core/Model/Website/Factory.php new file mode 100644 index 0000000000000000000000000000000000000000..e836291d8b9a7672d40e95555fbb8e4506593436 --- /dev/null +++ b/app/code/core/Mage/Core/Model/Website/Factory.php @@ -0,0 +1,52 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Mage_Core + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +/** + * Website factory + */ +class Mage_Core_Model_Website_Factory +{ + /** + * Object Manager + * + * @var Magento_ObjectManager + */ + protected $_objectManager; + + public function __construct(Magento_ObjectManager $objectManager) + { + $this->_objectManager = $objectManager; + } + + /** + * @param array $data + * @return Mage_Core_Model_Website + */ + public function create(array $data = array()) + { + return $this->_objectManager->create('Mage_Core_Model_Website', $data); + } +} diff --git a/app/code/core/Mage/Core/data/core_setup/data-upgrade-1.6.0.4-1.6.0.5.php b/app/code/core/Mage/Core/data/core_setup/data-upgrade-1.6.0.4-1.6.0.5.php index 50b73c22d0d1d5b6c9d55ee8bcbdeb9d6a6c0d02..451de151aed0b6fd45c777d581d2f99300980218 100644 --- a/app/code/core/Mage/Core/data/core_setup/data-upgrade-1.6.0.4-1.6.0.5.php +++ b/app/code/core/Mage/Core/data/core_setup/data-upgrade-1.6.0.4-1.6.0.5.php @@ -32,6 +32,11 @@ $tableName = $installer->getTable('admin_rule'); if ($tableName) { $installer->getConnection()->delete($tableName, array('resource_id = ?' => 'admin/system/tools/compiler')); } +$tableName = $installer->getTable('core_resource'); +if ($tableName) { + $installer->getConnection()->delete($tableName, array('code = ?' => 'admin_setup')); +} + $installer->endSetup(); diff --git a/app/code/core/Mage/Core/etc/adminhtml/system.xml b/app/code/core/Mage/Core/etc/adminhtml/system.xml new file mode 100644 index 0000000000000000000000000000000000000000..3b1b0cc118cd43bd704b4334e7bf6d5183c6b93a --- /dev/null +++ b/app/code/core/Mage/Core/etc/adminhtml/system.xml @@ -0,0 +1,625 @@ +<?xml version="1.0"?> +<!-- +/** + * 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 Mage_Core + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> + <system> + <tab id="general" translate="label" module="Mage_Core" sortOrder="100"> + <label>General</label> + </tab> + <tab id="service" translate="label" module="Mage_Core" sortOrder="99999"> + <label>Services</label> + </tab> + <tab id="advanced" translate="label" module="Mage_Core" sortOrder="999999"> + <label>Advanced</label> + </tab> + <section id="advanced" translate="label" module="Mage_Core" type="text" sortOrder="910" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Advanced</label> + <tab>advanced</tab> + <resource>Mage_Adminhtml::advanced</resource> + <group id="modules_disable_output" translate="label" type="text" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Disable Modules Output</label> + <frontend_model>Mage_Backend_Block_System_Config_Form_Fieldset_Modules_DisableOutput</frontend_model> + </group> + </section> + <section id="trans_email" translate="label" module="Mage_Core" type="text" sortOrder="90" showInDefault="1" showInWebsite="1" showInStore="1"> + <class>separator-top</class> + <label>Store Email Addresses</label> + <tab>general</tab> + <resource>Mage_Adminhtml::trans_email</resource> + <group id="ident_custom1" translate="label" type="text" sortOrder="4" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Custom Email 1</label> + <field id="email" translate="label" type="text" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Sender Email</label> + <validate>validate-email</validate> + <backend_model>Mage_Backend_Model_Config_Backend_Email_Address</backend_model> + </field> + <field id="name" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Sender Name</label> + <backend_model>Mage_Backend_Model_Config_Backend_Email_Sender</backend_model> + <validate>validate-emailSender</validate> + </field> + </group> + <group id="ident_custom2" translate="label" type="text" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Custom Email 2</label> + <field id="email" translate="label" type="text" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Sender Email</label> + <validate>validate-email</validate> + <backend_model>Mage_Backend_Model_Config_Backend_Email_Address</backend_model> + </field> + <field id="name" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Sender Name</label> + <backend_model>Mage_Backend_Model_Config_Backend_Email_Sender</backend_model> + <validate>validate-emailSender</validate> + </field> + </group> + <group id="ident_general" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>General Contact</label> + <field id="email" translate="label" type="text" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Sender Email</label> + <validate>validate-email</validate> + <backend_model>Mage_Backend_Model_Config_Backend_Email_Address</backend_model> + </field> + <field id="name" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Sender Name</label> + <backend_model>Mage_Backend_Model_Config_Backend_Email_Sender</backend_model> + <validate>validate-emailSender</validate> + </field> + </group> + <group id="ident_sales" translate="label" type="text" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Sales Representative</label> + <field id="email" translate="label" type="text" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Sender Email</label> + <validate>validate-email</validate> + <backend_model>Mage_Backend_Model_Config_Backend_Email_Address</backend_model> + </field> + <field id="name" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Sender Name</label> + <backend_model>Mage_Backend_Model_Config_Backend_Email_Sender</backend_model> + <validate>validate-emailSender</validate> + </field> + </group> + <group id="ident_support" translate="label" type="text" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Customer Support</label> + <field id="email" translate="label" type="text" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Sender Email</label> + <validate>validate-email</validate> + <backend_model>Mage_Backend_Model_Config_Backend_Email_Address</backend_model> + </field> + <field id="name" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Sender Name</label> + <backend_model>Mage_Backend_Model_Config_Backend_Email_Sender</backend_model> + <validate>validate-emailSender</validate> + </field> + </group> + </section> + <section id="design" translate="label" module="Mage_Core" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Design</label> + <tab>general</tab> + <resource>Mage_Adminhtml::config_design</resource> + <group id="theme" translate="label" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Design Theme</label> + <field id="full_name" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Design Theme</label> + <source_model>Mage_Core_Model_Design_Source_Design::getOptions</source_model> + <backend_model>Mage_Core_Model_Design_Backend_Theme</backend_model> + </field> + <field id="ua_regexp" translate="label comment tooltip" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>User-Agent Exceptions</label> + <frontend_model>Mage_Backend_Block_System_Config_Form_Field_Regexceptions</frontend_model> + <backend_model>Mage_Core_Model_Design_Backend_Exceptions</backend_model> + <comment> + <![CDATA[Search strings are either normal strings or regular exceptions (PCRE). They are matched in the same order as entered. Examples:<br /><span style="font-family:monospace">Firefox<br />/^mozilla/i</span>]]> +</comment> + <tooltip>Find a string in client user-agent header and switch to specific design theme for that browser.</tooltip> + </field> + </group> + <group id="pagination" translate="label" type="text" sortOrder="500" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Pagination</label> + <field id="pagination_frame" translate="label comment" type="text" sortOrder="7" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Pagination Frame</label> + <comment>How many links to display at once.</comment> + </field> + <field id="pagination_frame_skip" translate="label comment" type="text" sortOrder="8" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Pagination Frame Skip</label> + <comment>If the current frame position does not cover utmost pages, will render link to current position plus/minus this value.</comment> + </field> + <field id="anchor_text_for_previous" translate="label comment" type="text" sortOrder="9" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Anchor Text for Previous</label> + <comment>Alternative text for previous link in pagination menu. If empty, default arrow image will used.</comment> + </field> + <field id="anchor_text_for_next" translate="label comment" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Anchor Text for Next</label> + <comment>Alternative text for next link in pagination menu. If empty, default arrow image will used.</comment> + </field> + </group> + <group id="email" translate="label" type="text" sortOrder="510" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Transactional Emails</label> + <field id="logo" translate="label" type="image" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Logo Image</label> + <comment>Allowed file types: jpg, jpeg, gif, png</comment> + <backend_model>Mage_Backend_Model_Config_Backend_Email_Logo</backend_model> + <base_url type="media" scope_info="1">email/logo</base_url> + </field> + <field id="logo_alt" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Logo Image Alt</label> + </field> + </group> + </section> + <section id="dev" translate="label" module="Mage_Core" type="text" sortOrder="920" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Developer</label> + <tab>advanced</tab> + <resource>Mage_Adminhtml::dev</resource> + <group id="restrict" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Developer Client Restrictions</label> + <field id="allow_ips" translate="label comment" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Allowed IPs (comma separated)</label> + <comment>Leave empty for access from any location.</comment> + </field> + </group> + <group id="debug" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Debug</label> + <field id="template_hints" translate="label" type="select" sortOrder="20" showInDefault="0" showInWebsite="1" showInStore="1"> + <label>Template Path Hints</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="template_hints_blocks" translate="label" type="select" sortOrder="21" showInDefault="0" showInWebsite="1" showInStore="1"> + <label>Add Block Names to Hints</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + </group> + <group id="template" translate="label" type="text" sortOrder="25" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Template Settings</label> + <field id="allow_symlink" translate="label comment" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Allow Symlinks</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + <comment>Warning! Enabling this feature is not recommended on production environments because it represents a potential security risk.</comment> + </field> + </group> + <group id="translate_inline" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Translate Inline</label> + <field id="active" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Enabled for Frontend</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + <backend_model>Mage_Backend_Model_Config_Backend_Translate</backend_model> + </field> + <field id="active_admin" translate="label comment" type="select" sortOrder="20" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Enabled for Admin</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + <backend_model>Mage_Backend_Model_Config_Backend_Translate</backend_model> + <comment>Translate, blocks and other output caches should be disabled for both frontend and admin inline translations.</comment> + </field> + </group> + <group id="log" translate="label" type="text" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Log Settings</label> + <field id="active" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Enabled</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="file" translate="label comment" type="text" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>System Log File Name</label> + <backend_model>Mage_Backend_Model_Config_Backend_Filename</backend_model> + <comment>Logging from Mage::log(). File is located in {{base_dir}}/var/log</comment> + </field> + <field id="exception_file" translate="label comment" type="text" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Exceptions Log File Name</label> + <backend_model>Mage_Backend_Model_Config_Backend_Filename</backend_model> + <comment>Logging from Mage::logException(). File is located in {{base_dir}}/var/log</comment> + </field> + </group> + <group id="js" translate="label" type="text" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>JavaScript Settings</label> + <field id="merge_files" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Merge JavaScript Files</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + </group> + <group id="css" translate="label" type="text" sortOrder="110" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>CSS Settings</label> + <field id="merge_css_files" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Merge CSS Files</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + </group> + <group id="image" translate="label" type="text" sortOrder="120" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Image Processing Settings</label> + <field id="adapter" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Image Adapter</label> + <source_model>Mage_Backend_Model_Config_Source_Image_Adapter</source_model> + <backend_model>Mage_Backend_Model_Config_Backend_Image_Adapter</backend_model> + <comment>When the adapter was changed, please, flush Catalog Images Cache.</comment> + </field> + </group> + <group id="static" translate="label" type="text" sortOrder="130" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Static Files Settings</label> + <field id="sign" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Sign Static Files</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + </group> + </section> + <section id="general" translate="label" module="Mage_Core" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>General</label> + <tab>general</tab> + <resource>Mage_Adminhtml::config_general</resource> + <group id="country" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Country Options</label> + <field id="allow" translate="label" type="multiselect" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Allow Countries</label> + <source_model>Mage_Directory_Model_Config_Source_Country</source_model> + <can_be_empty>1</can_be_empty> + </field> + <field id="default" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Default Country</label> + <source_model>Mage_Directory_Model_Config_Source_Country</source_model> + </field> + <field id="eu_countries" translate="label" type="multiselect" sortOrder="30" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>European Union Countries</label> + <source_model>Mage_Directory_Model_Config_Source_Country</source_model> + </field> + </group> + <group id="locale" translate="label" type="text" sortOrder="8" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Locale Options</label> + <field id="timezone" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Timezone</label> + <source_model>Mage_Backend_Model_Config_Source_Locale_Timezone</source_model> + <backend_model>Mage_Backend_Model_Config_Backend_Locale_Timezone</backend_model> + </field> + <field id="code" translate="label" type="select" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Locale</label> + <source_model>Mage_Backend_Model_Config_Source_Locale</source_model> + </field> + <field id="firstday" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>First Day of Week</label> + <source_model>Mage_Backend_Model_Config_Source_Locale_Weekdays</source_model> + </field> + <field id="weekend" translate="label" type="multiselect" sortOrder="15" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Weekend Days</label> + <source_model>Mage_Backend_Model_Config_Source_Locale_Weekdays</source_model> + <can_be_empty>1</can_be_empty> + </field> + </group> + <group id="store_information" translate="label" type="text" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Store Information</label> + <field id="name" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Store Name</label> + </field> + <field id="phone" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Store Contact Telephone</label> + </field> + <field id="merchant_country" translate="label" type="select" sortOrder="25" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Country</label> + <source_model>Mage_Directory_Model_Config_Source_Country</source_model> + <can_be_empty>1</can_be_empty> + </field> + <field id="merchant_vat_number" translate="label" type="text" sortOrder="27" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>VAT Number</label> + <can_be_empty>1</can_be_empty> + </field> + <field id="address" translate="label" type="textarea" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Store Contact Address</label> + </field> + </group> + <group id="single_store_mode" translate="label" type="text" sortOrder="150" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Single-Store Mode</label> + <field id="enabled" translate="label comment" type="select" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Enable Single-Store Mode</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + <comment>This setting will not be taken into account if system has more than one store view.</comment> + </field> + </group> + </section> + <section id="system" translate="label" module="Mage_Core" type="text" sortOrder="900" showInDefault="1" showInWebsite="1" showInStore="1"> + <class>separator-top</class> + <label>System</label> + <tab>advanced</tab> + <resource>Mage_Adminhtml::config_system</resource> + <group id="smtp" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Mail Sending Settings</label> + <field id="disable" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Disable Email Communications</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="host" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Host</label> + <comment>For Windows server only.</comment> + </field> + <field id="port" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Port (25)</label> + <comment>For Windows server only.</comment> + </field> + <field id="set_return_path" translate="label" type="select" sortOrder="70" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Set Return-Path</label> + <source_model>Mage_Backend_Model_Config_Source_Yesnocustom</source_model> + </field> + <field id="return_path_email" translate="label" type="text" sortOrder="80" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Return-Path Email</label> + <validate>validate-email</validate> + <backend_model>Mage_Backend_Model_Config_Backend_Email_Address</backend_model> + <depends> + <field id="set_return_path">2</field> + </depends> + </field> + </group> + <group id="media_storage_configuration" translate="label" module="Mage_Core" type="text" sortOrder="900" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Storage Configuration for Media</label> + <field id="media_storage" translate="label" type="select" sortOrder="100" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Media Storage</label> + <source_model>Mage_Backend_Model_Config_Source_Storage_Media_Storage</source_model> + </field> + <field id="media_database" translate="label" type="select" sortOrder="200" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Select Media Database</label> + <source_model>Mage_Backend_Model_Config_Source_Storage_Media_Database</source_model> + <backend_model>Mage_Backend_Model_Config_Backend_Storage_Media_Database</backend_model> + <depends> + <field id="media_storage">1</field> + </depends> + </field> + <field id="synchronize" translate="label comment" type="button" sortOrder="300" showInDefault="1" showInWebsite="0" showInStore="0"> + <frontend_model>Mage_Backend_Block_System_Config_System_Storage_Media_Synchronize</frontend_model> + <comment>After selecting a new media storage location, press the Synchronize button to transfer all media to that location. Media will not be available in the new location until the synchronization process is complete.</comment> + </field> + <field id="configuration_update_time" translate="label" type="text" sortOrder="400" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Environment Update Time</label> + </field> + </group> + </section> + <section id="admin" translate="label" module="Mage_Core" type="text" sortOrder="20" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Admin</label> + <tab>advanced</tab> + <resource>Mage_Adminhtml::config_admin</resource> + <group id="emails" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Admin User Emails</label> + <field id="forgot_email_template" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Forgot Password Email Template</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Template</source_model> + </field> + <field id="forgot_email_identity" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Forgot Password Email Sender</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Identity</source_model> + </field> + <field id="password_reset_link_expiration_period" translate="label comment" type="text" sortOrder="30" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Recovery Link Expiration Period (days)</label> + <comment>Please enter a number 1 or greater in this field.</comment> + <validate>required-entry validate-digits validate-digits-range digits-range-1-</validate> + <backend_model>Mage_Backend_Model_Config_Backend_Admin_Password_Link_Expirationperiod</backend_model> + </field> + </group> + <group id="startup" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Startup Page</label> + <field id="menu_item_id" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Startup Page</label> + <source_model>Mage_Backend_Model_Config_Source_Admin_Page</source_model> + </field> + </group> + <group id="url" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Admin Base URL</label> + <field id="use_custom" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Use Custom Admin URL</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + <backend_model>Mage_Backend_Model_Config_Backend_Admin_Usecustom</backend_model> + </field> + <field id="custom" translate="label comment" type="text" sortOrder="2" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Custom Admin URL</label> + <backend_model>Mage_Backend_Model_Config_Backend_Admin_Custom</backend_model> + <depends> + <field id="use_custom">1</field> + </depends> + <comment>Make sure that base URL ends with '/' (slash), e.g. http://yourdomain/magento/</comment> + </field> + <field id="use_custom_path" translate="label" type="select" sortOrder="3" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Use Custom Admin Path</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + <backend_model>Mage_Backend_Model_Config_Backend_Admin_Usecustompath</backend_model> + </field> + <field id="custom_path" translate="label comment" type="text" sortOrder="4" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Custom Admin Path</label> + <validate>required-entry validate-alphanum</validate> + <backend_model>Mage_Backend_Model_Config_Backend_Admin_Custompath</backend_model> + <depends> + <field id="use_custom_path">1</field> + </depends> + <comment>You will have to log in after you save your custom admin path.</comment> + </field> + </group> + <group id="security" translate="label" type="text" sortOrder="35" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Security</label> + <field id="use_form_key" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Add Secret Key to URLs</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + <backend_model>Mage_Backend_Model_Config_Backend_Admin_Usesecretkey</backend_model> + </field> + <field id="use_case_sensitive_login" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Login is Case Sensitive</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="session_lifetime" translate="label comment" sortOrder="3" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Admin Session Lifetime (seconds)</label> + <comment>Values less than 60 are ignored.</comment> + <validate>validate-digits</validate> + </field> + </group> + <group id="dashboard" translate="label" sortOrder="40" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Dashboard</label> + <field id="enable_charts" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Enable Charts</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + </group> + </section> + <section id="web" translate="label" module="Mage_Core" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Web</label> + <tab>general</tab> + <resource>Mage_Adminhtml::web</resource> + <group id="url" translate="label" type="text" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Url Options</label> + <field id="use_store" translate="label comment" type="select" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Add Store Code to Urls</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + <backend_model>Mage_Backend_Model_Config_Backend_Store</backend_model> + <comment> + <![CDATA[<strong style="color:red">Warning!</strong> When using Store Code in URLs, in some cases system may not work properly if URLs without Store Codes are specified in the third party services (e.g. PayPal etc.).]]> +</comment> + </field> + <field id="redirect_to_base" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Auto-redirect to Base URL</label> + <source_model>Mage_Backend_Model_Config_Source_Web_Redirect</source_model> + <comment>I.e. redirect from http://example.com/store/ to http://www.example.com/store/</comment> + </field> + </group> + <group id="seo" translate="label" type="text" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Search Engines Optimization</label> + <field id="use_rewrites" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Use Web Server Rewrites</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + </group> + <group id="unsecure" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Unsecure</label> + <field id="base_url" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Base URL</label> + <backend_model>Mage_Backend_Model_Config_Backend_Baseurl</backend_model> + </field> + <field id="base_link_url" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Base Link URL</label> + <backend_model>Mage_Backend_Model_Config_Backend_Baseurl</backend_model> + </field> + <field id="base_public_url" translate="label comment" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Base URL for Public Static Files</label> + <backend_model>Mage_Backend_Model_Config_Backend_Baseurl</backend_model> + <comment><strong style="color:red">Warning!</strong> When using CDN, in some cases JavaScript may not run properly if CDN is not in your subdomain</comment> + </field> + <field id="base_media_url" translate="label" type="text" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Base Media URL</label> + <backend_model>Mage_Backend_Model_Config_Backend_Baseurl</backend_model> + </field> + </group> + <group id="secure" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Secure</label> + <field id="base_url" translate="label comment" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Base URL</label> + <backend_model>Mage_Backend_Model_Config_Backend_Baseurl</backend_model> + <comment>Make sure that base URL ends with '/' (slash), e.g. http://yourdomain/magento/</comment> + </field> + <field id="base_link_url" translate="label comment" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Base Link URL</label> + <backend_model>Mage_Backend_Model_Config_Backend_Baseurl</backend_model> + <comment>Make sure that base URL ends with '/' (slash), e.g. http://yourdomain/magento/</comment> + </field> + <field id="base_public_url" translate="label comment" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Base URL for Public Static Files</label> + <backend_model>Mage_Backend_Model_Config_Backend_Baseurl</backend_model> + <comment><strong style="color:red">Warning!</strong> When using CDN, in some cases JavaScript may not run properly if CDN is not in your subdomain</comment> + </field> + <field id="base_media_url" translate="label" type="text" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Base Media URL</label> + <backend_model>Mage_Backend_Model_Config_Backend_Baseurl</backend_model> + </field> + <field id="use_in_frontend" translate="label" type="select" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Use Secure URLs in Frontend</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + <backend_model>Mage_Backend_Model_Config_Backend_Secure</backend_model> + </field> + <field id="use_in_adminhtml" translate="label" type="select" sortOrder="60" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Use Secure URLs in Admin</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + <backend_model>Mage_Backend_Model_Config_Backend_Secure</backend_model> + </field> + <field id="offloader_header" translate="label" type="text" sortOrder="70" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Offloader header</label> + </field> + </group> + <group id="default" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Default Pages</label> + <field id="front" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Default Web URL</label> + </field> + <field id="no_route" translate="label" type="text" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Default No-route URL</label> + </field> + </group> + <group id="polls" translate="label" type="text" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Polls</label> + </group> + <group id="cookie" translate="label" type="text" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Default Cookie Settings</label> + <field id="cookie_lifetime" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Cookie Lifetime</label> + </field> + <field id="cookie_path" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Cookie Path</label> + </field> + <field id="cookie_domain" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Cookie Domain</label> + </field> + <field id="cookie_httponly" translate="label" type="select" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Use HTTP Only</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="cookie_restriction" translate="label" type="select" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Cookie Restriction Mode</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + <backend_model>Mage_Backend_Model_Config_Backend_Cookie</backend_model> + </field> + </group> + <group id="session" translate="label" type="text" sortOrder="60" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Session Validation Settings</label> + <field id="use_remote_addr" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Validate REMOTE_ADDR</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="use_http_via" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Validate HTTP_VIA</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="use_http_x_forwarded_for" translate="label" type="select" sortOrder="30" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Validate HTTP_X_FORWARDED_FOR</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="use_http_user_agent" translate="label" type="select" sortOrder="40" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Validate HTTP_USER_AGENT</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="use_frontend_sid" translate="label comment" type="select" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Use SID on Frontend</label> + <comment>Allows customers to stay logged in when switching between different stores.</comment> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + </group> + <group id="browser_capabilities" translate="label" type="text" sortOrder="200" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Browser Capabilities Detection</label> + <field id="cookies" translate="label" module="Mage_Cms" type="select" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Redirect to CMS-page if Cookies are Disabled</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="javascript" translate="label" module="Mage_Cms" type="select" sortOrder="200" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Show Notice if JavaScript is Disabled</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + </group> + </section> + </system> +</config> diff --git a/app/code/core/Mage/Core/etc/config.xml b/app/code/core/Mage/Core/etc/config.xml index c74f398e4c67d8c0a80a264e831dde8c1ac4e68f..0b841c4f0c87f8caa6fee8e04725d0464c22fc5b 100644 --- a/app/code/core/Mage/Core/etc/config.xml +++ b/app/code/core/Mage/Core/etc/config.xml @@ -177,6 +177,11 @@ </observers> </show_synchronize_message> </events> + <design> + <theme> + <full_name>default/basic</full_name> + </theme> + </design> <di> <preferences> <Mage_Core_Model_Url>Mage_Backend_Model_Url</Mage_Core_Model_Url> @@ -193,12 +198,17 @@ </Mage_Core> </modules> </translate> + <design> + <theme> + <full_name>default/basic</full_name> + </theme> + </design> </install> <default> <design> <theme> - <full_name>default/default/default</full_name> - <allow_skin_files_duplication>1</allow_skin_files_duplication> + <full_name>default/demo</full_name> + <allow_view_files_duplication>1</allow_view_files_duplication> </theme> <pagination> <list_allow_all>1</list_allow_all> @@ -242,7 +252,7 @@ <compiled_css_folder>css</compiled_css_folder> <compiled_css_secure_folder>css_secure</compiled_css_secure_folder> <compiled_js_folder>js</compiled_js_folder> - <design_skin_folder>skin</design_skin_folder> + <design_theme_folder>theme</design_theme_folder> </allowed_resources> </media_storage_configuration> </system> diff --git a/app/code/core/Mage/Core/etc/system.xml b/app/code/core/Mage/Core/etc/system.xml deleted file mode 100644 index 6e4111180ab06dc14b4ddc3346170f58b019d6e5..0000000000000000000000000000000000000000 --- a/app/code/core/Mage/Core/etc/system.xml +++ /dev/null @@ -1,1465 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * 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 Mage_Core - * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<config> - <tabs> - <general translate="label" module="Mage_Core"> - <label>General</label> - <sort_order>100</sort_order> - </general> - <service translate="label" module="Mage_Core"> - <label>Services</label> - <sort_order>99999</sort_order> - </service> - <advanced translate="label" module="Mage_Core"> - <label>Advanced</label> - <sort_order>999999</sort_order> - </advanced> - </tabs> - <sections> - <!--<web_track translate="label" module="Mage_Core"> - <label>Web Tracking</label> - <frontend_type>text</frontend_type> - <sort_order>180</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </web_track>--> - <advanced translate="label" module="Mage_Core"> - <label>Advanced</label> - <tab>advanced</tab> - <frontend_type>text</frontend_type> - <sort_order>910</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <resource>Mage_Adminhtml::advanced</resource> - <groups> - <!--datashare translate="label"> - <label>Datasharing</label> - <frontend_type>text</frontend_type> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <fields> - <default translate="label"> - <label>Default</label> - <frontend_type>multiselect</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Datashare</backend_model> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Store</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </default> - <default translate="label"> - <label>Default</label> - <frontend_type>multiselect</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Datashare</backend_model> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Store</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </default> - </fields> - </datashare--> - <modules_disable_output translate="label"> - <label>Disable Modules Output</label> - <frontend_type>text</frontend_type> - <frontend_model>Mage_Adminhtml_Block_System_Config_Form_Fieldset_Modules_DisableOutput</frontend_model> - <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> - </modules_disable_output> - </groups> - </advanced> - <trans_email translate="label" module="Mage_Core"> - <class>separator-top</class> - <label>Store Email Addresses</label> - <tab>general</tab> - <frontend_type>text</frontend_type> - <sort_order>90</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <resource>Mage_Adminhtml::trans_email</resource> - <groups> - <ident_custom1 translate="label"> - <label>Custom Email 1</label> - <frontend_type>text</frontend_type> - <sort_order>4</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <email translate="label"> - <label>Sender Email</label> - <frontend_type>text</frontend_type> - <validate>validate-email</validate> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Email_Address</backend_model> - <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> - </email> - <name translate="label"> - <label>Sender Name</label> - <frontend_type>text</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Email_Sender</backend_model> - <validate>validate-emailSender</validate> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </name> - </fields> - </ident_custom1> - <ident_custom2 translate="label"> - <label>Custom Email 2</label> - <frontend_type>text</frontend_type> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <email translate="label"> - <label>Sender Email</label> - <frontend_type>text</frontend_type> - <validate>validate-email</validate> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Email_Address</backend_model> - <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> - </email> - <name translate="label"> - <label>Sender Name</label> - <frontend_type>text</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Email_Sender</backend_model> - <validate>validate-emailSender</validate> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </name> - </fields> - </ident_custom2> - <ident_general translate="label"> - <label>General Contact</label> - <frontend_type>text</frontend_type> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <email translate="label"> - <label>Sender Email</label> - <frontend_type>text</frontend_type> - <validate>validate-email</validate> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Email_Address</backend_model> - <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> - </email> - <name translate="label"> - <label>Sender Name</label> - <frontend_type>text</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Email_Sender</backend_model> - <validate>validate-emailSender</validate> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </name> - </fields> - </ident_general> - <ident_sales translate="label"> - <label>Sales Representative</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> - <fields> - <email translate="label"> - <label>Sender Email</label> - <frontend_type>text</frontend_type> - <validate>validate-email</validate> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Email_Address</backend_model> - <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> - </email> - <name translate="label"> - <label>Sender Name</label> - <frontend_type>text</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Email_Sender</backend_model> - <validate>validate-emailSender</validate> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </name> - </fields> - </ident_sales> - <ident_support translate="label"> - <label>Customer Support</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> - <fields> - <email translate="label"> - <label>Sender Email</label> - <frontend_type>text</frontend_type> - <validate>validate-email</validate> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Email_Address</backend_model> - <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> - </email> - <name translate="label"> - <label>Sender Name</label> - <frontend_type>text</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Email_Sender</backend_model> - <validate>validate-emailSender</validate> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </name> - </fields> - </ident_support> - </groups> - </trans_email> - - <design translate="label" module="Mage_Core"> - <label>Design</label> - <tab>general</tab> - <frontend_type>text</frontend_type> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <resource>Mage_Adminhtml::config_design</resource> - <groups> - <theme translate="label"> - <label>Design Theme</label> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <full_name translate="label"> - <label>Design Theme</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Core_Model_Design_Source_Design::getOptions</source_model> - <backend_model>Mage_Core_Model_Design_Backend_Theme</backend_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </full_name> - <ua_regexp translate="label comment tooltip"> - <label>User-Agent Exceptions</label> - <frontend_model>Mage_Adminhtml_Block_System_Config_Form_Field_Regexceptions</frontend_model> - <backend_model>Mage_Core_Model_Design_Backend_Exceptions</backend_model> - <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> - <comment><![CDATA[Search strings are either normal strings or regular exceptions (PCRE). They are matched in the same order as entered. Examples:<br /><span style="font-family:monospace">Firefox<br />/^mozilla/i</span>]]></comment> - <tooltip>Find a string in client user-agent header and switch to specific design theme for that browser.</tooltip> - </ua_regexp> - </fields> - </theme> - <pagination translate="label"> - <label>Pagination</label> - <frontend_type>text</frontend_type> - <sort_order>500</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <pagination_frame translate="label comment"> - <label>Pagination Frame</label> - <comment>How many links to display at once.</comment> - <frontend_type>text</frontend_type> - <sort_order>7</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </pagination_frame> - <pagination_frame_skip translate="label comment"> - <label>Pagination Frame Skip</label> - <comment>If the current frame position does not cover utmost pages, will render link to current position plus/minus this value.</comment> - <frontend_type>text</frontend_type> - <sort_order>8</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </pagination_frame_skip> - <anchor_text_for_previous translate="label comment"> - <label>Anchor Text for Previous</label> - <comment>Alternative text for previous link in pagination menu. If empty, default arrow image will used.</comment> - <frontend_type>text</frontend_type> - <sort_order>9</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </anchor_text_for_previous> - <anchor_text_for_next translate="label comment"> - <label>Anchor Text for Next</label> - <comment>Alternative text for next link in pagination menu. If empty, default arrow image will used.</comment> - <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> - </anchor_text_for_next> - </fields> - </pagination> - <email translate="label"> - <label>Transactional Emails</label> - <frontend_type>text</frontend_type> - <sort_order>510</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <logo translate="label"> - <label>Logo Image</label> - <comment>Allowed file types: jpg, jpeg, gif, png</comment> - <frontend_type>image</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Email_Logo</backend_model> - <base_url type="media" scope_info="1">email/logo</base_url> - <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> - </logo> - <logo_alt translate="label"> - <label>Logo Image Alt</label> - <frontend_type>text</frontend_type> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </logo_alt> - </fields> - </email> - </groups> - </design> - <dev translate="label" module="Mage_Core"> - <label>Developer</label> - <tab>advanced</tab> - <frontend_type>text</frontend_type> - <sort_order>920</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <resource>Mage_Adminhtml::dev</resource> - <groups> - <restrict translate="label"> - <label>Developer Client Restrictions</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> - <fields> - <allow_ips translate="label comment"> - <label>Allowed IPs (comma separated)</label> - <frontend_type>text</frontend_type> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <comment>Leave empty for access from any location.</comment> - </allow_ips> - </fields> - </restrict> - <debug translate="label"> - <label>Debug</label> - <frontend_type>text</frontend_type> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <template_hints translate="label"> - <label>Template Path Hints</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>20</sort_order> - <show_in_default>0</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </template_hints> - <template_hints_blocks translate="label"> - <label>Add Block Names to Hints</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>21</sort_order> - <show_in_default>0</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </template_hints_blocks> - </fields> - </debug> - <template translate="label"> - <label>Template Settings</label> - <frontend_type>text</frontend_type> - <sort_order>25</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <allow_symlink translate="label comment"> - <label>Allow Symlinks</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <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> - <comment>Warning! Enabling this feature is not recommended on production environments because it represents a potential security risk.</comment> - </allow_symlink> - </fields> - </template> - <translate_inline translate="label"> - <label>Translate Inline</label> - <frontend_type>text</frontend_type> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <active translate="label"> - <label>Enabled for Frontend</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Translate</backend_model> - <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> - </active> - <active_admin translate="label comment"> - <label>Enabled for Admin</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Translate</backend_model> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - <comment>Translate, blocks and other output caches should be disabled for both frontend and admin inline translations.</comment> - </active_admin> - </fields> - </translate_inline> - <log translate="label"> - <label>Log Settings</label> - <frontend_type>text</frontend_type> - <sort_order>40</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <active translate="label"> - <label>Enabled</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </active> - <file translate="label comment"> - <label>System Log File Name</label> - <frontend_type>text</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Filename</backend_model> - <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> - <comment>Logging from Mage::log(). File is located in {{base_dir}}/var/log</comment> - </file> - <exception_file translate="label comment"> - <label>Exceptions Log File Name</label> - <frontend_type>text</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Filename</backend_model> - <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> - <comment>Logging from Mage::logException(). File is located in {{base_dir}}/var/log</comment> - </exception_file> - </fields> - </log> - <js translate="label"> - <label>JavaScript Settings</label> - <frontend_type>text</frontend_type> - <sort_order>100</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <merge_files translate="label"> - <label>Merge JavaScript Files</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <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> - </merge_files> - </fields> - </js> - <css translate="label"> - <label>CSS Settings</label> - <frontend_type>text</frontend_type> - <sort_order>110</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <merge_css_files translate="label"> - <label>Merge CSS Files</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <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> - </merge_css_files> - </fields> - </css> - <image translate="label"> - <label>Image Processing Settings</label> - <frontend_type>text</frontend_type> - <sort_order>120</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - <fields> - <adapter translate="label"> - <label>Image Adapter</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Image_Adapter</source_model> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Image_Adapter</backend_model> - <comment>When the adapter was changed, please, flush Catalog Images Cache.</comment> - <sort_order>10</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </adapter> - </fields> - </image> - <static translate="label"> - <label>Static Files Settings</label> - <frontend_type>text</frontend_type> - <sort_order>130</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - <fields> - <sign translate="label"> - <label>Sign Static Files</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>10</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </sign> - </fields> - </static> - </groups> - </dev> - <general translate="label" module="Mage_Core"> - <label>General</label> - <tab>general</tab> - <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> - <resource>Mage_Adminhtml::config_general</resource> - <groups> - <country translate="label"> - <label>Country Options</label> - <frontend_type>text</frontend_type> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <allow translate="label"> - <label>Allow Countries</label> - <frontend_type>multiselect</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Country</source_model> - <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> - <can_be_empty>1</can_be_empty> - </allow> - <default translate="label"> - <label>Default Country</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Country</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </default> - <eu_countries translate="label"> - <label>European Union Countries</label> - <frontend_type>multiselect</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Country</source_model> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </eu_countries> - </fields> - </country> - <locale translate="label"> - <label>Locale Options</label> - <frontend_type>text</frontend_type> - <sort_order>8</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <timezone translate="label"> - <label>Timezone</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Locale_Timezone</source_model> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Locale_Timezone</backend_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </timezone> - <code translate="label"> - <label>Locale</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Locale</source_model> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </code> - <firstday translate="label"> - <label>First Day of Week</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Locale_Weekdays</source_model> - <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> - </firstday> - <weekend translate="label"> - <label>Weekend Days</label> - <frontend_type>multiselect</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Locale_Weekdays</source_model> - <sort_order>15</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <can_be_empty>1</can_be_empty> - </weekend> - </fields> - </locale> - <store_information translate="label"> - <label>Store Information</label> - <frontend_type>text</frontend_type> - <sort_order>100</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <name translate="label"> - <label>Store Name</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> - </name> - <phone translate="label"> - <label>Store Contact Telephone</label> - <frontend_type>text</frontend_type> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </phone> - <merchant_country translate="label"> - <label>Country</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Country</source_model> - <sort_order>25</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <can_be_empty>1</can_be_empty> - </merchant_country> - <merchant_vat_number translate="label"> - <label>VAT Number</label> - <frontend_type>text</frontend_type> - <sort_order>27</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <can_be_empty>1</can_be_empty> - </merchant_vat_number> - <address translate="label"> - <label>Store Contact Address</label> - <frontend_type>textarea</frontend_type> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </address> - </fields> - </store_information> - <single_store_mode translate="label"> - <label>Single-Store Mode</label> - <frontend_type>text</frontend_type> - <sort_order>150</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - <fields> - <enabled translate="label comment"> - <label>Enable Single-Store Mode</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>10</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - <comment>This setting will not be taken into account if system has more than one store view.</comment> - </enabled> - </fields> - </single_store_mode> - </groups> - </general> - <system translate="label" module="Mage_Core"> - <class>separator-top</class> - <label>System</label> - <tab>advanced</tab> - <frontend_type>text</frontend_type> - <sort_order>900</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <resource>Mage_Adminhtml::config_system</resource> - <groups> - <smtp translate="label"> - <label>Mail Sending Settings</label> - <frontend_type>text</frontend_type> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <disable translate="label"> - <label>Disable Email Communications</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <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> - </disable> - <host translate="label"> - <label>Host</label> - <frontend_type>text</frontend_type> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <comment>For Windows server only.</comment> - </host> - <port translate="label"> - <label>Port (25)</label> - <frontend_type>text</frontend_type> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <comment>For Windows server only.</comment> - </port> - <!-- - <auth translate="label"> - <label>Authentication method</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Smtpauth</source_model> - <sort_order>40</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </auth> - <username translate="label"> - <label>Username</label> - <frontend_type>text</frontend_type> - <sort_order>50</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </username> - <password translate="label"> - <label>Password</label> - <frontend_type>text</frontend_type> - <sort_order>60</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </password> - --> - <set_return_path translate="label"> - <label>Set Return-Path</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesnocustom</source_model> - <sort_order>70</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </set_return_path> - <return_path_email translate="label"> - <label>Return-Path Email</label> - <frontend_type>text</frontend_type> - <validate>validate-email</validate> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Email_Address</backend_model> - <sort_order>80</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - <depends><set_return_path>2</set_return_path></depends> - </return_path_email> - </fields> - </smtp> - <media_storage_configuration translate="label" module="Mage_Core"> - <label>Storage Configuration for Media</label> - <frontend_type>text</frontend_type> - <sort_order>900</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <media_storage translate="label"> - <label>Media Storage</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Storage_Media_Storage</source_model> - <sort_order>100</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </media_storage> - <media_database translate="label"> - <label>Select Media Database</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Storage_Media_Database</source_model> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Storage_Media_Database</backend_model> - <sort_order>200</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - <depends><media_storage>1</media_storage></depends> - </media_database> - <synchronize translate="label comment"> - <frontend_type>button</frontend_type> - <frontend_model>Mage_Adminhtml_Block_System_Config_System_Storage_Media_Synchronize</frontend_model> - <sort_order>300</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - <comment>After selecting a new media storage location, press the Synchronize button - to transfer all media to that location. Media will not be available in the new - location until the synchronization process is complete.</comment> - </synchronize> - <configuration_update_time translate="label"> - <label>Environment Update Time</label> - <frontend_type>text</frontend_type> - <sort_order>400</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </configuration_update_time> - </fields> - </media_storage_configuration> - </groups> - </system> - <admin translate="label" module="Mage_Core"> - <label>Admin</label> - <tab>advanced</tab> - <frontend_type>text</frontend_type> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - <resource>Mage_Adminhtml::config_admin</resource> - <groups> - <emails translate="label"> - <label>Admin User Emails</label> - <frontend_type>text</frontend_type> - <sort_order>10</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - <fields> - <forgot_email_template translate="label"> - <label>Forgot Password Email Template</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Template</source_model> - <sort_order>10</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </forgot_email_template> - <forgot_email_identity translate="label"> - <label>Forgot Password Email Sender</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Identity</source_model> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </forgot_email_identity> - <password_reset_link_expiration_period translate="label comment"> - <label>Recovery Link Expiration Period (days)</label> - <comment>Please enter a number 1 or greater in this field.</comment> - <frontend_type>text</frontend_type> - <validate>required-entry validate-digits validate-digits-range digits-range-1-</validate> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Admin_Password_Link_Expirationperiod</backend_model> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </password_reset_link_expiration_period> - </fields> - </emails> - <startup translate="label"> - <label>Startup Page</label> - <frontend_type>text</frontend_type> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - <fields> - <menu_item_id translate="label"> - <label>Startup Page</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Admin_Page</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </menu_item_id> - </fields> - </startup> - <url translate="label"> - <label>Admin Base URL</label> - <frontend_type>text</frontend_type> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - <fields> - <use_custom translate="label"> - <label>Use Custom Admin URL</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Admin_Usecustom</backend_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </use_custom> - <custom translate="label comment"> - <label>Custom Admin URL</label> - <frontend_type>text</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Admin_Custom</backend_model> - <depends><use_custom>1</use_custom></depends> - <sort_order>2</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - <comment>Make sure that base URL ends with '/' (slash), e.g. http://yourdomain/magento/</comment> - </custom> - <use_custom_path translate="label"> - <label>Use Custom Admin Path</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Admin_Usecustompath</backend_model> - <sort_order>3</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </use_custom_path> - <custom_path translate="label comment"> - <label>Custom Admin Path</label> - <frontend_type>text</frontend_type> - <validate>required-entry validate-alphanum</validate> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Admin_Custompath</backend_model> - <depends><use_custom_path>1</use_custom_path></depends> - <sort_order>4</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - <comment>You will have to log in after you save your custom admin path.</comment> - </custom_path> - </fields> - </url> - <security translate="label"> - <label>Security</label> - <frontend_type>text</frontend_type> - <sort_order>35</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - <fields> - <use_form_key translate="label"> - <label>Add Secret Key to URLs</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Admin_Usesecretkey</backend_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </use_form_key> - <use_case_sensitive_login translate="label"> - <label>Login is Case Sensitive</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </use_case_sensitive_login> - <session_lifetime translate="label comment"> - <label>Admin Session Lifetime (seconds)</label> - <comment>Values less than 60 are ignored.</comment> - <validate>validate-digits</validate> - <sort_order>3</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </session_lifetime> - </fields> - </security> - <dashboard translate="label"> - <label>Dashboard</label> - <sort_order>40</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - <fields> - <enable_charts translate="label"> - <label>Enable Charts</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </enable_charts> - </fields> - </dashboard> - </groups> - </admin> - <web translate="label" module="Mage_Core"> - <label>Web</label> - <tab>general</tab> - <frontend_type>text</frontend_type> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <resource>Mage_Adminhtml::web</resource> - <groups> - <url translate="label"> - <label>Url Options</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> - <fields> - <use_store translate="label comment"> - <label>Add Store Code to Urls</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Store</backend_model> - <sort_order>10</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - <comment><![CDATA[<strong style="color:red">Warning!</strong> When using Store Code in URLs, in some cases system may not work properly if URLs without Store Codes are specified in the third party services (e.g. PayPal etc.).]]></comment> - </use_store> - <redirect_to_base translate="label"> - <label>Auto-redirect to Base URL</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Web_Redirect</source_model> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - <comment>I.e. redirect from http://example.com/store/ to http://www.example.com/store/</comment> - </redirect_to_base> - </fields> - </url> - <seo translate="label"> - <label>Search Engines Optimization</label> - <frontend_type>text</frontend_type> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <use_rewrites translate="label"> - <label>Use Web Server Rewrites</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <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> - </use_rewrites> - </fields> - </seo> - <unsecure translate="label"> - <label>Unsecure</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> - <fields> - <base_url translate="label"> - <label>Base URL</label> - <frontend_type>text</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Baseurl</backend_model> - <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> - </base_url> - <base_link_url translate="label"> - <label>Base Link URL</label> - <frontend_type>text</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Baseurl</backend_model> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </base_link_url> - <base_public_url translate="label comment"> - <label>Base URL for Public Static Files</label> - <frontend_type>text</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Baseurl</backend_model> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <comment><strong style="color:red">Warning!</strong> When using CDN, in some cases JavaScript may not run properly if CDN is not in your subdomain</comment> - </base_public_url> - <base_media_url translate="label"> - <label>Base Media URL</label> - <frontend_type>text</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Baseurl</backend_model> - <sort_order>40</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </base_media_url> - </fields> - </unsecure> - <secure translate="label"> - <label>Secure</label> - <frontend_type>text</frontend_type> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <base_url translate="label comment"> - <label>Base URL</label> - <frontend_type>text</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Baseurl</backend_model> - <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> - <comment>Make sure that base URL ends with '/' (slash), e.g. http://yourdomain/magento/</comment> - </base_url> - <base_link_url translate="label comment"> - <label>Base Link URL</label> - <frontend_type>text</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Baseurl</backend_model> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <comment>Make sure that base URL ends with '/' (slash), e.g. http://yourdomain/magento/</comment> - </base_link_url> - <base_public_url translate="label comment"> - <label>Base URL for Public Static Files</label> - <frontend_type>text</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Baseurl</backend_model> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <comment><strong style="color:red">Warning!</strong> When using CDN, in some cases JavaScript may not run properly if CDN is not in your subdomain</comment> - </base_public_url> - <base_media_url translate="label"> - <label>Base Media URL</label> - <frontend_type>text</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Baseurl</backend_model> - <sort_order>40</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </base_media_url> - <use_in_frontend translate="label"> - <label>Use Secure URLs in Frontend</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Secure</backend_model> - <sort_order>50</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </use_in_frontend> - <use_in_adminhtml translate="label"> - <label>Use Secure URLs in Admin</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Secure</backend_model> - <sort_order>60</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </use_in_adminhtml> - <offloader_header translate="label"> - <label>Offloader header</label> - <frontend_type>text</frontend_type> - <sort_order>70</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </offloader_header> - </fields> - </secure> - <default translate="label"> - <label>Default Pages</label> - <frontend_type>text</frontend_type> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <front translate="label"> - <label>Default Web URL</label> - <frontend_type>text</frontend_type> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </front> - <no_route translate="label"> - <label>Default No-route URL</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> - </no_route> - </fields> - </default> - <polls translate="label"> - <label>Polls</label> - <frontend_type>text</frontend_type> - <sort_order>40</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </polls> - <cookie translate="label"> - <label>Default Cookie Settings</label> - <frontend_type>text</frontend_type> - <sort_order>50</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <cookie_lifetime translate="label"> - <label>Cookie Lifetime</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> - </cookie_lifetime> - <cookie_path translate="label"> - <label>Cookie Path</label> - <frontend_type>text</frontend_type> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </cookie_path> - <cookie_domain translate="label"> - <label>Cookie Domain</label> - <frontend_type>text</frontend_type> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </cookie_domain> - <cookie_httponly translate="label"> - <label>Use HTTP Only</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>40</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </cookie_httponly> - <cookie_restriction translate="label"> - <label>Cookie Restriction Mode</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Cookie</backend_model> - <sort_order>50</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </cookie_restriction> - </fields> - </cookie> - <session translate="label"> - <label>Session Validation Settings</label> - <frontend_type>text</frontend_type> - <sort_order>60</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <fields> - <use_remote_addr translate="label"> - <label>Validate REMOTE_ADDR</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </use_remote_addr> - <use_http_via translate="label"> - <label>Validate HTTP_VIA</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </use_http_via> - <use_http_x_forwarded_for translate="label"> - <label>Validate HTTP_X_FORWARDED_FOR</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </use_http_x_forwarded_for> - <use_http_user_agent translate="label"> - <label>Validate HTTP_USER_AGENT</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>40</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </use_http_user_agent> - <use_frontend_sid translate="label comment"> - <label>Use SID on Frontend</label> - <comment>Allows customers to stay logged in when switching between different stores.</comment> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>50</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </use_frontend_sid> - </fields> - </session> - <browser_capabilities translate="label"> - <label>Browser Capabilities Detection</label> - <frontend_type>text</frontend_type> - <sort_order>200</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <cookies translate="label" module="Mage_Cms"> - <label>Redirect to CMS-page if Cookies are Disabled</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>100</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </cookies> - <javascript translate="label" module="Mage_Cms"> - <label>Show Notice if JavaScript is Disabled</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>200</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </javascript> - </fields> - </browser_capabilities> - </groups> - </web> - </sections> -</config> diff --git a/app/design/frontend/default/default/skin/blue/images/calendar.gif b/app/code/core/Mage/Core/view/adminhtml/calendar.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/calendar.gif rename to app/code/core/Mage/Core/view/adminhtml/calendar.gif diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Product/Alert/Cron.php b/app/code/core/Mage/Cron/Model/Config/Backend/Product/Alert.php similarity index 86% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Product/Alert/Cron.php rename to app/code/core/Mage/Cron/Model/Config/Backend/Product/Alert.php index 50a2e1df57507897d91dd23033bc58712588fc94..fac65b66ac2a1c3dfab784c764337c335ece644d 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Product/Alert/Cron.php +++ b/app/code/core/Mage/Cron/Model/Config/Backend/Product/Alert.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Cron * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -29,10 +29,10 @@ * Backend Model for product alerts * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Cron * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Model_System_Config_Backend_Product_Alert_Cron extends Mage_Core_Model_Config_Data +class Mage_Cron_Model_Config_Backend_Product_Alert extends Mage_Core_Model_Config_Data { const CRON_STRING_PATH = 'crontab/jobs/catalog_product_alert/schedule/cron_expr'; const CRON_MODEL_PATH = 'crontab/jobs/catalog_product_alert/run/model'; @@ -48,9 +48,9 @@ class Mage_Adminhtml_Model_System_Config_Backend_Product_Alert_Cron extends Mage $errorEmail = $this->getData('groups/productalert_cron/fields/error_email/value'); - $frequencyDaily = Mage_Adminhtml_Model_System_Config_Source_Cron_Frequency::CRON_DAILY; - $frequencyWeekly = Mage_Adminhtml_Model_System_Config_Source_Cron_Frequency::CRON_WEEKLY; - $frequencyMonthly = Mage_Adminhtml_Model_System_Config_Source_Cron_Frequency::CRON_MONTHLY; + $frequencyDaily = Mage_Cron_Model_Config_Source_Frequency::CRON_DAILY; + $frequencyWeekly = Mage_Cron_Model_Config_Source_Frequency::CRON_WEEKLY; + $frequencyMonthly = Mage_Cron_Model_Config_Source_Frequency::CRON_MONTHLY; $cronDayOfWeek = date('N'); $cronExprArray = array( diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Sitemap/Cron.php b/app/code/core/Mage/Cron/Model/Config/Backend/Sitemap.php similarity index 86% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Sitemap/Cron.php rename to app/code/core/Mage/Cron/Model/Config/Backend/Sitemap.php index 793f0cc96d2b752fdf5d3d02a379458b2be8d691..052837037cbe726f2b0503e5672ba372687f3f1b 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Sitemap/Cron.php +++ b/app/code/core/Mage/Cron/Model/Config/Backend/Sitemap.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Cron * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -28,10 +28,10 @@ * Backend Model for Currency import options * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Cron * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Model_System_Config_Backend_Sitemap_Cron extends Mage_Core_Model_Config_Data +class Mage_Cron_Model_Config_Backend_Sitemap extends Mage_Core_Model_Config_Data { const CRON_STRING_PATH = 'crontab/jobs/sitemap_generate/schedule/cron_expr'; @@ -45,9 +45,9 @@ class Mage_Adminhtml_Model_System_Config_Backend_Sitemap_Cron extends Mage_Core_ $frequncy = $this->getData('groups/generate/frequency/value'); $errorEmail = $this->getData('groups/generate/error_email/value'); - $frequencyDaily = Mage_Adminhtml_Model_System_Config_Source_Cron_Frequency::CRON_DAILY; - $frequencyWeekly = Mage_Adminhtml_Model_System_Config_Source_Cron_Frequency::CRON_WEEKLY; - $frequencyMonthly = Mage_Adminhtml_Model_System_Config_Source_Cron_Frequency::CRON_MONTHLY; + $frequencyDaily = Mage_Cron_Model_Config_Source_Frequency::CRON_DAILY; + $frequencyWeekly = Mage_Cron_Model_Config_Source_Frequency::CRON_WEEKLY; + $frequencyMonthly = Mage_Cron_Model_Config_Source_Frequency::CRON_MONTHLY; $cronDayOfWeek = date('N'); diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Cron/Frequency.php b/app/code/core/Mage/Cron/Model/Config/Source/Frequency.php old mode 100755 new mode 100644 similarity index 93% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Cron/Frequency.php rename to app/code/core/Mage/Cron/Model/Config/Source/Frequency.php index 432b30ad75b74912bd561cf3e118b0e21a511933..dcf2c9e0875dddcc34e518b00927f91c863c61b1 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Cron/Frequency.php +++ b/app/code/core/Mage/Cron/Model/Config/Source/Frequency.php @@ -19,13 +19,13 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Cron * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Adminhtml_Model_System_Config_Source_Cron_Frequency +class Mage_Cron_Model_Config_Source_Frequency implements Mage_Core_Model_Option_ArrayInterface { protected static $_options; diff --git a/app/code/core/Mage/Cron/etc/adminhtml/system.xml b/app/code/core/Mage/Cron/etc/adminhtml/system.xml new file mode 100644 index 0000000000000000000000000000000000000000..ebd3f037dc64b07f8b7ab8c54b9d055a2ab6426c --- /dev/null +++ b/app/code/core/Mage/Cron/etc/adminhtml/system.xml @@ -0,0 +1,55 @@ +<?xml version="1.0"?> +<!-- +/** + * 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 Mage_Cron + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> + <system> + <section id="system"> + <group id="cron" translate="label comment" module="Mage_Cron" type="text" sortOrder="15" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Cron (Scheduled Tasks) - all the times are in minutes</label> + <comment>For correct URLs generated during cron runs please make sure that Web > Secure and Unsecure Base URLs are explicitly set.</comment> + <field id="schedule_generate_every" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Generate Schedules Every</label> + </field> + <field id="schedule_ahead_for" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Schedule Ahead for</label> + </field> + <field id="schedule_lifetime" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Missed if Not Run Within</label> + </field> + <field id="history_cleanup_every" translate="label" type="text" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>History Cleanup Every</label> + </field> + <field id="history_success_lifetime" translate="label" type="text" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Success History Lifetime</label> + </field> + <field id="history_failure_lifetime" translate="label" type="text" sortOrder="60" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Failure History Lifetime</label> + </field> + </group> + </section> + </system> +</config> diff --git a/app/code/core/Mage/Cron/etc/system.xml b/app/code/core/Mage/Cron/etc/system.xml deleted file mode 100644 index 217cb8ddaabf374e439ba2e7539dfafb00602dbb..0000000000000000000000000000000000000000 --- a/app/code/core/Mage/Cron/etc/system.xml +++ /dev/null @@ -1,94 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * 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 Mage_Cron - * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<config> - <sections> - <system> - <groups> - <cron translate="label comment" module="Mage_Cron"> - <label>Cron (Scheduled Tasks) - all the times are in minutes</label> - <frontend_type>text</frontend_type> - <sort_order>15</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - <comment>For correct URLs generated during cron runs please make sure that Web > Secure and Unsecure Base URLs are explicitly set.</comment> - <fields> - <schedule_generate_every translate="label"> - <label>Generate Schedules Every</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> - </schedule_generate_every> - <schedule_ahead_for translate="label"> - <label>Schedule Ahead for</label> - <frontend_type>text</frontend_type> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </schedule_ahead_for> - <schedule_lifetime translate="label"> - <label>Missed if Not Run Within</label> - <frontend_type>text</frontend_type> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </schedule_lifetime> - <history_cleanup_every translate="label"> - <label>History Cleanup Every</label> - <frontend_type>text</frontend_type> - <sort_order>40</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </history_cleanup_every> - <history_success_lifetime translate="label"> - <label>Success History Lifetime</label> - <frontend_type>text</frontend_type> - <sort_order>50</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </history_success_lifetime> - <history_failure_lifetime translate="label"> - <label>Failure History Lifetime</label> - <frontend_type>text</frontend_type> - <sort_order>60</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </history_failure_lifetime> - </fields> - </cron> - </groups> - </system> - </sections> -</config> diff --git a/app/code/core/Mage/CurrencySymbol/Model/System/Currencysymbol.php b/app/code/core/Mage/CurrencySymbol/Model/System/Currencysymbol.php index afe168199dc4724f6bd85f59e1f23bcf2cf43a16..dc7114db19a9a8bc7cc88eaaf6860b58437b02c0 100644 --- a/app/code/core/Mage/CurrencySymbol/Model/System/Currencysymbol.php +++ b/app/code/core/Mage/CurrencySymbol/Model/System/Currencysymbol.php @@ -208,7 +208,7 @@ class Mage_CurrencySymbol_Model_System_Currencysymbol $value['options']['fields']['customsymbol']['inherit'] = 1; } - Mage::getModel('Mage_Adminhtml_Model_Config_Data') + Mage::getModel('Mage_Backend_Model_Config') ->setSection(self::CONFIG_SECTION) ->setWebsite(null) ->setStore(null) diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Customer/Address/Street.php b/app/code/core/Mage/Customer/Model/Config/Backend/Address/Street.php similarity index 91% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Customer/Address/Street.php rename to app/code/core/Mage/Customer/Model/Config/Backend/Address/Street.php index b14d0f5d9310e0fd738d63e01c8d1fec60a93d50..7f8ae12014c09527b0196ada23b5f75daa5901a0 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Customer/Address/Street.php +++ b/app/code/core/Mage/Customer/Model/Config/Backend/Address/Street.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Customer * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -28,15 +28,15 @@ * Customer Address Street Model * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Customer * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Model_System_Config_Backend_Customer_Address_Street extends Mage_Core_Model_Config_Data +class Mage_Customer_Model_Config_Backend_Address_Street extends Mage_Core_Model_Config_Data { /** * Actions after save * - * @return Mage_Adminhtml_Model_System_Config_Backend_Customer_Address_Street + * @return Mage_Customer_Model_Config_Backend_Address_Street */ protected function _afterSave() { diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Customer/Password/Link/Expirationperiod.php b/app/code/core/Mage/Customer/Model/Config/Backend/Password/Link/Expirationperiod.php similarity index 86% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Customer/Password/Link/Expirationperiod.php rename to app/code/core/Mage/Customer/Model/Config/Backend/Password/Link/Expirationperiod.php index 3b07d813568b911845443ab028917be68a7e8f55..bb035a00262a151009bbb673c526d7c94a28af63 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Customer/Password/Link/Expirationperiod.php +++ b/app/code/core/Mage/Customer/Model/Config/Backend/Password/Link/Expirationperiod.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Customer * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -29,16 +29,16 @@ * Customer Reset Password Link Expiration period backend model * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Customer * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Model_System_Config_Backend_Customer_Password_Link_Expirationperiod +class Mage_Customer_Model_Config_Backend_Password_Link_Expirationperiod extends Mage_Core_Model_Config_Data { /** * Validate expiration period value before saving * - * @return Mage_Adminhtml_Model_System_Config_Backend_Customer_Password_Link_Expirationperiod + * @return Mage_Customer_Model_Config_Backend_Password_Link_Expirationperiod */ protected function _beforeSave() { diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Customer/Show/Address.php b/app/code/core/Mage/Customer/Model/Config/Backend/Show/Address.php similarity index 86% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Customer/Show/Address.php rename to app/code/core/Mage/Customer/Model/Config/Backend/Show/Address.php index a549a002efb247e68f8c283d93575350888dd535..8d8cca357a940ed68013971ec81cc45075a5c788 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Customer/Show/Address.php +++ b/app/code/core/Mage/Customer/Model/Config/Backend/Show/Address.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Customer * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -28,11 +28,11 @@ * Customer Show Address Model * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Customer * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Model_System_Config_Backend_Customer_Show_Address - extends Mage_Adminhtml_Model_System_Config_Backend_Customer_Show_Customer +class Mage_Customer_Model_Config_Backend_Show_Address + extends Mage_Customer_Model_Config_Backend_Show_Customer { /** * Retrieve attribute objects diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Customer/Show/Customer.php b/app/code/core/Mage/Customer/Model/Config/Backend/Show/Customer.php similarity index 93% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Customer/Show/Customer.php rename to app/code/core/Mage/Customer/Model/Config/Backend/Show/Customer.php index 83d5b132fda787acc83ba9a625b4254f8d363ba9..98843b26a087f68a7c8706ca9571ebd275cccfdf 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Customer/Show/Customer.php +++ b/app/code/core/Mage/Customer/Model/Config/Backend/Show/Customer.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Customer * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -28,10 +28,10 @@ * Customer Show Customer Model * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Customer * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Model_System_Config_Backend_Customer_Show_Customer extends Mage_Core_Model_Config_Data +class Mage_Customer_Model_Config_Backend_Show_Customer extends Mage_Core_Model_Config_Data { /** * Retrieve attribute code @@ -58,7 +58,7 @@ class Mage_Adminhtml_Model_System_Config_Backend_Customer_Show_Customer extends /** * Actions after save * - * @return Mage_Adminhtml_Model_System_Config_Backend_Customer_Show_Customer + * @return Mage_Customer_Model_Config_Backend_Show_Customer */ protected function _afterSave() { diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Customer/Address/Type.php b/app/code/core/Mage/Customer/Model/Config/Source/Address/Type.php similarity index 82% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Customer/Address/Type.php rename to app/code/core/Mage/Customer/Model/Config/Source/Address/Type.php index f37e323ad3f5b9a4e592370849678bbb1633c2d9..5be283913c992f45a704242cc83f1e187d76f272 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Customer/Address/Type.php +++ b/app/code/core/Mage/Customer/Model/Config/Source/Address/Type.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Customer * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -28,10 +28,10 @@ * Source model of customer address types * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Customer * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Model_System_Config_Source_Customer_Address_Type +class Mage_Customer_Model_Config_Source_Address_Type implements Mage_Core_Model_Option_ArrayInterface { /** * Retrieve possible customer address types @@ -41,8 +41,8 @@ class Mage_Adminhtml_Model_System_Config_Source_Customer_Address_Type public function toOptionArray() { return array( - Mage_Customer_Model_Address_Abstract::TYPE_BILLING => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Billing Address'), - Mage_Customer_Model_Address_Abstract::TYPE_SHIPPING => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Shipping Address') + Mage_Customer_Model_Address_Abstract::TYPE_BILLING => Mage::helper('Mage_Customer_Helper_Data')->__('Billing Address'), + Mage_Customer_Model_Address_Abstract::TYPE_SHIPPING => Mage::helper('Mage_Customer_Helper_Data')->__('Shipping Address') ); } } diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Customer/Group.php b/app/code/core/Mage/Customer/Model/Config/Source/Group.php similarity index 86% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Customer/Group.php rename to app/code/core/Mage/Customer/Model/Config/Source/Group.php index c67aa416a6471f51454d1ca4b08bc44ea85e866a..70b87ee60ea8ff7c01b4d39e4807da9bd18719ba 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Customer/Group.php +++ b/app/code/core/Mage/Customer/Model/Config/Source/Group.php @@ -19,13 +19,13 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Customer * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Adminhtml_Model_System_Config_Source_Customer_Group +class Mage_Customer_Model_Config_Source_Group implements Mage_Core_Model_Option_ArrayInterface { protected $_options; @@ -35,7 +35,7 @@ class Mage_Adminhtml_Model_System_Config_Source_Customer_Group $this->_options = Mage::getResourceModel('Mage_Customer_Model_Resource_Group_Collection') ->setRealGroupsFilter() ->loadData()->toOptionArray(); - array_unshift($this->_options, array('value'=> '', 'label'=> Mage::helper('Mage_Adminhtml_Helper_Data')->__('-- Please Select --'))); + array_unshift($this->_options, array('value'=> '', 'label'=> Mage::helper('Mage_Customer_Helper_Data')->__('-- Please Select --'))); } return $this->_options; } diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Customer/Group/Multiselect.php b/app/code/core/Mage/Customer/Model/Config/Source/Group/Multiselect.php similarity index 91% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Customer/Group/Multiselect.php rename to app/code/core/Mage/Customer/Model/Config/Source/Group/Multiselect.php index 0b168734c1bc4c2d1ec99d854475e462ee3fc603..d7223d04f9a457f1055e7c0e74548af750af7618 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Customer/Group/Multiselect.php +++ b/app/code/core/Mage/Customer/Model/Config/Source/Group/Multiselect.php @@ -19,12 +19,12 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Customer * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Adminhtml_Model_System_Config_Source_Customer_Group_Multiselect +class Mage_Customer_Model_Config_Source_Group_Multiselect implements Mage_Core_Model_Option_ArrayInterface { /** * Customer groups options array diff --git a/app/code/core/Mage/Customer/etc/adminhtml/system.xml b/app/code/core/Mage/Customer/etc/adminhtml/system.xml new file mode 100644 index 0000000000000000000000000000000000000000..84ec24381ff644b507a69535b55bea7f44bda367 --- /dev/null +++ b/app/code/core/Mage/Customer/etc/adminhtml/system.xml @@ -0,0 +1,255 @@ +<?xml version="1.0"?> +<!-- +/** + * 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 Mage_Customer + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> + <system> + <tab id="customer" translate="label" module="Mage_Customer" sortOrder="300"> + <label>Customers</label> + </tab> + <section id="customer" translate="label" module="Mage_Customer" sortOrder="130" showInDefault="1" showInWebsite="1" showInStore="1"> + <class>separator-top</class> + <label>Customer Configuration</label> + <tab>customer</tab> + <resource>Mage_Customer::config_customer</resource> + <group id="account_share" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Account Sharing Options</label> + <hide_in_single_store_mode>1</hide_in_single_store_mode> + <field id="scope" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Share Customer Accounts</label> + <backend_model>Mage_Customer_Model_Config_Share</backend_model> + <source_model>Mage_Customer_Model_Config_Share</source_model> + </field> + </group> + <group id="online_customers" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Online Customers Options</label> + <field id="online_minutes_interval" translate="label comment" type="text" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Online Minutes Interval</label> + <comment>Leave empty for default (15 minutes).</comment> + </field> + </group> + <group id="create_account" translate="label" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Create New Account Options</label> + <field id="auto_group_assign" translate="label comment" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Enable Automatic Assignment to Customer Group</label> + <comment>To show VAT number on frontend, set Show VAT Number on Frontend option to Yes.</comment> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="tax_calculation_address_type" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Tax Calculation Based On</label> + <source_model>Mage_Customer_Model_Config_Source_Address_Type</source_model> + <depends> + <field id="auto_group_assign">1</field> + </depends> + </field> + <field id="default_group" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Default Group</label> + <source_model>Mage_Customer_Model_Config_Source_Group</source_model> + </field> + <field id="viv_domestic_group" translate="label" type="select" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Group for Valid VAT ID - Domestic</label> + <source_model>Mage_Customer_Model_Config_Source_Group</source_model> + <depends> + <field id="auto_group_assign">1</field> + </depends> + </field> + <field id="viv_intra_union_group" translate="label" type="select" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Group for Valid VAT ID - Intra-Union</label> + <source_model>Mage_Customer_Model_Config_Source_Group</source_model> + <depends> + <field id="auto_group_assign">1</field> + </depends> + </field> + <field id="viv_invalid_group" translate="label" type="select" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Group for Invalid VAT ID</label> + <source_model>Mage_Customer_Model_Config_Source_Group</source_model> + <depends> + <field id="auto_group_assign">1</field> + </depends> + </field> + <field id="viv_error_group" translate="label" type="select" sortOrder="55" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Validation Error Group</label> + <source_model>Mage_Customer_Model_Config_Source_Group</source_model> + <depends> + <field id="auto_group_assign">1</field> + </depends> + </field> + <field id="viv_on_each_transaction" translate="label" type="select" sortOrder="56" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Validate on Each Transaction</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + <depends> + <field id="auto_group_assign">1</field> + </depends> + </field> + <field id="viv_disable_auto_group_assign_default" translate="label" type="select" sortOrder="57" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Default Value for Disable Automatic Group Changes Based on VAT ID</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="vat_frontend_visibility" translate="label" type="select" sortOrder="58" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Show VAT Number on Frontend</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="email_domain" translate="label" type="text" sortOrder="60" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Default Email Domain</label> + </field> + <field id="email_template" translate="label" type="select" sortOrder="70" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Default Welcome Email</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Template</source_model> + </field> + <field id="email_identity" translate="label" type="select" sortOrder="80" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Email Sender</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Identity</source_model> + </field> + <field id="confirm" translate="label" type="select" sortOrder="90" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Require Emails Confirmation</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="email_confirmation_template" translate="label" type="select" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Confirmation Link Email</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Template</source_model> + </field> + <field id="email_confirmed_template" translate="label comment" type="select" sortOrder="110" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Welcome Email</label> + <comment>This email will be sent instead of default welcome email, after account confirmation.</comment> + <source_model>Mage_Backend_Model_Config_Source_Email_Template</source_model> + </field> + <field id="generate_human_friendly_id" translate="label" type="select" sortOrder="120" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Generate Human-Friendly Customer ID</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + </group> + <group id="password" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Password Options</label> + <field id="forgot_email_template" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Forgot Email Template</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Template</source_model> + </field> + <field id="remind_email_template" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Remind Email Template</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Template</source_model> + </field> + <field id="forgot_email_identity" translate="label" type="select" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Forgot and Remind Email Sender</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Identity</source_model> + </field> + <field id="reset_link_expiration_period" translate="label comment" type="text" sortOrder="40" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Recovery Link Expiration Period (days)</label> + <comment>Please enter a number 1 or greater in this field.</comment> + <validate>required-entry validate-digits validate-digits-range digits-range-1-</validate> + <backend_model>Mage_Customer_Model_Config_Backend_Password_Link_Expirationperiod</backend_model> + </field> + </group> + <group id="address" translate="label" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Name and Address Options</label> + <field id="street_lines" translate="label comment" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Number of Lines in a Street Address</label> + <backend_model>Mage_Customer_Model_Config_Backend_Address_Street</backend_model> + <comment>Leave empty for default (2). Valid range: 1-4</comment> + </field> + <field id="prefix_show" translate="label comment" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Show Prefix</label> + <source_model>Mage_Backend_Model_Config_Source_Nooptreq</source_model> + <backend_model>Mage_Customer_Model_Config_Backend_Show_Address</backend_model> + <comment>The title that goes before name (Mr., Mrs., etc.)</comment> + </field> + <field id="prefix_options" translate="label comment" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Prefix Dropdown Options</label> + <comment> + <![CDATA[Semicolon (;) separated values.<br/>Put semicolon in the beginning for empty first option.<br/>Leave empty for open text field.]]> +</comment> + </field> + <field id="middlename_show" translate="label comment" type="select" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Show Middle Name (initial)</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + <comment>Always optional.</comment> + <backend_model>Mage_Customer_Model_Config_Backend_Show_Address</backend_model> + </field> + <field id="suffix_show" translate="label comment" type="select" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Show Suffix</label> + <source_model>Mage_Backend_Model_Config_Source_Nooptreq</source_model> + <comment>The suffix that goes after name (Jr., Sr., etc.)</comment> + <backend_model>Mage_Customer_Model_Config_Backend_Show_Address</backend_model> + </field> + <field id="suffix_options" translate="label comment" sortOrder="60" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Suffix Dropdown Options</label> + <comment> + <![CDATA[Semicolon (;) separated values.<br/>Put semicolon in the beginning for empty first option.<br/>Leave empty for open text field.]]> +</comment> + </field> + <field id="dob_show" translate="label" type="select" sortOrder="70" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Show Date of Birth</label> + <source_model>Mage_Backend_Model_Config_Source_Nooptreq</source_model> + <backend_model>Mage_Customer_Model_Config_Backend_Show_Customer</backend_model> + </field> + <field id="taxvat_show" translate="label" type="select" sortOrder="80" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Show Tax/VAT Number</label> + <source_model>Mage_Backend_Model_Config_Source_Nooptreq</source_model> + <backend_model>Mage_Customer_Model_Config_Backend_Show_Customer</backend_model> + </field> + <field id="gender_show" translate="label" type="select" sortOrder="90" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Show Gender</label> + <source_model>Mage_Backend_Model_Config_Source_Nooptreq</source_model> + <backend_model>Mage_Customer_Model_Config_Backend_Show_Customer</backend_model> + </field> + </group> + <group id="startup" translate="label" sortOrder="90" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Login Options</label> + <field id="redirect_dashboard" translate="label comment" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Redirect Customer to Account Dashboard after Logging in</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + <comment>Customer will stay on the current page if "No" is selected.</comment> + </field> + </group> + <group id="address_templates" translate="label" type="text" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Address Templates</label> + <field id="text" type="textarea" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Text</label> + </field> + <field id="oneline" type="textarea" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Text One Line</label> + </field> + <field id="html" type="textarea" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>HTML</label> + </field> + <field id="pdf" type="textarea" sortOrder="4" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>PDF</label> + </field> + <field id="js_template" type="textarea" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>JavaScript Template</label> + </field> + </group> + </section> + <section id="general"> + <group id="store_information"> + <field id="validate_vat_number" translate="button_label" sortOrder="28" showInDefault="1" showInWebsite="1" showInStore="0"> + <label></label> + <button_label>Validate VAT Number</button_label> + <frontend_model>Mage_Adminhtml_Block_Customer_System_Config_Validatevat</frontend_model> + </field> + </group> + </section> + </system> +</config> diff --git a/app/code/core/Mage/Customer/etc/system.xml b/app/code/core/Mage/Customer/etc/system.xml deleted file mode 100644 index 6ce36278dba59d3e9832e14f4e5fb53ed49313fe..0000000000000000000000000000000000000000 --- a/app/code/core/Mage/Customer/etc/system.xml +++ /dev/null @@ -1,489 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * 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 Mage_Customer - * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<config> - <tabs> - <customer translate="label" module="Mage_Customer"> - <label>Customers</label> - <sort_order>300</sort_order> - </customer> - </tabs> - <sections> - <customer translate="label" module="Mage_Customer"> - <class>separator-top</class> - <label>Customer Configuration</label> - <tab>customer</tab> - <sort_order>130</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <resource>Mage_Customer::config_customer</resource> - <groups> - <account_share translate="label"> - <label>Account Sharing Options</label> - <frontend_type>text</frontend_type> - <sort_order>10</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - <hide_in_single_store_mode>1</hide_in_single_store_mode> - <fields> - <scope translate="label"> - <label>Share Customer Accounts</label> - <frontend_type>select</frontend_type> - <backend_model>Mage_Customer_Model_Config_Share</backend_model> - <source_model>Mage_Customer_Model_Config_Share</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </scope> - </fields> - </account_share> - <online_customers translate="label"> - <label>Online Customers Options</label> - <frontend_type>text</frontend_type> - <sort_order>10</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - <fields> - <online_minutes_interval translate="label comment"> - <label>Online Minutes Interval</label> - <frontend_type>text</frontend_type> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - <comment>Leave empty for default (15 minutes).</comment> - </online_minutes_interval> - </fields> - </online_customers> - <create_account translate="label"> - <label>Create New Account Options</label> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <auto_group_assign translate="label comment"> - <label>Enable Automatic Assignment to Customer Group</label> - <comment>To show VAT number on frontend, set Show VAT Number on Frontend option to Yes.</comment> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <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> - </auto_group_assign> - <tax_calculation_address_type translate="label"> - <label>Tax Calculation Based On</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Customer_Address_Type</source_model> - <sort_order>10</sort_order> - <depends><auto_group_assign>1</auto_group_assign></depends> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </tax_calculation_address_type> - <default_group translate="label"> - <label>Default Group</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Customer_Group</source_model> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </default_group> - <viv_domestic_group translate="label"> - <label>Group for Valid VAT ID - Domestic</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Customer_Group</source_model> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <depends><auto_group_assign>1</auto_group_assign></depends> - </viv_domestic_group> - <viv_intra_union_group translate="label"> - <label>Group for Valid VAT ID - Intra-Union</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Customer_Group</source_model> - <sort_order>40</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <depends><auto_group_assign>1</auto_group_assign></depends> - </viv_intra_union_group> - <viv_invalid_group translate="label"> - <label>Group for Invalid VAT ID</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Customer_Group</source_model> - <sort_order>50</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <depends><auto_group_assign>1</auto_group_assign></depends> - </viv_invalid_group> - <viv_error_group translate="label"> - <label>Validation Error Group</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Customer_Group</source_model> - <sort_order>55</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <depends><auto_group_assign>1</auto_group_assign></depends> - </viv_error_group> - <viv_on_each_transaction translate="label"> - <label>Validate on Each Transaction</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>56</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <depends><auto_group_assign>1</auto_group_assign></depends> - </viv_on_each_transaction> - <viv_disable_auto_group_assign_default translate="label"> - <label>Default Value for Disable Automatic Group Changes Based on VAT ID</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>57</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </viv_disable_auto_group_assign_default> - <vat_frontend_visibility translate="label"> - <label>Show VAT Number on Frontend</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>58</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </vat_frontend_visibility> - <email_domain translate="label"> - <label>Default Email Domain</label> - <frontend_type>text</frontend_type> - <sort_order>60</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </email_domain> - <email_template translate="label"> - <label>Default Welcome Email</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Template</source_model> - <sort_order>70</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </email_template> - <email_identity translate="label"> - <label>Email Sender</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Identity</source_model> - <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> - </email_identity> - <confirm translate="label"> - <label>Require Emails Confirmation</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>90</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </confirm> - <email_confirmation_template translate="label"> - <label>Confirmation Link Email</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Template</source_model> - <sort_order>100</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </email_confirmation_template> - <email_confirmed_template translate="label comment"> - <label>Welcome Email</label> - <comment>This email will be sent instead of default welcome email, after account confirmation.</comment> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Template</source_model> - <sort_order>110</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </email_confirmed_template> - <generate_human_friendly_id translate="label"> - <label>Generate Human-Friendly Customer ID</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>120</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </generate_human_friendly_id> - </fields> - </create_account> - <password translate="label"> - <label>Password Options</label> - <frontend_type>text</frontend_type> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <forgot_email_template translate="label"> - <label>Forgot Email Template</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Template</source_model> - <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> - </forgot_email_template> - <remind_email_template translate="label"> - <label>Remind Email Template</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Template</source_model> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </remind_email_template> - <forgot_email_identity translate="label"> - <label>Forgot and Remind Email Sender</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Identity</source_model> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </forgot_email_identity> - <reset_link_expiration_period translate="label comment"> - <label>Recovery Link Expiration Period (days)</label> - <comment>Please enter a number 1 or greater in this field.</comment> - <frontend_type>text</frontend_type> - <validate>required-entry validate-digits validate-digits-range digits-range-1-</validate> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Customer_Password_Link_Expirationperiod</backend_model> - <sort_order>40</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </reset_link_expiration_period> - </fields> - </password> - <address translate="label"> - <label>Name and Address Options</label> - <sort_order>40</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <street_lines translate="label comment"> - <label>Number of Lines in a Street Address </label> - <sort_order>10</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Customer_Address_Street</backend_model> - <comment>Leave empty for default (2). Valid range: 1-4</comment> - </street_lines> - <prefix_show translate="label comment"> - <label>Show Prefix</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Nooptreq</source_model> - <sort_order>20</sort_order> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Customer_Show_Address</backend_model> - <comment>The title that goes before name (Mr., Mrs., etc.)</comment> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </prefix_show> - <prefix_options translate="label comment"> - <label>Prefix Dropdown Options</label> - <sort_order>30</sort_order> - <comment><![CDATA[Semicolon (;) separated values.<br/>Put semicolon in the beginning for empty first option.<br/>Leave empty for open text field.]]></comment> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </prefix_options> - <middlename_show translate="label comment"> - <label>Show Middle Name (initial)</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <comment>Always optional.</comment> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Customer_Show_Address</backend_model> - <sort_order>40</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </middlename_show> - <suffix_show translate="label comment"> - <label>Show Suffix</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Nooptreq</source_model> - <comment>The suffix that goes after name (Jr., Sr., etc.)</comment> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Customer_Show_Address</backend_model> - <sort_order>50</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </suffix_show> - <suffix_options translate="label comment"> - <label>Suffix Dropdown Options</label> - <sort_order>60</sort_order> - <comment><![CDATA[Semicolon (;) separated values.<br/>Put semicolon in the beginning for empty first option.<br/>Leave empty for open text field.]]></comment> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </suffix_options> - <dob_show translate="label"> - <label>Show Date of Birth</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Nooptreq</source_model> - <sort_order>70</sort_order> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Customer_Show_Customer</backend_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </dob_show> - <taxvat_show translate="label"> - <label>Show Tax/VAT Number</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Nooptreq</source_model> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Customer_Show_Customer</backend_model> - <sort_order>80</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </taxvat_show> - <gender_show translate="label"> - <label>Show Gender</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Nooptreq</source_model> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Customer_Show_Customer</backend_model> - <sort_order>90</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </gender_show> - </fields> - </address> - <startup translate="label"> - <label>Login Options</label> - <sort_order>90</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <redirect_dashboard translate="label comment"> - <label>Redirect Customer to Account Dashboard after Logging in</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <comment>Customer will stay on the current page if "No" is selected.</comment> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </redirect_dashboard> - </fields> - </startup> - <address_templates translate="label"> - <label>Address Templates</label> - <frontend_type>text</frontend_type> - <sort_order>100</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <text> - <label>Text</label> - <frontend_type>textarea</frontend_type> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </text> - <oneline> - <label>Text One Line</label> - <frontend_type>textarea</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> - </oneline> - <html> - <label>HTML</label> - <frontend_type>textarea</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> - </html> - <pdf> - <label>PDF</label> - <frontend_type>textarea</frontend_type> - <sort_order>4</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </pdf> - <js_template> - <label>JavaScript Template</label> - <frontend_type>textarea</frontend_type> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </js_template> - </fields> - </address_templates> - </groups> - </customer> - <general> - <groups> - <store_information> - <fields> - <validate_vat_number translate="button_label"> - <label></label> - <button_label>Validate VAT Number</button_label> - <frontend_model>Mage_Adminhtml_Block_Customer_System_Config_Validatevat</frontend_model> - <sort_order>28</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </validate_vat_number> - </fields> - </store_information> - </groups> - </general> - </sections> -</config> diff --git a/app/code/core/Mage/DesignEditor/Block/Adminhtml/Launcher/Form.php b/app/code/core/Mage/DesignEditor/Block/Adminhtml/Launcher/Form.php index f5f2a22c2f296a2afcc8e21f1b5331b2eda854e8..c519ddddc7ace08ffdfb4a3af82a98ba8f99c2e5 100644 --- a/app/code/core/Mage/DesignEditor/Block/Adminhtml/Launcher/Form.php +++ b/app/code/core/Mage/DesignEditor/Block/Adminhtml/Launcher/Form.php @@ -59,9 +59,6 @@ class Mage_DesignEditor_Block_Adminhtml_Launcher_Form extends Mage_Adminhtml_Blo $form->addField('theme_id', 'hidden', array( 'name' => 'theme_id' )); - $form->addField('theme_skin', 'hidden', array( - 'name' => 'theme_skin' - )); $this->setForm($form); $form->setUseContainer(true); diff --git a/app/code/core/Mage/DesignEditor/Block/Adminhtml/Theme/Item.php b/app/code/core/Mage/DesignEditor/Block/Adminhtml/Theme/Item.php index e5f78c787a8907b0c7ca881a3515708d4f8d464f..b20a5101452b47fbda279efe2bba254318a804c4 100644 --- a/app/code/core/Mage/DesignEditor/Block/Adminhtml/Theme/Item.php +++ b/app/code/core/Mage/DesignEditor/Block/Adminhtml/Theme/Item.php @@ -55,10 +55,7 @@ class Mage_DesignEditor_Block_Adminhtml_Theme_Item extends Mage_Backend_Block_Wi $previewButton = $this->getLayout()->createBlock('Mage_Backend_Block_Widget_Button'); $previewButton->setData(array( 'label' => $this->__('Launch'), - 'onclick' => sprintf( - "$('theme_id').value='%s'; $('theme_skin').value=$('theme-skin-list-%s').value; editForm.submit();", - $themeId, $themeId - ), + 'onclick' => sprintf("$('theme_id').value='%s'; editForm.submit();", $themeId), 'class' => 'save', 'target' => '_blank' )); diff --git a/app/code/core/Mage/DesignEditor/Block/Toolbar/Buttons.php b/app/code/core/Mage/DesignEditor/Block/Toolbar/Buttons.php index db09ca2e5a9cc5a478415fd33fc44e4ccb9fe22b..d18a33a3158c54602d52112f7b1ccbe2763a20d6 100644 --- a/app/code/core/Mage/DesignEditor/Block/Toolbar/Buttons.php +++ b/app/code/core/Mage/DesignEditor/Block/Toolbar/Buttons.php @@ -36,7 +36,7 @@ class Mage_DesignEditor_Block_Toolbar_Buttons extends Mage_Core_Block_Template */ public function getExitUrl() { - return Mage::getSingleton('Mage_Adminhtml_Model_Url')->getUrl('adminhtml/system_design_editor/exit'); + return Mage::getSingleton('Mage_Backend_Model_Url')->getUrl('adminhtml/system_design_editor/exit'); } /** diff --git a/app/code/core/Mage/DesignEditor/Block/Toolbar/Skin.php b/app/code/core/Mage/DesignEditor/Block/Toolbar/Theme.php similarity index 69% rename from app/code/core/Mage/DesignEditor/Block/Toolbar/Skin.php rename to app/code/core/Mage/DesignEditor/Block/Toolbar/Theme.php index bb604a14f75995a9c87f359f26ff8ad94613c128..3815bc607be65097015e3db9067e356108985d89 100644 --- a/app/code/core/Mage/DesignEditor/Block/Toolbar/Skin.php +++ b/app/code/core/Mage/DesignEditor/Block/Toolbar/Theme.php @@ -25,14 +25,14 @@ */ /** - * A skin selector for design editor frontend toolbar panel + * A theme selector for design editor frontend toolbar panel */ -class Mage_DesignEditor_Block_Toolbar_Skin extends Mage_Core_Block_Template +class Mage_DesignEditor_Block_Toolbar_Theme extends Mage_Core_Block_Template { /** - * Html id of the skin select control + * Html id of the theme select control */ - const VDE_HTML_SKIN_ID = 'visual_design_editor_skin'; + const VDE_HTML_THEME_ID = 'visual_design_editor_theme'; /** * Get current theme @@ -45,24 +45,24 @@ class Mage_DesignEditor_Block_Toolbar_Skin extends Mage_Core_Block_Template } /** - * Returns whether skin selected in current store design + * Returns whether theme selected in current store design * - * @param string $skin + * @param string $theme * @return bool */ - public function isSkinSelected($skin) + public function isThemeSelected($theme) { - $currentSkin = Mage::getDesign()->getDesignTheme(); - return $currentSkin == $skin; + $currentTheme = Mage::getDesign()->getDesignTheme(); + return $currentTheme == $theme; } /** - * Returns html id of the skin select control + * Returns html id of the theme select control * * @return string */ public function getSelectHtmlId() { - return self::VDE_HTML_SKIN_ID; + return self::VDE_HTML_THEME_ID; } } diff --git a/app/code/core/Mage/DesignEditor/Model/Observer.php b/app/code/core/Mage/DesignEditor/Model/Observer.php index cdfd14d5fed417e8c0587ef17cbdf32b55cebd88..f6973464bbc903ad31be9edef1ce0cc4f17cf20d 100644 --- a/app/code/core/Mage/DesignEditor/Model/Observer.php +++ b/app/code/core/Mage/DesignEditor/Model/Observer.php @@ -70,8 +70,8 @@ class Mage_DesignEditor_Model_Observer } /* Apply custom design to the current page */ - if ($this->_getSession()->isDesignEditorActive() && $this->_getSession()->getSkin()) { - Mage::getDesign()->setDesignTheme($this->_getSession()->getSkin()); + if ($this->_getSession()->isDesignEditorActive() && $theme->getThemePath()) { + Mage::getDesign()->setDesignTheme($theme->getThemePath()); } } diff --git a/app/code/core/Mage/DesignEditor/Model/Session.php b/app/code/core/Mage/DesignEditor/Model/Session.php index 3699d1dbe710ff93fda959c8f232b018930fd6aa..4f3bd3ed6646f8f22310af16db544d26d26ad8e9 100644 --- a/app/code/core/Mage/DesignEditor/Model/Session.php +++ b/app/code/core/Mage/DesignEditor/Model/Session.php @@ -87,41 +87,4 @@ class Mage_DesignEditor_Model_Session extends Mage_Backend_Model_Auth_Session $highlighting = Mage::getSingleton('Mage_Core_Model_Cookie')->get(self::COOKIE_HIGHLIGHTING); return 'off' == $highlighting; } - - /** - * Sets skin to user session, so that next time everything will be rendered with this skin - * - * @param string $skin - * @return Mage_DesignEditor_Model_Session - */ - public function setSkin($skin) - { - if ($skin && !$this->_isSkinApplicable($skin)) { - Mage::throwException(Mage::helper('Mage_DesignEditor_Helper_Data')->__("Skin doesn't exist")); - } - $this->setData('skin', $skin); - return $this; - } - - /** - * Returns whether a skin is a valid one to set into user session - * - * @param string $skin - * @return bool - */ - protected function _isSkinApplicable($skin) - { - if (!$skin) { - return false; - } - $options = Mage::getModel('Mage_Core_Model_Design_Source_Design')->getOptions(); - foreach ($options as $optGroup) { - foreach ($optGroup['value'] as $option) { - if ($option['value'] == $skin) { - return true; - } - } - } - return false; - } } diff --git a/app/code/core/Mage/DesignEditor/controllers/Adminhtml/System/Design/EditorController.php b/app/code/core/Mage/DesignEditor/controllers/Adminhtml/System/Design/EditorController.php index 3b6fa02756cd456b82c89953a2f8adb4af03f192..a5d7e8ba9600f0eab04be3d8d3effb92b8e9124f 100644 --- a/app/code/core/Mage/DesignEditor/controllers/Adminhtml/System/Design/EditorController.php +++ b/app/code/core/Mage/DesignEditor/controllers/Adminhtml/System/Design/EditorController.php @@ -55,7 +55,6 @@ class Mage_DesignEditor_Adminhtml_System_Design_EditorController extends Mage_Ad $session = Mage::getSingleton('Mage_DesignEditor_Model_Session'); $themeId = (int)$this->getRequest()->getParam('theme_id'); - $skin = $this->getRequest()->get('theme_skin'); /** @var $theme Mage_Core_Model_Theme */ $theme = Mage::getModel('Mage_Core_Model_Theme'); try { @@ -65,13 +64,12 @@ class Mage_DesignEditor_Adminhtml_System_Design_EditorController extends Mage_Ad } $session->activateDesignEditor(); $session->setThemeId($theme->getId()); - $session->setSkin($skin); } catch (Mage_Core_Exception $e) { $this->_getSession()->addError($e->getMessage()); $this->_redirect('*/*/'); return; } catch (Exception $e) { - $this->_getSession()->addError($this->__('The theme or skin was not found.')); + $this->_getSession()->addError($this->__('The theme was not found.')); Mage::logException($e); $this->_redirect('*/*/'); return; diff --git a/app/code/core/Mage/DesignEditor/controllers/EditorController.php b/app/code/core/Mage/DesignEditor/controllers/EditorController.php index cb9fc80c5161141a547159b83f8a139a85497599..1b6801eff4507ecf236aca738436754b7219cbaa 100644 --- a/app/code/core/Mage/DesignEditor/controllers/EditorController.php +++ b/app/code/core/Mage/DesignEditor/controllers/EditorController.php @@ -120,11 +120,10 @@ class Mage_DesignEditor_EditorController extends Mage_Core_Controller_Front_Acti } /** - * Sets new skin for viewed store and returns customer back to the previous address + * Sets new theme for viewed store and returns customer back to the previous address */ - public function skinAction() + public function themeAction() { - $skin = $this->getRequest()->get('skin'); $backUrl = $this->_getRefererUrl(); $themeId = $this->getRequest()->get('theme_id'); /** @var $theme Mage_Core_Model_Theme */ @@ -135,7 +134,6 @@ class Mage_DesignEditor_EditorController extends Mage_Core_Controller_Front_Acti Mage::throwException($this->__('The theme was not found.')); } $this->_session->setThemeId($themeId); - $this->_session->setSkin($skin); } catch (Mage_Core_Exception $e) { $this->_session->addError($e->getMessage()); } diff --git a/app/code/core/Mage/DesignEditor/view/adminhtml/theme/item.phtml b/app/code/core/Mage/DesignEditor/view/adminhtml/theme/item.phtml index 016a9625eede165355f790bf4409bcc69df3d12d..5f5669621f9de466f74c98b144f081831f477ffb 100644 --- a/app/code/core/Mage/DesignEditor/view/adminhtml/theme/item.phtml +++ b/app/code/core/Mage/DesignEditor/view/adminhtml/theme/item.phtml @@ -31,14 +31,6 @@ <?php echo $this->getThemeHtml() ?> <div style="margin:5px 20px;"> <h4><sup><?php echo $this->getTheme()->getIsFeatured() ? 'F' : 'X'?></sup> <?php echo $this->getTheme()->getThemeTitle()?></h4> - <?php $themeId = $this->getTheme()->getId(); $skinList = $this->getTheme()->getSkinList(); ?> - <?php $hideSkinSelector = empty($skinList) ? 'style="display: none;"' : '' ?> - <label <?php echo $hideSkinSelector ?> for="theme-skin-list-<?php echo $themeId ?>"><?php echo $this->__('Skin:') ?></label> - <select <?php echo $hideSkinSelector ?> id="theme-skin-list-<?php echo $themeId ?>"> - <?php foreach ($skinList as $skinLabel => $skinValue): ?> - <option value="<?php echo $skinValue ?>"><?php echo $this->escapeHtml($skinLabel) ?></option> - <?php endforeach ?> - </select> <?php echo $this->getLaunchButtonHtml() ?> </div> </li> diff --git a/app/code/core/Mage/DesignEditor/view/frontend/css/styles.css b/app/code/core/Mage/DesignEditor/view/frontend/css/styles.css index 16d9a4a8cdf5a3621f81c9a5dec240fa85ea328f..977705824d761e593083ae240072015c3715f514 100644 --- a/app/code/core/Mage/DesignEditor/view/frontend/css/styles.css +++ b/app/code/core/Mage/DesignEditor/view/frontend/css/styles.css @@ -242,7 +242,7 @@ body { margin:0 0.3em; } -#visual_design_editor_skin a { +#visual_design_editor_theme a { display:block; text-decoration:none; } diff --git a/app/code/core/Mage/DesignEditor/view/frontend/layout.xml b/app/code/core/Mage/DesignEditor/view/frontend/layout.xml index d46762f70a875837e41665833b7f90a617c26b35..8f1155b47c8c93c05f9c839f2a5823739828edc6 100644 --- a/app/code/core/Mage/DesignEditor/view/frontend/layout.xml +++ b/app/code/core/Mage/DesignEditor/view/frontend/layout.xml @@ -41,7 +41,7 @@ <block type="Mage_DesignEditor_Block_Toolbar_Breadcrumbs" name="design_editor_toolbar_breadcrumbs" template="toolbar/breadcrumbs.phtml"/> <block type="Mage_DesignEditor_Block_Template" name="design_editor_toolbar_row" template="toolbar/row.phtml"> <block type="Mage_DesignEditor_Block_Toolbar_HandlesHierarchy" name="design_editor_toolbar_handles_hierarchy" template="toolbar/handles_hierarchy.phtml"/> - <block type="Mage_DesignEditor_Block_Toolbar_Skin" name="design_editor_toolbar_skin" template="toolbar/skin.phtml"/> + <block type="Mage_DesignEditor_Block_Toolbar_Theme" name="design_editor_toolbar_theme" template="toolbar/theme.phtml"/> <block type="Mage_DesignEditor_Block_Template" name="design_editor_toolbar_highlighting" template="toolbar/highlighting.phtml"/> <block type="Mage_DesignEditor_Block_Toolbar_Buttons" name="design_editor_toolbar_buttons" template="toolbar/buttons.phtml"/> <block type="Mage_DesignEditor_Block_Toolbar_History" name="design_editor_toolbar_history" template="toolbar/history.phtml"/> diff --git a/app/code/core/Mage/DesignEditor/view/frontend/toolbar/skin.phtml b/app/code/core/Mage/DesignEditor/view/frontend/toolbar/theme.phtml similarity index 62% rename from app/code/core/Mage/DesignEditor/view/frontend/toolbar/skin.phtml rename to app/code/core/Mage/DesignEditor/view/frontend/toolbar/theme.phtml index 6d5bc36ac8f1e903d3842834e5e9edadaee06bda..8b846a6d5bc154f86650d260fbf4d20b08aef54f 100644 --- a/app/code/core/Mage/DesignEditor/view/frontend/toolbar/skin.phtml +++ b/app/code/core/Mage/DesignEditor/view/frontend/toolbar/theme.phtml @@ -24,8 +24,8 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -<?php /** @var $this Mage_DesignEditor_Block_Toolbar_Skin */ ?> -<div id="skin_selector" class="vde_toolbar_cell"> +<?php /** @var $this Mage_DesignEditor_Block_Toolbar_Theme */ ?> +<div id="theme_selector" class="vde_toolbar_cell"> <div class="vde_toolbar_cell_title"> <?php echo $this->__('Theme:'); ?> <span class="vde_toolbar_cell_value"><?php echo $this->escapeHtml($this->getTheme()->getThemeTitle()) ?></span> @@ -33,17 +33,13 @@ <div class="vde_toolbar_cell_content"> <dl id="<?php echo $this->getSelectHtmlId(); ?>"> <?php foreach ($this->getTheme()->getCollection() as $theme): ?> - <dt class="vde_cell_list_group"><?php echo $this->escapeHtml($theme->getThemeTitle()) ?></dt> - <?php foreach ($theme->getSkinList() as $skinLabel => $skinValue): ?> - <?php $checked = $this->isSkinSelected($skinValue) ? ' checked' : '' ?> - <dd class="vde_cell_list_item<?php echo $checked ?>"> - <?php $url = $this->getUrl('design/editor/skin', array('_query' => array( - 'skin' => $skinValue, - 'theme_id' => $theme->getId() - ))) ?> - <a href="<?php echo $url?>"><?php echo $this->escapeHtml($skinLabel); ?></a> - </dd> - <?php endforeach; ?> + <?php $checked = $this->isThemeSelected($theme->getThemePath()) ? ' checked' : '' ?> + <dd class="vde_cell_list_item<?php echo $checked ?>"> + <?php $url = $this->getUrl('design/editor/theme', array('_query' => array( + 'theme_id' => $theme->getId() + ))) ?> + <a href="<?php echo $url?>"><?php echo $this->escapeHtml($theme->getThemeTitle()) ?></a> + </dd> <?php endforeach; ?> </dl> </div> diff --git a/app/code/core/Mage/DesignEditor/view/frontend/wrapper/remove.phtml b/app/code/core/Mage/DesignEditor/view/frontend/wrapper/remove.phtml index 8518dd6b83fb8e0dc852537979931c0a4c230630..31f08c3813df16f167052257544b95f87457087f 100644 --- a/app/code/core/Mage/DesignEditor/view/frontend/wrapper/remove.phtml +++ b/app/code/core/Mage/DesignEditor/view/frontend/wrapper/remove.phtml @@ -27,6 +27,6 @@ <?php /** @var $this Mage_DesignEditor_Block_Wrapper_Remove */ ?> <div class="vde_element_title vde_element_remove" id="<?php echo $this->getElementId(); ?>"> <a href="#remove"> - <img src="<?php echo $this->getSkinUrl('images/btn_remove.gif') ?>" alt="<?php echo $this->__('Remove')?>" /> + <img src="<?php echo $this->getViewFileUrl('images/btn_remove.gif') ?>" alt="<?php echo $this->__('Remove')?>" /> </a> </div> diff --git a/app/code/core/Mage/Directory/Block/Adminhtml/Frontend/Currency/Base.php b/app/code/core/Mage/Directory/Block/Adminhtml/Frontend/Currency/Base.php index 204004028347b41700cc7a6e3beba314908ace07..feea46e412779bf67f947a2b2b0a870db35086d3 100644 --- a/app/code/core/Mage/Directory/Block/Adminhtml/Frontend/Currency/Base.php +++ b/app/code/core/Mage/Directory/Block/Adminhtml/Frontend/Currency/Base.php @@ -30,7 +30,7 @@ * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Directory_Block_Adminhtml_Frontend_Currency_Base extends Mage_Adminhtml_Block_System_Config_Form_Field +class Mage_Directory_Block_Adminhtml_Frontend_Currency_Base extends Mage_Backend_Block_System_Config_Form_Field { public function render(Varien_Data_Form_Element_Abstract $element) { diff --git a/app/code/core/Mage/Directory/Block/Adminhtml/Frontend/Region/Updater.php b/app/code/core/Mage/Directory/Block/Adminhtml/Frontend/Region/Updater.php index adbf5b5e77ffd76aaeb7018857148a85d26db709..08e74975e8c3a175665f61c8bb1596c40f2317df 100644 --- a/app/code/core/Mage/Directory/Block/Adminhtml/Frontend/Region/Updater.php +++ b/app/code/core/Mage/Directory/Block/Adminhtml/Frontend/Region/Updater.php @@ -25,7 +25,7 @@ */ class Mage_Directory_Block_Adminhtml_Frontend_Region_Updater - extends Mage_Adminhtml_Block_System_Config_Form_Field + extends Mage_Backend_Block_System_Config_Form_Field { protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) { diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Allregion.php b/app/code/core/Mage/Directory/Model/Config/Source/Allregion.php similarity index 95% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Allregion.php rename to app/code/core/Mage/Directory/Model/Config/Source/Allregion.php index bf12e42c5b194ca580990e00928ca076d4269ead..f1abde4611b1c295faab633529a0654207be822c 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Allregion.php +++ b/app/code/core/Mage/Directory/Model/Config/Source/Allregion.php @@ -19,13 +19,13 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Directory * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Adminhtml_Model_System_Config_Source_Allregion +class Mage_Directory_Model_Config_Source_Allregion implements Mage_Core_Model_Option_ArrayInterface { protected $_countries; protected $_options; diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Country.php b/app/code/core/Mage/Directory/Model/Config/Source/Country.php similarity index 88% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Country.php rename to app/code/core/Mage/Directory/Model/Config/Source/Country.php index 538f7ad80055dc0fd6acb104a72de7e5b066e517..a6ebbcfe500fde52a012eb7450a847678eb4b4a8 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Country.php +++ b/app/code/core/Mage/Directory/Model/Config/Source/Country.php @@ -19,13 +19,13 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Directory * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Adminhtml_Model_System_Config_Source_Country +class Mage_Directory_Model_Config_Source_Country implements Mage_Core_Model_Option_ArrayInterface { protected $_options; @@ -39,7 +39,7 @@ class Mage_Adminhtml_Model_System_Config_Source_Country $options = $this->_options; if(!$isMultiselect){ - array_unshift($options, array('value'=>'', 'label'=> Mage::helper('Mage_Adminhtml_Helper_Data')->__('--Please Select--'))); + array_unshift($options, array('value'=>'', 'label'=> Mage::helper('Mage_Directory_Helper_Data')->__('--Please Select--'))); } return $options; diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Country/Full.php b/app/code/core/Mage/Directory/Model/Config/Source/Country/Full.php similarity index 84% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Country/Full.php rename to app/code/core/Mage/Directory/Model/Config/Source/Country/Full.php index f1e4a7be5f3c919d891874d111ec8e84496f0dd4..090d02a461f53466a25acc940dd62ffb97b174de 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Country/Full.php +++ b/app/code/core/Mage/Directory/Model/Config/Source/Country/Full.php @@ -19,13 +19,14 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Directory * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Adminhtml_Model_System_Config_Source_Country_Full extends Mage_Adminhtml_Model_System_Config_Source_Country +class Mage_Directory_Model_Config_Source_Country_Full extends Mage_Directory_Model_Config_Source_Country + implements Mage_Core_Model_Option_ArrayInterface { public function toOptionArray($isMultiselect=false) { return parent::toOptionArray(true); diff --git a/app/code/core/Mage/Directory/Model/CountryFactory.php b/app/code/core/Mage/Directory/Model/CountryFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..91eb0e0b20fd9d4530ffc609a47ff10a3c6851f7 --- /dev/null +++ b/app/code/core/Mage/Directory/Model/CountryFactory.php @@ -0,0 +1,59 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Mage_Directory + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +/** + * Country factory + * + * @category Mage + * @package Mage_Directory + * @author Magento Core Team <core@magentocommerce.com> + */ +class Mage_Directory_Model_CountryFactory +{ + /** + * @var Magento_ObjectManager + */ + protected $_objectManager; + + /** + * @param Magento_ObjectManager $objectManager + */ + public function __construct(Magento_ObjectManager $objectManager) + { + $this->_objectManager = $objectManager; + } + + /** + * Create new country model + * + * @param array $arguments + * @return Mage_Directory_Model_Country + */ + public function create(array $arguments = array()) + { + return $this->_objectManager->create('Mage_Directory_Model_Country', $arguments, false); + } +} diff --git a/app/code/core/Mage/Directory/Model/RegionFactory.php b/app/code/core/Mage/Directory/Model/RegionFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..bfac43bc0bda8987959fe9e67be999fb722b7e4a --- /dev/null +++ b/app/code/core/Mage/Directory/Model/RegionFactory.php @@ -0,0 +1,59 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Mage_Directory + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +/** + * Region factory + * + * @category Mage + * @package Mage_Directory + * @author Magento Core Team <core@magentocommerce.com> + */ +class Mage_Directory_Model_RegionFactory +{ + /** + * @var Magento_ObjectManager + */ + protected $_objectManager; + + /** + * @param Magento_ObjectManager $objectManager + */ + public function __construct(Magento_ObjectManager $objectManager) + { + $this->_objectManager = $objectManager; + } + + /** + * Create new region model + * + * @param array $arguments + * @return Mage_Directory_Model_Region + */ + public function create(array $arguments = array()) + { + return $this->_objectManager->create('Mage_Directory_Model_Region', $arguments, false); + } +} diff --git a/app/code/core/Mage/Directory/etc/adminhtml/system.xml b/app/code/core/Mage/Directory/etc/adminhtml/system.xml new file mode 100644 index 0000000000000000000000000000000000000000..610df30c243489dad08fff94e38bec093c75508b --- /dev/null +++ b/app/code/core/Mage/Directory/etc/adminhtml/system.xml @@ -0,0 +1,127 @@ +<?xml version="1.0"?> +<!-- +/** + * 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 Mage_Directory + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> + <system> + <section id="currency" translate="label" module="Mage_Directory" sortOrder="60" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Currency Setup</label> + <tab>general</tab> + <resource>Mage_Adminhtml::currency</resource> + <group id="options" translate="label" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Currency Options</label> + <field id="base" translate="label comment" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Base Currency</label> + <frontend_model>Mage_Directory_Block_Adminhtml_Frontend_Currency_Base</frontend_model> + <source_model>Mage_Backend_Model_Config_Source_Currency</source_model> + <backend_model>Mage_Backend_Model_Config_Backend_Currency_Base</backend_model> + <comment> + <![CDATA[Base currency is used for all online payment transactions. If you have more than one store view, the base currency scope is defined by the catalog price scope ("Catalog" > "Price" > "Catalog Price Scope").]]> +</comment> + </field> + <field id="default" translate="label" type="select" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Default Display Currency</label> + <source_model>Mage_Backend_Model_Config_Source_Currency</source_model> + <backend_model>Mage_Backend_Model_Config_Backend_Currency_Default</backend_model> + </field> + <field id="allow" translate="label" type="multiselect" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Allowed Currencies</label> + <source_model>Mage_Backend_Model_Config_Source_Currency</source_model> + <backend_model>Mage_Backend_Model_Config_Backend_Currency_Allow</backend_model> + <can_be_empty>1</can_be_empty> + </field> + </group> + <group id="webservicex" translate="label" sortOrder="40" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Webservicex</label> + <field id="timeout" translate="label" type="text" sortOrder="0" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Connection Timeout in Seconds</label> + </field> + </group> + <group id="import" translate="label" type="text" sortOrder="50" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Scheduled Import Settings</label> + <field id="enabled" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Enabled</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="error_email" translate="label" type="text" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Error Email Recipient</label> + <validate>validate-email</validate> + </field> + <field id="error_email_identity" translate="label" type="select" sortOrder="6" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Error Email Sender</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Identity</source_model> + </field> + <field id="error_email_template" translate="label" type="select" sortOrder="7" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Error Email Template</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Template</source_model> + </field> + <field id="frequency" translate="label" type="select" sortOrder="4" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Frequency</label> + <source_model>Mage_Cron_Model_Config_Source_Frequency</source_model> + </field> + <field id="service" translate="label" type="select" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Service</label> + <source_model>Mage_Backend_Model_Config_Source_Currency_Service</source_model> + <backend_model>Mage_Backend_Model_Config_Backend_Currency_Cron</backend_model> + </field> + <field id="time" translate="label" type="time" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Start Time</label> + </field> + </group> + </section> + <section id="system"> + <group id="currency" translate="label" module="Mage_Directory" type="text" sortOrder="50" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Currency</label> + <field id="installed" translate="label" type="multiselect" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Installed Currencies</label> + <backend_model>Mage_Backend_Model_Config_Backend_Locale</backend_model> + <source_model>Mage_Backend_Model_Config_Source_Locale_Currency_All</source_model> + <can_be_empty>1</can_be_empty> + </field> + </group> + </section> + <section id="general"> + <group id="country"> + <field id="optional_zip_countries" module="Mage_Directory" translate="label" type="multiselect" sortOrder="3" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Zip/Postal Code is Optional for</label> + <source_model>Mage_Directory_Model_Config_Source_Country</source_model> + <can_be_empty>1</can_be_empty> + </field> + </group> + <group id="region" translate="label" module="Mage_Directory" type="text" sortOrder="4" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>State Options</label> + <field id="state_required" translate="label" type="multiselect" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>State is Required for</label> + <source_model>Mage_Directory_Model_Config_Source_Country</source_model> + </field> + <field id="display_all" translate="label" type="select" sortOrder="8" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Allow to Choose State if It is Optional for Country</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + </group> + </section> + </system> +</config> diff --git a/app/code/core/Mage/Directory/etc/system.xml b/app/code/core/Mage/Directory/etc/system.xml deleted file mode 100644 index 5703fab643d0101ab475db035fb9490b9fc877d6..0000000000000000000000000000000000000000 --- a/app/code/core/Mage/Directory/etc/system.xml +++ /dev/null @@ -1,245 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * 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 Mage_Directory - * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<config> - <sections> - <currency translate="label" module="Mage_Directory"> - <label>Currency Setup</label> - <tab>general</tab> - <sort_order>60</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <resource>Mage_Adminhtml::currency</resource> - <groups> - <options translate="label"> - <label>Currency Options</label> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <base translate="label comment"> - <label>Base Currency</label> - <frontend_type>select</frontend_type> - <frontend_model>Mage_Directory_Block_Adminhtml_Frontend_Currency_Base</frontend_model> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Currency</source_model> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Currency_Base</backend_model> - <sort_order>1</sort_order> - <comment><![CDATA[Base currency is used for all online payment transactions. If you have more than one store view, the base currency scope is defined by the catalog price scope ("Catalog" > "Price" > "Catalog Price Scope").]]></comment> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </base> - <default translate="label"> - <label>Default Display Currency</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Currency</source_model> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Currency_Default</backend_model> - <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> - </default> - <allow translate="label"> - <label>Allowed Currencies</label> - <frontend_type>multiselect</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Currency</source_model> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Currency_Allow</backend_model> - <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> - <can_be_empty>1</can_be_empty> - </allow> - </fields> - </options> - <webservicex translate="label"> - <label>Webservicex</label> - <sort_order>40</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - <fields> - <timeout translate="label"> - <label>Connection Timeout in Seconds</label> - <frontend_type>text</frontend_type> - <sort_order>0</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </timeout> - </fields> - </webservicex> - <import translate="label"> - <label>Scheduled Import Settings</label> - <frontend_type>text</frontend_type> - <sort_order>50</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - <fields> - <enabled translate="label"> - <label>Enabled</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </enabled> - <error_email translate="label"> - <label>Error Email Recipient</label> - <frontend_type>text</frontend_type> - <validate>validate-email</validate> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </error_email> - <error_email_identity translate="label"> - <label>Error Email Sender</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Identity</source_model> - <sort_order>6</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </error_email_identity> - <error_email_template translate="label"> - <label>Error Email Template</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Template</source_model> - <sort_order>7</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </error_email_template> - <frequency translate="label"> - <label>Frequency</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Cron_Frequency</source_model> - <sort_order>4</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </frequency> - <service translate="label"> - <label>Service</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Currency_Service</source_model> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Currency_Cron</backend_model> - <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> - </service> - <time translate="label"> - <label>Start Time</label> - <frontend_type>time</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> - </time> - </fields> - </import> - </groups> - </currency> - <system> - <groups> - <currency translate="label" module="Mage_Directory"> - <label>Currency</label> - <frontend_type>text</frontend_type> - <sort_order>50</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - <fields> - <installed translate="label"> - <label>Installed Currencies</label> - <frontend_type>multiselect</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Locale</backend_model> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Locale_Currency_All</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - <can_be_empty>1</can_be_empty> - </installed> - </fields> - </currency> - </groups> - </system> - <general> - <groups> - <country> - <fields> - <optional_zip_countries translate="label" module="Mage_Directory"> - <label>Zip/Postal Code is Optional for</label> - <frontend_type>multiselect</frontend_type> - <sort_order>3</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Country</source_model> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - <can_be_empty>1</can_be_empty> - </optional_zip_countries> - </fields> - </country> - <region translate="label" module="Mage_Directory"> - <label>State Options</label> - <frontend_type>text</frontend_type> - <sort_order>4</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - <fields> - <state_required translate="label"> - <label>State is Required for</label> - <frontend_type>multiselect</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Country</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </state_required> - <display_all translate="label"> - <label>Allow to Choose State if It is Optional for Country</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>8</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </display_all> - </fields> - </region> - </groups> - </general> - </sections> -</config> diff --git a/app/code/core/Mage/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Links.php b/app/code/core/Mage/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Links.php index 63dd825ca1f783902e83fc47348cc723e7531213..568baf679ff40f9ecc762096aec9af60cf6a1d62 100644 --- a/app/code/core/Mage/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Links.php +++ b/app/code/core/Mage/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Links.php @@ -99,7 +99,7 @@ class Mage_Downloadable_Block_Adminhtml_Catalog_Product_Edit_Tab_Downloadable_Li $select = $this->getLayout()->createBlock('Mage_Adminhtml_Block_Html_Select') ->setName('product[links_purchased_separately]') ->setId('downloadable_link_purchase_type') - ->setOptions(Mage::getSingleton('Mage_Adminhtml_Model_System_Config_Source_Yesno')->toOptionArray()) + ->setOptions(Mage::getSingleton('Mage_Backend_Model_Config_Source_Yesno')->toOptionArray()) ->setValue($this->getProduct()->getLinksPurchasedSeparately()); return $select->getHtml(); @@ -293,7 +293,7 @@ class Mage_Downloadable_Block_Adminhtml_Catalog_Product_Edit_Tab_Downloadable_Li */ public function getUploadUrl($type) { - return Mage::getModel('Mage_Adminhtml_Model_Url')->addSessionParam() + return Mage::getModel('Mage_Backend_Model_Url')->addSessionParam() ->getUrl('*/downloadable_file/upload', array('type' => $type, '_secure' => true)); } diff --git a/app/code/core/Mage/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Samples.php b/app/code/core/Mage/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Samples.php index a5f582d2ba0a7059b5a8c4623cea95787e629c9b..4502544480bd797045c2115489489cd41c56edd8 100644 --- a/app/code/core/Mage/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Samples.php +++ b/app/code/core/Mage/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Samples.php @@ -173,7 +173,7 @@ class Mage_Downloadable_Block_Adminhtml_Catalog_Product_Edit_Tab_Downloadable_Sa */ public function getConfigJson() { - $this->getConfig()->setUrl(Mage::getModel('Mage_Adminhtml_Model_Url') + $this->getConfig()->setUrl(Mage::getModel('Mage_Backend_Model_Url') ->addSessionParam() ->getUrl('*/downloadable_file/upload', array('type' => 'samples', '_secure' => true))); $this->getConfig()->setParams(array('form_key' => $this->getFormKey())); diff --git a/app/code/core/Mage/Downloadable/etc/adminhtml/system.xml b/app/code/core/Mage/Downloadable/etc/adminhtml/system.xml new file mode 100644 index 0000000000000000000000000000000000000000..641405b1ebc4a46263b83c7d52724f7fe6297260 --- /dev/null +++ b/app/code/core/Mage/Downloadable/etc/adminhtml/system.xml @@ -0,0 +1,66 @@ +<?xml version="1.0"?> +<!-- +/** + * 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 Mage_Downloadable + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> + <system> + <section id="catalog"> + <group id="downloadable" translate="label" type="text" sortOrder="600" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Downloadable Product Options</label> + <field id="order_item_status" translate="label" type="select" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Order Item Status to Enable Downloads</label> + <source_model>Mage_Downloadable_Model_System_Config_Source_Orderitemstatus</source_model> + </field> + <field id="downloads_number" translate="label" type="text" sortOrder="200" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Default Maximum Number of Downloads</label> + </field> + <field id="shareable" translate="label" type="select" sortOrder="300" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Shareable</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="samples_title" translate="label" type="text" sortOrder="400" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Default Sample Title</label> + </field> + <field id="links_title" translate="label" type="text" sortOrder="500" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Default Link Title</label> + </field> + <field id="links_target_new_window" translate="label" type="select" sortOrder="600" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Open Links in New Window</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="content_disposition" translate="label" type="select" sortOrder="700" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Use Content-Disposition</label> + <source_model>Mage_Downloadable_Model_System_Config_Source_Contentdisposition</source_model> + </field> + <field id="disable_guest_checkout" translate="label comment" type="select" sortOrder="800" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Disable Guest Checkout if Cart Contains Downloadable Items</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + <comment>Guest checkout will only work with shareable.</comment> + </field> + </group> + </section> + </system> +</config> diff --git a/app/code/core/Mage/Downloadable/etc/system.xml b/app/code/core/Mage/Downloadable/etc/system.xml deleted file mode 100644 index 0709e5d5fbc197da36f155803500445e5f6be89b..0000000000000000000000000000000000000000 --- a/app/code/core/Mage/Downloadable/etc/system.xml +++ /dev/null @@ -1,115 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * 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 Mage_Downloadable - * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<config> - <sections> - <catalog> - <groups> - <downloadable translate="label"> - <label>Downloadable Product Options</label> - <frontend_type>text</frontend_type> - <sort_order>600</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <order_item_status translate="label"> - <label>Order Item Status to Enable Downloads</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Downloadable_Model_System_Config_Source_Orderitemstatus</source_model> - <sort_order>100</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </order_item_status> - <downloads_number translate="label"> - <label>Default Maximum Number of Downloads</label> - <frontend_type>text</frontend_type> - <sort_order>200</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </downloads_number> - <shareable translate="label"> - <label>Shareable</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>300</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </shareable> - <samples_title translate="label"> - <label>Default Sample Title</label> - <frontend_type>text</frontend_type> - <sort_order>400</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </samples_title> - <links_title translate="label"> - <label>Default Link Title</label> - <frontend_type>text</frontend_type> - <sort_order>500</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </links_title> - <links_target_new_window translate="label"> - <label>Open Links in New Window</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>600</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </links_target_new_window> - <content_disposition translate="label"> - <label>Use Content-Disposition</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Downloadable_Model_System_Config_Source_Contentdisposition</source_model> - <sort_order>700</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </content_disposition> - <disable_guest_checkout translate="label comment"> - <label>Disable Guest Checkout if Cart Contains Downloadable Items</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>800</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <comment>Guest checkout will only work with shareable.</comment> - </disable_guest_checkout> - </fields> - </downloadable> - </groups> - </catalog> - </sections> -</config> diff --git a/app/code/core/Mage/Eav/Block/Adminhtml/Attribute/Edit/Main/Abstract.php b/app/code/core/Mage/Eav/Block/Adminhtml/Attribute/Edit/Main/Abstract.php index d56c1d47b609028da167dd2627db059569e136a2..85bb16d7a52382351a83e457356cb4bfcb66136b 100644 --- a/app/code/core/Mage/Eav/Block/Adminhtml/Attribute/Edit/Main/Abstract.php +++ b/app/code/core/Mage/Eav/Block/Adminhtml/Attribute/Edit/Main/Abstract.php @@ -76,7 +76,7 @@ abstract class Mage_Eav_Block_Adminhtml_Attribute_Edit_Main_Abstract extends Mag $this->_addElementTypes($fieldset); - $yesno = Mage::getModel('Mage_Adminhtml_Model_System_Config_Source_Yesno')->toOptionArray(); + $yesno = Mage::getModel('Mage_Backend_Model_Config_Source_Yesno')->toOptionArray(); $validateClass = sprintf('validate-code validate-length maximum-length-%d', Mage_Eav_Model_Entity_Attribute::ATTRIBUTE_CODE_MAX_LENGTH); @@ -119,7 +119,7 @@ abstract class Mage_Eav_Block_Adminhtml_Attribute_Edit_Main_Abstract extends Mag 'name' => 'default_value_date', 'label' => Mage::helper('Mage_Eav_Helper_Data')->__('Default Value'), 'title' => Mage::helper('Mage_Eav_Helper_Data')->__('Default Value'), - 'image' => $this->getSkinUrl('images/grid-cal.gif'), + 'image' => $this->getViewFileUrl('images/grid-cal.gif'), 'value' => $attributeObject->getDefaultValue(), 'date_format' => $dateFormat )); @@ -220,4 +220,4 @@ abstract class Mage_Eav_Block_Adminhtml_Attribute_Edit_Main_Abstract extends Mag return $html.$jsScripts; } -} \ No newline at end of file +} diff --git a/app/code/core/Mage/Tag/etc/system.xml b/app/code/core/Mage/GiftMessage/etc/adminhtml/system.xml similarity index 50% rename from app/code/core/Mage/Tag/etc/system.xml rename to app/code/core/Mage/GiftMessage/etc/adminhtml/system.xml index ee017412fdc9b2a57768672f3e37822168c6560b..bceab066f6382c137b2e39e36bc521c991e7bbcc 100644 --- a/app/code/core/Mage/Tag/etc/system.xml +++ b/app/code/core/Mage/GiftMessage/etc/adminhtml/system.xml @@ -20,29 +20,25 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Rss + * @package Mage_GiftMessage * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> <config> - <sections> - <rss> - <groups> - <catalog translate="label"> - <fields> - <tag translate="label"> - <label>Tags Products</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Enabledisable</source_model> - <sort_order>13</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </tag> - </fields> - </catalog> - </groups> - </rss> - </sections> + <system> + <section id="sales"> + <group id="gift_options" translate="label" module="Mage_GiftMessage" type="text" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Gift Options</label> + <field id="allow_order" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Allow Gift Messages on Order Level</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="allow_items" translate="label" type="select" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Allow Gift Messages for Order Items</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + </group> + </section> + </system> </config> diff --git a/app/code/core/Mage/GiftMessage/etc/system.xml b/app/code/core/Mage/GiftMessage/etc/system.xml deleted file mode 100644 index f3fd8de93c0e95f5e60ba9f6cb1b58fb4c50449d..0000000000000000000000000000000000000000 --- a/app/code/core/Mage/GiftMessage/etc/system.xml +++ /dev/null @@ -1,63 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * 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 Mage_GiftMessage - * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<config> - <sections> - <sales> - <groups> - <gift_options translate="label" module="Mage_GiftMessage"> - <label>Gift Options</label> - <frontend_type>text</frontend_type> - <sort_order>100</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <fields> - <allow_order translate="label"> - <label>Allow Gift Messages on Order Level</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </allow_order> - <allow_items translate="label"> - <label>Allow Gift Messages for Order Items</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </allow_items> - </fields> - </gift_options> - </groups> - </sales> - </sections> -</config> diff --git a/app/code/core/Mage/GoogleAnalytics/etc/adminhtml/system.xml b/app/code/core/Mage/GoogleAnalytics/etc/adminhtml/system.xml new file mode 100644 index 0000000000000000000000000000000000000000..6c6d4210a7cc2beae2d57eb5adce30d84b1b4142 --- /dev/null +++ b/app/code/core/Mage/GoogleAnalytics/etc/adminhtml/system.xml @@ -0,0 +1,46 @@ +<?xml version="1.0"?> +<!-- +/** + * 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 Mage_GoogleAnalytics + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> + <system> + <section id="google" translate="label" module="Mage_GoogleAnalytics" type="text" sortOrder="340" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Google API</label> + <tab>sales</tab> + <resource>Mage_GoogleCheckout::google</resource> + <group id="analytics" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Google Analytics</label> + <field id="active" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Enable</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="account" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Account Number</label> + </field> + </group> + </section> + </system> +</config> diff --git a/app/code/core/Mage/GoogleAnalytics/etc/system.xml b/app/code/core/Mage/GoogleAnalytics/etc/system.xml deleted file mode 100644 index da9bcb49fc201e8124bfaedf035dd283bec58a1c..0000000000000000000000000000000000000000 --- a/app/code/core/Mage/GoogleAnalytics/etc/system.xml +++ /dev/null @@ -1,70 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * 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 Mage_GoogleAnalytics - * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<config> - <sections> - <google translate="label" module="Mage_GoogleAnalytics"> - <label>Google API</label> - <tab>sales</tab> - <frontend_type>text</frontend_type> - <sort_order>340</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <resource>Mage_GoogleCheckout::google</resource> - <groups> - <analytics translate="label"> - <label>Google Analytics</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> - <fields> - <active translate="label"> - <label>Enable</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <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> - </active> - <account translate="label"> - <label>Account Number</label> - <frontend_type>text</frontend_type> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </account> - </fields> - </analytics> - </groups> - </google> - </sections> -</config> diff --git a/app/code/core/Mage/GoogleCheckout/Block/Adminhtml/Shipping/Applicable/Countries.php b/app/code/core/Mage/GoogleCheckout/Block/Adminhtml/Shipping/Applicable/Countries.php index 576e03ff8aeaad6b4e32c3ad2a6f160cac8406fe..c346609db1972c097712087a5b01186dfffb55b5 100644 --- a/app/code/core/Mage/GoogleCheckout/Block/Adminhtml/Shipping/Applicable/Countries.php +++ b/app/code/core/Mage/GoogleCheckout/Block/Adminhtml/Shipping/Applicable/Countries.php @@ -25,7 +25,7 @@ */ class Mage_GoogleCheckout_Block_Adminhtml_Shipping_Applicable_Countries - extends Mage_Adminhtml_Block_System_Config_Form_Field + extends Mage_Backend_Block_System_Config_Form_Field { protected $_addRowButtonHtml = array(); protected $_removeRowButtonHtml = array(); diff --git a/app/code/core/Mage/GoogleCheckout/Block/Adminhtml/Shipping/Merchant.php b/app/code/core/Mage/GoogleCheckout/Block/Adminhtml/Shipping/Merchant.php index f93c03164658fef45a40340e3fb22de5655fd49d..9fc66e6a780277015e8f4accbf3a1d9bb653010e 100644 --- a/app/code/core/Mage/GoogleCheckout/Block/Adminhtml/Shipping/Merchant.php +++ b/app/code/core/Mage/GoogleCheckout/Block/Adminhtml/Shipping/Merchant.php @@ -25,7 +25,7 @@ */ class Mage_GoogleCheckout_Block_Adminhtml_Shipping_Merchant - extends Mage_Adminhtml_Block_System_Config_Form_Field + extends Mage_Backend_Block_System_Config_Form_Field { protected $_addRowButtonHtml = array(); protected $_removeRowButtonHtml = array(); diff --git a/app/code/core/Mage/GoogleCheckout/etc/adminhtml/system.xml b/app/code/core/Mage/GoogleCheckout/etc/adminhtml/system.xml new file mode 100644 index 0000000000000000000000000000000000000000..d48af58454823c357721905a64490750cca7e83c --- /dev/null +++ b/app/code/core/Mage/GoogleCheckout/etc/adminhtml/system.xml @@ -0,0 +1,212 @@ +<?xml version="1.0"?> +<!-- +/** + * 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 Mage_GoogleCheckout + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> + <system> + <section id="google" translate="label" module="Mage_GoogleCheckout" type="text" sortOrder="340" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Google API</label> + <tab>general</tab> + <resource>Mage_GoogleCheckout::google</resource> + <group id="checkout" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Google Checkout</label> + <comment> + <![CDATA[<a href="http://www.magentocommerce.com/redirect/google-checkout/" target="_blank">Signup for Google Checkout</a>]]> +</comment> + <field id="active" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Enable</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="title" translate="label" type="text" sortOrder="11" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Title</label> + </field> + <field id="sandbox" translate="label" type="select" sortOrder="12" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Sandbox</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="use_secure_callback_url" translate="label comment" type="select" sortOrder="13" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Secure Callback URL</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + <comment>Required for live Google Checkout transactions. Make sure that this option corresponds to Use Secure URLs in Frontend ("Web" > "Secure").</comment> + </field> + <field id="debug" translate="label" type="select" sortOrder="14" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Debug</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="merchant_id" translate="label" type="obscure" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Merchant ID</label> + <backend_model>Mage_Backend_Model_Config_Backend_Encrypted</backend_model> + </field> + <field id="merchant_key" translate="label" type="obscure" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Merchant Key</label> + <backend_model>Mage_Backend_Model_Config_Backend_Encrypted</backend_model> + </field> + <field id="checkout_image" translate="label" type="select" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Checkout Image Style</label> + <source_model>Mage_GoogleCheckout_Model_Source_Checkout_Image</source_model> + </field> + <field id="locale" translate="label" type="select" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Location</label> + <source_model>Mage_GoogleCheckout_Model_Source_Locale</source_model> + </field> + <field id="order_status" translate="label" type="select" sortOrder="60" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>New Order Status</label> + <source_model>Mage_Sales_Model_Config_Source_Order_Status_New</source_model> + </field> + <field id="continue_shopping_url" translate="label comment" sortOrder="80" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Continue Shopping URL</label> + <comment>Optional, leave empty for home page.</comment> + </field> + <field id="hide_cart_contents" translate="label comment" type="select" sortOrder="90" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Hide Cart Contents</label> + <comment>If enabled, cart contents will be hidden after clicking on the Google Checkout button in the shopping cart, and restored if "Edit Cart" link was activated.</comment> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="disable_default_tax_tables" translate="label comment" type="select" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Disable Default Tax Tables</label> + <comment>Enable this if your checkout request is too big and being cut off.</comment> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + </group> + <group id="checkout_shipping_merchant" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Google Checkout Shipping - Merchant Calculated</label> + <field id="active" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Enable Merchant Calculated</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="allowed_methods" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Allowed Methods</label> + <frontend_model>Mage_GoogleCheckout_Block_Adminhtml_Shipping_Merchant</frontend_model> + <backend_model>Mage_Backend_Model_Config_Backend_Serialized</backend_model> + </field> + </group> + <group id="checkout_shipping_carrier" translate="label" type="text" sortOrder="32" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Google Checkout Shipping - Carrier Calculated</label> + <field id="active" translate="label comment" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Enable Carrier Calculated</label> + <comment> + <![CDATA[<strong style="color:red">Warning!</strong> This option disables the merchant calculated shipping. With this option, Google API ignores any attempt to affect shipping prices.]]> +</comment> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="methods" translate="label" type="multiselect" sortOrder="15" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Carrier Calculated Methods</label> + <source_model>Mage_GoogleCheckout_Model_Source_Shipping_Carrier</source_model> + <can_be_empty>1</can_be_empty> + </field> + <field id="address_category" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Delivery Address Category</label> + <source_model>Mage_GoogleCheckout_Model_Source_Shipping_Category</source_model> + </field> + <field id="default_price" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Default Price for Methods</label> + </field> + <field id="default_width" translate="label" type="text" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Default Package Width (in)</label> + </field> + <field id="default_height" translate="label" type="text" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Default Package Height (in)</label> + </field> + <field id="default_length" translate="label" type="text" sortOrder="60" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Default Package Length (in)</label> + </field> + </group> + <group id="checkout_shipping_flatrate" translate="label" type="text" sortOrder="36" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Google Checkout Shipping - Flat Rate</label> + <field id="active" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Enable Flat Rate</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="title_1" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Rate 1 Title</label> + </field> + <field id="price_1" translate="label" type="text" sortOrder="22" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Rate 1 Amount</label> + </field> + <field id="sallowspecific_1" translate="label" type="select" sortOrder="24" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Rate 1 Ship To Applicable Countries</label> + <source_model>Mage_Shipping_Model_Config_Source_Allspecificcountries</source_model> + <frontend_model>Mage_GoogleCheckout_Block_Adminhtml_Shipping_Applicable_Countries</frontend_model> + <can_be_empty>1</can_be_empty> + </field> + <field id="specificcountry_1" translate="label" type="multiselect" sortOrder="26" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Rate 1 Ship to Specific Countries</label> + <source_model>Mage_Directory_Model_Config_Source_Country</source_model> + <can_be_empty>1</can_be_empty> + </field> + <field id="title_2" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Rate 2 Title</label> + </field> + <field id="price_2" translate="label" type="text" sortOrder="32" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Rate 2 Amount</label> + </field> + <field id="sallowspecific_2" translate="label" type="select" sortOrder="34" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Rate 2 Ship To Applicable Countries</label> + <source_model>Mage_Shipping_Model_Config_Source_Allspecificcountries</source_model> + <frontend_model>Mage_GoogleCheckout_Block_Adminhtml_Shipping_Applicable_Countries</frontend_model> + <can_be_empty>1</can_be_empty> + </field> + <field id="specificcountry_2" translate="label" type="multiselect" sortOrder="36" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Rate 2 Ship to Specific Countries</label> + <source_model>Mage_Directory_Model_Config_Source_Country</source_model> + <can_be_empty>1</can_be_empty> + </field> + <field id="title_3" translate="label" type="text" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Rate 3 Title</label> + </field> + <field id="price_3" translate="label" type="text" sortOrder="42" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Rate 3 Amount</label> + </field> + <field id="sallowspecific_3" translate="label" type="select" sortOrder="44" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Rate 3 Ship To Applicable Countries</label> + <source_model>Mage_Shipping_Model_Config_Source_Allspecificcountries</source_model> + <frontend_model>Mage_GoogleCheckout_Block_Adminhtml_Shipping_Applicable_Countries</frontend_model> + <can_be_empty>1</can_be_empty> + </field> + <field id="specificcountry_3" translate="label" type="multiselect" sortOrder="46" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Rate 3 Ship to Specific Countries</label> + <source_model>Mage_Directory_Model_Config_Source_Country</source_model> + <can_be_empty>1</can_be_empty> + </field> + </group> + <group id="checkout_shipping_virtual" translate="label" type="text" sortOrder="200" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Google Checkout Shipping - Digital Delivery</label> + <field id="active" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Enable Digital Delivery</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="schedule" translate="label" type="select" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Delivery Schedule</label> + <source_model>Mage_GoogleCheckout_Model_Source_Shipping_Virtual_Schedule</source_model> + </field> + <field id="method" translate="label" type="select" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Method</label> + <source_model>Mage_GoogleCheckout_Model_Source_Shipping_Virtual_Method</source_model> + </field> + </group> + </section> + </system> +</config> diff --git a/app/code/core/Mage/GoogleCheckout/etc/config.xml b/app/code/core/Mage/GoogleCheckout/etc/config.xml index 5d54ff850ede23a153507795601c3a887a29f53a..27c1332840827c33d2679aa0869cfc222ad03b66 100644 --- a/app/code/core/Mage/GoogleCheckout/etc/config.xml +++ b/app/code/core/Mage/GoogleCheckout/etc/config.xml @@ -136,8 +136,8 @@ </payment> <google> <checkout> - <merchant_id backend_model="Mage_Adminhtml_Model_System_Config_Backend_Encrypted"/> - <merchant_key backend_model="Mage_Adminhtml_Model_System_Config_Backend_Encrypted"/> + <merchant_id backend_model="Mage_Backend_Model_Config_Backend_Encrypted"/> + <merchant_key backend_model="Mage_Backend_Model_Config_Backend_Encrypted"/> <use_secure_callback_url>0</use_secure_callback_url> <disable_default_tax_tables>0</disable_default_tax_tables> <hide_cart_contents>1</hide_cart_contents> diff --git a/app/code/core/Mage/GoogleCheckout/etc/system.xml b/app/code/core/Mage/GoogleCheckout/etc/system.xml deleted file mode 100644 index 15c88e21aa64a841e9666554b7ce89baaf751e80..0000000000000000000000000000000000000000 --- a/app/code/core/Mage/GoogleCheckout/etc/system.xml +++ /dev/null @@ -1,484 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * 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 Mage_GoogleCheckout - * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<config> - <sections> - <google translate="label" module="Mage_GoogleCheckout"> - <label>Google API</label> - <tab>general</tab> - <frontend_type>text</frontend_type> - <sort_order>340</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <resource>Mage_GoogleCheckout::google</resource> - <groups> - <checkout translate="label"> - <label>Google Checkout</label> - <frontend_type>text</frontend_type> - <comment><![CDATA[<a href="http://www.magentocommerce.com/redirect/google-checkout/" target="_blank">Signup for Google Checkout</a>]]></comment> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <active translate="label"> - <label>Enable</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>10</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </active> - <title translate="label"> - <label>Title</label> - <frontend_type>text</frontend_type> - <sort_order>11</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </title> - <sandbox translate="label"> - <label>Sandbox</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>12</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </sandbox> - <use_secure_callback_url translate="label comment"> - <label>Secure Callback URL</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>13</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <comment>Required for live Google Checkout transactions. Make sure that this option corresponds to Use Secure URLs in Frontend ("Web" > "Secure").</comment> - </use_secure_callback_url> - <debug translate="label"> - <label>Debug</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>14</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </debug> - <merchant_id translate="label"> - <label>Merchant ID</label> - <frontend_type>obscure</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Encrypted</backend_model> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </merchant_id> - <merchant_key translate="label"> - <label>Merchant Key</label> - <frontend_type>obscure</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Encrypted</backend_model> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </merchant_key> - <checkout_image translate="label"> - <label>Checkout Image Style</label> - <frontend_type>select</frontend_type> - <source_model>Mage_GoogleCheckout_Model_Source_Checkout_Image</source_model> - <sort_order>40</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </checkout_image> - <locale translate="label"> - <label>Location</label> - <frontend_type>select</frontend_type> - <source_model>Mage_GoogleCheckout_Model_Source_Locale</source_model> - <sort_order>50</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </locale> - <order_status translate="label"> - <label>New Order Status</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Order_Status_New</source_model> - <sort_order>60</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </order_status> - <continue_shopping_url translate="label comment"> - <label>Continue Shopping URL</label> - <comment>Optional, leave empty for home page.</comment> - <sort_order>80</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </continue_shopping_url> - <hide_cart_contents translate="label comment"> - <label>Hide Cart Contents</label> - <comment>If enabled, cart contents will be hidden after clicking on the Google Checkout button in the shopping cart, and restored if "Edit Cart" link was activated.</comment> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>90</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </hide_cart_contents> - <disable_default_tax_tables translate="label comment"> - <label>Disable Default Tax Tables</label> - <comment>Enable this if your checkout request is too big and being cut off.</comment> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>100</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </disable_default_tax_tables> - </fields> - </checkout> - - <checkout_shipping_merchant translate="label"> - <label>Google Checkout Shipping - Merchant Calculated</label> - <frontend_type>text</frontend_type> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <fields> - <active translate="label"> - <label>Enable Merchant Calculated</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>10</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </active> - <allowed_methods translate="label"> - <label>Allowed Methods</label> - <frontend_type>select</frontend_type> - <frontend_model>Mage_GoogleCheckout_Block_Adminhtml_Shipping_Merchant</frontend_model> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Serialized</backend_model> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </allowed_methods> - </fields> - </checkout_shipping_merchant> - - <checkout_shipping_carrier translate="label"> - <label>Google Checkout Shipping - Carrier Calculated</label> - <frontend_type>text</frontend_type> - <sort_order>32</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <fields> - <active translate="label comment"> - <label>Enable Carrier Calculated</label> - <comment><![CDATA[<strong style="color:red">Warning!</strong> This option disables the merchant calculated shipping. With this option, Google API ignores any attempt to affect shipping prices.]]></comment> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>10</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </active> - <methods translate="label"> - <label>Carrier Calculated Methods</label> - <frontend_type>multiselect</frontend_type> - <source_model>Mage_GoogleCheckout_Model_Source_Shipping_Carrier</source_model> - <sort_order>15</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <can_be_empty>1</can_be_empty> - </methods> - <address_category translate="label"> - <label>Delivery Address Category</label> - <frontend_type>select</frontend_type> - <source_model>Mage_GoogleCheckout_Model_Source_Shipping_Category</source_model> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </address_category> - <default_price translate="label"> - <label>Default Price for Methods</label> - <frontend_type>text</frontend_type> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </default_price> - <default_width translate="label"> - <label>Default Package Width (in)</label> - <frontend_type>text</frontend_type> - <sort_order>40</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </default_width> - <default_height translate="label"> - <label>Default Package Height (in)</label> - <frontend_type>text</frontend_type> - <sort_order>50</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </default_height> - <default_length translate="label"> - <label>Default Package Length (in)</label> - <frontend_type>text</frontend_type> - <sort_order>60</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </default_length> - </fields> - </checkout_shipping_carrier> -<!-- - <checkout_shipping_pickup translate="label"> - <label>Google Checkout Shipping - Pickup</label> - <frontend_type>text</frontend_type> - <sort_order>34</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <fields> - <active> - <label>Enable Pickup</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>10</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </active> - <title> - <label>Pickup Title</label> - <frontend_type>text</frontend_type> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </title> - <price> - <label>Pickup Price</label> - <frontend_type>text</frontend_type> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </price> - </fields> - </checkout_shipping_pickup> ---> - <checkout_shipping_flatrate translate="label"> - <label>Google Checkout Shipping - Flat Rate</label> - <frontend_type>text</frontend_type> - <sort_order>36</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <fields> - <active translate="label"> - <label>Enable Flat Rate</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>10</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </active> - <title_1 translate="label"> - <label>Rate 1 Title</label> - <frontend_type>text</frontend_type> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </title_1> - <price_1 translate="label"> - <label>Rate 1 Amount</label> - <frontend_type>text</frontend_type> - <sort_order>22</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </price_1> - - <sallowspecific_1 translate="label"> - <label>Rate 1 Ship To Applicable Countries</label> - <frontend_type>select</frontend_type> - <sort_order>24</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Shipping_Allspecificcountries</source_model> - <frontend_model>Mage_GoogleCheckout_Block_Adminhtml_Shipping_Applicable_Countries</frontend_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <can_be_empty>1</can_be_empty> - </sallowspecific_1> - <specificcountry_1 translate="label"> - <label>Rate 1 Ship to Specific Countries</label> - <frontend_type>multiselect</frontend_type> - <sort_order>26</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Country</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <can_be_empty>1</can_be_empty> - </specificcountry_1> - - - <title_2 translate="label"> - <label>Rate 2 Title</label> - <frontend_type>text</frontend_type> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </title_2> - <price_2 translate="label"> - <label>Rate 2 Amount</label> - <frontend_type>text</frontend_type> - <sort_order>32</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </price_2> - - <sallowspecific_2 translate="label"> - <label>Rate 2 Ship To Applicable Countries</label> - <frontend_type>select</frontend_type> - <sort_order>34</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Shipping_Allspecificcountries</source_model> - <frontend_model>Mage_GoogleCheckout_Block_Adminhtml_Shipping_Applicable_Countries</frontend_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <can_be_empty>1</can_be_empty> - </sallowspecific_2> - <specificcountry_2 translate="label"> - <label>Rate 2 Ship to Specific Countries</label> - <frontend_type>multiselect</frontend_type> - <sort_order>36</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Country</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <can_be_empty>1</can_be_empty> - </specificcountry_2> - - - <title_3 translate="label"> - <label>Rate 3 Title</label> - <frontend_type>text</frontend_type> - <sort_order>40</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </title_3> - <price_3 translate="label"> - <label>Rate 3 Amount</label> - <frontend_type>text</frontend_type> - <sort_order>42</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </price_3> - <sallowspecific_3 translate="label"> - <label>Rate 3 Ship To Applicable Countries</label> - <frontend_type>select</frontend_type> - <sort_order>44</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Shipping_Allspecificcountries</source_model> - <frontend_model>Mage_GoogleCheckout_Block_Adminhtml_Shipping_Applicable_Countries</frontend_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <can_be_empty>1</can_be_empty> - </sallowspecific_3> - <specificcountry_3 translate="label"> - <label>Rate 3 Ship to Specific Countries</label> - <frontend_type>multiselect</frontend_type> - <sort_order>46</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Country</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <can_be_empty>1</can_be_empty> - </specificcountry_3> - </fields> - </checkout_shipping_flatrate> - <checkout_shipping_virtual translate="label"> - <label>Google Checkout Shipping - Digital Delivery</label> - <frontend_type>text</frontend_type> - <sort_order>200</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <fields> - <active translate="label"> - <label>Enable Digital Delivery</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </active> - <schedule translate="label"> - <label>Delivery Schedule</label> - <frontend_type>select</frontend_type> - <source_model>Mage_GoogleCheckout_Model_Source_Shipping_Virtual_Schedule</source_model> - <sort_order>2</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </schedule> - <method translate="label"> - <label>Method</label> - <frontend_type>select</frontend_type> - <source_model>Mage_GoogleCheckout_Model_Source_Shipping_Virtual_Method</source_model> - <sort_order>3</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </method> - </fields> - </checkout_shipping_virtual> - </groups> - </google> - </sections> -</config> diff --git a/app/code/core/Mage/GoogleOptimizer/etc/adminhtml/system.xml b/app/code/core/Mage/GoogleOptimizer/etc/adminhtml/system.xml new file mode 100644 index 0000000000000000000000000000000000000000..a45e48f307833f3da9c53328c835aef031ac56fc --- /dev/null +++ b/app/code/core/Mage/GoogleOptimizer/etc/adminhtml/system.xml @@ -0,0 +1,40 @@ +<?xml version="1.0"?> +<!-- +/** + * 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 Mage_GoogleOptimizer + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> + <system> + <section id="google" translate="label" module="Mage_GoogleOptimizer"> + <group id="optimizer" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Google Website Optimizer</label> + <field id="active" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Enable</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + </group> + </section> + </system> +</config> diff --git a/app/code/core/Mage/GoogleOptimizer/etc/system.xml b/app/code/core/Mage/GoogleOptimizer/etc/system.xml deleted file mode 100644 index e7eca6794c35cde486cd590b0ffadf42b7f091eb..0000000000000000000000000000000000000000 --- a/app/code/core/Mage/GoogleOptimizer/etc/system.xml +++ /dev/null @@ -1,54 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * 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 Mage_GoogleOptimizer - * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<config> - <sections> - <google translate="label" module="Mage_GoogleOptimizer"> - <groups> - <optimizer translate="label"> - <label>Google Website Optimizer</label> - <frontend_type>text</frontend_type> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <active translate="label"> - <label>Enable</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <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> - </active> - </fields> - </optimizer> - </groups> - </google> - </sections> -</config> diff --git a/app/code/core/Mage/GoogleShopping/Block/Adminhtml/Store/Switcher.php b/app/code/core/Mage/GoogleShopping/Block/Adminhtml/Store/Switcher.php index 0c247079a7a99b4bf100b63bb0c8f5d475495989..470af73941921778a474f1ce586b77d34fcc4f13 100644 --- a/app/code/core/Mage/GoogleShopping/Block/Adminhtml/Store/Switcher.php +++ b/app/code/core/Mage/GoogleShopping/Block/Adminhtml/Store/Switcher.php @@ -31,7 +31,7 @@ * @package Mage_GoogleShopping * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_GoogleShopping_Block_Adminhtml_Store_Switcher extends Mage_Adminhtml_Block_Store_Switcher +class Mage_GoogleShopping_Block_Adminhtml_Store_Switcher extends Mage_Backend_Block_Store_Switcher { /** * Whether the switcher should show default option diff --git a/app/code/core/Mage/GoogleShopping/etc/adminhtml/system.xml b/app/code/core/Mage/GoogleShopping/etc/adminhtml/system.xml new file mode 100644 index 0000000000000000000000000000000000000000..ebdbcd090fa4b13c7c1e9284116196a169b55c01 --- /dev/null +++ b/app/code/core/Mage/GoogleShopping/etc/adminhtml/system.xml @@ -0,0 +1,78 @@ +<?xml version="1.0"?> +<!-- +/** + * 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 Mage_GoogleShopping + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> + <system> + <section id="google" translate="label" module="Mage_GoogleShopping"> + <group id="googleshopping" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Google Shopping</label> + <field id="account_id" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Account ID</label> + </field> + <field id="login" translate="label" type="text" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Account Login</label> + </field> + <field id="password" translate="label" type="obscure" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Account Password</label> + <backend_model>Mage_Backend_Model_Config_Backend_Encrypted</backend_model> + </field> + <field id="account_type" translate="label" type="select" sortOrder="4" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Account Type</label> + <source_model>Mage_GoogleShopping_Model_Source_Accounttype</source_model> + </field> + <field id="target_country" translate="label" type="select" sortOrder="90" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Target Country</label> + <source_model>Mage_GoogleShopping_Model_Source_Country</source_model> + </field> + <field id="observed" translate="label" type="select" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Update Google Shopping Item when Product is Updated</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="debug" translate="label" type="select" sortOrder="140" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Debug</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="destinations" translate="label" sortOrder="150" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Destinations</label> + <frontend_model>Mage_Backend_Block_System_Config_Form_Field_Heading</frontend_model> + </field> + <field id="product_search" translate="label" type="select" sortOrder="151" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Google Product Search</label> + <source_model>Mage_GoogleShopping_Model_Source_Destinationstates</source_model> + </field> + <field id="product_ads" translate="label" type="select" sortOrder="152" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Product Ads</label> + <source_model>Mage_GoogleShopping_Model_Source_Destinationstates</source_model> + </field> + <field id="commerce_search" translate="label" type="select" sortOrder="153" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Commerce Search</label> + <source_model>Mage_GoogleShopping_Model_Source_Destinationstates</source_model> + </field> + </group> + </section> + </system> +</config> diff --git a/app/code/core/Mage/GoogleShopping/etc/system.xml b/app/code/core/Mage/GoogleShopping/etc/system.xml deleted file mode 100644 index e88018be96d1cd43b3cd4a56daffd5972487f312..0000000000000000000000000000000000000000 --- a/app/code/core/Mage/GoogleShopping/etc/system.xml +++ /dev/null @@ -1,141 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * 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 Mage_GoogleShopping - * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<config> - <sections> - <google translate="label" module="Mage_GoogleShopping"> - <groups> - <googleshopping translate="label"> - <label>Google Shopping</label> - <frontend_type>text</frontend_type> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <account_id translate="label"> - <label>Account ID</label> - <frontend_type>text</frontend_type> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </account_id> - <login translate="label"> - <label>Account Login</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> - </login> - <password translate="label"> - <label>Account Password</label> - <frontend_type>obscure</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Encrypted</backend_model> - <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> - </password> - <account_type translate="label"> - <label>Account Type</label> - <frontend_type>select</frontend_type> - <source_model>Mage_GoogleShopping_Model_Source_Accounttype</source_model> - <sort_order>4</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </account_type> - <target_country translate="label"> - <label>Target Country</label> - <frontend_type>select</frontend_type> - <source_model>Mage_GoogleShopping_Model_Source_Country</source_model> - <sort_order>90</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </target_country> - <observed translate="label"> - <label>Update Google Shopping Item when Product is Updated</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>100</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </observed> - <debug translate="label"> - <label>Debug</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>140</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </debug> - <destinations translate="label"> - <label>Destinations</label> - <frontend_model>Mage_Adminhtml_Block_System_Config_Form_Field_Heading</frontend_model> - <sort_order>150</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </destinations> - <product_search translate="label"> - <label>Google Product Search</label> - <frontend_type>select</frontend_type> - <source_model>Mage_GoogleShopping_Model_Source_Destinationstates</source_model> - <sort_order>151</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </product_search> - <product_ads translate="label"> - <label>Product Ads</label> - <frontend_type>select</frontend_type> - <source_model>Mage_GoogleShopping_Model_Source_Destinationstates</source_model> - <sort_order>152</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </product_ads> - <commerce_search translate="label"> - <label>Commerce Search</label> - <frontend_type>select</frontend_type> - <source_model>Mage_GoogleShopping_Model_Source_Destinationstates</source_model> - <sort_order>153</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </commerce_search> - </fields> - </googleshopping> - </groups> - </google> - </sections> -</config> diff --git a/app/code/core/Mage/ImportExport/Block/Adminhtml/Export/Filter.php b/app/code/core/Mage/ImportExport/Block/Adminhtml/Export/Filter.php index 757e5b07d03c510c92c77ced56a308634e70f28f..17f9a9f554d7f046837032d399a84369e873b0aa 100644 --- a/app/code/core/Mage/ImportExport/Block/Adminhtml/Export/Filter.php +++ b/app/code/core/Mage/ImportExport/Block/Adminhtml/Export/Filter.php @@ -72,7 +72,7 @@ class Mage_ImportExport_Block_Adminhtml_Export_Filter extends Mage_Adminhtml_Blo 'id' => $this->getFilterElementId($attribute->getAttributeCode()), 'class' => 'input-text input-text-range-date', 'date_format' => Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT), - 'image' => $this->getSkinUrl('images/grid-cal.gif') + 'image' => $this->getViewFileUrl('images/grid-cal.gif') ); /** @var $selectBlock Mage_Core_Block_Html_Date */ $dateBlock = $this->_layout->getBlockFactory()->createBlock('Mage_Core_Block_Html_Date', $arguments); diff --git a/app/code/core/Mage/ImportExport/Block/Adminhtml/Import/Edit/Before.php b/app/code/core/Mage/ImportExport/Block/Adminhtml/Import/Edit/Before.php index 91b1530f4da275159ede0d6ab6e11ea633e90a04..eaef4d1760bdb6b752f9e7fd1a25cde2350f956c 100644 --- a/app/code/core/Mage/ImportExport/Block/Adminhtml/Import/Edit/Before.php +++ b/app/code/core/Mage/ImportExport/Block/Adminhtml/Import/Edit/Before.php @@ -48,36 +48,40 @@ class Mage_ImportExport_Block_Adminhtml_Import_Edit_Before extends Mage_Backend_ protected $_importModel; /** - * Constructor - * * @param Mage_Core_Controller_Request_Http $request * @param Mage_Core_Model_Layout $layout * @param Mage_Core_Model_Event_Manager $eventManager + * @param Mage_Backend_Model_Url $urlBuilder * @param Mage_Core_Model_Translate $translator * @param Mage_Core_Model_Cache $cache * @param Mage_Core_Model_Design_Package $designPackage * @param Mage_Core_Model_Session $session * @param Mage_Core_Model_Store_Config $storeConfig * @param Mage_Core_Controller_Varien_Front $frontController + * @param Mage_Core_Model_Factory_Helper $helperFactory * @param Mage_Core_Helper_Data $coreHelper * @param Mage_ImportExport_Model_Import $importModel * @param array $data + * + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( Mage_Core_Controller_Request_Http $request, Mage_Core_Model_Layout $layout, Mage_Core_Model_Event_Manager $eventManager, + Mage_Backend_Model_Url $urlBuilder, Mage_Core_Model_Translate $translator, Mage_Core_Model_Cache $cache, Mage_Core_Model_Design_Package $designPackage, Mage_Core_Model_Session $session, Mage_Core_Model_Store_Config $storeConfig, Mage_Core_Controller_Varien_Front $frontController, + Mage_Core_Model_Factory_Helper $helperFactory, Mage_Core_Helper_Data $coreHelper, Mage_ImportExport_Model_Import $importModel, array $data = array() ) { - parent::__construct($request, $layout, $eventManager, $translator, $cache, $designPackage, $session, - $storeConfig, $frontController, $data + parent::__construct($request, $layout, $eventManager, $urlBuilder, $translator, $cache, $designPackage, + $session, $storeConfig, $frontController, $helperFactory, $data ); $this->_coreHelper = $coreHelper; $this->_importModel = $importModel; diff --git a/app/code/core/Mage/ImportExport/Helper/Data.php b/app/code/core/Mage/ImportExport/Helper/Data.php index 73718ba36fa0153a25a07e0005bc74da887a60ed..a06ccefbcf108860b37e56c286ffdafe5886ab79 100644 --- a/app/code/core/Mage/ImportExport/Helper/Data.php +++ b/app/code/core/Mage/ImportExport/Helper/Data.php @@ -41,13 +41,19 @@ class Mage_ImportExport_Helper_Data extends Mage_Core_Helper_Data /**#@-*/ /** - * Maximum size of uploaded files. + * Get maximum upload size message * - * @return int + * @return string */ - public function getMaxUploadSize() + public function getMaxUploadSizeMessage() { - return min(ini_get('post_max_size'), ini_get('upload_max_filesize')); + $maxImageSize = Mage::helper('Mage_Core_Helper_File_Storage')->getMaxFileSizeInMb(); + if ($maxImageSize) { + $message = $this->__('Total size of uploadable files must not exceed %sM', $maxImageSize); + } else { + $message = $this->__('System doesn\'t allow to get file upload settings'); + } + return $message; } /** diff --git a/app/code/core/Mage/ImportExport/controllers/Adminhtml/ImportController.php b/app/code/core/Mage/ImportExport/controllers/Adminhtml/ImportController.php index ccca6a36f623fc5138b5ef0f23c79f0b9abfe165..94a7cf73f384128c2cded310f1eb8d2a6fdc364b 100644 --- a/app/code/core/Mage/ImportExport/controllers/Adminhtml/ImportController.php +++ b/app/code/core/Mage/ImportExport/controllers/Adminhtml/ImportController.php @@ -69,27 +69,19 @@ class Mage_ImportExport_Adminhtml_ImportController extends Mage_Adminhtml_Contro } /** - * Index action. - * - * @return void + * Index action */ public function indexAction() { - $maxUploadSize = Mage::helper('Mage_ImportExport_Helper_Data')->getMaxUploadSize(); - $this->_getSession()->addNotice( - $this->__('Total size of uploadable files must not exceed %s', $maxUploadSize) - ); - $this->_initAction() - ->_title($this->__('Import')) - ->_addBreadcrumb($this->__('Import'), $this->__('Import')); - + $this->_getSession()->addNotice(Mage::helper('Mage_ImportExport_Helper_Data')->getMaxUploadSizeMessage()); + $this->_initAction()->_title($this->__('Import'))->_addBreadcrumb($this->__('Import'), $this->__('Import')); $this->renderLayout(); } /** - * Start import process action. + * Start import process action * - * @return void + * @return null */ public function startAction() { @@ -122,8 +114,6 @@ class Mage_ImportExport_Adminhtml_ImportController extends Mage_Adminhtml_Contro /** * Validate uploaded files action - * - * @return void */ public function validateAction() { diff --git a/app/code/core/Mage/Index/Block/Adminhtml/Process/Grid.php b/app/code/core/Mage/Index/Block/Adminhtml/Process/Grid.php index 9b22b9172a88402451f30d5fd4087e901433c6b9..f78e6f52521f7fdcc6d892e4167874f4e6fcb97e 100644 --- a/app/code/core/Mage/Index/Block/Adminhtml/Process/Grid.php +++ b/app/code/core/Mage/Index/Block/Adminhtml/Process/Grid.php @@ -48,8 +48,8 @@ class Mage_Index_Block_Adminhtml_Process_Grid extends Mage_Adminhtml_Block_Widge parent::_construct(); $this->_processModel = Mage::getSingleton('Mage_Index_Model_Process'); $this->setId('indexer_processes_grid'); - $this->_filterVisibility = false; - $this->_pagerVisibility = false; + $this->setFilterVisibility(false); + $this->setPagerVisibility(false); } /** diff --git a/app/code/core/Mage/Install/controllers/WizardController.php b/app/code/core/Mage/Install/controllers/WizardController.php index 3c4096a1587d63698069c09a91445f5196fc7e8d..42fa3a6bba6cf76c51735e69a60317784d7238f1 100644 --- a/app/code/core/Mage/Install/controllers/WizardController.php +++ b/app/code/core/Mage/Install/controllers/WizardController.php @@ -37,7 +37,7 @@ class Mage_Install_WizardController extends Mage_Install_Controller_Action return; } - if (!$this->_verifySkin()) { + if (!$this->_verifyTheme()) { return; } @@ -46,21 +46,21 @@ class Mage_Install_WizardController extends Mage_Install_Controller_Action } /** - * Verify that the folder for skin publication is writable. Web installation is unable to proceed without write + * Verify that the folder for theme publication is writable. Web installation is unable to proceed without write * permissions. * * @return bool */ - protected function _verifySkin() + protected function _verifyTheme() { - $pubSkin = Mage::getDesign()->getPublicSkinDir(); + $pubTheme = Mage::getDesign()->getPublicDir(); - if (is_dir($pubSkin)) { - $isWritable = is_writable($pubSkin); + if (is_dir($pubTheme)) { + $isWritable = is_writable($pubTheme); } else { - $isWritable = @mkdir($pubSkin, 0777, true); + $isWritable = @mkdir($pubTheme, 0777, true); if ($isWritable) { - rmdir($pubSkin); + rmdir($pubTheme); } } @@ -68,7 +68,7 @@ class Mage_Install_WizardController extends Mage_Install_Controller_Action $this->setFlag('', self::FLAG_NO_DISPATCH, true); $this->getResponse()->setHeader('Content-Type', 'text/plain;charset=UTF-8') ->setHttpResponseCode(503) - ->setBody("To proceed with installation, ensure that the path '{$pubSkin}' is writable.") + ->setBody("To proceed with installation, ensure that the path '{$pubTheme}' is writable.") ; return false; } diff --git a/app/code/core/Mage/Install/etc/install.xml b/app/code/core/Mage/Install/etc/install.xml index 081b6b6d4e564e46ca6d2ddbae0a31eb51ae5880..24de8685edd10cd2cd14e2df56f903451c501a08 100644 --- a/app/code/core/Mage/Install/etc/install.xml +++ b/app/code/core/Mage/Install/etc/install.xml @@ -73,11 +73,11 @@ <existence>1</existence> <recursive>1</recursive> </media> - <skin> - <path>/pub/media/skin</path> + <theme> + <path>/pub/media/theme</path> <existence>0</existence> <recursive>0</recursive> - </skin> + </theme> </writeable> </filesystem> <php> diff --git a/app/code/core/Mage/Install/view/install/begin.phtml b/app/code/core/Mage/Install/view/install/begin.phtml index 376b767cf54b72dd44c569e7e87be5e58f6d03d7..efd824d40b9b500213870f18f050bf8bed09724c 100644 --- a/app/code/core/Mage/Install/view/install/begin.phtml +++ b/app/code/core/Mage/Install/view/install/begin.phtml @@ -53,7 +53,7 @@ <script type="text/javascript"> //<![CDATA[ (function($) { - head.js("<?php echo $this->getSkinUrl('Mage_Install::js/install.js') ?>", function() { + head.js("<?php echo $this->getViewFileUrl('Mage_Install::js/install.js') ?>", function() { $('#agree').begin({submitButtonSelector: '#submitButton'}); }); })(jQuery); diff --git a/app/code/core/Mage/Install/view/install/config.phtml b/app/code/core/Mage/Install/view/install/config.phtml index 5ec58bbfe582aec5d245e956a105c5e81eff72b0..25338bb0e7df01c1df4988d6eff3f8fe718752f9 100644 --- a/app/code/core/Mage/Install/view/install/config.phtml +++ b/app/code/core/Mage/Install/view/install/config.phtml @@ -156,12 +156,12 @@ </form> <script type="text/javascript"> (function ($) { - head.js("<?php echo $this->getSkinUrl('jquery/jquery.validate.js')?>", - "<?php echo $this->getSkinUrl('jquery/additional-methods.js')?>", - "<?php echo $this->getSkinUrl('jquery/jquery.metadata.js')?>", - "<?php echo $this->getSkinUrl('jquery/jquery.hook.js')?>", - "<?php echo $this->getSkinUrl('mage/validation/validate.js')?>", - "<?php echo $this->getSkinUrl('Mage_Install::js/install.js') ?>", function() { + head.js("<?php echo $this->getViewFileUrl('jquery/jquery.validate.js')?>", + "<?php echo $this->getViewFileUrl('jquery/additional-methods.js')?>", + "<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js')?>", + "<?php echo $this->getViewFileUrl('jquery/jquery.hook.js')?>", + "<?php echo $this->getViewFileUrl('mage/validation/validate.js')?>", + "<?php echo $this->getViewFileUrl('Mage_Install::js/install.js') ?>", function() { $('#form-validate').configure({ useSecureSelector: '#use_secure', useSecureOptionsSelector: '#use_secure_options' @@ -176,7 +176,7 @@ <span><?php echo $this->__('Continue') ?></span></button> <script type="text/javascript"> (function($) { - head.js("<?php echo $this->getSkinUrl('Mage_Install::js/install.js')?>", function() { + head.js("<?php echo $this->getViewFileUrl('Mage_Install::js/install.js')?>", function() { $('#btn-continue').configure({ url: '<?php echo $this->getUrl('*/*/*', array('_current' => true)) ?>' }); diff --git a/app/code/core/Mage/Install/view/install/create_admin.phtml b/app/code/core/Mage/Install/view/install/create_admin.phtml index 7f40179e2840b22434e41c20ae349262a143adcd..84b4930acf8befb2188cc2251e8f2a49ff6178ba 100644 --- a/app/code/core/Mage/Install/view/install/create_admin.phtml +++ b/app/code/core/Mage/Install/view/install/create_admin.phtml @@ -115,12 +115,12 @@ </form> <script type="text/javascript"> (function ($) { - head.js("<?php echo $this->getSkinUrl('jquery/jquery.validate.js')?>", - "<?php echo $this->getSkinUrl('jquery/additional-methods.js')?>", - "<?php echo $this->getSkinUrl('jquery/jquery.metadata.js')?>", - "<?php echo $this->getSkinUrl('jquery/jquery.hook.js')?>", - "<?php echo $this->getSkinUrl('mage/validation/validate.js')?>", - "<?php echo $this->getSkinUrl('Mage_Install::js/install.js') ?>", function() { + head.js("<?php echo $this->getViewFileUrl('jquery/jquery.validate.js')?>", + "<?php echo $this->getViewFileUrl('jquery/additional-methods.js')?>", + "<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js')?>", + "<?php echo $this->getViewFileUrl('jquery/jquery.hook.js')?>", + "<?php echo $this->getViewFileUrl('mage/validation/validate.js')?>", + "<?php echo $this->getViewFileUrl('Mage_Install::js/install.js') ?>", function() { $('#form-validate').createAdmin(); }); })(jQuery); diff --git a/app/code/core/Mage/Install/view/install/locale.phtml b/app/code/core/Mage/Install/view/install/locale.phtml index 99c919afceedf4a4114da262aadc76ca07297746..279af5ca2292bd7520905a420199581d16c2e18f 100644 --- a/app/code/core/Mage/Install/view/install/locale.phtml +++ b/app/code/core/Mage/Install/view/install/locale.phtml @@ -65,7 +65,7 @@ </form> <script type="text/javascript"> (function($) { - head.js("<?php echo $this->getSkinUrl('Mage_Install::js/install.js') ?>", function() { + head.js("<?php echo $this->getViewFileUrl('Mage_Install::js/install.js') ?>", function() { $('#locale').setLocale({url: '<?php echo $this->getChangeUrl();?>'}); }); })(jQuery); diff --git a/app/code/core/Mage/Install/view/install/page.phtml b/app/code/core/Mage/Install/view/install/page.phtml index 4a8cb06c3f3568f3f7869a5979ddcf27252e8b4b..6baf816901bd8b7453c40ee7506ab425a9564834 100644 --- a/app/code/core/Mage/Install/view/install/page.phtml +++ b/app/code/core/Mage/Install/view/install/page.phtml @@ -35,23 +35,23 @@ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title><?php echo Mage::helper('Mage_Install_Helper_Data')->__('Magento Installation Wizard') ?></title> - <link rel="icon" href="<?php echo $this->getSkinUrl('Mage_Page::favicon.ico') ?>" type="image/x-icon"/> - <link rel="shortcut icon" href="<?php echo $this->getSkinUrl('Mage_Page::favicon.ico') ?>" type="image/x-icon"/> + <link rel="icon" href="<?php echo $this->getViewFileUrl('Mage_Page::favicon.ico') ?>" type="image/x-icon"/> + <link rel="shortcut icon" href="<?php echo $this->getViewFileUrl('Mage_Page::favicon.ico') ?>" type="image/x-icon"/> - <script type="text/javascript" src="<?php echo $this->getSkinUrl('jquery/jquery-1.7.1.min.js') ?>"></script> - <script type="text/javascript" src="<?php echo $this->getSkinUrl('jquery/ui/jquery-ui.js') ?>"></script> - <script type="text/javascript" src="<?php echo $this->getSkinUrl('jquery/head.js') ?>"></script> - <script type="text/javascript" src="<?php echo $this->getSkinUrl('jquery/jquery.cookie.js') ?>"></script> - <script type="text/javascript" src="<?php echo $this->getSkinUrl('mage/mage.js') ?>"></script> - <script type="text/javascript" src="<?php echo $this->getSkinUrl('mage/translate.js') ?>"></script> + <script type="text/javascript" src="<?php echo $this->getViewFileUrl('jquery/jquery-1.7.1.min.js') ?>"></script> + <script type="text/javascript" src="<?php echo $this->getViewFileUrl('jquery/ui/jquery-ui.js') ?>"></script> + <script type="text/javascript" src="<?php echo $this->getViewFileUrl('jquery/head.js') ?>"></script> + <script type="text/javascript" src="<?php echo $this->getViewFileUrl('jquery/jquery.cookie.js') ?>"></script> + <script type="text/javascript" src="<?php echo $this->getViewFileUrl('mage/mage.js') ?>"></script> + <script type="text/javascript" src="<?php echo $this->getViewFileUrl('mage/translate.js') ?>"></script> - <link rel="stylesheet" href="<?php echo $this->getSkinUrl('Mage_Install::css/mage-js-style.css') ?>" type="text/css" + <link rel="stylesheet" href="<?php echo $this->getViewFileUrl('Mage_Install::css/mage-js-style.css') ?>" type="text/css" media="all"/> - <link rel="stylesheet" href="<?php echo $this->getSkinUrl('Mage_Install::css/validate.css') ?>" type="text/css" + <link rel="stylesheet" href="<?php echo $this->getViewFileUrl('Mage_Install::css/validate.css') ?>" type="text/css" media="all"/> - <link rel="stylesheet" href="<?php echo $this->getSkinUrl('css/reset.css') ?>" type="text/css" media="all"/> - <link rel="stylesheet" href="<?php echo $this->getSkinUrl('css/boxes.css') ?>" type="text/css" media="all"/> - <link rel="stylesheet" href="<?php echo $this->getSkinUrl('css/clears.css') ?>" type="text/css" media="all"/> + <link rel="stylesheet" href="<?php echo $this->getViewFileUrl('css/reset.css') ?>" type="text/css" media="all"/> + <link rel="stylesheet" href="<?php echo $this->getViewFileUrl('css/boxes.css') ?>" type="text/css" media="all"/> + <link rel="stylesheet" href="<?php echo $this->getViewFileUrl('css/clears.css') ?>" type="text/css" media="all"/> <?php echo $this->helper('Mage_Core_Helper_Js')->getTranslatorScript() ?> </head> @@ -61,7 +61,7 @@ <div class="header-top-container"> <div class="header-top"> <h1 id="logo"> - <a href="<?php echo $this->getUrl('') ?>"><img src="<?php echo $this->getSkinUrl('images/logo.gif') ?>" + <a href="<?php echo $this->getUrl('') ?>"><img src="<?php echo $this->getViewFileUrl('images/logo.gif') ?>" title="<?php echo Mage::helper('Mage_Install_Helper_Data')->__('Magento') ?>" alt="<?php echo Mage::helper('Mage_Install_Helper_Data')->__('Magento') ?>"/></a> </h1> diff --git a/app/code/core/Mage/Log/etc/adminhtml/system.xml b/app/code/core/Mage/Log/etc/adminhtml/system.xml new file mode 100644 index 0000000000000000000000000000000000000000..003715b3f09e7621287539977efc56aa4fbb673b --- /dev/null +++ b/app/code/core/Mage/Log/etc/adminhtml/system.xml @@ -0,0 +1,63 @@ +<?xml version="1.0"?> +<!-- +/** + * 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 Mage_Log + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> + <system> + <section id="system"> + <group id="log" translate="label" module="Mage_Log" type="text" sortOrder="200" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Log Cleaning</label> + <field id="clean_after_day" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Save Log, Days</label> + </field> + <field id="enabled" translate="label" type="select" sortOrder="2" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Enable Log Cleaning</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="time" translate="label" type="time" sortOrder="3" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Start Time</label> + </field> + <field id="frequency" translate="label" type="select" sortOrder="4" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Frequency</label> + <source_model>Mage_Cron_Model_Config_Source_Frequency</source_model> + <backend_model>Mage_Backend_Model_Config_Backend_Log_Cron</backend_model> + </field> + <field id="error_email" translate="label" type="text" sortOrder="5" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Error Email Recipient</label> + <validate>validate-email</validate> + </field> + <field id="error_email_identity" translate="label" type="select" sortOrder="6" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Error Email Sender</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Identity</source_model> + </field> + <field id="error_email_template" translate="label" type="select" sortOrder="7" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Error Email Template</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Template</source_model> + </field> + </group> + </section> + </system> +</config> diff --git a/app/code/core/Mage/Log/etc/system.xml b/app/code/core/Mage/Log/etc/system.xml deleted file mode 100644 index 336a81c652ca53f31bc077f6a6e2d1542250f786..0000000000000000000000000000000000000000 --- a/app/code/core/Mage/Log/etc/system.xml +++ /dev/null @@ -1,107 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * 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 Mage_Log - * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<config> - <sections> - <system> - <groups> - <log translate="label" module="Mage_Log"> - <label>Log Cleaning</label> - <frontend_type>text</frontend_type> - <sort_order>200</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - <fields> - <clean_after_day translate="label"> - <label>Save Log, Days</label> - <frontend_type>text</frontend_type> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </clean_after_day> - <enabled translate="label"> - <label>Enable Log Cleaning</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>2</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </enabled> - <time translate="label"> - <label>Start Time</label> - <frontend_type>time</frontend_type> - <sort_order>3</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </time> - <frequency translate="label"> - <label>Frequency</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Cron_Frequency</source_model> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Log_Cron</backend_model> - <sort_order>4</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </frequency> - <error_email translate="label"> - <label>Error Email Recipient</label> - <frontend_type>text</frontend_type> - <validate>validate-email</validate> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </error_email> - <error_email_identity translate="label"> - <label>Error Email Sender</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Identity</source_model> - <sort_order>6</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </error_email_identity> - <error_email_template translate="label"> - <label>Error Email Template</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Template</source_model> - <sort_order>7</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </error_email_template> - </fields> - </log> - </groups> - </system> - </sections> -</config> diff --git a/app/code/core/Mage/Newsletter/etc/adminhtml/system.xml b/app/code/core/Mage/Newsletter/etc/adminhtml/system.xml new file mode 100644 index 0000000000000000000000000000000000000000..cf00d624ab626e67fcd9e67b43d92fba6efd2b2c --- /dev/null +++ b/app/code/core/Mage/Newsletter/etc/adminhtml/system.xml @@ -0,0 +1,71 @@ +<?xml version="1.0"?> +<!-- +/** + * 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 Mage_Newsletter + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> + <system> + <section id="newsletter" translate="label" module="Mage_Newsletter" type="text" sortOrder="110" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Newsletter</label> + <tab>customer</tab> + <resource>Mage_Newsletter::newsletter</resource> + <group id="subscription" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Subscription Options</label> + <field id="allow_guest_subscribe" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Allow Guest Subscription</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="confirm" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Need to Confirm</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="confirm_email_identity" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Confirmation Email Sender</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Identity</source_model> + </field> + <field id="confirm_email_template" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Confirmation Email Template</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Template</source_model> + </field> + <field id="success_email_identity" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Success Email Sender</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Identity</source_model> + </field> + <field id="success_email_template" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Success Email Template</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Template</source_model> + </field> + <field id="un_email_identity" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Unsubscription Email Sender</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Identity</source_model> + </field> + <field id="un_email_template" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Unsubscription Email Template</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Template</source_model> + </field> + </group> + </section> + </system> +</config> diff --git a/app/code/core/Mage/Newsletter/etc/system.xml b/app/code/core/Mage/Newsletter/etc/system.xml deleted file mode 100644 index 374d9c405aa2738c68c3c9453bbc4e733869c062..0000000000000000000000000000000000000000 --- a/app/code/core/Mage/Newsletter/etc/system.xml +++ /dev/null @@ -1,125 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * 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 Mage_Newsletter - * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<config> - <sections> - <newsletter translate="label" module="Mage_Newsletter"> - <label>Newsletter</label> - <tab>customer</tab> - <frontend_type>text</frontend_type> - <sort_order>110</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <resource>Mage_Newsletter::newsletter</resource> - <groups> - <subscription translate="label"> - <label>Subscription Options</label> - <frontend_type>text</frontend_type> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <allow_guest_subscribe translate="label"> - <label>Allow Guest Subscription</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </allow_guest_subscribe> - <confirm translate="label"> - <label>Need to Confirm</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </confirm> - <confirm_email_identity translate="label"> - <label>Confirmation Email Sender</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Identity</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </confirm_email_identity> - <confirm_email_template translate="label"> - <label>Confirmation Email Template</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Template</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </confirm_email_template> - <success_email_identity translate="label"> - <label>Success Email Sender</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Identity</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </success_email_identity> - <success_email_template translate="label"> - <label>Success Email Template</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Template</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </success_email_template> - <un_email_identity translate="label"> - <label>Unsubscription Email Sender</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Identity</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </un_email_identity> - <un_email_template translate="label"> - <label>Unsubscription Email Template</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Template</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </un_email_template> - </fields> - </subscription> - </groups> - </newsletter> - </sections> -</config> diff --git a/app/code/core/Mage/Newsletter/view/frontend/subscribe.phtml b/app/code/core/Mage/Newsletter/view/frontend/subscribe.phtml index c2397679ca93d0efccbabdbe65c8bc8b4f398be3..c56c0fc7d8d543195bae545b6a0a884b944d135e 100644 --- a/app/code/core/Mage/Newsletter/view/frontend/subscribe.phtml +++ b/app/code/core/Mage/Newsletter/view/frontend/subscribe.phtml @@ -48,12 +48,12 @@ <script type="text/javascript"> //<![CDATA[ (function($) { - head.js("<?php echo $this->getSkinUrl('jquery/jquery.validate.js')?>", - "<?php echo $this->getSkinUrl('jquery/additional-methods.js')?>", - "<?php echo $this->getSkinUrl('jquery/jquery.metadata.js')?>", - "<?php echo $this->getSkinUrl('jquery/jquery.hook.js')?>", - "<?php echo $this->getSkinUrl('mage/validation/validate.js')?>", - "<?php echo $this->getSkinUrl('Mage_Newsletter::newsletter.js')?>", function() { + head.js("<?php echo $this->getViewFileUrl('jquery/jquery.validate.js')?>", + "<?php echo $this->getViewFileUrl('jquery/additional-methods.js')?>", + "<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js')?>", + "<?php echo $this->getViewFileUrl('jquery/jquery.hook.js')?>", + "<?php echo $this->getViewFileUrl('mage/validation/validate.js')?>", + "<?php echo $this->getViewFileUrl('Mage_Newsletter::newsletter.js')?>", function() { $('#newsletter').newsletter({ formSelector: '#newsletter-validate-detail', placeholder: '<?php echo $this->__('Enter your email address') ?>' diff --git a/app/code/core/Mage/Oauth/Block/Adminhtml/Oauth/Admin/Token/Grid.php b/app/code/core/Mage/Oauth/Block/Adminhtml/Oauth/Admin/Token/Grid.php index ed22045887cbfd814321a3f6bd64052f2e2384b0..93241bbc58fa7d1d3cd5193a9e7d2a2c65ae10a2 100644 --- a/app/code/core/Mage/Oauth/Block/Adminhtml/Oauth/Admin/Token/Grid.php +++ b/app/code/core/Mage/Oauth/Block/Adminhtml/Oauth/Admin/Token/Grid.php @@ -87,8 +87,8 @@ class Mage_Oauth_Block_Adminhtml_Oauth_Admin_Token_Grid extends Mage_Adminhtml_B 'escape' => true, )); - /** @var $sourceYesNo Mage_Adminhtml_Model_System_Config_Source_Yesno */ - $sourceYesNo = Mage::getSingleton('Mage_Adminhtml_Model_System_Config_Source_Yesno'); + /** @var $sourceYesNo Mage_Backend_Model_Config_Source_Yesno */ + $sourceYesNo = Mage::getSingleton('Mage_Backend_Model_Config_Source_Yesno'); $this->addColumn('revoked', array( 'header' => $this->__('Revoked'), 'index' => 'revoked', diff --git a/app/code/core/Mage/Oauth/Block/Adminhtml/Oauth/AuthorizedTokens/Grid.php b/app/code/core/Mage/Oauth/Block/Adminhtml/Oauth/AuthorizedTokens/Grid.php index 13f638e2e60a6c965f4f76c5879a294004a16d82..a9289c7aa23b74b62054ff61dfb65ed62637b738 100644 --- a/app/code/core/Mage/Oauth/Block/Adminhtml/Oauth/AuthorizedTokens/Grid.php +++ b/app/code/core/Mage/Oauth/Block/Adminhtml/Oauth/AuthorizedTokens/Grid.php @@ -97,8 +97,8 @@ class Mage_Oauth_Block_Adminhtml_Oauth_AuthorizedTokens_Grid extends Mage_Adminh 'frame_callback' => array($this, 'decorateUserId') )); - /** @var $sourceYesNo Mage_Adminhtml_Model_System_Config_Source_Yesno */ - $sourceYesNo = Mage::getSingleton('Mage_Adminhtml_Model_System_Config_Source_Yesno'); + /** @var $sourceYesNo Mage_Backend_Model_Config_Source_Yesno */ + $sourceYesNo = Mage::getSingleton('Mage_Backend_Model_Config_Source_Yesno'); $this->addColumn('revoked', array( 'header' => $this->__('Revoked'), 'index' => 'revoked', diff --git a/app/code/core/Mage/Oauth/etc/adminhtml/system.xml b/app/code/core/Mage/Oauth/etc/adminhtml/system.xml new file mode 100644 index 0000000000000000000000000000000000000000..b4ba8c2a7dae7308335d8e41728c1c3a204c5be5 --- /dev/null +++ b/app/code/core/Mage/Oauth/etc/adminhtml/system.xml @@ -0,0 +1,54 @@ +<?xml version="1.0"?> +<!-- +/** + * 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 Mage_Api + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> + <system> + <section id="oauth" translate="label" module="Mage_Oauth" type="text" sortOrder="300" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>OAuth</label> + <tab>service</tab> + <resource>Mage_Oauth::oauth</resource> + <group id="cleanup" translate="label" type="text" sortOrder="300" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Cleanup Settings</label> + <field id="cleanup_probability" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Cleanup Probability</label> + <comment>Integer. Launch cleanup in X OAuth requests. 0 (not recommended) - to disable cleanup</comment> + </field> + <field id="expiration_period" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Expiration Period</label> + <comment>Cleanup entries older than X minutes.</comment> + </field> + </group> + <group id="email" translate="label" type="text" sortOrder="300" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Email</label> + <field id="template" translate="label" type="select" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Token Status Change Email Template</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Template</source_model> + </field> + </group> + </section> + </system> +</config> diff --git a/app/code/core/Mage/Oauth/etc/system.xml b/app/code/core/Mage/Oauth/etc/system.xml deleted file mode 100644 index 87701205af05c81520c8ecdd03d341d116f8ba2c..0000000000000000000000000000000000000000 --- a/app/code/core/Mage/Oauth/etc/system.xml +++ /dev/null @@ -1,90 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * 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 Mage_Api - * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<config> - <sections> - <oauth translate="label" module="Mage_Oauth"> - <label>OAuth</label> - <tab>service</tab> - <frontend_type>text</frontend_type> - <sort_order>300</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <resource>Mage_Oauth::oauth</resource> - <groups> - <cleanup translate="label"> - <label>Cleanup Settings</label> - <frontend_type>text</frontend_type> - <sort_order>300</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - <fields> - <cleanup_probability translate="label"> - <label>Cleanup Probability</label> - <frontend_type>text</frontend_type> - <comment>Integer. Launch cleanup in X OAuth requests. 0 (not recommended) - to disable cleanup</comment> - <sort_order>10</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </cleanup_probability> - <expiration_period translate="label"> - <label>Expiration Period</label> - <comment>Cleanup entries older than X minutes.</comment> - <frontend_type>text</frontend_type> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </expiration_period> - </fields> - </cleanup> - <email translate="label"> - <label>Email</label> - <frontend_type>text</frontend_type> - <sort_order>300</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <template translate="label"> - <label>Token Status Change Email Template</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Template</source_model> - <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> - </template> - </fields> - </email> - </groups> - </oauth> - </sections> -</config> diff --git a/app/code/core/Mage/Oauth/view/adminhtml/authorize/button-simple.phtml b/app/code/core/Mage/Oauth/view/adminhtml/authorize/button-simple.phtml index 5e8dcf88355b91c4913765bedd8b7638748abc2b..54dc1b1f01df7cb2f8a87816bb80921da568cc4d 100644 --- a/app/code/core/Mage/Oauth/view/adminhtml/authorize/button-simple.phtml +++ b/app/code/core/Mage/Oauth/view/adminhtml/authorize/button-simple.phtml @@ -30,7 +30,7 @@ * * @var $this Mage_Oauth_Block_Authorize_ButtonBaseAbstract */ -$logo = $this->getSkinUrl('images/logo-large.gif', array('area' => 'adminhtml', 'package' => 'default')); +$logo = $this->getViewFileUrl('images/logo-large.gif', array('area' => 'adminhtml', 'package' => 'default')); ?> <div class="login-container"> <div class="login-box"> diff --git a/app/code/core/Mage/Oauth/view/adminhtml/authorize/head-simple.phtml b/app/code/core/Mage/Oauth/view/adminhtml/authorize/head-simple.phtml index 17d5f0632a5a1704c10b860e4200fb561f65e6ff..59a6661b1da12b58ee8036c3940df5e91eb62536 100644 --- a/app/code/core/Mage/Oauth/view/adminhtml/authorize/head-simple.phtml +++ b/app/code/core/Mage/Oauth/view/adminhtml/authorize/head-simple.phtml @@ -34,15 +34,14 @@ ?> <meta http-equiv="Content-Type" content="<?php echo $this->getContentType() ?>"/> <title><?php echo htmlspecialchars(html_entity_decode($this->getTitle())) ?></title> -<link rel="icon" href="<?php echo $this->getSkinUrl('Mage_Page::favicon.ico') ?>" type="image/x-icon"/> -<link rel="shortcut icon" href="<?php echo $this->getSkinUrl('Mage_Page::favicon.ico') ?>" type="image/x-icon"/> +<link rel="icon" href="<?php echo $this->getViewFileUrl('Mage_Page::favicon.ico') ?>" type="image/x-icon"/> +<link rel="shortcut icon" href="<?php echo $this->getViewFileUrl('Mage_Page::favicon.ico') ?>" type="image/x-icon"/> <script type="text/javascript"> //<![CDATA[ var BLANK_URL = '<?php echo $this->getJsUrl() ?>blank.html'; var BLANK_IMG = '<?php echo $this->getJsUrl() ?>spacer.gif'; var BASE_URL = '<?php echo $this->getUrl('*') ?>'; - var SKIN_URL = '<?php echo $this->getSkinUrl() ?>'; var FORM_KEY = '<?php echo $this->getFormKey() ?>'; //]]> </script> diff --git a/app/code/core/Mage/Oauth/view/adminhtml/layout.xml b/app/code/core/Mage/Oauth/view/adminhtml/layout.xml index 178578d5d343f5fcd2acdba8c2003815d05c2d86..75bededbfa6cc1e2a14a796b89e3c0baa4e7ae31 100644 --- a/app/code/core/Mage/Oauth/view/adminhtml/layout.xml +++ b/app/code/core/Mage/Oauth/view/adminhtml/layout.xml @@ -101,7 +101,7 @@ <action method="removeItem"><type>css</type><name>print.css</name></action> <action method="removeItem"><type>js_css</type><name>extjs/resources/css/ext-all.css</name></action> <action method="removeItem"><type>js_css</type><name>extjs/resources/css/ytheme-magento.css</name></action> - <action method="removeItem"><type>skin_css</type><name>menu.css</name></action> + <action method="removeItem"><type>js_css</type><name>menu.css</name></action> <action method="removeItem"><type>js_css</type><name>mage/calendar.css</name></action> <action method="removeItem"><type>js</type><name>jquery/jquery-1.7.1.min.js</name></action> diff --git a/app/code/core/Mage/Oauth/view/frontend/authorize/button-simple.phtml b/app/code/core/Mage/Oauth/view/frontend/authorize/button-simple.phtml index c023e05f1ea7c596ea8eb75379231fcea17f8db4..7053d1c98043d76a650d77b3dbcab016976d81da 100644 --- a/app/code/core/Mage/Oauth/view/frontend/authorize/button-simple.phtml +++ b/app/code/core/Mage/Oauth/view/frontend/authorize/button-simple.phtml @@ -30,7 +30,7 @@ * * @var $this Mage_Oauth_Block_Authorize_ButtonBaseAbstract */ -$logo = $this->getSkinUrl('images/logo-large.gif', array('area' => 'adminhtml', 'package' => 'default')); +$logo = $this->getViewFileUrl('images/logo-large.gif', array('area' => 'adminhtml', 'package' => 'default')); ?> <div class="login-container"> <div class="login-box"> diff --git a/app/code/core/Mage/Ogone/etc/adminhtml/system.xml b/app/code/core/Mage/Ogone/etc/adminhtml/system.xml new file mode 100644 index 0000000000000000000000000000000000000000..9110b1fd0ac34f3af109201c12aeb6e8b3a77bf0 --- /dev/null +++ b/app/code/core/Mage/Ogone/etc/adminhtml/system.xml @@ -0,0 +1,161 @@ +<?xml version="1.0"?> +<!-- +/** + * 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 Mage_Ogone + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> + <system> + <section id="payment"> + <group id="ogone" translate="label,comment" module="Mage_Ogone" type="text" sortOrder="800" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Ogone</label> + <comment> + <![CDATA[<br /> +<div class="custom-options"> +<div class="box"> +<p class="grand-total"><br /><b>Signing up with Ogone</b></p> +<p>Please enter the correct post back url and offline processiong url in Ogone configuration</p> +<p>post back url example: http://myMagentoStore.com/ogone/api/postBack</p> +<p>offline processing url example: http://myMagentoStore.com/ogone/api/offlineProcess</p> +</div> +</div> +]]> +</comment> + <field id="active" translate="label" type="select" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Enabled</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="debug_flag" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Debug</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="title" translate="label" type="text" sortOrder="15" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Title</label> + </field> + <field id="pspid" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>PSPID</label> + <comment>PSPID is a case sensitive field.</comment> + </field> + <field id="secret_key_out" translate="label comment" type="obscure" sortOrder="25" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>SHA-IN Pass Phrase</label> + <comment> + <![CDATA[Use in posting data from Magento to Ogone.<br/>Use in data checking by Ogone before the payment.]]> +</comment> + <backend_model>Mage_Backend_Model_Config_Backend_Encrypted</backend_model> + </field> + <field id="secret_key_in" translate="label comment" type="obscure" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>SHA-OUT Pass Phrase</label> + <comment> + <![CDATA[Use in posting data from Ogone to Magento.<br/>Use in feedback data checking by Magento.]]> +</comment> + <backend_model>Mage_Backend_Model_Config_Backend_Encrypted</backend_model> + </field> + <field id="shamode" translate="label comment tooltip" type="select" sortOrder="35" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Hash All Parameters</label> + <comment> + <![CDATA[Enabling this feature needs adjusting "Technical information > Global security parameters" on merchant administration.]]> +</comment> + <tooltip> + <![CDATA[To hash <strong>all parameters</strong>, select the following options in the "Global security parameters" fieldset: <ul><li>Each parameter followed by the pass phrase.</li><li>"Hash algorithm" same as "Hashing Algorithm" below</li><li>UTF-8</li></ul>]]> +</tooltip> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="hashing_algorithm" translate="label" type="select" sortOrder="37" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Hashing Algorithm</label> + <source_model>Mage_Ogone_Model_Api::getHashingAlgorithms</source_model> + <depends> + <field id="shamode">1</field> + </depends> + </field> + <field id="ogone_gateway" translate="label comment" type="text" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Gateway URL</label> + <comment>For production, replace "test" with "prod". Example: https://secure.ogone.com/ncol/prod/orderstandard.asp</comment> + </field> + <field id="payment_action" translate="label comment" type="select" sortOrder="45" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Payment Action</label> + <source_model>Mage_Ogone_Model_Source_PaymentAction</source_model> + <comment>If you choose "No Operation", Ogone will use default payment procedure setup in Ogone configuration.</comment> + </field> + <field id="template" translate="label comment" type="select" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Payment Template</label> + <source_model>Mage_Ogone_Model_Source_Template</source_model> + <comment>If you choose "Ogone Template", you will need to fill in all the following fields.</comment> + </field> + <field id="html_title" translate="label comment" type="text" sortOrder="55" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Title of the Ogone Template</label> + </field> + <field id="bgcolor" translate="label comment" type="text" sortOrder="60" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Background Color of Ogone Template</label> + <comment> + <![CDATA[E.g: "white".]]> +</comment> + </field> + <field id="txtcolor" translate="label comment" type="text" sortOrder="65" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Text Color of the Ogone Template</label> + <comment> + <![CDATA[E.g: "black".]]> +</comment> + </field> + <field id="tblbgcolor" translate="label comment" type="text" sortOrder="70" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Table Background Color of the Ogone Template</label> + <comment> + <![CDATA[E.g: "white".]]> +</comment> + </field> + <field id="tbltxtcolor" translate="label comment" type="text" sortOrder="75" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Table Text Color of the Ogone Template</label> + <comment> + <![CDATA[E.g: "black".]]> +</comment> + </field> + <field id="buttonbgcolor" translate="label" type="text" sortOrder="80" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Button Background Color of the Ogone Template</label> + </field> + <field id="buttontxtcolor" translate="label comment" type="text" sortOrder="85" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Button Text Color of the Ogone Template</label> + <comment> + <![CDATA[E.g: "white".]]> +</comment> + </field> + <field id="fonttype" translate="label comment" type="text" sortOrder="90" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Font Family of the Ogone Template</label> + <comment> + <![CDATA[E.g: "Verdana".]]> +</comment> + </field> + <field id="logo" translate="label comment" type="text" sortOrder="95" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Logo of the Ogone Template</label> + <comment> + <![CDATA[URL/filename of the logo.<br />The URL must be absolute and stored on a secure server.]]> +</comment> + </field> + <field id="pmlist" translate="label comment" type="select" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Layout of Payment Methods</label> + <source_model>Mage_Ogone_Model_Source_Pmlist</source_model> + <comment>You can arrange the layout/list of the payment methods on Ogone payment page.</comment> + </field> + </group> + </section> + </system> +</config> diff --git a/app/code/core/Mage/Ogone/etc/config.xml b/app/code/core/Mage/Ogone/etc/config.xml index 4da32eaab7057a77b888af2168d750d91785f271..592d7a7869138b8689bf4b553b92b679b1034177 100644 --- a/app/code/core/Mage/Ogone/etc/config.xml +++ b/app/code/core/Mage/Ogone/etc/config.xml @@ -130,7 +130,7 @@ <ogone> <model>Mage_Ogone_Model_Api</model> <title>Ogone</title> - <secret_key backend_model="Mage_Adminhtml_Model_System_Config_Backend_Encrypted"/> + <secret_key backend_model="Mage_Backend_Model_Config_Backend_Encrypted"/> <payment_action>authorize</payment_action> <hashing_algorithm>sha256</hashing_algorithm> <template>ogone</template> 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 d6fbf5c9998ea21e4c7bde50393a4972d21a7c4d..0000000000000000000000000000000000000000 --- a/app/code/core/Mage/Ogone/etc/system.xml +++ /dev/null @@ -1,249 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * 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 Mage_Ogone - * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<config> - <sections> - <payment> - <groups> - <ogone translate="label,comment" module="Mage_Ogone"> - <label>Ogone</label> - <comment><![CDATA[<br /> -<div class="custom-options"> -<div class="box"> -<p class="grand-total"><br /><b>Signing up with Ogone</b></p> -<p>Please enter the correct post back url and offline processiong url in Ogone configuration</p> -<p>post back url example: http://myMagentoStore.com/ogone/api/postBack</p> -<p>offline processing url example: http://myMagentoStore.com/ogone/api/offlineProcess</p> -</div> -</div> -]]></comment> - <frontend_type>text</frontend_type> - <sort_order>800</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <active translate="label"> - <label>Enabled</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </active> - <debug_flag translate="label"> - <label>Debug</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>10</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </debug_flag> - <title translate="label"> - <label>Title</label> - <frontend_type>text</frontend_type> - <sort_order>15</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </title> - <pspid translate="label"> - <label>PSPID</label> - <frontend_type>text</frontend_type> - <comment> PSPID is a case sensitive field.</comment> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </pspid> - <secret_key_out translate="label comment"> - <label>SHA-IN Pass Phrase</label> - <comment><![CDATA[Use in posting data from Magento to Ogone.<br/>Use in data checking by Ogone before the payment.]]></comment> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Encrypted</backend_model> - <frontend_type>obscure</frontend_type> - <sort_order>25</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </secret_key_out> - <secret_key_in translate="label comment"> - <label>SHA-OUT Pass Phrase</label> - <comment><![CDATA[Use in posting data from Ogone to Magento.<br/>Use in feedback data checking by Magento.]]></comment> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Encrypted</backend_model> - <frontend_type>obscure</frontend_type> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </secret_key_in> - <shamode translate="label comment tooltip"> - <label>Hash All Parameters</label> - <comment><![CDATA[Enabling this feature needs adjusting "Technical information > Global security parameters" on merchant administration.]]></comment> - <tooltip><![CDATA[To hash <strong>all parameters</strong>, select the following options in the "Global security parameters" fieldset: <ul><li>Each parameter followed by the pass phrase.</li><li>"Hash algorithm" same as "Hashing Algorithm" below</li><li>UTF-8</li></ul>]]></tooltip> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>35</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </shamode> - <hashing_algorithm translate="label"> - <label>Hashing Algorithm</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Ogone_Model_Api::getHashingAlgorithms</source_model> - <depends><shamode>1</shamode></depends> - <sort_order>37</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </hashing_algorithm> - <ogone_gateway translate="label comment"> - <label>Gateway URL</label> - <frontend_type>text</frontend_type> - <comment>For production, replace "test" with "prod". Example: https://secure.ogone.com/ncol/prod/orderstandard.asp</comment> - <sort_order>40</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </ogone_gateway> - <payment_action translate="label comment"> - <label>Payment Action</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Ogone_Model_Source_PaymentAction</source_model> - <comment>If you choose "No Operation", Ogone will use default payment procedure setup in Ogone configuration.</comment> - <sort_order>45</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </payment_action> - <template translate="label comment"> - <label>Payment Template</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Ogone_Model_Source_Template</source_model> - <comment>If you choose "Ogone Template", you will need to fill in all the following fields.</comment> - <sort_order>50</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </template> - <html_title translate="label comment"> - <label>Title of the Ogone Template</label> - <frontend_type>text</frontend_type> - <sort_order>55</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </html_title> - <bgcolor translate="label comment"> - <label>Background Color of Ogone Template</label> - <frontend_type>text</frontend_type> - <comment><![CDATA[E.g: "white".]]></comment> - <sort_order>60</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </bgcolor> - <txtcolor translate="label comment"> - <label>Text Color of the Ogone Template</label> - <frontend_type>text</frontend_type> - <comment><![CDATA[E.g: "black".]]></comment> - <sort_order>65</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </txtcolor> - <tblbgcolor translate="label comment"> - <label>Table Background Color of the Ogone Template</label> - <frontend_type>text</frontend_type> - <comment><![CDATA[E.g: "white".]]></comment> - <sort_order>70</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </tblbgcolor> - <tbltxtcolor translate="label comment"> - <label>Table Text Color of the Ogone Template</label> - <frontend_type>text</frontend_type> - <comment><![CDATA[E.g: "black".]]></comment> - <sort_order>75</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </tbltxtcolor> - <buttonbgcolor translate="label"> - <label>Button Background Color of the Ogone Template</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> - </buttonbgcolor> - <buttontxtcolor translate="label comment"> - <label>Button Text Color of the Ogone Template</label> - <frontend_type>text</frontend_type> - <comment><![CDATA[E.g: "white".]]></comment> - <sort_order>85</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </buttontxtcolor> - <fonttype translate="label comment"> - <label>Font Family of the Ogone Template</label> - <frontend_type>text</frontend_type> - <comment><![CDATA[E.g: "Verdana".]]></comment> - <sort_order>90</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </fonttype> - <logo translate="label comment"> - <label>Logo of the Ogone Template</label> - <frontend_type>text</frontend_type> - <comment><![CDATA[URL/filename of the logo.<br />The URL must be absolute and stored on a secure server.]]></comment> - <sort_order>95</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </logo> - <pmlist translate="label comment"> - <label>Layout of Payment Methods</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Ogone_Model_Source_Pmlist</source_model> - <comment>You can arrange the layout/list of the payment methods on Ogone payment page.</comment> - <sort_order>100</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </pmlist> - </fields> - </ogone> - </groups> - </payment> - </sections> -</config> diff --git a/app/code/core/Mage/Page/Block/Html.php b/app/code/core/Mage/Page/Block/Html.php index 6638c00c732d98adb1b6b03d4b9be9257af010dd..4d3d3ed8eba6399eee0a41f9df39efac805ef09b 100644 --- a/app/code/core/Mage/Page/Block/Html.php +++ b/app/code/core/Mage/Page/Block/Html.php @@ -36,41 +36,17 @@ class Mage_Page_Block_Html extends Mage_Core_Block_Template protected $_urls = array(); protected $_title = ''; - /** - * @param Mage_Core_Controller_Request_Http $request - * @param Mage_Core_Model_Layout $layout - * @param Mage_Core_Model_Event_Manager $eventManager - * @param Mage_Core_Model_Translate $translator - * @param Mage_Core_Model_Cache $cache - * @param Mage_Core_Model_Design_Package $designPackage - * @param Mage_Core_Model_Session $session - * @param Mage_Core_Model_Store_Config $storeConfig - * @param Mage_Core_Controller_Varien_Front $frontController - * @param array $data - */ - public function __construct( - Mage_Core_Controller_Request_Http $request, - Mage_Core_Model_Layout $layout, - Mage_Core_Model_Event_Manager $eventManager, - Mage_Core_Model_Translate $translator, - Mage_Core_Model_Cache $cache, - Mage_Core_Model_Design_Package $designPackage, - Mage_Core_Model_Session $session, - Mage_Core_Model_Store_Config $storeConfig, - Mage_Core_Controller_Varien_Front $frontController, - array $data = array() - ) { - parent::__construct( - $request, $layout, $eventManager, $translator, $cache, $designPackage, $session, $storeConfig, - $frontController, $data - ); + protected function _construct() + { + parent::_construct(); + $this->_urls = array( 'base' => Mage::getBaseUrl('web'), 'baseSecure'=> Mage::getBaseUrl('web', true), - 'current' => $request->getRequestUri() + 'current' => $this->_request->getRequestUri() ); - $action = $frontController->getAction(); + $action = $this->_frontController->getAction(); if ($action) { $this->addBodyClass($action->getFullActionName('-')); } diff --git a/app/code/core/Mage/Page/Block/Html/Breadcrumbs.php b/app/code/core/Mage/Page/Block/Html/Breadcrumbs.php index 686e1b14479b6f4bb54ba35c8103618cdc8326c9..fb3f8af9fee3954db54d59b5d234d6a099f984b0 100644 --- a/app/code/core/Mage/Page/Block/Html/Breadcrumbs.php +++ b/app/code/core/Mage/Page/Block/Html/Breadcrumbs.php @@ -50,9 +50,23 @@ class Mage_Page_Block_Html_Breadcrumbs extends Mage_Core_Block_Template */ protected $_crumbs = null; + /** + * Cache key info + * + * @var null|array + */ + protected $_cacheKeyInfo = null; + protected $_template = 'html/breadcrumbs.phtml'; - function addCrumb($crumbName, $crumbInfo, $after = false) + /** + * Add crumb + * + * @param string $crumbName + * @param array $crumbInfo + * @return Mage_Page_Block_Html_Breadcrumbs + */ + public function addCrumb($crumbName, $crumbInfo) { $properties = array('label', 'title', 'link', 'first', 'last', 'readonly'); foreach ($properties as $key) { @@ -66,6 +80,29 @@ class Mage_Page_Block_Html_Breadcrumbs extends Mage_Core_Block_Template return $this; } + /** + * Get cache key informative items + * Provide string array key to share specific info item with FPC placeholder + * + * @return array + */ + public function getCacheKeyInfo() + { + if (is_null($this->_cacheKeyInfo)) { + $this->_cacheKeyInfo = parent::getCacheKeyInfo() + array( + 'crumbs' => base64_encode(serialize($this->_crumbs)), + 'name' => $this->getNameInLayout() + ); + } + + return $this->_cacheKeyInfo; + } + + /** + * Render block HTML + * + * @return string + */ protected function _toHtml() { if (is_array($this->_crumbs)) { diff --git a/app/code/core/Mage/Page/Block/Html/Head.php b/app/code/core/Mage/Page/Block/Html/Head.php index bef99e91fa29e25032233fefed4fcd30bb2fbd74..dcc556601a0025d22b21c0214cd4e94375dc5870 100644 --- a/app/code/core/Mage/Page/Block/Html/Head.php +++ b/app/code/core/Mage/Page/Block/Html/Head.php @@ -353,7 +353,7 @@ class Mage_Page_Block_Html_Head extends Mage_Core_Block_Template */ protected function _getFaviconFile() { - $folderName = Mage_Adminhtml_Model_System_Config_Backend_Image_Favicon::UPLOAD_DIR; + $folderName = Mage_Backend_Model_Config_Backend_Image_Favicon::UPLOAD_DIR; $storeConfig = Mage::getStoreConfig('design/head/shortcut_icon'); $faviconFile = Mage::getBaseUrl('media') . $folderName . '/' . $storeConfig; $absolutePath = Mage::getBaseDir('media') . '/' . $folderName . '/' . $storeConfig; @@ -361,7 +361,7 @@ class Mage_Page_Block_Html_Head extends Mage_Core_Block_Template if (!is_null($storeConfig) && $this->_isFile($absolutePath)) { $url = $faviconFile; } else { - $url = $this->getSkinUrl('Mage_Page::favicon.ico'); + $url = $this->getViewFileUrl('Mage_Page::favicon.ico'); } return $url; } diff --git a/app/code/core/Mage/Page/Block/Html/Header.php b/app/code/core/Mage/Page/Block/Html/Header.php index 682f9acdd3bf6ef86aa7eb73a597a1465e24c1a9..6cc4eea8ad71df1face0e7baaaa69c89c9575ff7 100644 --- a/app/code/core/Mage/Page/Block/Html/Header.php +++ b/app/code/core/Mage/Page/Block/Html/Header.php @@ -60,7 +60,7 @@ class Mage_Page_Block_Html_Header extends Mage_Core_Block_Template if (empty($this->_data['logo_src'])) { $this->_data['logo_src'] = Mage::getStoreConfig('design/header/logo_src'); } - return $this->getSkinUrl($this->_data['logo_src']); + return $this->getViewFileUrl($this->_data['logo_src']); } public function getLogoAlt() diff --git a/app/code/core/Mage/Page/etc/adminhtml/system.xml b/app/code/core/Mage/Page/etc/adminhtml/system.xml new file mode 100644 index 0000000000000000000000000000000000000000..b5b6f5afef614cda67282af0a5ca4212042c6cf6 --- /dev/null +++ b/app/code/core/Mage/Page/etc/adminhtml/system.xml @@ -0,0 +1,104 @@ +<?xml version="1.0"?> +<!-- +/** + * 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 Mage_Page + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> + <system> + <section id="design" translate="label" module="Mage_Core"> + <group id="head" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>HTML Head</label> + <field id="shortcut_icon" translate="label comment" type="image" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Favicon Icon</label> + <comment>Allowed file types: ICO, PNG, GIF, JPG, JPEG, APNG, SVG. Not all browsers support all these formats!</comment> + <backend_model>Mage_Backend_Model_Config_Backend_Image_Favicon</backend_model> + <base_url type="media" scope_info="1">favicon</base_url> + </field> + <field id="default_title" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Default Title</label> + </field> + <field id="title_prefix" translate="label" type="text" sortOrder="12" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Title Prefix</label> + </field> + <field id="title_suffix" translate="label" type="text" sortOrder="14" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Title Suffix</label> + </field> + <field id="default_description" translate="label" type="textarea" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Default Description</label> + </field> + <field id="default_keywords" translate="label" type="textarea" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Default Keywords</label> + </field> + <field id="includes" translate="label comment" type="textarea" sortOrder="70" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Miscellaneous Scripts</label> + <comment>This will be included before head closing tag in page HTML.</comment> + </field> + <field id="demonotice" translate="label comment" type="select" sortOrder="80" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Display Demo Store Notice</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + </group> + <group id="search_engine_robots" translate="label" type="text" sortOrder="25" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Search Engine Robots</label> + <field id="default_robots" translate="label comment" type="select" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Default Robots</label> + <comment>This will be included before head closing tag in page HTML.</comment> + <source_model>Mage_Backend_Model_Config_Source_Design_Robots</source_model> + </field> + <field id="custom_instructions" translate="label comment" type="textarea" sortOrder="70" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Edit custom instruction of robots.txt File</label> + <backend_model>Mage_Backend_Model_Config_Backend_Admin_Robots</backend_model> + </field> + <field id="reset_to_defaults" translate="label comment" type="button" sortOrder="80" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Reset to Defaults</label> + <frontend_model>Mage_Adminhtml_Block_Page_System_Config_Robots_Reset</frontend_model> + <comment>This action will delete your custom instructions and reset robots.txt file to system's default settings.</comment> + </field> + </group> + <group id="header" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Header</label> + <field id="logo_src" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Logo Image Src</label> + </field> + <field id="logo_alt" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Logo Image Alt</label> + </field> + <field id="welcome" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Welcome Text</label> + </field> + </group> + <group id="footer" translate="label" type="text" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Footer</label> + <field id="copyright" translate="label" type="textarea" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Copyright</label> + </field> + <field id="absolute_footer" translate="label comment" type="textarea" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Miscellaneous HTML</label> + <comment>This will be displayed just before body closing tag.</comment> + </field> + </group> + </section> + </system> +</config> diff --git a/app/code/core/Mage/Page/etc/system.xml b/app/code/core/Mage/Page/etc/system.xml deleted file mode 100644 index df4708f099b6824c8a6f9faab763f2e359474d3f..0000000000000000000000000000000000000000 --- a/app/code/core/Mage/Page/etc/system.xml +++ /dev/null @@ -1,232 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * 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 Mage_Page - * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<config> - <sections> - <design translate="label" module="Mage_Core"> - <groups> - <head translate="label"> - <label>HTML Head</label> - <frontend_type>text</frontend_type> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <shortcut_icon translate="label comment"> - <label>Favicon Icon</label> - <comment>Allowed file types: ICO, PNG, GIF, JPG, JPEG, APNG, SVG. Not all browsers support all these formats!</comment> - <frontend_type>image</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Image_Favicon</backend_model> - <base_url type="media" scope_info="1">favicon</base_url> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </shortcut_icon> - <default_title translate="label"> - <label>Default 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> - </default_title> - <title_prefix translate="label"> - <label>Title Prefix</label> - <frontend_type>text</frontend_type> - <sort_order>12</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </title_prefix> - <title_suffix translate="label"> - <label>Title Suffix</label> - <frontend_type>text</frontend_type> - <sort_order>14</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </title_suffix> - <default_description translate="label"> - <label>Default Description</label> - <frontend_type>textarea</frontend_type> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </default_description> - <default_keywords translate="label"> - <label>Default Keywords</label> - <frontend_type>textarea</frontend_type> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </default_keywords> -<!-- - <default_media_type translate="label"> - <label>Default Media Type</label> - <frontend_type>text</frontend_type> - <sort_order>50</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </default_media_type> - <default_charset translate="label"> - <label>Default Charset</label> - <frontend_type>text</frontend_type> - <sort_order>60</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </default_charset> ---> - <includes translate="label comment"> - <label>Miscellaneous Scripts</label> - <comment>This will be included before head closing tag in page HTML.</comment> - <frontend_type>textarea</frontend_type> - <sort_order>70</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </includes> - <demonotice translate="label comment"> - <label>Display Demo Store Notice</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <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> - </demonotice> - </fields> - </head> - <search_engine_robots translate="label"> - <label>Search Engine Robots</label> - <frontend_type>text</frontend_type> - <sort_order>25</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <default_robots translate="label comment"> - <label>Default Robots</label> - <comment>This will be included before head closing tag in page HTML.</comment> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Design_Robots</source_model> - <sort_order>40</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </default_robots> - <custom_instructions translate="label comment"> - <label>Edit custom instruction of robots.txt File</label> - <frontend_type>textarea</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Admin_Robots</backend_model> - <sort_order>70</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </custom_instructions> - <reset_to_defaults translate="label comment"> - <frontend_type>button</frontend_type> - <frontend_model>Mage_Adminhtml_Block_Page_System_Config_Robots_Reset</frontend_model> - <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> - <comment>This action will delete your custom instructions and reset robots.txt file to - system's default settings.</comment> - </reset_to_defaults> - </fields> - </search_engine_robots> - <header translate="label"> - <label>Header</label> - <frontend_type>text</frontend_type> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <logo_src translate="label"> - <label>Logo Image Src</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> - </logo_src> - <logo_alt translate="label"> - <label>Logo Image Alt</label> - <frontend_type>text</frontend_type> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </logo_alt> - <welcome translate="label"> - <label>Welcome Text</label> - <frontend_type>text</frontend_type> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </welcome> - </fields> - </header> - <footer translate="label"> - <label>Footer</label> - <frontend_type>text</frontend_type> - <sort_order>40</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <copyright translate="label"> - <label>Copyright</label> - <frontend_type>textarea</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> - </copyright> - <absolute_footer translate="label comment"> - <label>Miscellaneous HTML</label> - <comment>This will be displayed just before body closing tag.</comment> - <frontend_type>textarea</frontend_type> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </absolute_footer> - </fields> - </footer> - </groups> - </design> - </sections> -</config> diff --git a/app/code/core/Mage/Page/view/frontend/callouts/left_col.phtml b/app/code/core/Mage/Page/view/frontend/callouts/left_col.phtml index 8f8202d9e3b3d37597b96274cd2b7303634be618..0c951717741cd64b350b418a370d2c7e4c99fc6e 100644 --- a/app/code/core/Mage/Page/view/frontend/callouts/left_col.phtml +++ b/app/code/core/Mage/Page/view/frontend/callouts/left_col.phtml @@ -31,7 +31,7 @@ <?php elseif($this->getLinkUrl()): ?> <a href="<?php echo $this->getUrl($this->getLinkUrl()) ?>" title="<?php echo $this->__($this->getImgAlt()) ?>"> <?php endif; ?> - <img src="<?php echo $this->getSkinUrl($this->getImgSrc()) ?>"<?php if(!$this->getLinkUrl()): ?> title="<?php echo $this->__($this->getImgAlt()) ?>"<?php endif; ?> alt="<?php echo $this->__($this->getImgAlt()) ?>" /> + <img src="<?php echo $this->getViewFileUrl($this->getImgSrc()) ?>"<?php if(!$this->getLinkUrl()): ?> title="<?php echo $this->__($this->getImgAlt()) ?>"<?php endif; ?> alt="<?php echo $this->__($this->getImgAlt()) ?>" /> <?php if($this->getLinkUrl()): ?> </a> <?php endif ?> diff --git a/app/code/core/Mage/Page/view/frontend/callouts/right_col.phtml b/app/code/core/Mage/Page/view/frontend/callouts/right_col.phtml index 8f8202d9e3b3d37597b96274cd2b7303634be618..0c951717741cd64b350b418a370d2c7e4c99fc6e 100644 --- a/app/code/core/Mage/Page/view/frontend/callouts/right_col.phtml +++ b/app/code/core/Mage/Page/view/frontend/callouts/right_col.phtml @@ -31,7 +31,7 @@ <?php elseif($this->getLinkUrl()): ?> <a href="<?php echo $this->getUrl($this->getLinkUrl()) ?>" title="<?php echo $this->__($this->getImgAlt()) ?>"> <?php endif; ?> - <img src="<?php echo $this->getSkinUrl($this->getImgSrc()) ?>"<?php if(!$this->getLinkUrl()): ?> title="<?php echo $this->__($this->getImgAlt()) ?>"<?php endif; ?> alt="<?php echo $this->__($this->getImgAlt()) ?>" /> + <img src="<?php echo $this->getViewFileUrl($this->getImgSrc()) ?>"<?php if(!$this->getLinkUrl()): ?> title="<?php echo $this->__($this->getImgAlt()) ?>"<?php endif; ?> alt="<?php echo $this->__($this->getImgAlt()) ?>" /> <?php if($this->getLinkUrl()): ?> </a> <?php endif ?> diff --git a/app/code/core/Mage/Page/view/frontend/html/head.phtml b/app/code/core/Mage/Page/view/frontend/html/head.phtml index a082cef5d24ff51ddf93050c75188e459cf10c17..831185416856018d39f20ca1fe9c52b19cedb0d6 100644 --- a/app/code/core/Mage/Page/view/frontend/html/head.phtml +++ b/app/code/core/Mage/Page/view/frontend/html/head.phtml @@ -31,9 +31,9 @@ <meta name="robots" content="<?php echo htmlspecialchars($this->getRobots()) ?>"/> <link rel="icon" href="<?php echo $this->getFaviconFile(); ?>" type="image/x-icon"/> <link rel="shortcut icon" href="<?php echo $this->getFaviconFile(); ?>" type="image/x-icon"/> -<link rel="stylesheet" href="<?php echo $this->getSkinUrl('jquery/ui/css/jquery-ui.css')?>" type="text/css" media="all"/> -<link rel="stylesheet" href="<?php echo $this->getSkinUrl('Mage_Page::css/validate.css') ?>" type="text/css" media="all"/> +<link rel="stylesheet" href="<?php echo $this->getViewFileUrl('jquery/ui/css/jquery-ui.css')?>" type="text/css" media="all"/> +<link rel="stylesheet" href="<?php echo $this->getViewFileUrl('Mage_Page::css/validate.css') ?>" type="text/css" media="all"/> <?php echo $this->getCssJsHtml() ?> <?php echo $this->getChildHtml() ?> <?php echo $this->getIncludes() ?> -<?php echo $this->helper('Mage_Core_Helper_Js')->getTranslatorScript() ?> \ No newline at end of file +<?php echo $this->helper('Mage_Core_Helper_Js')->getTranslatorScript() ?> diff --git a/app/code/core/Mage/Page/view/frontend/html/notices.phtml b/app/code/core/Mage/Page/view/frontend/html/notices.phtml index 46fb015d06f6f1aef24b3f830ef367718ef0c419..7717f16bf810572f8a50524ab032dbad9b493ba0 100644 --- a/app/code/core/Mage/Page/view/frontend/html/notices.phtml +++ b/app/code/core/Mage/Page/view/frontend/html/notices.phtml @@ -65,9 +65,9 @@ o.noCookiesUrl = '<?php echo Mage::getUrl('cms/index/noCookies') ?>'; }); $.mage.load.jsSync( - "<?php echo $this->getSkinUrl('jquery/jquery.cookie.js')?>", - "<?php echo $this->getSkinUrl('Mage_Page::js/cookies.js')?>", - "<?php echo $this->getSkinUrl('Mage_Page::js/notices.js')?>" + "<?php echo $this->getViewFileUrl('jquery/jquery.cookie.js')?>", + "<?php echo $this->getViewFileUrl('Mage_Page::js/cookies.js')?>", + "<?php echo $this->getViewFileUrl('Mage_Page::js/notices.js')?>" ); })(jQuery); // ]]> diff --git a/app/code/core/Mage/Page/view/frontend/html/pager.phtml b/app/code/core/Mage/Page/view/frontend/html/pager.phtml index 7d14bb5e0dfa9db3b238bff366b4691f220b6ad9..1f030dac49fe9fd712296ee3b2d7ead2bdabb2a5 100644 --- a/app/code/core/Mage/Page/view/frontend/html/pager.phtml +++ b/app/code/core/Mage/Page/view/frontend/html/pager.phtml @@ -68,7 +68,7 @@ <li> <a class="previous<?php if(!$this->getAnchorTextForPrevious()): ?> i-previous<?php endif;?>" href="<?php echo $this->getPreviousPageUrl() ?>" title="<?php echo $this->__('Previous') ?>"> <?php if(!$this->getAnchorTextForPrevious()): ?> - <img src="<?php echo $this->getSkinUrl('images/pager_arrow_left.gif') ?>" alt="<?php echo $this->__('Previous') ?>" class="v-middle" /> + <img src="<?php echo $this->getViewFileUrl('images/pager_arrow_left.gif') ?>" alt="<?php echo $this->__('Previous') ?>" class="v-middle" /> <?php else: ?> <?php echo $this->getAnchorTextForPrevious() ?> <?php endif;?> @@ -105,7 +105,7 @@ <li> <a class="next<?php if(!$this->getAnchorTextForNext()): ?> i-next<?php endif; ?>" href="<?php echo $this->getNextPageUrl() ?>" title="<?php echo $this->__('Next') ?>"> <?php if(!$this->getAnchorTextForNext()): ?> - <img src="<?php echo $this->getSkinUrl('images/pager_arrow_right.gif') ?>" alt="<?php echo $this->__('Next') ?>" class="v-middle" /> + <img src="<?php echo $this->getViewFileUrl('images/pager_arrow_right.gif') ?>" alt="<?php echo $this->__('Next') ?>" class="v-middle" /> <?php else: ?> <?php echo $this->getAnchorTextForNext() ?> <?php endif;?> diff --git a/app/code/core/Mage/Page/view/frontend/html/topmenu.phtml b/app/code/core/Mage/Page/view/frontend/html/topmenu.phtml index 2944f51b78c21d72df2864cf54d3aa67d63ca400..5b597917344fe4e7ad2e46c14104da5b11e64feb 100644 --- a/app/code/core/Mage/Page/view/frontend/html/topmenu.phtml +++ b/app/code/core/Mage/Page/view/frontend/html/topmenu.phtml @@ -40,7 +40,7 @@ </div> <script type="text/javascript"> (function($) { - head.js("<?php echo $this->getSkinUrl('Mage_Page::js/menu.js') ?>", function() { + head.js("<?php echo $this->getViewFileUrl('Mage_Page::js/menu.js') ?>", function() { $('#nav .parent').menu(); }); })(jQuery); diff --git a/app/code/core/Mage/Page/view/frontend/js/cookie.phtml b/app/code/core/Mage/Page/view/frontend/js/cookie.phtml index 046613831d41841e8a7034acba7e97987c0a9dd4..3582125a625e4344d5019cf294b476b0ade331ae 100644 --- a/app/code/core/Mage/Page/view/frontend/js/cookie.phtml +++ b/app/code/core/Mage/Page/view/frontend/js/cookie.phtml @@ -40,8 +40,8 @@ o.domain = '<?php echo $this->getDomain()?>' }); $.mage.load.jsSync( - "<?php echo $this->getSkinUrl('jquery/jquery.cookie.js') ?>", - "<?php echo $this->getSkinUrl('Mage_Page::js/cookie.js') ?>" + "<?php echo $this->getViewFileUrl('jquery/jquery.cookie.js') ?>", + "<?php echo $this->getViewFileUrl('Mage_Page::js/cookie.js') ?>" ); })(jQuery); //]]> diff --git a/app/code/core/Mage/Page/view/frontend/print.phtml b/app/code/core/Mage/Page/view/frontend/print.phtml index ffe0c9bd2442cf70407cc2c901913be0d1418141..6450b8f759f71a32b1c0ba183385a12976478c9f 100644 --- a/app/code/core/Mage/Page/view/frontend/print.phtml +++ b/app/code/core/Mage/Page/view/frontend/print.phtml @@ -38,7 +38,7 @@ <?php echo $this->getChildHtml('after_body_start') ?> <div> <div class="print-head"> - <img src="<?php echo $this->getPrintLogoUrl() ? $this->getPrintLogoUrl() : $this->getSkinUrl('images/logo_print.gif') ?>" class="logo" alt="" /> + <img src="<?php echo $this->getPrintLogoUrl() ? $this->getPrintLogoUrl() : $this->getViewFileUrl('images/logo_print.gif') ?>" class="logo" alt="" /> <?php if ($this->getPrintLogoText()):?> <address><?php echo nl2br($this->escapeHtml($this->getPrintLogoText())) ?></address> <?php endif;?> diff --git a/app/code/core/Mage/Page/view/frontend/switch/flags.phtml b/app/code/core/Mage/Page/view/frontend/switch/flags.phtml index 512fd4d4badeaf19b4ce1c1e14120872b6a5df56..e728758e1071421886ed21fce32d118270074384 100644 --- a/app/code/core/Mage/Page/view/frontend/switch/flags.phtml +++ b/app/code/core/Mage/Page/view/frontend/switch/flags.phtml @@ -30,7 +30,7 @@ <select id="select-language" title="<?php echo $this->__('Your Language') ?>" onchange="window.location.href=this.value" class="flags"> <?php foreach ($this->getStores() as $_lang): ?> <?php $_selected = ($_lang->getId() == $this->getCurrentStoreId()) ? ' selected="selected"' : '' ?> - <option value="<?php echo $_lang->getCurrentUrl() ?>" style="background-image:url('<?php echo $this->getSkinUrl('images/flags/flag_'.$_lang->getCode().'.gif') ?>');"<?php echo $_selected ?>><?php echo $this->escapeHtml($_lang->getName()) ?></option> + <option value="<?php echo $_lang->getCurrentUrl() ?>" style="background-image:url('<?php echo $this->getViewFileUrl('images/flags/flag_'.$_lang->getCode().'.gif') ?>');"<?php echo $_selected ?>><?php echo $this->escapeHtml($_lang->getName()) ?></option> <?php endforeach; ?> </select> </div> diff --git a/app/code/core/Mage/PageCache/etc/adminhtml/system.xml b/app/code/core/Mage/PageCache/etc/adminhtml/system.xml new file mode 100644 index 0000000000000000000000000000000000000000..a0fe32c07a29a0546d632fc4f0005b69d986fab1 --- /dev/null +++ b/app/code/core/Mage/PageCache/etc/adminhtml/system.xml @@ -0,0 +1,54 @@ +<?xml version="1.0"?> +<!-- +/** + * 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 Mage_PageCache + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> + <system> + <section id="system"> + <group id="external_page_cache" translate="label" showInDefault="1" showInWebsite="1" showInStore="1" sortOrder="500"> + <label>External Full Page Cache Settings</label> + <field id="enabled" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Enable External Cache</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="cookie_lifetime" translate="label comment" type="text" sortOrder="5" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Cookie Lifetime (seconds)</label> + <depends> + <field id="enabled">1</field> + </depends> + <comment>If empty, default value will be used.</comment> + </field> + <field id="control" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>External Cache Control</label> + <source_model>Mage_PageCache_Model_System_Config_Source_Controls</source_model> + <depends> + <field id="enabled">1</field> + </depends> + </field> + </group> + </section> + </system> +</config> diff --git a/app/code/core/Mage/PageCache/etc/system.xml b/app/code/core/Mage/PageCache/etc/system.xml deleted file mode 100644 index d1fe46e68a86e24b9d5fcb03814cc3843d92b564..0000000000000000000000000000000000000000 --- a/app/code/core/Mage/PageCache/etc/system.xml +++ /dev/null @@ -1,73 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * 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 Mage_PageCache - * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<config> - <sections> - <system> - <groups> - <external_page_cache translate="label"> - <label>External Full Page Cache Settings</label> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <sort_order>500</sort_order> - <fields> - <enabled translate="label"> - <label>Enable External Cache</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </enabled> - <cookie_lifetime translate="label comment"> - <label>Cookie Lifetime (seconds)</label> - <frontend_type>text</frontend_type> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - <depends><enabled>1</enabled></depends> - <comment>If empty, default value will be used.</comment> - </cookie_lifetime> - <control translate="label"> - <label>External Cache Control</label> - <frontend_type>select</frontend_type> - <source_model>Mage_PageCache_Model_System_Config_Source_Controls</source_model> - <sort_order>10</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - <depends><enabled>1</enabled></depends> - </control> - </fields> - </external_page_cache> - </groups> - </system> - </sections> -</config> diff --git a/app/code/core/Mage/PageCache/view/frontend/cookie.phtml b/app/code/core/Mage/PageCache/view/frontend/cookie.phtml index 0856e1e10a995767beaef39adf40f2f073b892c4..1b1dac94d1361618d6e871f6d90c884fcf26b2bb 100644 --- a/app/code/core/Mage/PageCache/view/frontend/cookie.phtml +++ b/app/code/core/Mage/PageCache/view/frontend/cookie.phtml @@ -34,8 +34,8 @@ o.cookieExpireAt = $.cookie.defaults.expires; }); $.mage.load.jsSync( - "<?php echo $this->getSkinUrl('Mage_Page::js/cookies.js')?>", - "<?php echo $this->getSkinUrl('Mage_PageCache::js/cookie.js')?>" + "<?php echo $this->getViewFileUrl('Mage_Page::js/cookies.js')?>", + "<?php echo $this->getViewFileUrl('Mage_PageCache::js/cookie.js')?>" ); })(jQuery); //]]> diff --git a/app/code/core/Mage/Paygate/Block/Authorizenet/Form/Cc.php b/app/code/core/Mage/Paygate/Block/Authorizenet/Form/Cc.php index b6f499a82419a6de68b671a4f61137ab337fc28c..63f2f5b1de86e46da3fdb6af420b665b348add87 100644 --- a/app/code/core/Mage/Paygate/Block/Authorizenet/Form/Cc.php +++ b/app/code/core/Mage/Paygate/Block/Authorizenet/Form/Cc.php @@ -70,7 +70,7 @@ class Mage_Paygate_Block_Authorizenet_Form_Cc extends Mage_Payment_Block_Form */ public function getAdminCancelUrl() { - return Mage::getModel('Mage_Adminhtml_Model_Url')->getUrl('adminhtml/paygate_authorizenet_payment/cancel'); + return Mage::getSingleton('Mage_Backend_Model_Url')->getUrl('adminhtml/paygate_authorizenet_payment/cancel'); } /** diff --git a/app/code/core/Mage/Paygate/etc/adminhtml/system.xml b/app/code/core/Mage/Paygate/etc/adminhtml/system.xml new file mode 100644 index 0000000000000000000000000000000000000000..108e12a9476b73427d6cb4400465da5f283be538 --- /dev/null +++ b/app/code/core/Mage/Paygate/etc/adminhtml/system.xml @@ -0,0 +1,139 @@ +<?xml version="1.0"?> +<!-- +/** + * 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 Mage_Paygate + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> + <system> + <section id="payment"> + <group id="authorizenet" translate="label" module="Mage_Paygate" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Authorize.net</label> + <comment> + <![CDATA[<a href="http://celinks.magento.com/authorize_netRegistration" target="_blank">Click here to sign up for an Authorize.net account</a>]]> +</comment> + <field id="active" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Enabled</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="cctypes" translate="label" type="multiselect" sortOrder="15" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Credit Card Types</label> + <source_model>Mage_Paygate_Model_Authorizenet_Source_Cctype</source_model> + </field> + <field id="useccv" translate="label" type="select" sortOrder="16" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Credit Card Verification</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="email_customer" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Email Customer</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="login" translate="label" type="obscure" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>API Login ID</label> + <backend_model>Mage_Backend_Model_Config_Backend_Encrypted</backend_model> + </field> + <field id="merchant_email" translate="label" type="text" sortOrder="11" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Merchant's Email</label> + <validate>validate-email</validate> + </field> + <field id="order_status" translate="label" type="select" sortOrder="4" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>New Order Status</label> + <source_model>Mage_Sales_Model_Config_Source_Order_Status_Processing</source_model> + </field> + <field id="sort_order" translate="label" type="text" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Sort Order</label> + </field> + <field id="test" translate="label" type="select" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Test Mode</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="debug" translate="label" type="select" sortOrder="6" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Debug</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="title" translate="label" type="text" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Title</label> + </field> + <field id="trans_key" translate="label" type="obscure" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Transaction Key</label> + <backend_model>Mage_Backend_Model_Config_Backend_Encrypted</backend_model> + </field> + <field id="payment_action" translate="label" type="select" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Payment Action</label> + <source_model>Mage_Paygate_Model_Authorizenet_Source_PaymentAction</source_model> + </field> + <field id="cgi_url" type="text" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Gateway URL</label> + </field> + <field id="currency" translate="label" type="select" sortOrder="6" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Accepted Currency</label> + <source_model>Mage_Backend_Model_Config_Source_Currency</source_model> + </field> + <field id="allowspecific" translate="label" type="allowspecific" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Payment from Applicable Countries</label> + <source_model>Mage_Payment_Model_Config_Source_Allspecificcountries</source_model> + </field> + <field id="specificcountry" translate="label" type="multiselect" sortOrder="51" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Payment from Specific Countries</label> + <source_model>Mage_Directory_Model_Config_Source_Country</source_model> + </field> + <field id="min_order_total" translate="label" type="text" sortOrder="98" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Minimum Order Total</label> + </field> + <field id="max_order_total" translate="label" type="text" sortOrder="99" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Maximum Order Total</label> + </field> + <field id="allow_partial_authorization" translate="label" type="select" sortOrder="110" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Allow Partial Authorization</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="heading_3dsecure" translate="label" sortOrder="120" showInDefault="1" showInWebsite="1"> + <label>3D Secure</label> + <frontend_model>Mage_Backend_Block_System_Config_Form_Field_Heading</frontend_model> + </field> + <field id="centinel" translate="label" type="select" sortOrder="125" showInDefault="1" showInWebsite="1"> + <label>3D Secure Card Validation</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="centinel_is_mode_strict" translate="label comment" type="select" sortOrder="130" showInDefault="1" showInWebsite="1"> + <label>Severe 3D Secure Card Validation</label> + <comment>Severe Validation Removes Chargeback Liability on Merchant</comment> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + <depends> + <field id="centinel">1</field> + </depends> + </field> + <field id="centinel_api_url" translate="label comment" type="text" sortOrder="135" showInDefault="1" showInWebsite="1"> + <label>Centinel API URL</label> + <comment>If empty, a default value will be used. Custom URL may be provided by CardinalCommerce agreement.</comment> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + <depends> + <field id="centinel">1</field> + </depends> + </field> + <field id="model"></field> + </group> + </section> + </system> +</config> diff --git a/app/code/core/Mage/Paygate/etc/config.xml b/app/code/core/Mage/Paygate/etc/config.xml index 92de1d09d420058abc005f4f9cc0d46da34240aa..b1433b7b816215bfd7ae8dea87df2cfe3852b307 100644 --- a/app/code/core/Mage/Paygate/etc/config.xml +++ b/app/code/core/Mage/Paygate/etc/config.xml @@ -98,14 +98,14 @@ <cgi_url>https://secure.authorize.net/gateway/transact.dll</cgi_url> <debug>0</debug> <email_customer>0</email_customer> - <login backend_model="Mage_Adminhtml_Model_System_Config_Backend_Encrypted"/> + <login backend_model="Mage_Backend_Model_Config_Backend_Encrypted"/> <merchant_email/> <model>Mage_Paygate_Model_Authorizenet</model> <order_status>processing</order_status> <payment_action>authorize</payment_action> <test>1</test> <title>Credit Card (Authorize.net)</title> - <trans_key backend_model="Mage_Adminhtml_Model_System_Config_Backend_Encrypted"/> + <trans_key backend_model="Mage_Backend_Model_Config_Backend_Encrypted"/> <allowspecific>0</allowspecific> <currency>USD</currency> <partial_authorization_checksum_checking>1</partial_authorization_checksum_checking> diff --git a/app/code/core/Mage/Paygate/etc/system.xml b/app/code/core/Mage/Paygate/etc/system.xml deleted file mode 100644 index aa2190c558ecacfc4f898578aaa58d7f6aac8f3c..0000000000000000000000000000000000000000 --- a/app/code/core/Mage/Paygate/etc/system.xml +++ /dev/null @@ -1,258 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * 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 Mage_Paygate - * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<config> - <sections> - <payment> - <groups> - <authorizenet translate="label" module="Mage_Paygate"> - <label>Authorize.net</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> - <comment><![CDATA[<a href="http://celinks.magento.com/authorize_netRegistration" target="_blank">Click here to sign up for an Authorize.net account</a>]]></comment> - <fields> - <active translate="label"> - <label>Enabled</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </active> - <cctypes translate="label"> - <label>Credit Card Types</label> - <frontend_type>multiselect</frontend_type> - <source_model>Mage_Paygate_Model_Authorizenet_Source_Cctype</source_model> - <sort_order>15</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </cctypes> - <useccv translate="label"> - <label>Credit Card Verification</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>16</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </useccv> - <email_customer translate="label"> - <label>Email Customer</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>10</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </email_customer> - <login translate="label"> - <label>API Login ID</label> - <frontend_type>obscure</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Encrypted</backend_model> - <sort_order>2</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </login> - <merchant_email translate="label"> - <label>Merchant's Email</label> - <frontend_type>text</frontend_type> - <validate>validate-email</validate> - <sort_order>11</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </merchant_email> - <order_status translate="label"> - <label>New Order Status</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Order_Status_Processing</source_model> - <sort_order>4</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </order_status> - <sort_order translate="label"> - <label>Sort Order</label> - <frontend_type>text</frontend_type> - <sort_order>100</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </sort_order> - <test translate="label"> - <label>Test Mode</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </test> - <debug translate="label"> - <label>Debug</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>6</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </debug> - <title translate="label"> - <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> - </title> - <trans_key translate="label"> - <label>Transaction Key</label> - <frontend_type>obscure</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Encrypted</backend_model> - <sort_order>3</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </trans_key> - <payment_action translate="label"> - <label>Payment Action</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Paygate_Model_Authorizenet_Source_PaymentAction</source_model> - <sort_order>2</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </payment_action> - <cgi_url> - <label>Gateway URL</label> - <frontend_type>text</frontend_type> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </cgi_url> - <currency translate="label"> - <label>Accepted Currency</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Currency</source_model> - <sort_order>6</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </currency> - <allowspecific translate="label"> - <label>Payment from Applicable Countries</label> - <frontend_type>allowspecific</frontend_type> - <sort_order>50</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Payment_Allspecificcountries</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </allowspecific> - <specificcountry translate="label"> - <label>Payment from Specific Countries</label> - <frontend_type>multiselect</frontend_type> - <sort_order>51</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Country</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </specificcountry> - <min_order_total translate="label"> - <label>Minimum Order Total</label> - <frontend_type>text</frontend_type> - <sort_order>98</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </min_order_total> - <max_order_total translate="label"> - <label>Maximum Order Total</label> - <frontend_type>text</frontend_type> - <sort_order>99</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </max_order_total> - <allow_partial_authorization translate="label"> - <label>Allow Partial Authorization</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>110</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </allow_partial_authorization> - <heading_3dsecure translate="label"> - <label>3D Secure</label> - <frontend_model>Mage_Adminhtml_Block_System_Config_Form_Field_Heading</frontend_model> - <sort_order>120</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </heading_3dsecure> - <centinel translate="label"> - <label>3D Secure Card Validation</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>125</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </centinel> - <centinel_is_mode_strict translate="label comment"> - <label>Severe 3D Secure Card Validation</label> - <comment>Severe Validation Removes Chargeback Liability on Merchant</comment> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>130</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <depends><centinel>1</centinel></depends> - </centinel_is_mode_strict> - <centinel_api_url translate="label comment"> - <label>Centinel API URL</label> - <comment>If empty, a default value will be used. Custom URL may be provided by CardinalCommerce agreement.</comment> - <frontend_type>text</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>135</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <depends><centinel>1</centinel></depends> - </centinel_api_url> - <model> - </model> - </fields> - </authorizenet> - </groups> - </payment> - </sections> -</config> diff --git a/app/code/core/Mage/Paygate/view/frontend/form/cc.phtml b/app/code/core/Mage/Paygate/view/frontend/form/cc.phtml index 3cbe429207826280473fa2a4ccc2035715601147..3f4b749787bb80fcc928bae24b00fe393c707b13 100644 --- a/app/code/core/Mage/Paygate/view/frontend/form/cc.phtml +++ b/app/code/core/Mage/Paygate/view/frontend/form/cc.phtml @@ -84,7 +84,7 @@ //]]> </script> <span id="cancel-please-wait" class="please-wait" style="display:none"> - <img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" alt="" class="v-middle" /> <?php echo $this->__('Processing...') ?> + <img src="<?php echo $this->getViewFileUrl('images/opc-ajax-loader.gif') ?>" alt="" class="v-middle" /> <?php echo $this->__('Processing...') ?> </span> <?php endif;?> </div> diff --git a/app/code/core/Mage/Payment/Block/Catalog/Product/View/Profile.php b/app/code/core/Mage/Payment/Block/Catalog/Product/View/Profile.php index d240b2cd088253064ddb8a92de5fd0acaf9fdd73..9c0713e211d4fc11998734ae9c3e820efaf160d9 100644 --- a/app/code/core/Mage/Payment/Block/Catalog/Product/View/Profile.php +++ b/app/code/core/Mage/Payment/Block/Catalog/Product/View/Profile.php @@ -67,7 +67,7 @@ class Mage_Payment_Block_Catalog_Product_View_Profile extends Mage_Core_Block_Te ->setId('recurring_start_date') ->setName(Mage_Payment_Model_Recurring_Profile::BUY_REQUEST_START_DATETIME) ->setClass('datetime-picker input-text') - ->setImage($this->getSkinUrl('Mage_Core::calendar.gif')) + ->setImage($this->getViewFileUrl('Mage_Core::calendar.gif')) ->setDateFormat(Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT)) ->setTimeFormat(Mage::app()->getLocale()->getTimeFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT)); return $calendar->getHtml(); diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Payment/Allmethods.php b/app/code/core/Mage/Payment/Model/Config/Source/Allmethods.php similarity index 89% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Payment/Allmethods.php rename to app/code/core/Mage/Payment/Model/Config/Source/Allmethods.php index 350f10a4e4d1ff6fbbafef4f5a58763e92010bf1..f0a14760b603534826df7770e9e4e92714f785fd 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Payment/Allmethods.php +++ b/app/code/core/Mage/Payment/Model/Config/Source/Allmethods.php @@ -19,12 +19,12 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Payment * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Adminhtml_Model_System_Config_Source_Payment_Allmethods +class Mage_Payment_Model_Config_Source_Allmethods implements Mage_Core_Model_Option_ArrayInterface { public function toOptionArray() { diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Design/Package.php b/app/code/core/Mage/Payment/Model/Config/Source/Allowedmethods.php similarity index 78% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Design/Package.php rename to app/code/core/Mage/Payment/Model/Config/Source/Allowedmethods.php index b9b0e7f08c2f052e77f0c3125415b0287de97fab..58a609aa8de7c5ffa8889edf75a50bb65069e706 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Design/Package.php +++ b/app/code/core/Mage/Payment/Model/Config/Source/Allowedmethods.php @@ -19,17 +19,16 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Payment * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Adminhtml_Model_System_Config_Source_Design_Package -{ - public function toOptionArray() +class Mage_Payment_Model_Config_Source_Allowedmethods + extends Mage_Payment_Model_Config_Source_Allmethods +{ + protected function _getPaymentMethods() { - $dir = new Varien_Io_File(); - #$dir->open(array('path'=>Mage::getStore)) + return Mage::getSingleton('Mage_Payment_Model_Config')->getActiveMethods(); } - } diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Shipping/Allspecificcountries.php b/app/code/core/Mage/Payment/Model/Config/Source/Allspecificcountries.php similarity index 74% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Shipping/Allspecificcountries.php rename to app/code/core/Mage/Payment/Model/Config/Source/Allspecificcountries.php index 5c3b9728a875aed22bbc1fcda4395a926c807c3f..1b53ba3973e5a7a021add487be47eb2412c1e0cc 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Shipping/Allspecificcountries.php +++ b/app/code/core/Mage/Payment/Model/Config/Source/Allspecificcountries.php @@ -19,19 +19,19 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Payment * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Adminhtml_Model_System_Config_Source_Shipping_Allspecificcountries +class Mage_Payment_Model_Config_Source_Allspecificcountries implements Mage_Core_Model_Option_ArrayInterface { public function toOptionArray() { return array( - array('value'=>0, 'label'=>Mage::helper('Mage_Adminhtml_Helper_Data')->__('All Allowed Countries')), - array('value'=>1, 'label'=>Mage::helper('Mage_Adminhtml_Helper_Data')->__('Specific Countries')), + array('value'=>0, 'label'=>Mage::helper('Mage_Payment_Helper_Data')->__('All Allowed Countries')), + array('value'=>1, 'label'=>Mage::helper('Mage_Payment_Helper_Data')->__('Specific Countries')), ); } } diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Payment/Cctype.php b/app/code/core/Mage/Payment/Model/Config/Source/Cctype.php similarity index 91% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Payment/Cctype.php rename to app/code/core/Mage/Payment/Model/Config/Source/Cctype.php index a23ba7937f1b7e3fac40b515127fb754089da81d..2e56290679f0c0a91b067117aa53987e0ca8f8d7 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Payment/Cctype.php +++ b/app/code/core/Mage/Payment/Model/Config/Source/Cctype.php @@ -19,12 +19,12 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Payment * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Adminhtml_Model_System_Config_Source_Payment_Cctype +class Mage_Payment_Model_Config_Source_Cctype implements Mage_Core_Model_Option_ArrayInterface { public function toOptionArray() { diff --git a/app/code/core/Mage/Payment/etc/adminhtml/system.xml b/app/code/core/Mage/Payment/etc/adminhtml/system.xml new file mode 100644 index 0000000000000000000000000000000000000000..eb8537ce25910a20f8437916b75ea232c0b115bd --- /dev/null +++ b/app/code/core/Mage/Payment/etc/adminhtml/system.xml @@ -0,0 +1,279 @@ +<?xml version="1.0"?> +<!-- +/** + * 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 Mage_Payment + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> + <system> + <section id="payment" translate="label" module="Mage_Payment" type="text" sortOrder="400" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Payment Methods</label> + <tab>sales</tab> + <resource>Mage_Payment::payment</resource> + <group id="ccsave" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Saved CC</label> + <field id="active" translate="label comment" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Enabled</label> + <comment>Enabling this method will store credit card information in the database, which may increase your security or compliance requirements.</comment> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="cctypes" translate="label" type="multiselect" sortOrder="4" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Credit Card Types</label> + <source_model>Mage_Payment_Model_Config_Source_Cctype</source_model> + <can_be_empty>1</can_be_empty> + </field> + <field id="order_status" translate="label" type="select" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>New Order Status</label> + <source_model>Mage_Sales_Model_Config_Source_Order_Status_New</source_model> + </field> + <field id="sort_order" translate="label" type="text" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Sort Order</label> + <frontend_class>validate-number</frontend_class> + </field> + <field id="title" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Title</label> + </field> + <field id="useccv" translate="label" type="select" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Request Card Security Code</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="centinel" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>3D Secure Card Validation</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="centinel_is_mode_strict" translate="label comment" type="select" sortOrder="25" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Severe 3D Secure Card Validation</label> + <comment>Severe validation removes chargeback liability on merchant.</comment> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + <depends> + <field id="centinel">1</field> + </depends> + </field> + <field id="centinel_api_url" translate="label comment" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Centinel API URL</label> + <comment>A value is required for live mode. Refer to your CardinalCommerce agreement.</comment> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + <depends> + <field id="centinel">1</field> + </depends> + </field> + <field id="allowspecific" translate="label" type="allowspecific" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Payment from Applicable Countries</label> + <source_model>Mage_Payment_Model_Config_Source_Allspecificcountries</source_model> + </field> + <field id="specificcountry" translate="label" type="multiselect" sortOrder="51" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Payment from Specific Countries</label> + <source_model>Mage_Directory_Model_Config_Source_Country</source_model> + <can_be_empty>1</can_be_empty> + </field> + <field id="min_order_total" translate="label" type="text" sortOrder="98" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Minimum Order Total</label> + </field> + <field id="max_order_total" translate="label" type="text" sortOrder="99" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Maximum Order Total</label> + </field> + <field id="model"></field> + </group> + <group id="checkmo" translate="label" type="text" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Check / Money Order</label> + <field id="active" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Enabled</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="order_status" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>New Order Status</label> + <source_model>Mage_Sales_Model_Config_Source_Order_Status_New</source_model> + </field> + <field id="sort_order" translate="label" type="text" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Sort Order</label> + <frontend_class>validate-number</frontend_class> + </field> + <field id="title" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Title</label> + </field> + <field id="allowspecific" translate="label" type="allowspecific" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Payment from Applicable Countries</label> + <source_model>Mage_Payment_Model_Config_Source_Allspecificcountries</source_model> + </field> + <field id="specificcountry" translate="label" type="multiselect" sortOrder="51" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Payment from Specific Countries</label> + <source_model>Mage_Directory_Model_Config_Source_Country</source_model> + <can_be_empty>1</can_be_empty> + </field> + <field id="payable_to" translate="label" sortOrder="61" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Make Check Payable to</label> + </field> + <field id="mailing_address" translate="label" type="textarea" sortOrder="62" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Send Check to</label> + </field> + <field id="min_order_total" translate="label" type="text" sortOrder="98" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Minimum Order Total</label> + </field> + <field id="max_order_total" translate="label" type="text" sortOrder="99" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Maximum Order Total</label> + </field> + <field id="model"></field> + </group> + <group id="free" translate="label" type="text" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Zero Subtotal Checkout</label> + <field id="active" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Enabled</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="order_status" translate="label" type="select" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>New Order Status</label> + <source_model>Mage_Sales_Model_Config_Source_Order_Status_Newprocessing</source_model> + </field> + <field id="payment_action" translate="label" type="select" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Automatically Invoice All Items</label> + <source_model>Mage_Payment_Model_Source_Invoice</source_model> + <depends> + <field id="order_status" separator=",">processing,processed_ogone</field> + </depends> + </field> + <field id="sort_order" translate="label" type="text" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Sort Order</label> + <frontend_class>validate-number</frontend_class> + </field> + <field id="title" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Title</label> + </field> + <field id="allowspecific" translate="label" type="allowspecific" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Payment from Applicable Countries</label> + <source_model>Mage_Payment_Model_Config_Source_Allspecificcountries</source_model> + </field> + <field id="specificcountry" translate="label" type="multiselect" sortOrder="51" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Payment from Specific Countries</label> + <source_model>Mage_Directory_Model_Config_Source_Country</source_model> + <can_be_empty>1</can_be_empty> + </field> + <field id="model"></field> + </group> + <group id="purchaseorder" translate="label" type="text" sortOrder="7" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Purchase Order</label> + <field id="active" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Enabled</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="order_status" translate="label" type="select" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>New Order Status</label> + <source_model>Mage_Sales_Model_Config_Source_Order_Status_New</source_model> + </field> + <field id="sort_order" translate="label" type="text" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Sort Order</label> + <frontend_class>validate-number</frontend_class> + </field> + <field id="title" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Title</label> + </field> + <field id="allowspecific" translate="label" type="allowspecific" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Payment from Applicable Countries</label> + <source_model>Mage_Payment_Model_Config_Source_Allspecificcountries</source_model> + </field> + <field id="specificcountry" translate="label" type="multiselect" sortOrder="51" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Payment from Specific Countries</label> + <source_model>Mage_Directory_Model_Config_Source_Country</source_model> + <can_be_empty>1</can_be_empty> + </field> + <field id="min_order_total" translate="label" type="text" sortOrder="98" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Minimum Order Total</label> + </field> + <field id="max_order_total" translate="label" type="text" sortOrder="99" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Maximum Order Total</label> + </field> + <field id="model"></field> + </group> + <group id="banktransfer" translate="label" type="text" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Bank Transfer Payment</label> + <field id="active" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Enabled</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="title" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Title</label> + </field> + <field id="order_status" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>New Order Status</label> + <source_model>Mage_Sales_Model_Config_Source_Order_Status_New</source_model> + </field> + <field id="allowspecific" translate="label" type="allowspecific" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Payment from Applicable Countries</label> + <source_model>Mage_Payment_Model_Config_Source_Allspecificcountries</source_model> + </field> + <field id="specificcountry" translate="label" type="multiselect" sortOrder="51" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Payment from Specific Countries</label> + <source_model>Mage_Directory_Model_Config_Source_Country</source_model> + <can_be_empty>1</can_be_empty> + </field> + <field id="instructions" translate="label" type="textarea" sortOrder="62" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Instructions</label> + </field> + <field id="min_order_total" translate="label" type="text" sortOrder="98" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Minimum Order Total</label> + </field> + <field id="max_order_total" translate="label" type="text" sortOrder="99" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Maximum Order Total</label> + </field> + <field id="sort_order" translate="label" type="text" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Sort Order</label> + </field> + </group> + <group id="cashondelivery" translate="label" type="text" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Cash On Delivery Payment</label> + <field id="active" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Enabled</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="title" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Title</label> + </field> + <field id="order_status" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>New Order Status</label> + <source_model>Mage_Sales_Model_Config_Source_Order_Status_New</source_model> + </field> + <field id="allowspecific" translate="label" type="allowspecific" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Payment from Applicable Countries</label> + <source_model>Mage_Payment_Model_Config_Source_Allspecificcountries</source_model> + </field> + <field id="specificcountry" translate="label" type="multiselect" sortOrder="51" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Payment from Specific Countries</label> + <source_model>Mage_Directory_Model_Config_Source_Country</source_model> + <can_be_empty>1</can_be_empty> + </field> + <field id="instructions" translate="label" type="textarea" sortOrder="62" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Instructions</label> + </field> + <field id="min_order_total" translate="label" type="text" sortOrder="98" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Minimum Order Total</label> + </field> + <field id="max_order_total" translate="label" type="text" sortOrder="99" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Maximum Order Total</label> + </field> + <field id="sort_order" translate="label" type="text" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Sort Order</label> + </field> + </group> + </section> + </system> +</config> diff --git a/app/code/core/Mage/Payment/etc/system.xml b/app/code/core/Mage/Payment/etc/system.xml deleted file mode 100644 index 008e6d18b92add4764b0af33cb017357a929454c..0000000000000000000000000000000000000000 --- a/app/code/core/Mage/Payment/etc/system.xml +++ /dev/null @@ -1,627 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * 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 Mage_Payment - * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<config> - <sections> - <payment translate="label" module="Mage_Payment"> - <label>Payment Methods</label> - <tab>sales</tab> - <frontend_type>text</frontend_type> - <sort_order>400</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <resource>Mage_Payment::payment</resource> - <groups> - <ccsave translate="label"> - <label>Saved CC</label> - <frontend_type>text</frontend_type> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <active translate="label comment"> - <label>Enabled</label> - <comment>Enabling this method will store credit card information in the database, which may increase your security or compliance requirements.</comment> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </active> - <cctypes translate="label"> - <label>Credit Card Types</label> - <frontend_type>multiselect</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Payment_Cctype</source_model> - <sort_order>4</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <can_be_empty>1</can_be_empty> - </cctypes> - <order_status translate="label"> - <label>New Order Status</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Order_Status_New</source_model> - <sort_order>2</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </order_status> - <sort_order translate="label"> - <label>Sort Order</label> - <frontend_type>text</frontend_type> - <sort_order>100</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <frontend_class>validate-number</frontend_class> - </sort_order> - <title translate="label"> - <label>Title</label> - <frontend_type>text</frontend_type> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </title> - <useccv translate="label"> - <label>Request Card Security Code</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </useccv> - - <centinel translate="label"> - <label>3D Secure Card Validation</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </centinel> - <centinel_is_mode_strict translate="label comment"> - <label>Severe 3D Secure Card Validation</label> - <comment>Severe validation removes chargeback liability on merchant.</comment> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>25</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <depends><centinel>1</centinel></depends> - </centinel_is_mode_strict> - <centinel_api_url translate="label comment"> - <label>Centinel API URL</label> - <comment>A value is required for live mode. Refer to your CardinalCommerce agreement.</comment> - <frontend_type>text</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <depends><centinel>1</centinel></depends> - </centinel_api_url> - - <allowspecific translate="label"> - <label>Payment from Applicable Countries</label> - <frontend_type>allowspecific</frontend_type> - <sort_order>50</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Payment_Allspecificcountries</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </allowspecific> - <specificcountry translate="label"> - <label>Payment from Specific Countries</label> - <frontend_type>multiselect</frontend_type> - <sort_order>51</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Country</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <can_be_empty>1</can_be_empty> - </specificcountry> - <min_order_total translate="label"> - <label>Minimum Order Total</label> - <frontend_type>text</frontend_type> - <sort_order>98</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </min_order_total> - <max_order_total translate="label"> - <label>Maximum Order Total</label> - <frontend_type>text</frontend_type> - <sort_order>99</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </max_order_total> - <model> - </model> - </fields> - </ccsave> - <checkmo translate="label"> - <label>Check / Money Order</label> - <frontend_type>text</frontend_type> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <active translate="label"> - <label>Enabled</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </active> - <order_status translate="label"> - <label>New Order Status</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Order_Status_New</source_model> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </order_status> - <sort_order translate="label"> - <label>Sort Order</label> - <frontend_type>text</frontend_type> - <sort_order>100</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <frontend_class>validate-number</frontend_class> - </sort_order> - <title translate="label"> - <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> - </title> - <allowspecific translate="label"> - <label>Payment from Applicable Countries</label> - <frontend_type>allowspecific</frontend_type> - <sort_order>50</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Payment_Allspecificcountries</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </allowspecific> - <specificcountry translate="label"> - <label>Payment from Specific Countries</label> - <frontend_type>multiselect</frontend_type> - <sort_order>51</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Country</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <can_be_empty>1</can_be_empty> - </specificcountry> - <payable_to translate="label"> - <label>Make Check Payable to</label> - <sort_order>61</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </payable_to> - <mailing_address translate="label"> - <label>Send Check to</label> - <frontend_type>textarea</frontend_type> - <sort_order>62</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </mailing_address> - <min_order_total translate="label"> - <label>Minimum Order Total</label> - <frontend_type>text</frontend_type> - <sort_order>98</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </min_order_total> - <max_order_total translate="label"> - <label>Maximum Order Total</label> - <frontend_type>text</frontend_type> - <sort_order>99</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </max_order_total> - <model> - </model> - </fields> - </checkmo> - <free translate="label"> - <label>Zero Subtotal Checkout</label> - <frontend_type>text</frontend_type> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <active translate="label"> - <label>Enabled</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </active> - <order_status translate="label"> - <label>New Order Status</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Order_Status_Newprocessing</source_model> - <sort_order>2</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </order_status> - <payment_action translate="label"> - <label>Automatically Invoice All Items</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Payment_Model_Source_Invoice</source_model> - <sort_order>3</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <depends> - <order_status separator=",">processing,processed_ogone</order_status> - </depends> - </payment_action> - <sort_order translate="label"> - <label>Sort Order</label> - <frontend_type>text</frontend_type> - <sort_order>100</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <frontend_class>validate-number</frontend_class> - </sort_order> - <title translate="label"> - <label>Title</label> - <frontend_type>text</frontend_type> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </title> - <allowspecific translate="label"> - <label>Payment from Applicable Countries</label> - <frontend_type>allowspecific</frontend_type> - <sort_order>50</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Payment_Allspecificcountries</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </allowspecific> - <specificcountry translate="label"> - <label>Payment from Specific Countries</label> - <frontend_type>multiselect</frontend_type> - <sort_order>51</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Country</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <can_be_empty>1</can_be_empty> - </specificcountry> -<!-- - <min_order_total translate="label"> - <label>Minimum Order Total</label> - <frontend_type>text</frontend_type> - <sort_order>98</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </min_order_total> - <max_order_total translate="label"> - <label>Maximum Order Total</label> - <frontend_type>text</frontend_type> - <sort_order>99</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </max_order_total> ---> - <model> - </model> - </fields> - </free> - <purchaseorder translate="label"> - <label>Purchase Order</label> - <frontend_type>text</frontend_type> - <sort_order>7</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <active translate="label"> - <label>Enabled</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </active> - <order_status translate="label"> - <label>New Order Status</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Order_Status_New</source_model> - <sort_order>2</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </order_status> - <sort_order translate="label"> - <label>Sort Order</label> - <frontend_type>text</frontend_type> - <sort_order>100</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <frontend_class>validate-number</frontend_class> - </sort_order> - <title translate="label"> - <label>Title</label> - <frontend_type>text</frontend_type> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </title> - <allowspecific translate="label"> - <label>Payment from Applicable Countries</label> - <frontend_type>allowspecific</frontend_type> - <sort_order>50</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Payment_Allspecificcountries</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </allowspecific> - <specificcountry translate="label"> - <label>Payment from Specific Countries</label> - <frontend_type>multiselect</frontend_type> - <sort_order>51</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Country</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <can_be_empty>1</can_be_empty> - </specificcountry> - <min_order_total translate="label"> - <label>Minimum Order Total</label> - <frontend_type>text</frontend_type> - <sort_order>98</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </min_order_total> - <max_order_total translate="label"> - <label>Maximum Order Total</label> - <frontend_type>text</frontend_type> - <sort_order>99</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </max_order_total> - <model> - </model> - </fields> - </purchaseorder> - <banktransfer translate="label"> - <label>Bank Transfer Payment</label> - <frontend_type>text</frontend_type> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <active translate="label"> - <label>Enabled</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </active> - <title translate="label"> - <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> - </title> - <order_status translate="label"> - <label>New Order Status</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Order_Status_New</source_model> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </order_status> - <allowspecific translate="label"> - <label>Payment from Applicable Countries</label> - <frontend_type>allowspecific</frontend_type> - <sort_order>50</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Payment_Allspecificcountries</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </allowspecific> - <specificcountry translate="label"> - <label>Payment from Specific Countries</label> - <frontend_type>multiselect</frontend_type> - <sort_order>51</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Country</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <can_be_empty>1</can_be_empty> - </specificcountry> - <instructions translate="label"> - <label>Instructions</label> - <frontend_type>textarea</frontend_type> - <sort_order>62</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </instructions> - <min_order_total translate="label"> - <label>Minimum Order Total</label> - <frontend_type>text</frontend_type> - <sort_order>98</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </min_order_total> - <max_order_total translate="label"> - <label>Maximum Order Total</label> - <frontend_type>text</frontend_type> - <sort_order>99</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </max_order_total> - <sort_order translate="label"> - <label>Sort Order</label> - <frontend_type>text</frontend_type> - <sort_order>100</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </sort_order> - </fields> - </banktransfer> - <cashondelivery translate="label"> - <label>Cash On Delivery Payment</label> - <frontend_type>text</frontend_type> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <active translate="label"> - <label>Enabled</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </active> - <title translate="label"> - <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> - </title> - <order_status translate="label"> - <label>New Order Status</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Order_Status_New</source_model> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </order_status> - <allowspecific translate="label"> - <label>Payment from Applicable Countries</label> - <frontend_type>allowspecific</frontend_type> - <sort_order>50</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Payment_Allspecificcountries</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </allowspecific> - <specificcountry translate="label"> - <label>Payment from Specific Countries</label> - <frontend_type>multiselect</frontend_type> - <sort_order>51</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Country</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <can_be_empty>1</can_be_empty> - </specificcountry> - <instructions translate="label"> - <label>Instructions</label> - <frontend_type>textarea</frontend_type> - <sort_order>62</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </instructions> - <min_order_total translate="label"> - <label>Minimum Order Total</label> - <frontend_type>text</frontend_type> - <sort_order>98</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </min_order_total> - <max_order_total translate="label"> - <label>Maximum Order Total</label> - <frontend_type>text</frontend_type> - <sort_order>99</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </max_order_total> - <sort_order translate="label"> - <label>Sort Order</label> - <frontend_type>text</frontend_type> - <sort_order>100</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </sort_order> - </fields> - </cashondelivery> - </groups> - </payment> - </sections> -</config> diff --git a/app/code/core/Mage/Paypal/Block/Adminhtml/System/Config/ApiWizard.php b/app/code/core/Mage/Paypal/Block/Adminhtml/System/Config/ApiWizard.php index 8b7d4d9192adb4cf5d8ddd04c95aca55800724cb..fb0584edab80b9c7dbfdbe712e999e17bb9a0eb8 100644 --- a/app/code/core/Mage/Paypal/Block/Adminhtml/System/Config/ApiWizard.php +++ b/app/code/core/Mage/Paypal/Block/Adminhtml/System/Config/ApiWizard.php @@ -27,7 +27,7 @@ /** * Custom renderer for PayPal API credentials wizard popup */ -class Mage_Paypal_Block_Adminhtml_System_Config_ApiWizard extends Mage_Adminhtml_Block_System_Config_Form_Field +class Mage_Paypal_Block_Adminhtml_System_Config_ApiWizard extends Mage_Backend_Block_System_Config_Form_Field { /** * Set template to itself diff --git a/app/code/core/Mage/Paypal/Helper/Data.php b/app/code/core/Mage/Paypal/Helper/Data.php index 8a9674fd66f9d20f3cf7042465e351c163f31294..bd9ac2ff216080a64971f178050226584ab44451 100644 --- a/app/code/core/Mage/Paypal/Helper/Data.php +++ b/app/code/core/Mage/Paypal/Helper/Data.php @@ -63,11 +63,12 @@ class Mage_Paypal_Helper_Data extends Mage_Core_Helper_Abstract * @return string */ public function getElementBackendConfig(Varien_Data_Form_Element_Abstract $element) { - $config = $element->getFieldConfig()->backend_congif; - if (!$config) { + $config = $element->getFieldConfig(); + if (!array_key_exists('backend_congif', $config)) { return false; } - $config = $config->asCanonicalArray(); + + $config = $config['backend_congif']; if (isset($config['enable_for_countries'])) { $config['enable_for_countries'] = explode(',', str_replace(' ', '', $config['enable_for_countries'])); } diff --git a/app/code/core/Mage/Paypal/etc/adminhtml/system.xml b/app/code/core/Mage/Paypal/etc/adminhtml/system.xml new file mode 100644 index 0000000000000000000000000000000000000000..4087b0eb5e5ad7911de32f2668ab76a7fbd6fb3b --- /dev/null +++ b/app/code/core/Mage/Paypal/etc/adminhtml/system.xml @@ -0,0 +1,1208 @@ +<?xml version="1.0"?> +<!-- +/** + * 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 Mage_Paypal + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> + <system> + <section id="payment"> + <group id="hint" sortOrder="0" showInDefault="1" showInWebsite="1" showInStore="1"> + <frontend_model>Mage_Paypal_Block_Adminhtml_System_Config_Fieldset_Hint</frontend_model> + </group> + </section> + <section id="paypal" translate="label" module="Mage_Paypal" type="text" sortOrder="350" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>PayPal</label> + <class>paypal-section</class> + <header_css>paypal-header</header_css> + <tab>sales</tab> + <resource>Mage_Paypal::paypal</resource> + <group id="account" translate="label" type="text" sortOrder="0" showInDefault="1" showInWebsite="1"> + <label>Merchant Account</label> + <fieldset_css>paypal-config</fieldset_css> + <expanded>1</expanded> + <field id="merchant_country" translate="label comment" type="select" showInDefault="1" showInWebsite="1" sortOrder="5"> + <label>Merchant Country</label> + <config_path>paypal/general/merchant_country</config_path> + <comment>If not specified, Default Country from General Config will be used</comment> + <source_model>Mage_Paypal_Model_System_Config_Source_MerchantCountry</source_model> + <backend_model>Mage_Paypal_Model_System_Config_Backend_MerchantCountry</backend_model> + </field> + <field id="business_account" translate="label comment tooltip" showInDefault="1" showInWebsite="1" sortOrder="10"> + <label>Email Associated with PayPal Merchant Account</label> + <comment> + <![CDATA[<a href="http://www.magentocommerce.com/paypal">Start accepting payments via PayPal!</a>]]> +</comment> + <tooltip>Don't have a PayPal account? Simply enter your email address.</tooltip> + <config_path>paypal/general/business_account</config_path> + <validate>validate-email</validate> + </field> + </group> + <group id="global" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1"> + <label>Select a PayPal Solution</label> + <help_url> + <![CDATA[https://merchant.paypal.com/cgi-bin/marketingweb?cmd=_render-content&content_ID=merchant/home]]> +</help_url> + <frontend_model>Mage_Paypal_Block_Adminhtml_System_Config_Fieldset_Global</frontend_model> + <field id="express" translate="label comment" type="checkbox" sortOrder="10" showInDefault="1" showInWebsite="1"> + <label>Express Checkout</label> + <comment>Add an Express Checkout button to your existing shopping cart for quick and easy credit card payments. PayPal handles all payment processing.</comment> + <demo_url> + <![CDATA[https://merchant.paypal.com/us/cgi-bin/?&cmd=_render-content&content_ID=merchant/demo_express_checkout]]> +</demo_url> + <more_url> + <![CDATA[https://www.paypal.com/cgi-bin/webscr?cmd=_simple-referral-flow&partner_id=NB9WWHYEMVUMS&product_id=ECA]]> +</more_url> + <attribute type="backend_congif"> + <enable_for_countries>all</enable_for_countries> + <urls> + <JP translate="switcher fieldset"> + <more_url> + <![CDATA[https://cms.paypal.com/jp/cgi-bin/marketingweb?cmd=_render-content&content_ID=marketing_jp/ExpressCheckout&nav=3.1.1]]> +</more_url> + </JP> + </urls> + </attribute> + <config_path>payment/paypal_express/active</config_path> + </field> + <field id="wps" translate="label comment" type="checkbox" sortOrder="20" showInDefault="1" showInWebsite="1"> + <label>Website Payments Standard</label> + <comment>PayPal processes all of your orders, and you get paid.</comment> + <demo_url> + <![CDATA[https://merchant.paypal.com/us/cgi-bin/?&cmd=_render-content&content_ID=merchant/demo_WPS]]> +</demo_url> + <more_url> + <![CDATA[https://www.paypal.com/cgi-bin/webscr?cmd=_simple-referral-flow&partner_id=NB9WWHYEMVUMS&product_id=WPSA]]> +</more_url> + <attribute type="backend_congif"> + <enable_for_countries>all</enable_for_countries> + <urls> + <JP translate="switcher fieldset"> + <more_url> + <![CDATA[https://cms.paypal.com/jp/cgi-bin/marketingweb?cmd=_render-content&content_ID=marketing_jp/WebsitePaymentsStandard&nav=3.1.2]]> +</more_url> + </JP> + </urls> + </attribute> + <config_path>payment/paypal_standard/active</config_path> + </field> + <field id="wpp" translate="label comment" type="checkbox" sortOrder="25" showInDefault="1" showInWebsite="1"> + <label>Website Payments Pro</label> + <comment>Process credit cards directly on your website with PayPal’s all-in-one online payment processing solution.</comment> + <demo_url> + <![CDATA[https://merchant.paypal.com/us/cgi-bin/?&cmd=_render-content&content_ID=merchant/demo_wpp]]> +</demo_url> + <more_url> + <![CDATA[https://www.paypal.com/cgi-bin/webscr?cmd=_simple-referral-flow&partner_id=NB9WWHYEMVUMS&product_id=WPPROA]]> +</more_url> + <attribute type="backend_congif"> + <enable_for_countries>US, CA, GB</enable_for_countries> + </attribute> + <config_path>payment/paypal_direct/active</config_path> + </field> + <field id="wpp_pe" translate="label comment" type="checkbox" sortOrder="30" showInDefault="1" showInWebsite="1"> + <label>Website Payments Pro Payflow Edition (includes Express Checkout)</label> + <comment>Accept PayPal payments in your shopping cart. PayPal will process your credit card payments through the Payflow Pro Gateway.</comment> + <attribute type="backend_congif"> + <enable_for_countries>US, GB</enable_for_countries> + </attribute> + <config_path>payment/paypaluk_direct/active</config_path> + </field> + <field id="verisign" translate="label comment" type="checkbox" sortOrder="35" showInDefault="1" showInWebsite="1"> + <label>Payflow Pro Gateway</label> + <comment>Don’t have a PayPal merchant account? You can still accept credit card payments through the Payflow Pro Gateway.</comment> + <more_url> + <![CDATA[https://www.paypal.com/cgi-bin/webscr?cmd=_simple-referral-flow&partner_id=NB9WWHYEMVUMS&product_id=payflow_pro]]> +</more_url> + <attribute type="backend_congif"> + <enable_for_countries>US, CA, AU, NZ</enable_for_countries> + </attribute> + <config_path>payment/verisign/active</config_path> + </field> + <field id="express_pe" translate="label comment" type="checkbox" sortOrder="40" showInDefault="1" showInWebsite="1"> + <label>Express Checkout</label> + <comment>Accept payments without customers leaving your website. Many popular web-hosting services and shopping carts come with the Payflow payment gateways built in, so they are easy to set up.</comment> + <attribute type="backend_congif"> + <enable_for_countries>US, GB</enable_for_countries> + </attribute> + <config_path>payment/paypaluk_express/active</config_path> + <attribute type="is_simplified" hello='sadfsdf'>1</attribute> + </field> + <field id="payflow_link" translate="label comment" type="checkbox" sortOrder="50" showInDefault="1" showInWebsite="1"> + <label>Payflow Link (for USA and Canada)</label> + <comment>Accept payments with a PCI-compliant checkout that keeps customers on your site. For use with your own merchant account.</comment> + <more_url> + <![CDATA[https://www.paypal.com/cgi-bin/webscr?cmd=_payflow-link-overview-outside]]> +</more_url> + <attribute type="backend_congif"> + <enable_for_countries>US, CA</enable_for_countries> + </attribute> + <config_path>payment/payflow_link/active</config_path> + </field> + <field id="payflow_advanced" translate="label comment" type="checkbox" sortOrder="55" showInDefault="1" showInWebsite="1"> + <label>PayPal Payments Advanced</label> + <comment>Accept payments with a PCI-compliant checkout that keeps customers on your site. Includes a merchant account from PayPal.</comment> + <attribute type="backend_congif"> + <enable_for_countries>US</enable_for_countries> + </attribute> + <config_path>payment/payflow_advanced/active</config_path> + </field> + <field id="hosted_pro" translate="label comment" type="checkbox" sortOrder="60" showInDefault="1" showInWebsite="1"> + <label>Website Payments Pro Hosted Solution</label> + <comment> + <![CDATA[Payments by cards + seller protection - <strong style="color:red">Contact PayPal before activating</strong>]]> +</comment> + <more_url> + <![CDATA[https://cms.paypal.com/cms_content/GB/en_GB/files/developer/HostedSolution.pdf]]> +</more_url> + <attribute type="backend_congif"> + <enable_for_countries>all</enable_for_countries> + <disable_for_countries>US,CA</disable_for_countries> + <labels> + <JP translate="switcher fieldset"> + <switcher>Website Payments Plus</switcher> + <fieldset>Website Payments Plus Settings</fieldset> + </JP> + <FR translate="switcher fieldset"> + <switcher>Integral Evolution</switcher> + <fieldset>Integral Evolution Settings</fieldset> + </FR> + <IT translate="switcher fieldset"> + <switcher>PayPal Pro</switcher> + <fieldset>PayPal Pro Settings</fieldset> + </IT> + <ES translate="switcher fieldset"> + <switcher>Pasarela integral</switcher> + <fieldset>Pasarela integral Settings</fieldset> + </ES> + </labels> + <urls> + <JP translate="switcher fieldset"> + <more_url> + <![CDATA[https://www.paypal-japan.com/wpp/]]> +</more_url> + </JP> + </urls> + </attribute> + <config_path>payment/hosted_pro/active</config_path> + </field> + </group> + <group id="store" sortOrder="5" showInStore="1"> + <frontend_model>Mage_Paypal_Block_Adminhtml_System_Config_Fieldset_Store</frontend_model> + </group> + <group id="api" translate="label comment" type="text" sortOrder="10" showInDefault="1" showInWebsite="1"> + <label>API/Integration Settings</label> + <fieldset_css>paypal-config</fieldset_css> + <field id="api_authentication" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1"> + <label>API Authentication Methods</label> + <config_path>paypal/wpp/api_authentication</config_path> + <source_model>Mage_Paypal_Model_Config::getApiAuthenticationMethods</source_model> + </field> + <field id="api_username" translate="label" type="obscure" sortOrder="5" showInDefault="1" showInWebsite="1"> + <label>API Username</label> + <config_path>paypal/wpp/api_username</config_path> + <backend_model>Mage_Backend_Model_Config_Backend_Encrypted</backend_model> + </field> + <field id="api_password" translate="label" type="obscure" sortOrder="10" showInDefault="1" showInWebsite="1"> + <label>API Password</label> + <config_path>paypal/wpp/api_password</config_path> + <backend_model>Mage_Backend_Model_Config_Backend_Encrypted</backend_model> + </field> + <field id="api_signature" translate="label" type="obscure" sortOrder="15" showInDefault="1" showInWebsite="1"> + <label>API Signature</label> + <config_path>paypal/wpp/api_signature</config_path> + <backend_model>Mage_Backend_Model_Config_Backend_Encrypted</backend_model> + <depends> + <field id="api_authentication">0</field> + </depends> + </field> + <field id="api_cert" translate="label" type="file" sortOrder="17" showInDefault="1" showInWebsite="1"> + <label>API Certificate</label> + <config_path>paypal/wpp/api_cert</config_path> + <backend_model>Mage_Paypal_Model_System_Config_Backend_Cert</backend_model> + <depends> + <field id="api_authentication">1</field> + </depends> + </field> + <field id="api_wizard" translate="button_label sandbox_button_label" sortOrder="20" showInDefault="1" showInWebsite="1"> + <label></label> + <button_label>Get Credentials from PayPal</button_label> + <button_url> + <![CDATA[https://www.paypal.com/us/cgi-bin/webscr?cmd=_login-api-run]]> +</button_url> + <attribute type="sandbox_button_label">Sandbox Credentials</attribute> + <attribute type="sandbox_button_url"> + <![CDATA[https://www.sandbox.paypal.com/us/cgi-bin/webscr?cmd=_login-api-run]]> +</attribute> + <frontend_model>Mage_Paypal_Block_Adminhtml_System_Config_ApiWizard</frontend_model> + </field> + <field id="sandbox_flag" translate="label" type="select" sortOrder="25" showInDefault="1" showInWebsite="1"> + <label>Sandbox Mode</label> + <config_path>paypal/wpp/sandbox_flag</config_path> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="use_proxy" translate="label" type="select" sortOrder="30" showInDefault="1" showInWebsite="1"> + <label>API Uses Proxy</label> + <config_path>paypal/wpp/use_proxy</config_path> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="proxy_host" translate="label" type="text" sortOrder="35" showInDefault="1" showInWebsite="1"> + <label>Proxy Host</label> + <config_path>paypal/wpp/proxy_host</config_path> + <depends> + <field id="use_proxy">1</field> + </depends> + </field> + <field id="proxy_port" translate="label" type="text" sortOrder="40" showInDefault="1" showInWebsite="1"> + <label>Proxy Port</label> + <config_path>paypal/wpp/proxy_port</config_path> + <depends> + <field id="use_proxy">1</field> + </depends> + </field> + </group> + <group id="express" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Express Checkout Settings</label> + <fieldset_css>paypal-config</fieldset_css> + <field id="title" translate="label comment" type="text" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Title</label> + <comment>It is recommended to set this value to "PayPal" per store views.</comment> + <config_path>payment/paypal_express/title</config_path> + </field> + <field id="sort_order" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Sort Order</label> + <config_path>payment/paypal_express/sort_order</config_path> + <frontend_class>validate-number</frontend_class> + </field> + <field id="payment_action" translate="label" type="select" sortOrder="15" showInDefault="1" showInWebsite="1"> + <label>Payment Action</label> + <config_path>payment/paypal_express/payment_action</config_path> + <source_model>Mage_Paypal_Model_System_Config_Source_PaymentActions_Express</source_model> + </field> + <field id="allowspecific" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1"> + <label>Payment Applicable From</label> + <config_path>payment/paypal_express/allowspecific</config_path> + <source_model>Mage_Payment_Model_Config_Source_Allspecificcountries</source_model> + </field> + <field id="specificcountry" translate="label" type="multiselect" sortOrder="25" showInDefault="1" showInWebsite="1"> + <label>Countries Payment Applicable From</label> + <config_path>payment/paypal_express/specificcountry</config_path> + <source_model>Mage_Paypal_Model_System_Config_Source_BuyerCountry</source_model> + <depends> + <field id="allowspecific">1</field> + </depends> + </field> + <field id="debug" translate="label" type="select" sortOrder="30" showInDefault="1" showInWebsite="1"> + <label>Debug Mode</label> + <config_path>payment/paypal_express/debug</config_path> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="line_items_enabled" translate="label" type="select" sortOrder="35" showInDefault="1" showInWebsite="1"> + <label>Transfer Cart Line Items</label> + <config_path>payment/paypal_express/line_items_enabled</config_path> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="transfer_shipping_options" translate="label tooltip comment" type="select" sortOrder="40" showInDefault="1" showInWebsite="1"> + <label>Transfer Shipping Options</label> + <config_path>payment/paypal_express/transfer_shipping_options</config_path> + <tooltip>If this option is enabled, customer can change shipping address and shipping method on PayPal website. In live mode works via HTTPS protocol only.</tooltip> + <comment>Notice that PayPal can handle up to 10 shipping options. That is why Magento will transfer only first 10 cheapest shipping options if there are more than 10 available.</comment> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + <depends> + <field id="line_items_enabled">1</field> + </depends> + </field> + <field id="visible_on_cart" translate="label comment" type="select" sortOrder="45" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Shortcut on Shopping Cart</label> + <config_path>payment/paypal_express/visible_on_cart</config_path> + <comment>Also affects mini-shopping cart.</comment> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="visible_on_product" translate="label" type="select" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Shortcut on Product View</label> + <config_path>payment/paypal_express/visible_on_product</config_path> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="button_flavor" translate="label" type="select" sortOrder="55" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Shortcut Buttons Flavor</label> + <config_path>paypal/wpp/button_flavor</config_path> + <source_model>Mage_Paypal_Model_Config::getExpressCheckoutButtonFlavors</source_model> + </field> + <field id="solution_type" translate="label comment" type="select" sortOrder="60" showInDefault="1" showInWebsite="1"> + <label>Enable PayPal Guest Checkout</label> + <comment>Ability for buyer to purchase without PayPal account.</comment> + <config_path>payment/paypal_express/solution_type</config_path> + <source_model>Mage_Paypal_Model_Config::getExpressCheckoutSolutionTypes</source_model> + </field> + <field id="require_billing_address" translate="label comment" type="select" sortOrder="65" showInDefault="1" showInWebsite="1"> + <label>Require Customer's Billing Address</label> + <comment>This feature needs be enabled first for the merchant account through PayPal technical support.</comment> + <config_path>payment/paypal_express/require_billing_address</config_path> + <source_model>Mage_Paypal_Model_System_Config_Source_RequireBillingAddress</source_model> + </field> + <field id="allow_ba_signup" translate="label comment tooltip" type="select" sortOrder="70" showInDefault="1" showInWebsite="1"> + <label>Billing Agreement Signup</label> + <comment>Whether to create a billing agreement, if there are no active billing agreements available.</comment> + <tooltip> + <![CDATA[Merchants need to apply to PayPal for enabling billing agreements feature. Do not enable this option until PayPal confirms that billing agreements are enabled for your merchant account.]]> +</tooltip> + <config_path>payment/paypal_express/allow_ba_signup</config_path> + <source_model>Mage_Paypal_Model_Config::getExpressCheckoutBASignupOptions</source_model> + </field> + <field id="authorization_honor_period" translate="label comment" type="text" sortOrder="80" showInDefault="1" showInWebsite="1"> + <label>Authorization Honor Period (days)</label> + <comment>Specifies what the Authorization Honor Period is on the merchant’s PayPal account. It must mirror the setting in PayPal.</comment> + <config_path>payment/paypal_express/authorization_honor_period</config_path> + </field> + <field id="order_valid_period" translate="label comment" type="text" sortOrder="90" showInDefault="1" showInWebsite="1"> + <label>Order Valid Period (days)</label> + <comment>Specifies what the Order Valid Period is on the merchant’s PayPal account. It must mirror the setting in PayPal.</comment> + <config_path>payment/paypal_express/order_valid_period</config_path> + </field> + <field id="child_authorization_number" translate="label comment" type="text" sortOrder="100" showInDefault="1" showInWebsite="1"> + <label>Number of Child Authorizations</label> + <comment>The default number of child authorizations in your PayPal account is 1. To do multiple authorizations please contact PayPal to request an increase.</comment> + <config_path>payment/paypal_express/child_authorization_number</config_path> + </field> + </group> + <group id="wps" translate="label comment" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Website Payments Standard Settings</label> + <fieldset_css>paypal-config</fieldset_css> + <field id="title" translate="label comment" type="text" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Title</label> + <comment>It is recommended to set this value to "PayPal" per store views.</comment> + <config_path>payment/paypal_standard/title</config_path> + </field> + <field id="sort_order" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Sort Order</label> + <config_path>payment/paypal_standard/sort_order</config_path> + <frontend_class>validate-number</frontend_class> + </field> + <field id="payment_action" translate="label" type="select" sortOrder="15" showInDefault="1" showInWebsite="1"> + <label>Payment Action</label> + <config_path>payment/paypal_standard/payment_action</config_path> + <source_model>Mage_Paypal_Model_System_Config_Source_PaymentActions</source_model> + </field> + <field id="allowspecific" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1"> + <label>Payment Applicable From</label> + <config_path>payment/paypal_standard/allowspecific</config_path> + <source_model>Mage_Payment_Model_Config_Source_Allspecificcountries</source_model> + </field> + <field id="specificcountry" translate="label" type="multiselect" sortOrder="25" showInDefault="1" showInWebsite="1"> + <label>Countries Payment Applicable From</label> + <config_path>payment/paypal_standard/specificcountry</config_path> + <source_model>Mage_Paypal_Model_System_Config_Source_BuyerCountry</source_model> + <depends> + <field id="allowspecific">1</field> + </depends> + </field> + <field id="sandbox_flag" translate="label" type="select" sortOrder="30" showInDefault="1" showInWebsite="1"> + <label>Sandbox Mode</label> + <config_path>payment/paypal_standard/sandbox_flag</config_path> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="debug" translate="label" type="select" sortOrder="35" showInDefault="1" showInWebsite="1"> + <label>Debug Mode</label> + <config_path>payment/paypal_standard/debug</config_path> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="line_items_enabled" translate="label" type="select" sortOrder="35" showInDefault="1" showInWebsite="1"> + <label>Transfer Cart Line Items</label> + <config_path>payment/paypal_standard/line_items_enabled</config_path> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="line_items_summary" translate="label comment" type="text" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Summary Text for Aggregated Cart</label> + <config_path>payment/paypal_standard/line_items_summary</config_path> + <comment>Uses store frontend name by default.</comment> + <depends> + <field id="line_items_enabled">0</field> + </depends> + </field> + </group> + <group id="wpp" translate="label comment" type="text" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Website Payments Pro Settings</label> + <fieldset_css>paypal-config</fieldset_css> + <field id="title" translate="label comment" type="text" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Title</label> + <comment>It is recommended to set this value to "Debit or Credit Card" per store views.</comment> + <config_path>payment/paypal_direct/title</config_path> + </field> + <field id="sort_order" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Sort Order</label> + <config_path>payment/paypal_direct/sort_order</config_path> + <frontend_class>validate-number</frontend_class> + </field> + <field id="payment_action" translate="label" type="select" sortOrder="15" showInDefault="1" showInWebsite="1"> + <label>Payment Action</label> + <config_path>payment/paypal_direct/payment_action</config_path> + <source_model>Mage_Paypal_Model_System_Config_Source_PaymentActions</source_model> + </field> + <field id="allowspecific" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1"> + <label>Payment Applicable From</label> + <config_path>payment/paypal_direct/allowspecific</config_path> + <source_model>Mage_Payment_Model_Config_Source_Allspecificcountries</source_model> + </field> + <field id="specificcountry" translate="label" type="multiselect" sortOrder="25" showInDefault="1" showInWebsite="1"> + <label>Countries Payment Applicable From</label> + <config_path>payment/paypal_direct/specificcountry</config_path> + <source_model>Mage_Paypal_Model_System_Config_Source_BuyerCountry</source_model> + <depends> + <field id="allowspecific">1</field> + </depends> + </field> + <field id="debug" translate="label" type="select" sortOrder="30" showInDefault="1" showInWebsite="1"> + <label>Debug Mode</label> + <config_path>payment/paypal_direct/debug</config_path> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="line_items_enabled" translate="label" type="select" sortOrder="35" showInDefault="1" showInWebsite="1"> + <label>Transfer Cart Line Items</label> + <config_path>payment/paypal_direct/line_items_enabled</config_path> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="heading_cc" translate="label" sortOrder="40" showInDefault="1" showInWebsite="1"> + <label>Credit Card Settings</label> + <frontend_model>Mage_Backend_Block_System_Config_Form_Field_Heading</frontend_model> + </field> + <field id="cctypes" translate="label comment" type="multiselect" sortOrder="45" showInDefault="1" showInWebsite="1"> + <label>Allowed Credit Card Types</label> + <comment> + <![CDATA[3D Secure validation is required for Maestro cards. Supporting of American Express cards require additional agreement. Learn more at <a href="http://www.paypal.com/amexupdate">http://www.paypal.com/amexupdate</a>.]]> +</comment> + <config_path>payment/paypal_direct/cctypes</config_path> + <source_model>Mage_Paypal_Model_Config::getWppCcTypesAsOptionArray</source_model> + </field> + <field id="useccv" translate="label" type="select" sortOrder="50" showInDefault="1" showInWebsite="1"> + <label>Require CVV Entry</label> + <config_path>payment/paypal_direct/useccv</config_path> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="heading_3dsecure" translate="label" sortOrder="55" showInDefault="1" showInWebsite="1"> + <label>3D Secure</label> + <frontend_model>Mage_Backend_Block_System_Config_Form_Field_Heading</frontend_model> + </field> + <field id="centinel" translate="label" type="select" sortOrder="60" showInDefault="1" showInWebsite="1"> + <label>3D Secure Card Validation</label> + <config_path>payment/paypal_direct/centinel</config_path> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="centinel_is_mode_strict" translate="label comment" type="select" sortOrder="65" showInDefault="1" showInWebsite="1"> + <label>Severe 3D Secure Card Validation</label> + <config_path>payment/paypal_direct/centinel_is_mode_strict</config_path> + <comment>Severe Validation Removes Chargeback Liability on Merchant</comment> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + <depends> + <field id="centinel">1</field> + </depends> + </field> + <field id="centinel_api_url" translate="label comment" type="text" sortOrder="70" showInDefault="1" showInWebsite="1"> + <label>Centinel Custom API URL</label> + <config_path>payment/paypal_direct/centinel_api_url</config_path> + <comment>If empty, a default value will be used. Custom URL may be provided by CardinalCommerce agreement.</comment> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + <depends> + <field id="centinel">1</field> + </depends> + </field> + </group> + <group id="paypal_billing_agreement" translate="label" type="text" sortOrder="45" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Paypal Billing Agreement Settings</label> + <field id="active" translate="label comment" type="select" sortOrder="5" showInDefault="1" showInWebsite="1"> + <label>Enabled</label> + <comment> + <![CDATA[Will appear as a payment option only for customers who have at least one active billing agreement.]]> +</comment> + <config_path>payment/paypal_billing_agreement/active</config_path> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="title" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Title</label> + <config_path>payment/paypal_billing_agreement/title</config_path> + </field> + <field id="sort_order" translate="label" type="text" sortOrder="15" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Sort Order</label> + <config_path>payment/paypal_billing_agreement/sort_order</config_path> + <frontend_class>validate-number</frontend_class> + </field> + <field id="payment_action" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1"> + <label>Payment Action</label> + <config_path>payment/paypal_billing_agreement/payment_action</config_path> + <source_model>Mage_Paypal_Model_System_Config_Source_PaymentActions</source_model> + </field> + <field id="allowspecific" translate="label" type="select" sortOrder="25" showInDefault="1" showInWebsite="1"> + <label>Payment Applicable From</label> + <config_path>payment/paypal_billing_agreement/allowspecific</config_path> + <source_model>Mage_Payment_Model_Config_Source_Allspecificcountries</source_model> + </field> + <field id="specificcountry" translate="label" type="multiselect" sortOrder="30" showInDefault="1" showInWebsite="1"> + <label>Countries Payment Applicable From</label> + <config_path>payment/paypal_billing_agreement/specificcountry</config_path> + <source_model>Mage_Paypal_Model_System_Config_Source_BuyerCountry</source_model> + <depends> + <field id="allowspecific">1</field> + </depends> + </field> + <field id="debug" translate="label" type="select" sortOrder="35" showInDefault="1" showInWebsite="1"> + <label>Debug Mode</label> + <config_path>payment/paypal_billing_agreement/debug</config_path> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="line_items_enabled" translate="label" type="select" sortOrder="40" showInDefault="1" showInWebsite="1"> + <label>Transfer Cart Line Items</label> + <config_path>payment/paypal_billing_agreement/line_items_enabled</config_path> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="allow_billing_agreement_wizard" translate="label" type="select" sortOrder="45" showInDefault="1" showInWebsite="1"> + <label>Allow in Billing Agreement Wizard</label> + <config_path>payment/paypal_billing_agreement/allow_billing_agreement_wizard</config_path> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + </group> + <group id="wpp_pe" translate="label" type="text" sortOrder="55" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Website Payments Pro (Payflow Edition) Settings</label> + <field id="title" translate="label comment" type="text" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Title</label> + <comment>It is recommended to set this value to "Debit or Credit Card" per store views.</comment> + <config_path>payment/paypaluk_direct/title</config_path> + </field> + <field id="sort_order" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Sort Order</label> + <config_path>payment/paypaluk_direct/sort_order</config_path> + <frontend_class>validate-number</frontend_class> + </field> + <field id="payment_action" translate="label" type="select" sortOrder="15" showInDefault="1" showInWebsite="1"> + <label>Payment Action</label> + <config_path>payment/paypaluk_direct/payment_action</config_path> + <source_model>Mage_Paypal_Model_System_Config_Source_PaymentActions</source_model> + </field> + <field id="allowspecific" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1"> + <label>Payment Applicable From</label> + <config_path>payment/paypaluk_direct/allowspecific</config_path> + <source_model>Mage_Payment_Model_Config_Source_Allspecificcountries</source_model> + </field> + <field id="specificcountry" translate="label" type="multiselect" sortOrder="25" showInDefault="1" showInWebsite="1"> + <label>Countries Payment Applicable From</label> + <config_path>payment/paypaluk_direct/specificcountry</config_path> + <source_model>Mage_Paypal_Model_System_Config_Source_BuyerCountry</source_model> + <depends> + <field id="allowspecific">1</field> + </depends> + </field> + <field id="debug" translate="label" type="select" sortOrder="30" showInDefault="1" showInWebsite="1"> + <label>Debug Mode</label> + <config_path>payment/paypaluk_direct/debug</config_path> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="line_items_enabled" translate="label" type="select" sortOrder="35" showInDefault="1" showInWebsite="1"> + <label>Transfer Cart Line Items</label> + <config_path>payment/paypaluk_direct/line_items_enabled</config_path> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="heading_api" translate="label" sortOrder="40" showInDefault="1" showInWebsite="1"> + <label>API/Integration</label> + <frontend_model>Mage_Backend_Block_System_Config_Form_Field_Heading</frontend_model> + </field> + <field id="partner" translate="label" type="text" sortOrder="45" showInDefault="1" showInWebsite="1"> + <label>Partner</label> + <config_path>paypal/wpuk/partner</config_path> + </field> + <field id="user" translate="label" type="obscure" sortOrder="50" showInDefault="1" showInWebsite="1"> + <label>User</label> + <config_path>paypal/wpuk/user</config_path> + <backend_model>Mage_Backend_Model_Config_Backend_Encrypted</backend_model> + </field> + <field id="vendor" translate="label" type="text" sortOrder="55" showInDefault="1" showInWebsite="1"> + <label>Vendor</label> + <config_path>paypal/wpuk/vendor</config_path> + </field> + <field id="pwd" translate="label" type="obscure" sortOrder="60" showInDefault="1" showInWebsite="1"> + <label>Password</label> + <config_path>paypal/wpuk/pwd</config_path> + <backend_model>Mage_Backend_Model_Config_Backend_Encrypted</backend_model> + </field> + <field id="sandbox_flag" translate="label" type="select" sortOrder="65" showInDefault="1" showInWebsite="1"> + <label>Sandbox Mode</label> + <config_path>paypal/wpuk/sandbox_flag</config_path> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="use_proxy" translate="label" type="select" sortOrder="70" showInDefault="1" showInWebsite="1"> + <label>API Uses Proxy</label> + <config_path>paypal/wpuk/use_proxy</config_path> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="proxy_host" translate="label" type="text" sortOrder="75" showInDefault="1" showInWebsite="1"> + <label>Proxy Host</label> + <config_path>paypal/wpuk/proxy_host</config_path> + <depends> + <field id="use_proxy">1</field> + </depends> + </field> + <field id="proxy_port" translate="label" type="text" sortOrder="80" showInDefault="1" showInWebsite="1"> + <label>Proxy Port</label> + <config_path>paypal/wpuk/proxy_port</config_path> + <depends> + <field id="use_proxy">1</field> + </depends> + </field> + <field id="heading_cc" translate="label" sortOrder="85" showInDefault="1" showInWebsite="1"> + <label>Credit Card Settings</label> + <frontend_model>Mage_Backend_Block_System_Config_Form_Field_Heading</frontend_model> + </field> + <field id="cctypes" translate="label" type="multiselect" sortOrder="90" showInDefault="1" showInWebsite="1"> + <label>Allowed Credit Card Types</label> + <comment> + <![CDATA[3D Secure validation is required for Maestro cards.]]> +</comment> + <config_path>payment/paypaluk_direct/cctypes</config_path> + <source_model>Mage_Paypal_Model_Config::getWppPeCcTypesAsOptionArray</source_model> + </field> + <field id="useccv" translate="label" type="select" sortOrder="95" showInDefault="1" showInWebsite="1"> + <label>Require CVV Entry</label> + <config_path>payment/paypaluk_direct/useccv</config_path> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="heading_3dsecure" translate="label" sortOrder="100" showInDefault="1" showInWebsite="1"> + <label>3D Secure</label> + <frontend_model>Mage_Backend_Block_System_Config_Form_Field_Heading</frontend_model> + </field> + <field id="centinel" translate="label" type="select" sortOrder="105" showInDefault="1" showInWebsite="1"> + <label>3D Secure Card Validation</label> + <config_path>payment/paypaluk_direct/centinel</config_path> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="centinel_is_mode_strict" translate="label comment" type="select" sortOrder="110" showInDefault="1" showInWebsite="1"> + <label>Severe 3D Secure Card Validation</label> + <config_path>payment/paypaluk_direct/centinel_is_mode_strict</config_path> + <comment>Severe Validation Removes Chargeback Liability on Merchant</comment> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + <depends> + <field id="centinel">1</field> + </depends> + </field> + <field id="centinel_api_url" translate="label comment" type="text" sortOrder="115" showInDefault="1" showInWebsite="1"> + <label>Centinel API URL</label> + <config_path>payment/paypaluk_direct/centinel_api_url</config_path> + <comment>If empty, a default value will be used. Custom URL may be provided by CardinalCommerce agreement.</comment> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + <depends> + <field id="centinel">1</field> + </depends> + </field> + </group> + <group id="verisign" translate="label" type="text" sortOrder="60" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Payflow Pro Settings</label> + <field id="title" translate="label comment" type="text" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Title</label> + <comment>It is recommended to set this value to "Debit or Credit Card" per store views.</comment> + <config_path>payment/verisign/title</config_path> + </field> + <field id="sort_order" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Sort Order</label> + <config_path>payment/verisign/sort_order</config_path> + <frontend_class>validate-number</frontend_class> + </field> + <field id="payment_action" translate="label" type="select" sortOrder="15" showInDefault="1" showInWebsite="1"> + <label>Payment Action</label> + <config_path>payment/verisign/payment_action</config_path> + <source_model>Mage_Paypal_Model_System_Config_Source_PaymentActions</source_model> + </field> + <field id="allowspecific" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1"> + <label>Payment Applicable From</label> + <config_path>payment/verisign/allowspecific</config_path> + <source_model>Mage_Payment_Model_Config_Source_Allspecificcountries</source_model> + </field> + <field id="specificcountry" translate="label" type="multiselect" sortOrder="25" showInDefault="1" showInWebsite="1"> + <label>Countries Payment Applicable From</label> + <config_path>payment/verisign/specificcountry</config_path> + <source_model>Mage_Paypal_Model_System_Config_Source_BuyerCountry</source_model> + <depends> + <field id="allowspecific">1</field> + </depends> + </field> + <field id="debug" translate="label" type="select" sortOrder="30" showInDefault="1" showInWebsite="1"> + <label>Debug Mode</label> + <config_path>payment/verisign/debug</config_path> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="heading_payflow" translate="label" sortOrder="35" showInDefault="1" showInWebsite="1"> + <label>API/Integration</label> + <frontend_model>Mage_Backend_Block_System_Config_Form_Field_Heading</frontend_model> + </field> + <field id="partner" translate="label" type="text" sortOrder="40" showInDefault="1" showInWebsite="1"> + <label>Partner</label> + <config_path>payment/verisign/partner</config_path> + </field> + <field id="user" translate="label" type="obscure" sortOrder="45" showInDefault="1" showInWebsite="1"> + <label>User</label> + <config_path>payment/verisign/user</config_path> + <backend_model>Mage_Backend_Model_Config_Backend_Encrypted</backend_model> + </field> + <field id="vendor" translate="label" type="text" sortOrder="50" showInDefault="1" showInWebsite="1"> + <label>Vendor</label> + <config_path>payment/verisign/vendor</config_path> + </field> + <field id="pwd" translate="label" type="obscure" sortOrder="55" showInDefault="1" showInWebsite="1"> + <label>Password</label> + <config_path>payment/verisign/pwd</config_path> + <backend_model>Mage_Backend_Model_Config_Backend_Encrypted</backend_model> + </field> + <field id="sandbox_flag" translate="label" type="select" sortOrder="60" showInDefault="1" showInWebsite="1"> + <label>Test Mode</label> + <config_path>payment/verisign/sandbox_flag</config_path> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="use_proxy" translate="label" type="select" sortOrder="65" showInDefault="1" showInWebsite="1"> + <label>Use Proxy</label> + <config_path>payment/verisign/use_proxy</config_path> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="proxy_host" translate="label" type="text" sortOrder="70" showInDefault="1" showInWebsite="1"> + <label>Proxy Host</label> + <config_path>payment/verisign/proxy_host</config_path> + <depends> + <field id="use_proxy">1</field> + </depends> + </field> + <field id="proxy_port" translate="label" type="text" sortOrder="75" showInDefault="1" showInWebsite="1"> + <label>Proxy Port</label> + <config_path>payment/verisign/proxy_port</config_path> + <depends> + <field id="use_proxy">1</field> + </depends> + </field> + <field id="heading_cc" translate="label" sortOrder="80" showInDefault="1" showInWebsite="1"> + <label>Credit Card Settings</label> + <frontend_model>Mage_Backend_Block_System_Config_Form_Field_Heading</frontend_model> + </field> + <field id="cctypes" translate="label comment" type="multiselect" sortOrder="85" showInDefault="1" showInWebsite="1"> + <label>Allowed Credit Card Types</label> + <comment> + <![CDATA[Supporting of American Express cards require additional agreement. Learn more at <a href="http://www.paypal.com/amexupdate">http://www.paypal.com/amexupdate</a>.]]> +</comment> + <config_path>payment/verisign/cctypes</config_path> + <source_model>Mage_Paypal_Model_Config::getPayflowproCcTypesAsOptionArray</source_model> + </field> + <field id="useccv" translate="label" type="select" sortOrder="90" showInDefault="1" showInWebsite="1"> + <label>Require CVV Entry</label> + <config_path>payment/verisign/useccv</config_path> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="heading_3dsecure" translate="label" sortOrder="95" showInDefault="1" showInWebsite="1"> + <label>3D Secure</label> + <frontend_model>Mage_Backend_Block_System_Config_Form_Field_Heading</frontend_model> + </field> + <field id="centinel" translate="label" type="select" sortOrder="100" showInDefault="1" showInWebsite="1"> + <label>3D Secure Card Validation</label> + <config_path>payment/verisign/centinel</config_path> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="centinel_is_mode_strict" translate="label comment" type="select" sortOrder="105" showInDefault="1" showInWebsite="1"> + <label>Severe 3D Secure Card Validation</label> + <config_path>payment/verisign/centinel_is_mode_strict</config_path> + <comment>Severe validation removes chargeback liability on merchant.</comment> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + <depends> + <field id="centinel">1</field> + </depends> + </field> + <field id="centinel_api_url" translate="label comment" type="text" sortOrder="110" showInDefault="1" showInWebsite="1"> + <label>Centinel API URL</label> + <config_path>payment/verisign/centinel_api_url</config_path> + <comment>A value is required for live mode. Refer to your CardinalCommerce agreement.</comment> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + <depends> + <field id="centinel">1</field> + </depends> + </field> + </group> + <group id="express_pe" translate="label" type="text" sortOrder="65" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Express Checkout (Payflow Edition) Settings</label> + <field id="title" translate="label" type="text" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Title</label> + <config_path>payment/paypaluk_express/title</config_path> + </field> + <field id="sort_order" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1"> + <label>Sort Order</label> + <config_path>payment/paypaluk_express/sort_order</config_path> + <frontend_class>validate-number</frontend_class> + </field> + <field id="payment_action" translate="label" type="select" sortOrder="15" showInDefault="1" showInWebsite="1"> + <label>Payment Action</label> + <config_path>payment/paypaluk_express/payment_action</config_path> + <source_model>Mage_Paypal_Model_System_Config_Source_PaymentActions</source_model> + </field> + <field id="allowspecific" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1"> + <label>Payment Applicable From</label> + <config_path>payment/paypaluk_express/allowspecific</config_path> + <source_model>Mage_Payment_Model_Config_Source_Allspecificcountries</source_model> + </field> + <field id="specificcountry" translate="label" type="multiselect" sortOrder="25" showInDefault="1" showInWebsite="1"> + <label>Countries Payment Applicable From</label> + <config_path>payment/paypaluk_express/specificcountry</config_path> + <source_model>Mage_Paypal_Model_System_Config_Source_BuyerCountry</source_model> + <depends> + <field id="allowspecific">1</field> + </depends> + </field> + <field id="debug" translate="label" type="select" sortOrder="30" showInDefault="1" showInWebsite="1"> + <label>Debug Mode</label> + <config_path>payment/paypaluk_express/debug</config_path> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="line_items_enabled" translate="label" type="select" sortOrder="35" showInDefault="1" showInWebsite="1"> + <label>Transfer Cart Line Items</label> + <config_path>payment/paypaluk_express/line_items_enabled</config_path> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="visible_on_cart" translate="label comment" type="select" sortOrder="40" showInDefault="1" showInWebsite="1"> + <label>Shortcut on Shopping Cart</label> + <comment>Also affects mini-shopping cart.</comment> + <config_path>payment/paypaluk_express/visible_on_cart</config_path> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="visible_on_product" translate="label" type="select" sortOrder="45" showInDefault="1" showInWebsite="1"> + <label>Shortcut on Product View</label> + <config_path>payment/paypaluk_express/visible_on_product</config_path> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + </group> + <group id="settlement_reports" translate="label" type="text" sortOrder="70" showInDefault="1" showInWebsite="1"> + <label>Settlement Report Settings</label> + <field id="heading_sftp" translate="label" sortOrder="5" showInDefault="1" showInWebsite="1"> + <label>SFTP Credentials</label> + <frontend_model>Mage_Backend_Block_System_Config_Form_Field_Heading</frontend_model> + </field> + <field id="settlement_reports_ftp_login" translate="label" type="obscure" sortOrder="10" showInDefault="1" showInWebsite="1"> + <label>Login</label> + <config_path>paypal/fetch_reports/ftp_login</config_path> + <backend_model>Mage_Backend_Model_Config_Backend_Encrypted</backend_model> + </field> + <field id="settlement_reports_ftp_password" translate="label" type="obscure" sortOrder="15" showInDefault="1" showInWebsite="1"> + <label>Password</label> + <config_path>paypal/fetch_reports/ftp_password</config_path> + <backend_model>Mage_Backend_Model_Config_Backend_Encrypted</backend_model> + </field> + <field id="settlement_reports_ftp_sandbox" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1"> + <label>Sandbox Mode</label> + <config_path>paypal/fetch_reports/ftp_sandbox</config_path> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="settlement_reports_ftp_ip" translate="label comment tooltip" type="text" sortOrder="25" showInDefault="1" showInWebsite="1"> + <label>Custom Endpoint Hostname or IP-Address</label> + <comment>By default it is "reports.paypal.com".</comment> + <tooltip>Use colon to specify port. For example: "test.example.com:5224".</tooltip> + <config_path>paypal/fetch_reports/ftp_ip</config_path> + <depends> + <field id="settlement_reports_ftp_sandbox">0</field> + </depends> + </field> + <field id="settlement_reports_ftp_path" translate="label comeent" type="text" sortOrder="30" showInDefault="1" showInWebsite="1"> + <label>Custom Path</label> + <comment>By default it is "/ppreports/outgoing".</comment> + <config_path>paypal/fetch_reports/ftp_path</config_path> + <depends> + <field id="settlement_reports_ftp_sandbox">0</field> + </depends> + </field> + <field id="heading_schedule" translate="label" sortOrder="35" showInDefault="1" showInWebsite="1"> + <label>Scheduled Fetching</label> + <frontend_model>Mage_Backend_Block_System_Config_Form_Field_Heading</frontend_model> + </field> + <field id="settlement_reports_active" translate="label" type="select" sortOrder="40" showInDefault="1" showInWebsite="1"> + <label>Enable Automatic Fetching</label> + <config_path>paypal/fetch_reports/active</config_path> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="settlement_reports_schedule" translate="label comment" type="select" sortOrder="45" showInDefault="1"> + <label>Schedule</label> + <comment>PayPal retains reports for 45 days.</comment> + <config_path>paypal/fetch_reports/schedule</config_path> + <source_model>Mage_Paypal_Model_System_Config_Source_FetchingSchedule</source_model> + </field> + <field id="settlement_reports_time" translate="label" type="time" sortOrder="50" showInDefault="1"> + <label>Time of Day</label> + <config_path>paypal/fetch_reports/time</config_path> + </field> + </group> + <group id="style" translate="label" type="text" sortOrder="75" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Frontend Experience Settings</label> + <field id="logo" translate="label comment" type="select" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>PayPal Product Logo</label> + <comment>Displays on catalog pages and homepage.</comment> + <config_path>paypal/style/logo</config_path> + <source_model>Mage_Paypal_Model_System_Config_Source_Logo</source_model> + </field> + <field id="paypal_pages" translate="label" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>PayPal Merchant Pages Style</label> + <frontend_model>Mage_Backend_Block_System_Config_Form_Field_Heading</frontend_model> + </field> + <field id="page_style" translate="label tooltip" type="text" sortOrder="15" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Page Style</label> + <config_path>paypal/style/page_style</config_path> + <tooltip> + <![CDATA[Allowable values: "paypal", "primary" (default), your_custom_value (a custom payment page style from your merchant account profile).]]> +</tooltip> + </field> + <field id="paypal_hdrimg" translate="label tooltip" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Header Image URL</label> + <config_path>paypal/style/paypal_hdrimg</config_path> + <tooltip> + <![CDATA[The image at the top left of the checkout page. Max size is 750x90-pixel. <strong style="color:red">https</strong> is highly encouraged.]]> +</tooltip> + </field> + <field id="paypal_hdrbackcolor" translate="label tooltip" sortOrder="25" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Header Background Color</label> + <config_path>paypal/style/paypal_hdrbackcolor</config_path> + <tooltip> + <![CDATA[The background color for the header of the checkout page. Case-insensitive six-character HTML hexadecimal color code in ASCII.]]> +</tooltip> + </field> + <field id="paypal_hdrbordercolor" translate="label tooltip" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Header Border Color</label> + <config_path>paypal/style/paypal_hdrbordercolor</config_path> + <tooltip>2-pixel perimeter around the header space.</tooltip> + </field> + <field id="paypal_payflowcolor" translate="label tooltip" sortOrder="35" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Page Background Color</label> + <config_path>paypal/style/paypal_payflowcolor</config_path> + <tooltip> + <![CDATA[The background color for the checkout page around the header and payment form.]]> +</tooltip> + </field> + </group> + <group id="payflow_link" translate="label" type="text" sortOrder="80" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Payflow Link Settings</label> + <field id="payflowlink_info" showInDefault="1" showInWebsite="1" showInStore="1" sortOrder="22"> + <frontend_model>Mage_Paypal_Block_Adminhtml_System_Config_Payflowlink_Info</frontend_model> + </field> + <field id="title" translate="label comment" type="text" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Title</label> + <comment>It is recommended to set this value to "Debit or Credit Card" per store views.</comment> + <config_path>payment/payflow_link/title</config_path> + </field> + <field id="sort_order" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Sort Order</label> + <config_path>payment/payflow_link/sort_order</config_path> + <frontend_class>validate-number</frontend_class> + </field> + <field id="payment_action" translate="label" type="select" sortOrder="15" showInDefault="1" showInWebsite="1"> + <label>Payment Action</label> + <config_path>payment/payflow_link/payment_action</config_path> + <source_model>Mage_Paypal_Model_System_Config_Source_PaymentActions</source_model> + </field> + <field id="allowspecific" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1"> + <label>Payment Applicable From</label> + <config_path>payment/payflow_link/allowspecific</config_path> + <source_model>Mage_Payment_Model_Config_Source_Allspecificcountries</source_model> + </field> + <field id="specificcountry" translate="label" type="multiselect" sortOrder="25" showInDefault="1" showInWebsite="1"> + <label>Countries Payment Applicable From</label> + <config_path>payment/payflow_link/specificcountry</config_path> + <source_model>Mage_Paypal_Model_System_Config_Source_BuyerCountry</source_model> + <depends> + <field id="allowspecific">1</field> + </depends> + </field> + <field id="debug" translate="label" type="select" sortOrder="30" showInDefault="1" showInWebsite="1"> + <label>Debug Mode</label> + <config_path>payment/payflow_link/debug</config_path> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="heading_payflowlink" translate="label" sortOrder="35" showInDefault="1" showInWebsite="1"> + <label>API/Integration</label> + <frontend_model>Mage_Backend_Block_System_Config_Form_Field_Heading</frontend_model> + </field> + <field id="partner" translate="label" type="text" sortOrder="40" showInDefault="1" showInWebsite="1"> + <label>Partner</label> + <config_path>payment/payflow_link/partner</config_path> + </field> + <field id="vendor" translate="label" type="text" sortOrder="45" showInDefault="1" showInWebsite="1"> + <label>Vendor / Merchant Login</label> + <config_path>payment/payflow_link/vendor</config_path> + </field> + <field id="user" translate="label" type="text" sortOrder="50" showInDefault="1" showInWebsite="1"> + <label>User</label> + <comment>If you do not have multiple users set up on your account, please re-enter your Vendor/Merchant Login here.</comment> + <config_path>payment/payflow_link/user</config_path> + </field> + <field id="pwd" translate="label" type="obscure" sortOrder="55" showInDefault="1" showInWebsite="1"> + <label>Password</label> + <config_path>payment/payflow_link/pwd</config_path> + <backend_model>Mage_Backend_Model_Config_Backend_Encrypted</backend_model> + </field> + <field id="sandbox_flag" translate="label" type="select" sortOrder="60" showInDefault="1" showInWebsite="1"> + <label>Test Mode</label> + <config_path>payment/payflow_link/sandbox_flag</config_path> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="use_proxy" translate="label" type="select" sortOrder="65" showInDefault="1" showInWebsite="1"> + <label>Use Proxy</label> + <config_path>payment/payflow_link/use_proxy</config_path> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="proxy_host" translate="label" type="text" sortOrder="70" showInDefault="1" showInWebsite="1"> + <label>Proxy Host</label> + <config_path>payment/payflow_link/proxy_host</config_path> + <depends> + <field id="use_proxy">1</field> + </depends> + </field> + <field id="proxy_port" translate="label" type="text" sortOrder="75" showInDefault="1" showInWebsite="1"> + <label>Proxy Port</label> + <config_path>payment/payflow_link/proxy_port</config_path> + <depends> + <field id="use_proxy">1</field> + </depends> + </field> + </group> + <group id="payflow_advanced" translate="label" type="text" sortOrder="90" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>PayPal Payments Advanced</label> + <field id="payflowlink_info" showInDefault="1" showInWebsite="1" showInStore="1" sortOrder="22"> + <frontend_model>Mage_Paypal_Block_Adminhtml_System_Config_Payflowlink_Advanced</frontend_model> + </field> + <field id="title" translate="label comment" type="text" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Title</label> + <comment>It is recommended to set this value to "Debit or Credit Card" per store views.</comment> + <config_path>payment/payflow_advanced/title</config_path> + </field> + <field id="sort_order" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Sort Order</label> + <config_path>payment/payflow_advanced/sort_order</config_path> + <frontend_class>validate-number</frontend_class> + </field> + <field id="payment_action" translate="label" type="select" sortOrder="15" showInDefault="1" showInWebsite="1"> + <label>Payment Action</label> + <config_path>payment/payflow_advanced/payment_action</config_path> + <source_model>Mage_Paypal_Model_System_Config_Source_PaymentActions</source_model> + </field> + <field id="allowspecific" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1"> + <label>Payment Applicable From</label> + <config_path>payment/payflow_advanced/allowspecific</config_path> + <source_model>Mage_Payment_Model_Config_Source_Allspecificcountries</source_model> + </field> + <field id="specificcountry" translate="label" type="multiselect" sortOrder="25" showInDefault="1" showInWebsite="1"> + <label>Countries Payment Applicable From</label> + <config_path>payment/payflow_advanced/specificcountry</config_path> + <source_model>Mage_Paypal_Model_System_Config_Source_BuyerCountry</source_model> + <depends> + <field id="allowspecific">1</field> + </depends> + </field> + <field id="debug" translate="label" type="select" sortOrder="30" showInDefault="1" showInWebsite="1"> + <label>Debug Mode</label> + <config_path>payment/payflow_advanced/debug</config_path> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="heading_payflowlink" translate="label" sortOrder="35" showInDefault="1" showInWebsite="1"> + <label>API/Integration</label> + <frontend_model>Mage_Backend_Block_System_Config_Form_Field_Heading</frontend_model> + </field> + <field id="partner" translate="label" type="text" sortOrder="40" showInDefault="1" showInWebsite="1"> + <label>Partner</label> + <config_path>payment/payflow_advanced/partner</config_path> + </field> + <field id="vendor" translate="label" type="text" sortOrder="45" showInDefault="1" showInWebsite="1"> + <label>Vendor / Merchant Login</label> + <config_path>payment/payflow_advanced/vendor</config_path> + </field> + <field id="user" translate="label" type="text" sortOrder="50" showInDefault="1" showInWebsite="1"> + <label>User</label> + <comment>If you do not have multiple users set up on your account, please re-enter your Vendor/Merchant Login here.</comment> + <config_path>payment/payflow_advanced/user</config_path> + </field> + <field id="pwd" translate="label" type="obscure" sortOrder="55" showInDefault="1" showInWebsite="1"> + <label>Password</label> + <config_path>payment/payflow_advanced/pwd</config_path> + <backend_model>Mage_Backend_Model_Config_Backend_Encrypted</backend_model> + </field> + <field id="sandbox_flag" translate="label" type="select" sortOrder="60" showInDefault="1" showInWebsite="1"> + <label>Test Mode</label> + <config_path>payment/payflow_advanced/sandbox_flag</config_path> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="use_proxy" translate="label" type="select" sortOrder="65" showInDefault="1" showInWebsite="1"> + <label>Use Proxy</label> + <config_path>payment/payflow_advanced/use_proxy</config_path> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="proxy_host" translate="label" type="text" sortOrder="70" showInDefault="1" showInWebsite="1"> + <label>Proxy Host</label> + <config_path>payment/payflow_advanced/proxy_host</config_path> + <depends> + <field id="use_proxy">1</field> + </depends> + </field> + <field id="proxy_port" translate="label" type="text" sortOrder="75" showInDefault="1" showInWebsite="1"> + <label>Proxy Port</label> + <config_path>payment/payflow_advanced/proxy_port</config_path> + <depends> + <field id="use_proxy">1</field> + </depends> + </field> + </group> + <group id="hosted_pro" translate="label" type="text" sortOrder="90" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Website Payments Pro Hosted Solution Settings</label> + <field id="title" translate="label comment" type="text" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Title</label> + <comment>It is recommended to set this value to "PayPal" per store views.</comment> + <config_path>payment/hosted_pro/title</config_path> + </field> + <field id="sort_order" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Sort Order</label> + <config_path>payment/hosted_pro/sort_order</config_path> + <frontend_class>validate-number</frontend_class> + </field> + <field id="payment_action" translate="label" type="select" sortOrder="15" showInDefault="1" showInWebsite="1"> + <label>Payment Action</label> + <config_path>payment/hosted_pro/payment_action</config_path> + <source_model>Mage_Paypal_Model_System_Config_Source_PaymentActions</source_model> + </field> + <field id="allowspecific" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1"> + <label>Payment Applicable From</label> + <config_path>payment/hosted_pro/allowspecific</config_path> + <source_model>Mage_Payment_Model_Config_Source_Allspecificcountries</source_model> + </field> + <field id="specificcountry" translate="label" type="multiselect" sortOrder="25" showInDefault="1" showInWebsite="1"> + <label>Countries Payment Applicable From</label> + <config_path>payment/hosted_pro/specificcountry</config_path> + <source_model>Mage_Paypal_Model_System_Config_Source_BuyerCountry</source_model> + <depends> + <field id="allowspecific">1</field> + </depends> + </field> + <field id="debug" translate="label" type="select" sortOrder="35" showInDefault="1" showInWebsite="1"> + <label>Debug Mode</label> + <config_path>payment/hosted_pro/debug</config_path> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="display_ec" translate="label" type="select" sortOrder="45" showInDefault="1" showInWebsite="1"> + <label>Display Express Checkout in the Payment Information step</label> + <config_path>payment/hosted_pro/display_ec</config_path> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + </group> + </section> + </system> +</config> diff --git a/app/code/core/Mage/Paypal/etc/config.xml b/app/code/core/Mage/Paypal/etc/config.xml index a044d2f04fe46b5af11ffdd99a5fba63e7a304dd..3dbf7c13a0955bdbe69ea1d83617c4a540511461 100644 --- a/app/code/core/Mage/Paypal/etc/config.xml +++ b/app/code/core/Mage/Paypal/etc/config.xml @@ -154,18 +154,18 @@ <logo>nowAccepting_150x60</logo> </style> <wpp> - <api_password backend_model="Mage_Adminhtml_Model_System_Config_Backend_Encrypted"/> - <api_signature backend_model="Mage_Adminhtml_Model_System_Config_Backend_Encrypted"/> - <api_username backend_model="Mage_Adminhtml_Model_System_Config_Backend_Encrypted"/> + <api_password backend_model="Mage_Backend_Model_Config_Backend_Encrypted"/> + <api_signature backend_model="Mage_Backend_Model_Config_Backend_Encrypted"/> + <api_username backend_model="Mage_Backend_Model_Config_Backend_Encrypted"/> <button_flavor>dynamic</button_flavor> </wpp> <wpuk> - <user backend_model="Mage_Adminhtml_Model_System_Config_Backend_Encrypted"/> - <pwd backend_model="Mage_Adminhtml_Model_System_Config_Backend_Encrypted"/> + <user backend_model="Mage_Backend_Model_Config_Backend_Encrypted"/> + <pwd backend_model="Mage_Backend_Model_Config_Backend_Encrypted"/> </wpuk> <fetch_reports> - <ftp_login backend_model="Mage_Adminhtml_Model_System_Config_Backend_Encrypted"/> - <ftp_password backend_model="Mage_Adminhtml_Model_System_Config_Backend_Encrypted"/> + <ftp_login backend_model="Mage_Backend_Model_Config_Backend_Encrypted"/> + <ftp_password backend_model="Mage_Backend_Model_Config_Backend_Encrypted"/> <schedule>1</schedule> <time>00,00,00</time> </fetch_reports> @@ -223,8 +223,8 @@ <useccv>1</useccv> <tender>C</tender> <verbosity>MEDIUM</verbosity> - <user backend_model="Mage_Adminhtml_Model_System_Config_Backend_Encrypted"/> - <pwd backend_model="Mage_Adminhtml_Model_System_Config_Backend_Encrypted"/> + <user backend_model="Mage_Backend_Model_Config_Backend_Encrypted"/> + <pwd backend_model="Mage_Backend_Model_Config_Backend_Encrypted"/> <group>paypal</group> </verisign> <paypal_billing_agreement> @@ -238,7 +238,7 @@ <model>Mage_Paypal_Model_Payflowlink</model> <payment_action>Authorization</payment_action> <verbosity>HIGH</verbosity> - <pwd backend_model="Mage_Adminhtml_Model_System_Config_Backend_Encrypted"/> + <pwd backend_model="Mage_Backend_Model_Config_Backend_Encrypted"/> <group>paypal</group> <title>Credit Card</title> </payflow_link> @@ -246,7 +246,7 @@ <model>Mage_Paypal_Model_Payflowadvanced</model> <payment_action>Authorization</payment_action> <verbosity>HIGH</verbosity> - <pwd backend_model="Mage_Adminhtml_Model_System_Config_Backend_Encrypted"/> + <pwd backend_model="Mage_Backend_Model_Config_Backend_Encrypted"/> <group>paypal</group> <title>Credit Card</title> <partner>PayPal</partner> diff --git a/app/code/core/Mage/Paypal/etc/system.xml b/app/code/core/Mage/Paypal/etc/system.xml deleted file mode 100644 index 56b3fbb58ede75c121037c71a33e32522a25b6fe..0000000000000000000000000000000000000000 --- a/app/code/core/Mage/Paypal/etc/system.xml +++ /dev/null @@ -1,1960 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * 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 Mage_Paypal - * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<config> - <sections> - <payment> - <groups> - <hint> - <frontend_model>Mage_Paypal_Block_Adminhtml_System_Config_Fieldset_Hint</frontend_model> - <sort_order>0</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </hint> - </groups> - </payment> - <paypal translate="label" module="Mage_Paypal"> - <label>PayPal</label> - <class>paypal-section</class> - <header_css>paypal-header</header_css> - <tab>sales</tab> - <frontend_type>text</frontend_type> - <sort_order>350</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <resource>Mage_Paypal::paypal</resource> - <groups> - <account translate="label"> - <label>Merchant Account</label> - <fieldset_css>paypal-config</fieldset_css> - <expanded>1</expanded> - <frontend_type>text</frontend_type> - <sort_order>0</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <fields> - <merchant_country translate="label comment"> - <label>Merchant Country</label> - <config_path>paypal/general/merchant_country</config_path> - <comment>If not specified, Default Country from General Config will be used</comment> - <frontend_type>select</frontend_type> - <source_model>Mage_Paypal_Model_System_Config_Source_MerchantCountry</source_model> - <backend_model>Mage_Paypal_Model_System_Config_Backend_MerchantCountry</backend_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <sort_order>5</sort_order> - </merchant_country> - <business_account translate="label comment tooltip"> - <label>Email Associated with PayPal Merchant Account</label> - <comment><![CDATA[<a href="http://www.magentocommerce.com/paypal">Start accepting payments via PayPal!</a>]]></comment> - <tooltip>Don't have a PayPal account? Simply enter your email address.</tooltip> - <config_path>paypal/general/business_account</config_path> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <sort_order>10</sort_order> - <validate>validate-email</validate> - </business_account> - </fields> - </account> - - <global translate="label"> - <label>Select a PayPal Solution</label> - <help_url><![CDATA[https://merchant.paypal.com/cgi-bin/marketingweb?cmd=_render-content&content_ID=merchant/home]]></help_url> - <frontend_type>text</frontend_type> - <frontend_model>Mage_Paypal_Block_Adminhtml_System_Config_Fieldset_Global</frontend_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <fields> - <express translate="label comment"> - <label>Express Checkout</label> - <comment>Add an Express Checkout button to your existing shopping cart for quick and easy credit card payments. PayPal handles all payment processing.</comment> - <demo_url><![CDATA[https://merchant.paypal.com/us/cgi-bin/?&cmd=_render-content&content_ID=merchant/demo_express_checkout]]></demo_url> - <more_url><![CDATA[https://www.paypal.com/cgi-bin/webscr?cmd=_simple-referral-flow&partner_id=NB9WWHYEMVUMS&product_id=ECA]]></more_url> - <backend_congif> - <enable_for_countries>all</enable_for_countries> - <urls> - <JP translate="switcher fieldset"> - <more_url><![CDATA[https://cms.paypal.com/jp/cgi-bin/marketingweb?cmd=_render-content&content_ID=marketing_jp/ExpressCheckout&nav=3.1.1]]></more_url> - </JP> - </urls> - </backend_congif> - <config_path>payment/paypal_express/active</config_path> - <frontend_type>checkbox</frontend_type> - <sort_order>10</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </express> - <wps translate="label comment"> - <label>Website Payments Standard</label> - <comment>PayPal processes all of your orders, and you get paid.</comment> - <demo_url><![CDATA[https://merchant.paypal.com/us/cgi-bin/?&cmd=_render-content&content_ID=merchant/demo_WPS]]></demo_url> - <more_url><![CDATA[https://www.paypal.com/cgi-bin/webscr?cmd=_simple-referral-flow&partner_id=NB9WWHYEMVUMS&product_id=WPSA]]></more_url> - <backend_congif> - <enable_for_countries>all</enable_for_countries> - <urls> - <JP translate="switcher fieldset"> - <more_url><![CDATA[https://cms.paypal.com/jp/cgi-bin/marketingweb?cmd=_render-content&content_ID=marketing_jp/WebsitePaymentsStandard&nav=3.1.2]]></more_url> - </JP> - </urls> - </backend_congif> - <config_path>payment/paypal_standard/active</config_path> - <frontend_type>checkbox</frontend_type> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </wps> - <wpp translate="label comment"> - <label>Website Payments Pro</label> - <comment>Process credit cards directly on your website with PayPal’s all-in-one online payment processing solution.</comment> - <demo_url><![CDATA[https://merchant.paypal.com/us/cgi-bin/?&cmd=_render-content&content_ID=merchant/demo_wpp]]></demo_url> - <more_url><![CDATA[https://www.paypal.com/cgi-bin/webscr?cmd=_simple-referral-flow&partner_id=NB9WWHYEMVUMS&product_id=WPPROA]]></more_url> - <backend_congif> - <enable_for_countries>US, CA, GB</enable_for_countries> - </backend_congif> - <config_path>payment/paypal_direct/active</config_path> - <frontend_type>checkbox</frontend_type> - <sort_order>25</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </wpp> - <wpp_pe translate="label comment"> - <label>Website Payments Pro Payflow Edition (includes Express Checkout)</label> - <comment>Accept PayPal payments in your shopping cart. PayPal will process your credit card payments through the Payflow Pro Gateway.</comment> - <backend_congif> - <enable_for_countries>US, GB</enable_for_countries> - </backend_congif> - <config_path>payment/paypaluk_direct/active</config_path> - <frontend_type>checkbox</frontend_type> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </wpp_pe> - <verisign translate="label comment"> - <label>Payflow Pro Gateway</label> - <comment>Don’t have a PayPal merchant account? You can still accept credit card payments through the Payflow Pro Gateway.</comment> - <more_url><![CDATA[https://www.paypal.com/cgi-bin/webscr?cmd=_simple-referral-flow&partner_id=NB9WWHYEMVUMS&product_id=payflow_pro]]></more_url> - <backend_congif> - <enable_for_countries>US, CA, AU, NZ</enable_for_countries> - </backend_congif> - <config_path>payment/verisign/active</config_path> - <frontend_type>checkbox</frontend_type> - <sort_order>35</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </verisign> - <express_pe translate="label comment"> - <label>Express Checkout</label> - <comment>Accept payments without customers leaving your website. Many popular web-hosting services and shopping carts come with the Payflow payment gateways built in, so they are easy to set up.</comment> - <backend_congif> - <enable_for_countries>US, GB</enable_for_countries> - </backend_congif> - <config_path>payment/paypaluk_express/active</config_path> - <is_simplified>1</is_simplified> - <frontend_type>checkbox</frontend_type> - <sort_order>40</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </express_pe> - <payflow_link translate="label comment"> - <label>Payflow Link (for USA and Canada)</label> - <comment>Accept payments with a PCI-compliant checkout that keeps customers on your site. For use with your own merchant account.</comment> - <more_url><![CDATA[https://www.paypal.com/cgi-bin/webscr?cmd=_payflow-link-overview-outside]]></more_url> - <backend_congif> - <enable_for_countries>US, CA</enable_for_countries> - </backend_congif> - <config_path>payment/payflow_link/active</config_path> - <frontend_type>checkbox</frontend_type> - <sort_order>50</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </payflow_link> - <payflow_advanced translate="label comment"> - <label>PayPal Payments Advanced</label> - <comment>Accept payments with a PCI-compliant checkout that keeps customers on your site. Includes a merchant account from PayPal.</comment> - <backend_congif> - <enable_for_countries>US</enable_for_countries> - </backend_congif> - <config_path>payment/payflow_advanced/active</config_path> - <frontend_type>checkbox</frontend_type> - <sort_order>55</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </payflow_advanced> - <hosted_pro translate="label comment"> - <label>Website Payments Pro Hosted Solution</label> - <comment><![CDATA[Payments by cards + seller protection - <strong style="color:red">Contact PayPal before activating</strong>]]></comment> - <more_url><![CDATA[https://cms.paypal.com/cms_content/GB/en_GB/files/developer/HostedSolution.pdf]]></more_url> - <backend_congif> - <enable_for_countries>all</enable_for_countries> - <disable_for_countries>US,CA</disable_for_countries> - <labels> - <JP translate="switcher fieldset"> - <switcher>Website Payments Plus</switcher> - <fieldset>Website Payments Plus Settings</fieldset> - </JP> - <FR translate="switcher fieldset"> - <switcher>Integral Evolution</switcher> - <fieldset>Integral Evolution Settings</fieldset> - </FR> - <IT translate="switcher fieldset"> - <switcher>PayPal Pro</switcher> - <fieldset>PayPal Pro Settings</fieldset> - </IT> - <ES translate="switcher fieldset"> - <switcher>Pasarela integral</switcher> - <fieldset>Pasarela integral Settings</fieldset> - </ES> - </labels> - <urls> - <JP translate="switcher fieldset"> - <more_url><![CDATA[https://www.paypal-japan.com/wpp/]]></more_url> - </JP> - </urls> - </backend_congif> - <config_path>payment/hosted_pro/active</config_path> - <frontend_type>checkbox</frontend_type> - <sort_order>60</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </hosted_pro> - </fields> - </global> - <store> - <frontend_model>Mage_Paypal_Block_Adminhtml_System_Config_Fieldset_Store</frontend_model> - <sort_order>5</sort_order> - <show_in_store>1</show_in_store> - </store> - <api translate="label comment"> - <label>API/Integration Settings</label> - <fieldset_css>paypal-config</fieldset_css> - <frontend_type>text</frontend_type> - <sort_order>10</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <fields> - <api_authentication translate="label"> - <label>API Authentication Methods</label> - <config_path>paypal/wpp/api_authentication</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Paypal_Model_Config::getApiAuthenticationMethods</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </api_authentication> - <api_username translate="label"> - <label>API Username</label> - <config_path>paypal/wpp/api_username</config_path> - <frontend_type>obscure</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Encrypted</backend_model> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </api_username> - <api_password translate="label"> - <label>API Password</label> - <config_path>paypal/wpp/api_password</config_path> - <frontend_type>obscure</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Encrypted</backend_model> - <sort_order>10</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </api_password> - <api_signature translate="label"> - <label>API Signature</label> - <config_path>paypal/wpp/api_signature</config_path> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Encrypted</backend_model> - <frontend_type>obscure</frontend_type> - <sort_order>15</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <depends><api_authentication>0</api_authentication></depends> - </api_signature> - <api_cert translate="label"> - <label>API Certificate</label> - <config_path>paypal/wpp/api_cert</config_path> - <frontend_type>file</frontend_type> - <backend_model>Mage_Paypal_Model_System_Config_Backend_Cert</backend_model> - <sort_order>17</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <depends><api_authentication>1</api_authentication></depends> - </api_cert> - <api_wizard translate="button_label sandbox_button_label"> - <label></label> - <button_label>Get Credentials from PayPal</button_label> - <button_url><![CDATA[https://www.paypal.com/us/cgi-bin/webscr?cmd=_login-api-run]]></button_url> - <sandbox_button_label>Sandbox Credentials</sandbox_button_label> - <sandbox_button_url><![CDATA[https://www.sandbox.paypal.com/us/cgi-bin/webscr?cmd=_login-api-run]]></sandbox_button_url> - <frontend_model>Mage_Paypal_Block_Adminhtml_System_Config_ApiWizard</frontend_model> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </api_wizard> - <sandbox_flag translate="label"> - <label>Sandbox Mode</label> - <config_path>paypal/wpp/sandbox_flag</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>25</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </sandbox_flag> - <use_proxy translate="label"> - <label>API Uses Proxy</label> - <config_path>paypal/wpp/use_proxy</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </use_proxy> - <proxy_host translate="label"> - <label>Proxy Host</label> - <config_path>paypal/wpp/proxy_host</config_path> - <frontend_type>text</frontend_type> - <sort_order>35</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <depends><use_proxy>1</use_proxy></depends> - </proxy_host> - <proxy_port translate="label"> - <label>Proxy Port</label> - <config_path>paypal/wpp/proxy_port</config_path> - <frontend_type>text</frontend_type> - <sort_order>40</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <depends><use_proxy>1</use_proxy></depends> - </proxy_port> - </fields> - </api> - - <express translate="label"> - <label>Express Checkout Settings</label> - <fieldset_css>paypal-config</fieldset_css> - <frontend_type>text</frontend_type> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <title translate="label comment"> - <label>Title</label> - <comment>It is recommended to set this value to "PayPal" per store views.</comment> - <config_path>payment/paypal_express/title</config_path> - <frontend_type>text</frontend_type> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </title> - <sort_order translate="label"> - <label>Sort Order</label> - <config_path>payment/paypal_express/sort_order</config_path> - <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> - <frontend_class>validate-number</frontend_class> - </sort_order> - <payment_action translate="label"> - <label>Payment Action</label> - <config_path>payment/paypal_express/payment_action</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Paypal_Model_System_Config_Source_PaymentActions_Express</source_model> - <sort_order>15</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </payment_action> - <allowspecific translate="label"> - <label>Payment Applicable From</label> - <config_path>payment/paypal_express/allowspecific</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Payment_Allspecificcountries</source_model> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </allowspecific> - <specificcountry translate="label"> - <label>Countries Payment Applicable From</label> - <config_path>payment/paypal_express/specificcountry</config_path> - <frontend_type>multiselect</frontend_type> - <source_model>Mage_Paypal_Model_System_Config_Source_BuyerCountry</source_model> - <sort_order>25</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <depends><allowspecific>1</allowspecific></depends> - </specificcountry> - <debug translate="label"> - <label>Debug Mode</label> - <config_path>payment/paypal_express/debug</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </debug> - <line_items_enabled translate="label"> - <label>Transfer Cart Line Items</label> - <config_path>payment/paypal_express/line_items_enabled</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>35</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </line_items_enabled> - <transfer_shipping_options translate="label tooltip comment"> - <label>Transfer Shipping Options</label> - <config_path>payment/paypal_express/transfer_shipping_options</config_path> - <tooltip>If this option is enabled, customer can change shipping address and shipping method on PayPal website. In live mode works via HTTPS protocol only.</tooltip> - <comment>Notice that PayPal can handle up to 10 shipping options. That is why Magento will transfer only first 10 cheapest shipping options if there are more than 10 available.</comment> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>40</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <depends><line_items_enabled>1</line_items_enabled></depends> - </transfer_shipping_options> - <visible_on_cart translate="label comment"> - <label>Shortcut on Shopping Cart</label> - <config_path>payment/paypal_express/visible_on_cart</config_path> - <comment>Also affects mini-shopping cart.</comment> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>45</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </visible_on_cart> - <visible_on_product translate="label"> - <label>Shortcut on Product View</label> - <config_path>payment/paypal_express/visible_on_product</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>50</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </visible_on_product> - <button_flavor translate="label"> - <label>Shortcut Buttons Flavor</label> - <config_path>paypal/wpp/button_flavor</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Paypal_Model_Config::getExpressCheckoutButtonFlavors</source_model> - <sort_order>55</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </button_flavor> - <solution_type translate="label comment"> - <label>Enable PayPal Guest Checkout</label> - <comment>Ability for buyer to purchase without PayPal account.</comment> - <config_path>payment/paypal_express/solution_type</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Paypal_Model_Config::getExpressCheckoutSolutionTypes</source_model> - <sort_order>60</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </solution_type> - <require_billing_address translate="label comment"> - <label>Require Customer's Billing Address</label> - <comment>This feature needs be enabled first for the merchant account through PayPal technical support.</comment> - <config_path>payment/paypal_express/require_billing_address</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Paypal_Model_System_Config_Source_RequireBillingAddress</source_model> - <sort_order>65</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </require_billing_address> - <allow_ba_signup translate="label comment tooltip"> - <label>Billing Agreement Signup </label> - <comment>Whether to create a billing agreement, if there are no active billing agreements available.</comment> - <tooltip><![CDATA[Merchants need to apply to PayPal for enabling billing agreements feature. Do not enable this option until PayPal confirms that billing agreements are enabled for your merchant account.]]></tooltip> - <config_path>payment/paypal_express/allow_ba_signup</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Paypal_Model_Config::getExpressCheckoutBASignupOptions</source_model> - <sort_order>70</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </allow_ba_signup> - <!-- heading_sftp translate="label"> - <label>some text</label> - <frontend_model>Mage_Adminhtml_Block_System_Config_Form_Field_Heading</frontend_model> - <sort_order>75</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </heading_sftp --> - <authorization_honor_period translate="label comment"> - <label>Authorization Honor Period (days)</label> - <comment>Specifies what the Authorization Honor Period is on the merchant’s PayPal account. It must mirror the setting in PayPal.</comment> - <config_path>payment/paypal_express/authorization_honor_period</config_path> - <frontend_type>text</frontend_type> - <sort_order>80</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </authorization_honor_period> - <order_valid_period translate="label comment"> - <label>Order Valid Period (days)</label> - <comment>Specifies what the Order Valid Period is on the merchant’s PayPal account. It must mirror the setting in PayPal.</comment> - <config_path>payment/paypal_express/order_valid_period</config_path> - <frontend_type>text</frontend_type> - <sort_order>90</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </order_valid_period> - <child_authorization_number translate="label comment"> - <label>Number of Child Authorizations</label> - <comment>The default number of child authorizations in your PayPal account is 1. To do multiple authorizations please contact PayPal to request an increase.</comment> - <config_path>payment/paypal_express/child_authorization_number</config_path> - <frontend_type>text</frontend_type> - <sort_order>100</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </child_authorization_number> - </fields> - </express> - - <wps translate="label comment"> - <label>Website Payments Standard Settings</label> - <fieldset_css>paypal-config</fieldset_css> - <frontend_type>text</frontend_type> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <title translate="label comment"> - <label>Title</label> - <comment>It is recommended to set this value to "PayPal" per store views.</comment> - <config_path>payment/paypal_standard/title</config_path> - <frontend_type>text</frontend_type> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </title> - <sort_order translate="label"> - <label>Sort Order</label> - <config_path>payment/paypal_standard/sort_order</config_path> - <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> - <frontend_class>validate-number</frontend_class> - </sort_order> - <payment_action translate="label"> - <label>Payment Action</label> - <config_path>payment/paypal_standard/payment_action</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Paypal_Model_System_Config_Source_PaymentActions</source_model> - <sort_order>15</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </payment_action> - <allowspecific translate="label"> - <label>Payment Applicable From</label> - <config_path>payment/paypal_standard/allowspecific</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Payment_Allspecificcountries</source_model> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </allowspecific> - <specificcountry translate="label"> - <label>Countries Payment Applicable From</label> - <config_path>payment/paypal_standard/specificcountry</config_path> - <frontend_type>multiselect</frontend_type> - <source_model>Mage_Paypal_Model_System_Config_Source_BuyerCountry</source_model> - <sort_order>25</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <depends><allowspecific>1</allowspecific></depends> - </specificcountry> - <sandbox_flag translate="label"> - <label>Sandbox Mode</label> - <config_path>payment/paypal_standard/sandbox_flag</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </sandbox_flag> - <debug translate="label"> - <label>Debug Mode</label> - <config_path>payment/paypal_standard/debug</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>35</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </debug> - <line_items_enabled translate="label"> - <label>Transfer Cart Line Items</label> - <config_path>payment/paypal_standard/line_items_enabled</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>35</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </line_items_enabled> - <line_items_summary translate="label comment"> - <label>Summary Text for Aggregated Cart</label> - <config_path>payment/paypal_standard/line_items_summary</config_path> - <comment>Uses store frontend name by default.</comment> - <frontend_type>text</frontend_type> - <sort_order>40</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <depends><line_items_enabled>0</line_items_enabled></depends> - </line_items_summary> - </fields> - </wps> - - <wpp translate="label comment"> - <label>Website Payments Pro Settings</label> - <fieldset_css>paypal-config</fieldset_css> - <frontend_type>text</frontend_type> - <sort_order>40</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <title translate="label comment"> - <label>Title</label> - <comment>It is recommended to set this value to "Debit or Credit Card" per store views.</comment> - <config_path>payment/paypal_direct/title</config_path> - <frontend_type>text</frontend_type> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </title> - <sort_order translate="label"> - <label>Sort Order</label> - <config_path>payment/paypal_direct/sort_order</config_path> - <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> - <frontend_class>validate-number</frontend_class> - </sort_order> - <payment_action translate="label"> - <label>Payment Action</label> - <config_path>payment/paypal_direct/payment_action</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Paypal_Model_System_Config_Source_PaymentActions</source_model> - <sort_order>15</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </payment_action> - <allowspecific translate="label"> - <label>Payment Applicable From</label> - <config_path>payment/paypal_direct/allowspecific</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Payment_Allspecificcountries</source_model> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </allowspecific> - <specificcountry translate="label"> - <label>Countries Payment Applicable From</label> - <config_path>payment/paypal_direct/specificcountry</config_path> - <frontend_type>multiselect</frontend_type> - <source_model>Mage_Paypal_Model_System_Config_Source_BuyerCountry</source_model> - <sort_order>25</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <depends><allowspecific>1</allowspecific></depends> - </specificcountry> - <debug translate="label"> - <label>Debug Mode</label> - <config_path>payment/paypal_direct/debug</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </debug> - <line_items_enabled translate="label"> - <label>Transfer Cart Line Items</label> - <config_path>payment/paypal_direct/line_items_enabled</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>35</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </line_items_enabled> - <heading_cc translate="label"> - <label>Credit Card Settings</label> - <frontend_model>Mage_Adminhtml_Block_System_Config_Form_Field_Heading</frontend_model> - <sort_order>40</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </heading_cc> - <cctypes translate="label comment"> - <label>Allowed Credit Card Types</label> - <comment><![CDATA[3D Secure validation is required for Maestro cards. Supporting of American Express cards require additional agreement. Learn more at <a href="http://www.paypal.com/amexupdate">http://www.paypal.com/amexupdate</a>.]]></comment> - <config_path>payment/paypal_direct/cctypes</config_path> - <frontend_type>multiselect</frontend_type> - <source_model>Mage_Paypal_Model_Config::getWppCcTypesAsOptionArray</source_model> - <sort_order>45</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </cctypes> - <useccv translate="label"> - <label>Require CVV Entry</label> - <config_path>payment/paypal_direct/useccv</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>50</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </useccv> - <heading_3dsecure translate="label"> - <label>3D Secure</label> - <frontend_model>Mage_Adminhtml_Block_System_Config_Form_Field_Heading</frontend_model> - <sort_order>55</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </heading_3dsecure> - <centinel translate="label"> - <label>3D Secure Card Validation</label> - <config_path>payment/paypal_direct/centinel</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>60</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </centinel> - <centinel_is_mode_strict translate="label comment"> - <label>Severe 3D Secure Card Validation</label> - <config_path>payment/paypal_direct/centinel_is_mode_strict</config_path> - <comment>Severe Validation Removes Chargeback Liability on Merchant</comment> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>65</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <depends><centinel>1</centinel></depends> - </centinel_is_mode_strict> - <centinel_api_url translate="label comment"> - <label>Centinel Custom API URL</label> - <config_path>payment/paypal_direct/centinel_api_url</config_path> - <comment>If empty, a default value will be used. Custom URL may be provided by CardinalCommerce agreement.</comment> - <frontend_type>text</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>70</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <depends><centinel>1</centinel></depends> - </centinel_api_url> - </fields> - </wpp> - - <paypal_billing_agreement translate="label"> - <label>Paypal Billing Agreement Settings</label> - <frontend_type>text</frontend_type> - <sort_order>45</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <active translate="label comment"> - <label>Enabled</label> - <comment><![CDATA[Will appear as a payment option only for customers who have at least one active billing agreement.]]></comment> - <config_path>payment/paypal_billing_agreement/active</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </active> - <title translate="label"> - <label>Title</label> - <config_path>payment/paypal_billing_agreement/title</config_path> - <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> - </title> - <sort_order translate="label"> - <label>Sort Order</label> - <config_path>payment/paypal_billing_agreement/sort_order</config_path> - <frontend_type>text</frontend_type> - <sort_order>15</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <frontend_class>validate-number</frontend_class> - </sort_order> - <payment_action translate="label"> - <label>Payment Action</label> - <config_path>payment/paypal_billing_agreement/payment_action</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Paypal_Model_System_Config_Source_PaymentActions</source_model> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </payment_action> - <allowspecific translate="label"> - <label>Payment Applicable From</label> - <config_path>payment/paypal_billing_agreement/allowspecific</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Payment_Allspecificcountries</source_model> - <sort_order>25</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </allowspecific> - <specificcountry translate="label"> - <label>Countries Payment Applicable From</label> - <config_path>payment/paypal_billing_agreement/specificcountry</config_path> - <frontend_type>multiselect</frontend_type> - <source_model>Mage_Paypal_Model_System_Config_Source_BuyerCountry</source_model> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <depends><allowspecific>1</allowspecific></depends> - </specificcountry> - <debug translate="label"> - <label>Debug Mode</label> - <config_path>payment/paypal_billing_agreement/debug</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>35</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </debug> - <line_items_enabled translate="label"> - <label>Transfer Cart Line Items</label> - <config_path>payment/paypal_billing_agreement/line_items_enabled</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>40</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </line_items_enabled> - <allow_billing_agreement_wizard translate="label"> - <label>Allow in Billing Agreement Wizard</label> - <config_path>payment/paypal_billing_agreement/allow_billing_agreement_wizard</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>45</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </allow_billing_agreement_wizard> - </fields> - </paypal_billing_agreement> - -<!-- TODO: paypal recurring profile --> - - <wpp_pe translate="label"> - <label>Website Payments Pro (Payflow Edition) Settings</label> - <frontend_type>text</frontend_type> - <sort_order>55</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <title translate="label comment"> - <label>Title</label> - <comment>It is recommended to set this value to "Debit or Credit Card" per store views.</comment> - <config_path>payment/paypaluk_direct/title</config_path> - <frontend_type>text</frontend_type> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </title> - <sort_order translate="label"> - <label>Sort Order</label> - <config_path>payment/paypaluk_direct/sort_order</config_path> - <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> - <frontend_class>validate-number</frontend_class> - </sort_order> - <payment_action translate="label"> - <label>Payment Action</label> - <config_path>payment/paypaluk_direct/payment_action</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Paypal_Model_System_Config_Source_PaymentActions</source_model> - <sort_order>15</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </payment_action> - <allowspecific translate="label"> - <label>Payment Applicable From</label> - <config_path>payment/paypaluk_direct/allowspecific</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Payment_Allspecificcountries</source_model> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </allowspecific> - <specificcountry translate="label"> - <label>Countries Payment Applicable From</label> - <config_path>payment/paypaluk_direct/specificcountry</config_path> - <frontend_type>multiselect</frontend_type> - <source_model>Mage_Paypal_Model_System_Config_Source_BuyerCountry</source_model> - <sort_order>25</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <depends><allowspecific>1</allowspecific></depends> - </specificcountry> - <debug translate="label"> - <label>Debug Mode</label> - <config_path>payment/paypaluk_direct/debug</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </debug> - <line_items_enabled translate="label"> - <label>Transfer Cart Line Items</label> - <config_path>payment/paypaluk_direct/line_items_enabled</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>35</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </line_items_enabled> - <heading_api translate="label"> - <label>API/Integration</label> - <frontend_model>Mage_Adminhtml_Block_System_Config_Form_Field_Heading</frontend_model> - <sort_order>40</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </heading_api> - <partner translate="label"> - <label>Partner</label> - <config_path>paypal/wpuk/partner</config_path> - <frontend_type>text</frontend_type> - <sort_order>45</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </partner> - <user translate="label"> - <label>User</label> - <frontend_type>obscure</frontend_type> - <config_path>paypal/wpuk/user</config_path> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Encrypted</backend_model> - <sort_order>50</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </user> - <vendor translate="label"> - <label>Vendor</label> - <config_path>paypal/wpuk/vendor</config_path> - <frontend_type>text</frontend_type> - <sort_order>55</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </vendor> - <pwd translate="label"> - <label>Password</label> - <config_path>paypal/wpuk/pwd</config_path> - <frontend_type>obscure</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Encrypted</backend_model> - <sort_order>60</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </pwd> - <sandbox_flag translate="label"> - <label>Sandbox Mode</label> - <config_path>paypal/wpuk/sandbox_flag</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>65</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </sandbox_flag> - <use_proxy translate="label"> - <label>API Uses Proxy</label> - <config_path>paypal/wpuk/use_proxy</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>70</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </use_proxy> - <proxy_host translate="label"> - <label>Proxy Host</label> - <config_path>paypal/wpuk/proxy_host</config_path> - <frontend_type>text</frontend_type> - <sort_order>75</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <depends><use_proxy>1</use_proxy></depends> - </proxy_host> - <proxy_port translate="label"> - <label>Proxy Port</label> - <config_path>paypal/wpuk/proxy_port</config_path> - <frontend_type>text</frontend_type> - <sort_order>80</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <depends><use_proxy>1</use_proxy></depends> - </proxy_port> - <heading_cc translate="label"> - <label>Credit Card Settings</label> - <frontend_model>Mage_Adminhtml_Block_System_Config_Form_Field_Heading</frontend_model> - <sort_order>85</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </heading_cc> - <cctypes translate="label"> - <label>Allowed Credit Card Types</label> - <comment><![CDATA[3D Secure validation is required for Maestro cards.]]></comment> - <config_path>payment/paypaluk_direct/cctypes</config_path> - <frontend_type>multiselect</frontend_type> - <source_model>Mage_Paypal_Model_Config::getWppPeCcTypesAsOptionArray</source_model> - <sort_order>90</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </cctypes> - <useccv translate="label"> - <label>Require CVV Entry</label> - <config_path>payment/paypaluk_direct/useccv</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>95</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </useccv> - <heading_3dsecure translate="label"> - <label>3D Secure</label> - <frontend_model>Mage_Adminhtml_Block_System_Config_Form_Field_Heading</frontend_model> - <sort_order>100</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </heading_3dsecure> - <centinel translate="label"> - <label>3D Secure Card Validation</label> - <config_path>payment/paypaluk_direct/centinel</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>105</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </centinel> - <centinel_is_mode_strict translate="label comment"> - <label>Severe 3D Secure Card Validation</label> - <config_path>payment/paypaluk_direct/centinel_is_mode_strict</config_path> - <comment>Severe Validation Removes Chargeback Liability on Merchant</comment> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>110</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <depends><centinel>1</centinel></depends> - </centinel_is_mode_strict> - <centinel_api_url translate="label comment"> - <label>Centinel API URL</label> - <config_path>payment/paypaluk_direct/centinel_api_url</config_path> - <comment>If empty, a default value will be used. Custom URL may be provided by CardinalCommerce agreement.</comment> - <frontend_type>text</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>115</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <depends><centinel>1</centinel></depends> - </centinel_api_url> - </fields> - </wpp_pe> - - <verisign translate="label"> - <label>Payflow Pro Settings</label> - <frontend_type>text</frontend_type> - <sort_order>60</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <title translate="label comment"> - <label>Title</label> - <comment>It is recommended to set this value to "Debit or Credit Card" per store views.</comment> - <config_path>payment/verisign/title</config_path> - <frontend_type>text</frontend_type> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </title> - <sort_order translate="label"> - <label>Sort Order</label> - <config_path>payment/verisign/sort_order</config_path> - <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> - <frontend_class>validate-number</frontend_class> - </sort_order> - <payment_action translate="label"> - <label>Payment Action</label> - <config_path>payment/verisign/payment_action</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Paypal_Model_System_Config_Source_PaymentActions</source_model> - <sort_order>15</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </payment_action> - <allowspecific translate="label"> - <label>Payment Applicable From</label> - <config_path>payment/verisign/allowspecific</config_path> - <frontend_type>select</frontend_type> - <sort_order>20</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Payment_Allspecificcountries</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </allowspecific> - <specificcountry translate="label"> - <label>Countries Payment Applicable From</label> - <config_path>payment/verisign/specificcountry</config_path> - <frontend_type>multiselect</frontend_type> - <sort_order>25</sort_order> - <source_model>Mage_Paypal_Model_System_Config_Source_BuyerCountry</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <depends><allowspecific>1</allowspecific></depends> - </specificcountry> - <debug translate="label"> - <label>Debug Mode</label> - <config_path>payment/verisign/debug</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </debug> - <heading_payflow translate="label"> - <label>API/Integration</label> - <frontend_model>Mage_Adminhtml_Block_System_Config_Form_Field_Heading</frontend_model> - <sort_order>35</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </heading_payflow> - <partner translate="label"> - <label>Partner</label> - <config_path>payment/verisign/partner</config_path> - <frontend_type>text</frontend_type> - <sort_order>40</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </partner> - <user translate="label"> - <label>User</label> - <config_path>payment/verisign/user</config_path> - <frontend_type>obscure</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Encrypted</backend_model> - <sort_order>45</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </user> - <vendor translate="label"> - <label>Vendor</label> - <config_path>payment/verisign/vendor</config_path> - <frontend_type>text</frontend_type> - <sort_order>50</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </vendor> - <pwd translate="label"> - <label>Password</label> - <config_path>payment/verisign/pwd</config_path> - <frontend_type>obscure</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Encrypted</backend_model> - <sort_order>55</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </pwd> - <sandbox_flag translate="label"> - <label>Test Mode</label> - <config_path>payment/verisign/sandbox_flag</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>60</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </sandbox_flag> - <use_proxy translate="label"> - <label>Use Proxy</label> - <config_path>payment/verisign/use_proxy</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>65</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </use_proxy> - <proxy_host translate="label"> - <label>Proxy Host</label> - <config_path>payment/verisign/proxy_host</config_path> - <frontend_type>text</frontend_type> - <sort_order>70</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <depends><use_proxy>1</use_proxy></depends> - </proxy_host> - <proxy_port translate="label"> - <label>Proxy Port</label> - <config_path>payment/verisign/proxy_port</config_path> - <frontend_type>text</frontend_type> - <sort_order>75</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <depends><use_proxy>1</use_proxy></depends> - </proxy_port> - <heading_cc translate="label"> - <label>Credit Card Settings</label> - <frontend_model>Mage_Adminhtml_Block_System_Config_Form_Field_Heading</frontend_model> - <sort_order>80</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </heading_cc> - <cctypes translate="label comment"> - <label>Allowed Credit Card Types</label> - <comment><![CDATA[Supporting of American Express cards require additional agreement. Learn more at <a href="http://www.paypal.com/amexupdate">http://www.paypal.com/amexupdate</a>.]]></comment> - <config_path>payment/verisign/cctypes</config_path> - <frontend_type>multiselect</frontend_type> - <source_model>Mage_Paypal_Model_Config::getPayflowproCcTypesAsOptionArray</source_model> - <sort_order>85</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </cctypes> - <useccv translate="label"> - <label>Require CVV Entry</label> - <config_path>payment/verisign/useccv</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>90</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </useccv> - <heading_3dsecure translate="label"> - <label>3D Secure</label> - <frontend_model>Mage_Adminhtml_Block_System_Config_Form_Field_Heading</frontend_model> - <sort_order>95</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </heading_3dsecure> - <centinel translate="label"> - <label>3D Secure Card Validation</label> - <config_path>payment/verisign/centinel</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>100</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </centinel> - <centinel_is_mode_strict translate="label comment"> - <label>Severe 3D Secure Card Validation</label> - <config_path>payment/verisign/centinel_is_mode_strict</config_path> - <comment>Severe validation removes chargeback liability on merchant.</comment> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>105</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <depends><centinel>1</centinel></depends> - </centinel_is_mode_strict> - <centinel_api_url translate="label comment"> - <label>Centinel API URL</label> - <config_path>payment/verisign/centinel_api_url</config_path> - <comment>A value is required for live mode. Refer to your CardinalCommerce agreement.</comment> - <frontend_type>text</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>110</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <depends><centinel>1</centinel></depends> - </centinel_api_url> - </fields> - </verisign> - - <express_pe translate="label"> - <label>Express Checkout (Payflow Edition) Settings</label> - <frontend_type>text</frontend_type> - <sort_order>65</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <title translate="label"> - <label>Title</label> - <config_path>payment/paypaluk_express/title</config_path> - <frontend_type>text</frontend_type> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </title> - <sort_order translate="label"> - <label>Sort Order</label> - <config_path>payment/paypaluk_express/sort_order</config_path> - <frontend_type>text</frontend_type> - <sort_order>10</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <frontend_class>validate-number</frontend_class> - </sort_order> - <payment_action translate="label"> - <label>Payment Action</label> - <config_path>payment/paypaluk_express/payment_action</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Paypal_Model_System_Config_Source_PaymentActions</source_model> - <sort_order>15</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </payment_action> - <allowspecific translate="label"> - <label>Payment Applicable From</label> - <config_path>payment/paypaluk_express/allowspecific</config_path> - <frontend_type>select</frontend_type> - <sort_order>20</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Payment_Allspecificcountries</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </allowspecific> - <specificcountry translate="label"> - <label>Countries Payment Applicable From</label> - <config_path>payment/paypaluk_express/specificcountry</config_path> - <frontend_type>multiselect</frontend_type> - <sort_order>25</sort_order> - <source_model>Mage_Paypal_Model_System_Config_Source_BuyerCountry</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <depends><allowspecific>1</allowspecific></depends> - </specificcountry> - <debug translate="label"> - <label>Debug Mode</label> - <config_path>payment/paypaluk_express/debug</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </debug> - <line_items_enabled translate="label"> - <label>Transfer Cart Line Items</label> - <config_path>payment/paypaluk_express/line_items_enabled</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>35</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </line_items_enabled> - <visible_on_cart translate="label comment"> - <label>Shortcut on Shopping Cart</label> - <comment>Also affects mini-shopping cart.</comment> - <config_path>payment/paypaluk_express/visible_on_cart</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>40</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </visible_on_cart> - <visible_on_product translate="label"> - <label>Shortcut on Product View</label> - <config_path>payment/paypaluk_express/visible_on_product</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>45</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </visible_on_product> - </fields> - </express_pe> - - <settlement_reports translate="label"> - <label>Settlement Report Settings</label> - <frontend_type>text</frontend_type> - <sort_order>70</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <fields> - <heading_sftp translate="label"> - <label>SFTP Credentials</label> - <frontend_model>Mage_Adminhtml_Block_System_Config_Form_Field_Heading</frontend_model> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </heading_sftp> - <settlement_reports_ftp_login translate="label"> - <label>Login</label> - <config_path>paypal/fetch_reports/ftp_login</config_path> - <frontend_type>obscure</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Encrypted</backend_model> - <sort_order>10</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </settlement_reports_ftp_login> - <settlement_reports_ftp_password translate="label"> - <label>Password</label> - <config_path>paypal/fetch_reports/ftp_password</config_path> - <frontend_type>obscure</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Encrypted</backend_model> - <sort_order>15</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </settlement_reports_ftp_password> - <settlement_reports_ftp_sandbox translate="label"> - <label>Sandbox Mode</label> - <config_path>paypal/fetch_reports/ftp_sandbox</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </settlement_reports_ftp_sandbox> - <settlement_reports_ftp_ip translate="label comment tooltip"> - <label>Custom Endpoint Hostname or IP-Address</label> - <comment>By default it is "reports.paypal.com".</comment> - <tooltip>Use colon to specify port. For example: "test.example.com:5224".</tooltip> - <config_path>paypal/fetch_reports/ftp_ip</config_path> - <frontend_type>text</frontend_type> - <sort_order>25</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <depends><settlement_reports_ftp_sandbox>0</settlement_reports_ftp_sandbox></depends> - </settlement_reports_ftp_ip> - <settlement_reports_ftp_path translate="label comeent"> - <label>Custom Path</label> - <comment>By default it is "/ppreports/outgoing".</comment> - <config_path>paypal/fetch_reports/ftp_path</config_path> - <frontend_type>text</frontend_type> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <depends><settlement_reports_ftp_sandbox>0</settlement_reports_ftp_sandbox></depends> - </settlement_reports_ftp_path> - <heading_schedule translate="label"> - <label>Scheduled Fetching</label> - <frontend_model>Mage_Adminhtml_Block_System_Config_Form_Field_Heading</frontend_model> - <sort_order>35</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </heading_schedule> - <settlement_reports_active translate="label"> - <label>Enable Automatic Fetching</label> - <config_path>paypal/fetch_reports/active</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>40</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </settlement_reports_active> - <settlement_reports_schedule translate="label comment"> - <label>Schedule</label> - <comment>PayPal retains reports for 45 days.</comment> - <config_path>paypal/fetch_reports/schedule</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Paypal_Model_System_Config_Source_FetchingSchedule</source_model> - <sort_order>45</sort_order> - <show_in_default>1</show_in_default> - </settlement_reports_schedule> - <settlement_reports_time translate="label"> - <label>Time of Day</label> - <config_path>paypal/fetch_reports/time</config_path> - <frontend_type>time</frontend_type> - <!-- backend_model>Mage_Paypal_Model_System_Config_Backend_Cron</backend_model --> - <sort_order>50</sort_order> - <show_in_default>1</show_in_default> - </settlement_reports_time> - </fields> - </settlement_reports> - - <style translate="label"> - <label>Frontend Experience Settings</label> - <frontend_type>text</frontend_type> - <sort_order>75</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <logo translate="label comment"> - <label>PayPal Product Logo</label> - <comment>Displays on catalog pages and homepage.</comment> - <config_path>paypal/style/logo</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Paypal_Model_System_Config_Source_Logo</source_model> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </logo> - <paypal_pages translate="label"> - <label>PayPal Merchant Pages Style</label> - <frontend_model>Mage_Adminhtml_Block_System_Config_Form_Field_Heading</frontend_model> - <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> - </paypal_pages> - <page_style translate="label tooltip"> - <label>Page Style</label> - <config_path>paypal/style/page_style</config_path> - <tooltip><![CDATA[Allowable values: "paypal", "primary" (default), your_custom_value (a custom payment page style from your merchant account profile).]]></tooltip> - <frontend_type>text</frontend_type> - <sort_order>15</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </page_style> - <paypal_hdrimg translate='label tooltip'> - <label>Header Image URL</label> - <config_path>paypal/style/paypal_hdrimg</config_path> - <tooltip><![CDATA[The image at the top left of the checkout page. Max size is 750x90-pixel. <strong style="color:red">https</strong> is highly encouraged.]]></tooltip> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </paypal_hdrimg> - <paypal_hdrbackcolor translate="label tooltip"> - <label>Header Background Color</label> - <config_path>paypal/style/paypal_hdrbackcolor</config_path> - <tooltip><![CDATA[The background color for the header of the checkout page. Case-insensitive six-character HTML hexadecimal color code in ASCII.]]></tooltip> - <sort_order>25</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </paypal_hdrbackcolor> - <paypal_hdrbordercolor translate="label tooltip"> - <label>Header Border Color</label> - <config_path>paypal/style/paypal_hdrbordercolor</config_path> - <tooltip>2-pixel perimeter around the header space.</tooltip> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </paypal_hdrbordercolor> - <paypal_payflowcolor translate="label tooltip"> - <label>Page Background Color</label> - <config_path>paypal/style/paypal_payflowcolor</config_path> - <tooltip><![CDATA[The background color for the checkout page around the header and payment form.]]></tooltip> - <sort_order>35</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </paypal_payflowcolor> - </fields> - </style> - - <payflow_link translate="label"> - <label>Payflow Link Settings</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> - <fields> - <payflowlink_info> - <frontend_model>Mage_Paypal_Block_Adminhtml_System_Config_Payflowlink_Info</frontend_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <sort_order>22</sort_order> - </payflowlink_info> - <title translate="label comment"> - <label>Title</label> - <comment>It is recommended to set this value to "Debit or Credit Card" per store views.</comment> - <config_path>payment/payflow_link/title</config_path> - <frontend_type>text</frontend_type> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </title> - <sort_order translate="label"> - <label>Sort Order</label> - <config_path>payment/payflow_link/sort_order</config_path> - <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> - <frontend_class>validate-number</frontend_class> - </sort_order> - <payment_action translate="label"> - <label>Payment Action</label> - <config_path>payment/payflow_link/payment_action</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Paypal_Model_System_Config_Source_PaymentActions</source_model> - <sort_order>15</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </payment_action> - <allowspecific translate="label"> - <label>Payment Applicable From</label> - <config_path>payment/payflow_link/allowspecific</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Payment_Allspecificcountries</source_model> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </allowspecific> - <specificcountry translate="label"> - <label>Countries Payment Applicable From</label> - <config_path>payment/payflow_link/specificcountry</config_path> - <frontend_type>multiselect</frontend_type> - <source_model>Mage_Paypal_Model_System_Config_Source_BuyerCountry</source_model> - <sort_order>25</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <depends><allowspecific>1</allowspecific></depends> - </specificcountry> - <debug translate="label"> - <label>Debug Mode</label> - <config_path>payment/payflow_link/debug</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </debug> - <heading_payflowlink translate="label"> - <label>API/Integration</label> - <frontend_model>Mage_Adminhtml_Block_System_Config_Form_Field_Heading</frontend_model> - <sort_order>35</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </heading_payflowlink> - <partner translate="label"> - <label>Partner</label> - <config_path>payment/payflow_link/partner</config_path> - <frontend_type>text</frontend_type> - <sort_order>40</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </partner> - <vendor translate="label"> - <label>Vendor / Merchant Login</label> - <config_path>payment/payflow_link/vendor</config_path> - <frontend_type>text</frontend_type> - <sort_order>45</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </vendor> - <user translate="label"> - <label>User</label> - <comment>If you do not have multiple users set up on your account, please re-enter your Vendor/Merchant Login here.</comment> - <frontend_type>text</frontend_type> - <config_path>payment/payflow_link/user</config_path> - <sort_order>50</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </user> - <pwd translate="label"> - <label>Password</label> - <config_path>payment/payflow_link/pwd</config_path> - <frontend_type>obscure</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Encrypted</backend_model> - <sort_order>55</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </pwd> - <sandbox_flag translate="label"> - <label>Test Mode</label> - <config_path>payment/payflow_link/sandbox_flag</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>60</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </sandbox_flag> - <use_proxy translate="label"> - <label>Use Proxy</label> - <config_path>payment/payflow_link/use_proxy</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>65</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </use_proxy> - <proxy_host translate="label"> - <label>Proxy Host</label> - <config_path>payment/payflow_link/proxy_host</config_path> - <frontend_type>text</frontend_type> - <sort_order>70</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <depends><use_proxy>1</use_proxy></depends> - </proxy_host> - <proxy_port translate="label"> - <label>Proxy Port</label> - <config_path>payment/payflow_link/proxy_port</config_path> - <frontend_type>text</frontend_type> - <sort_order>75</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <depends><use_proxy>1</use_proxy></depends> - </proxy_port> - </fields> - </payflow_link> - - <payflow_advanced translate="label"> - <label>PayPal Payments Advanced</label> - <frontend_type>text</frontend_type> - <sort_order>90</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <payflowlink_info> - <frontend_model>Mage_Paypal_Block_Adminhtml_System_Config_Payflowlink_Advanced</frontend_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <sort_order>22</sort_order> - </payflowlink_info> - <title translate="label comment"> - <label>Title</label> - <comment>It is recommended to set this value to "Debit or Credit Card" per store views.</comment> - <config_path>payment/payflow_advanced/title</config_path> - <frontend_type>text</frontend_type> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </title> - <sort_order translate="label"> - <label>Sort Order</label> - <config_path>payment/payflow_advanced/sort_order</config_path> - <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> - <frontend_class>validate-number</frontend_class> - </sort_order> - <payment_action translate="label"> - <label>Payment Action</label> - <config_path>payment/payflow_advanced/payment_action</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Paypal_Model_System_Config_Source_PaymentActions</source_model> - <sort_order>15</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </payment_action> - <allowspecific translate="label"> - <label>Payment Applicable From</label> - <config_path>payment/payflow_advanced/allowspecific</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Payment_Allspecificcountries</source_model> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </allowspecific> - <specificcountry translate="label"> - <label>Countries Payment Applicable From</label> - <config_path>payment/payflow_advanced/specificcountry</config_path> - <frontend_type>multiselect</frontend_type> - <source_model>Mage_Paypal_Model_System_Config_Source_BuyerCountry</source_model> - <sort_order>25</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <depends><allowspecific>1</allowspecific></depends> - </specificcountry> - <debug translate="label"> - <label>Debug Mode</label> - <config_path>payment/payflow_advanced/debug</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </debug> - <heading_payflowlink translate="label"> - <label>API/Integration</label> - <frontend_model>Mage_Adminhtml_Block_System_Config_Form_Field_Heading</frontend_model> - <sort_order>35</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </heading_payflowlink> - <partner translate="label"> - <label>Partner</label> - <config_path>payment/payflow_advanced/partner</config_path> - <frontend_type>text</frontend_type> - <sort_order>40</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </partner> - <vendor translate="label"> - <label>Vendor / Merchant Login</label> - <config_path>payment/payflow_advanced/vendor</config_path> - <frontend_type>text</frontend_type> - <sort_order>45</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </vendor> - <user translate="label"> - <label>User</label> - <comment>If you do not have multiple users set up on your account, please re-enter your Vendor/Merchant Login here.</comment> - <frontend_type>text</frontend_type> - <config_path>payment/payflow_advanced/user</config_path> - <sort_order>50</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </user> - <pwd translate="label"> - <label>Password</label> - <config_path>payment/payflow_advanced/pwd</config_path> - <frontend_type>obscure</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Encrypted</backend_model> - <sort_order>55</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </pwd> - <sandbox_flag translate="label"> - <label>Test Mode</label> - <config_path>payment/payflow_advanced/sandbox_flag</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>60</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </sandbox_flag> - <use_proxy translate="label"> - <label>Use Proxy</label> - <config_path>payment/payflow_advanced/use_proxy</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>65</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </use_proxy> - <proxy_host translate="label"> - <label>Proxy Host</label> - <config_path>payment/payflow_advanced/proxy_host</config_path> - <frontend_type>text</frontend_type> - <sort_order>70</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <depends><use_proxy>1</use_proxy></depends> - </proxy_host> - <proxy_port translate="label"> - <label>Proxy Port</label> - <config_path>payment/payflow_advanced/proxy_port</config_path> - <frontend_type>text</frontend_type> - <sort_order>75</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <depends><use_proxy>1</use_proxy></depends> - </proxy_port> - </fields> - </payflow_advanced> - - <hosted_pro translate="label"> - <label>Website Payments Pro Hosted Solution Settings</label> - <frontend_type>text</frontend_type> - <sort_order>90</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <title translate="label comment"> - <label>Title</label> - <comment>It is recommended to set this value to "PayPal" per store views.</comment> - <config_path>payment/hosted_pro/title</config_path> - <frontend_type>text</frontend_type> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </title> - <sort_order translate="label"> - <label>Sort Order</label> - <config_path>payment/hosted_pro/sort_order</config_path> - <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> - <frontend_class>validate-number</frontend_class> - </sort_order> - <payment_action translate="label"> - <label>Payment Action</label> - <config_path>payment/hosted_pro/payment_action</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Paypal_Model_System_Config_Source_PaymentActions</source_model> - <sort_order>15</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </payment_action> - <allowspecific translate="label"> - <label>Payment Applicable From</label> - <config_path>payment/hosted_pro/allowspecific</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Payment_Allspecificcountries</source_model> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </allowspecific> - <specificcountry translate="label"> - <label>Countries Payment Applicable From</label> - <config_path>payment/hosted_pro/specificcountry</config_path> - <frontend_type>multiselect</frontend_type> - <source_model>Mage_Paypal_Model_System_Config_Source_BuyerCountry</source_model> - <sort_order>25</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <depends><allowspecific>1</allowspecific></depends> - </specificcountry> - <debug translate="label"> - <label>Debug Mode</label> - <config_path>payment/hosted_pro/debug</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>35</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </debug> - <display_ec translate="label"> - <label>Display Express Checkout in the Payment Information step</label> - <config_path>payment/hosted_pro/display_ec</config_path> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>45</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - </display_ec> - </fields> - </hosted_pro> - </groups> - </paypal> - </sections> -</config> diff --git a/app/code/core/Mage/Paypal/view/frontend/express/review.phtml b/app/code/core/Mage/Paypal/view/frontend/express/review.phtml index 6aca09c939e030d47428e28f2446e53546f66cfe..e1b2920ce752df4653b92adb96db682d25c3dde7 100644 --- a/app/code/core/Mage/Paypal/view/frontend/express/review.phtml +++ b/app/code/core/Mage/Paypal/view/frontend/express/review.phtml @@ -99,7 +99,7 @@ $shippingAddress = $this->getShippingAddress(); <button type="button" id="review_submit" value="<?php echo $this->__('Place Order') ?>" class="button btn-checkout"><span><span><?php echo $this->__('Place Order') ?></span></span></button> <button type="button" id="update_order" class="button btn-checkout"><span><span><?php echo $this->__('Update Order Data') ?></span></span></button> <span class="please-wait" id="review-please-wait" style="display:none;"> - <img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo $this->__('Submitting order information...') ?>" title="<?php echo $this->__('Submitting order information...') ?>" class="v-middle" /> <?php echo $this->__('Submitting order information...') ?> + <img src="<?php echo $this->getViewFileUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo $this->__('Submitting order information...') ?>" title="<?php echo $this->__('Submitting order information...') ?>" class="v-middle" /> <?php echo $this->__('Submitting order information...') ?> </span> </div> </form> diff --git a/app/code/core/Mage/PaypalUk/view/frontend/express/review.phtml b/app/code/core/Mage/PaypalUk/view/frontend/express/review.phtml index 525319cdcc0b6508c13bb6195e2ab787d2cc41ac..35c127f644239c6e47427612fa01893ab3dbd2cb 100644 --- a/app/code/core/Mage/PaypalUk/view/frontend/express/review.phtml +++ b/app/code/core/Mage/PaypalUk/view/frontend/express/review.phtml @@ -126,7 +126,7 @@ <button type="button" id="review_button" value="<?php echo $this->__('Place Order') ?>" class="button btn-checkout"><span><span><?php echo $this->__('Place Order') ?></span></span></button> <button type="button" id="review_submit" value="<?php echo $this->__('Place Order') ?>" class="button btn-checkout"><span><span><?php echo $this->__('Place Order') ?></span></span></button> <span class="please-wait" id="review-please-wait" style="display:none;"> - <img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo $this->__('Submitting order information...') ?>" title="<?php echo $this->__('Submitting order information...') ?>" class="v-middle" /> <?php echo $this->__('Submitting order information...') ?> + <img src="<?php echo $this->getViewFileUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo $this->__('Submitting order information...') ?>" title="<?php echo $this->__('Submitting order information...') ?>" class="v-middle" /> <?php echo $this->__('Submitting order information...') ?> </span> </div> </form> diff --git a/app/code/core/Mage/Persistent/etc/adminhtml/system.xml b/app/code/core/Mage/Persistent/etc/adminhtml/system.xml new file mode 100644 index 0000000000000000000000000000000000000000..0527f1f9dc7babde2ce76daf85efdee5c23a7a57 --- /dev/null +++ b/app/code/core/Mage/Persistent/etc/adminhtml/system.xml @@ -0,0 +1,79 @@ +<?xml version="1.0"?> +<!-- +/** + * 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 Mage_Persistent + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> + <system> + <section id="persistent" translate="label" module="Mage_Persistent" type="text" sortOrder="500" showInDefault="1" showInWebsite="1" showInStore="0"> + <class>separator-top</class> + <label>Persistent Shopping Cart</label> + <tab>customer</tab> + <resource>Mage_Persistent::persistent</resource> + <group id="options" translate="label" module="Mage_Persistent" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>General Options</label> + <field id="enabled" translate="label" module="Mage_Persistent" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Enable Persistence</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="lifetime" translate="label" module="Mage_Persistent" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Persistence Lifetime (seconds)</label> + <validate>validate-digits validate-digits-range digits-range-0-3153600000</validate> + <depends> + <field id="enabled">1</field> + </depends> + </field> + <field id="remember_enabled" translate="label" module="Mage_Persistent" type="select" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Enable "Remember Me"</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + <depends> + <field id="enabled">1</field> + </depends> + </field> + <field id="remember_default" translate="label" module="Mage_Persistent" type="select" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>"Remember Me" Default Value</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + <depends> + <field id="enabled">1</field> + </depends> + </field> + <field id="logout_clear" translate="label" module="Mage_Persistent" type="select" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Clear Persistence on Log Out</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + <depends> + <field id="enabled">1</field> + </depends> + </field> + <field id="shopping_cart" translate="label" module="Mage_Persistent" type="select" sortOrder="60" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Persist Shopping Cart</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + <depends> + <field id="enabled">1</field> + </depends> + </field> + </group> + </section> + </system> +</config> diff --git a/app/code/core/Mage/Persistent/etc/system.xml b/app/code/core/Mage/Persistent/etc/system.xml deleted file mode 100644 index 5c91524951632a7ec4bb1003d0a4f4969612202e..0000000000000000000000000000000000000000 --- a/app/code/core/Mage/Persistent/etc/system.xml +++ /dev/null @@ -1,119 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * 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 Mage_Persistent - * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<config> - <sections> - <persistent translate="label" module="Mage_Persistent"> - <class>separator-top</class> - <label>Persistent Shopping Cart</label> - <tab>customer</tab> - <frontend_type>text</frontend_type> - <sort_order>500</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <resource>Mage_Persistent::persistent</resource> - <groups> - <options translate="label" module="Mage_Persistent"> - <label>General Options</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>0</show_in_store> - - <fields> - <enabled translate="label" module="Mage_Persistent"> - <label>Enable Persistence</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>10</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </enabled> - - <lifetime translate="label" module="Mage_Persistent"> - <label>Persistence Lifetime (seconds)</label> - <validate>validate-digits validate-digits-range digits-range-0-3153600000</validate> - <frontend_type>text</frontend_type> - <sort_order>20</sort_order> - <depends><enabled>1</enabled></depends> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </lifetime> - - <remember_enabled translate="label" module="Mage_Persistent"> - <label>Enable "Remember Me"</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>30</sort_order> - <depends><enabled>1</enabled></depends> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </remember_enabled> - - <remember_default translate="label" module="Mage_Persistent"> - <label>"Remember Me" Default Value</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>40</sort_order> - <depends><enabled>1</enabled></depends> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </remember_default> - - <logout_clear translate="label" module="Mage_Persistent"> - <label>Clear Persistence on Log Out</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>50</sort_order> - <depends><enabled>1</enabled></depends> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </logout_clear> - - <shopping_cart translate="label" module="Mage_Persistent"> - <label>Persist Shopping Cart</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>60</sort_order> - <depends><enabled>1</enabled></depends> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </shopping_cart> - </fields> - </options> - </groups> - </persistent> - </sections> -</config> diff --git a/app/code/core/Mage/Persistent/view/frontend/checkout/onepage/billing.phtml b/app/code/core/Mage/Persistent/view/frontend/checkout/onepage/billing.phtml index b23edecc30bbef0ef535622083f15a5658de8f0a..58de91077f60108be977bc769584fcef6da8f25e 100644 --- a/app/code/core/Mage/Persistent/view/frontend/checkout/onepage/billing.phtml +++ b/app/code/core/Mage/Persistent/view/frontend/checkout/onepage/billing.phtml @@ -196,7 +196,7 @@ <p class="required"><?php echo $this->__('* Required Fields') ?></p> <button type="button" title="<?php echo $this->__('Continue') ?>" class="button" onclick="billing.save()"><span><span><?php echo $this->__('Continue') ?></span></span></button> <span class="please-wait" id="billing-please-wait" style="display:none;"> - <img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo $this->__('Loading next step...') ?>" title="<?php echo $this->__('Loading next step...') ?>" class="v-middle" /> <?php echo $this->__('Loading next step...') ?> + <img src="<?php echo $this->getViewFileUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo $this->__('Loading next step...') ?>" title="<?php echo $this->__('Loading next step...') ?>" class="v-middle" /> <?php echo $this->__('Loading next step...') ?> </span> </div> </fieldset> diff --git a/app/code/core/Mage/Persistent/view/frontend/customer/form/register.phtml b/app/code/core/Mage/Persistent/view/frontend/customer/form/register.phtml index 66ae48bbfd4bae5eeb644e3a4ab3079be36cbaa1..38bdc43827878cbc80869a0477d5a962776db8fa 100644 --- a/app/code/core/Mage/Persistent/view/frontend/customer/form/register.phtml +++ b/app/code/core/Mage/Persistent/view/frontend/customer/form/register.phtml @@ -192,12 +192,12 @@ initData.dobMonthSelector = '#month'; initData.dobYearSelector = '#year'; }); - $.mage.load.js("<?php echo $this->getSkinUrl('jquery/jquery.validate.js')?>"); - $.mage.load.js("<?php echo $this->getSkinUrl('jquery/additional-methods.js')?>"); - $.mage.load.js("<?php echo $this->getSkinUrl('jquery/jquery.metadata.js')?>"); - $.mage.load.js("<?php echo $this->getSkinUrl('jquery/jquery.hook.js')?>"); - $.mage.load.js("<?php echo $this->getSkinUrl('mage/validation/validate.js')?>"); - $.mage.load.js("<?php echo $this->getSkinUrl('Mage_Customer::register.js') ?>"); + $.mage.load.js("<?php echo $this->getViewFileUrl('jquery/jquery.validate.js')?>"); + $.mage.load.js("<?php echo $this->getViewFileUrl('jquery/additional-methods.js')?>"); + $.mage.load.js("<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js')?>"); + $.mage.load.js("<?php echo $this->getViewFileUrl('jquery/jquery.hook.js')?>"); + $.mage.load.js("<?php echo $this->getViewFileUrl('mage/validation/validate.js')?>"); + $.mage.load.js("<?php echo $this->getViewFileUrl('Mage_Customer::register.js') ?>"); })(jQuery); </script> </div> diff --git a/app/code/core/Mage/Poll/etc/adminhtml/system.xml b/app/code/core/Mage/Poll/etc/adminhtml/system.xml new file mode 100644 index 0000000000000000000000000000000000000000..e3cc7038f3d2b1fa1db9271042a505c3dde688ab --- /dev/null +++ b/app/code/core/Mage/Poll/etc/adminhtml/system.xml @@ -0,0 +1,39 @@ +<?xml version="1.0"?> +<!-- +/** + * 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 Mage_Poll + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> + <system> + <section id="web"> + <group id="polls"> + <field id="poll_check_by_ip" translate="label" module="Mage_Poll" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Disallow Voting in a Poll Multiple Times from Same IP-address</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + </group> + </section> + </system> +</config> diff --git a/app/code/core/Mage/Poll/view/frontend/active.phtml b/app/code/core/Mage/Poll/view/frontend/active.phtml index b6a45cd2a859db699f9f14c68726e37c190155e2..726646edfbde32ec85878f1d023294566898126b 100644 --- a/app/code/core/Mage/Poll/view/frontend/active.phtml +++ b/app/code/core/Mage/Poll/view/frontend/active.phtml @@ -46,7 +46,7 @@ <script type="text/javascript"> //<![CDATA[ (function($) { - head.js("<?php echo $this->getSkinUrl('Mage_Poll::poll.js')?>", function() { + head.js("<?php echo $this->getViewFileUrl('Mage_Poll::poll.js')?>", function() { $('#pollForm').poll({pollAnswersSelector: '#poll-answers', pollCheckedOption: 'input.poll_vote:checked'}); }); })(jQuery); diff --git a/app/code/core/Mage/ProductAlert/etc/adminhtml/system.xml b/app/code/core/Mage/ProductAlert/etc/adminhtml/system.xml new file mode 100644 index 0000000000000000000000000000000000000000..c28f3ce062ff9ac5b398044811da51876997f7d5 --- /dev/null +++ b/app/code/core/Mage/ProductAlert/etc/adminhtml/system.xml @@ -0,0 +1,79 @@ +<?xml version="1.0"?> +<!-- +/** + * 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 Mage_ProductAlert + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> + <system> + <section id="catalog"> + <group id="productalert" translate="label" module="Mage_ProductAlert" type="text" sortOrder="250" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Product Alerts</label> + <field id="allow_price" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Allow Alert When Product Price Changes</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="allow_stock" translate="label" type="select" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Allow Alert When Product Comes Back in Stock</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="email_price_template" translate="label" type="select" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Price Alert Email Template</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Template</source_model> + </field> + <field id="email_stock_template" translate="label" type="select" sortOrder="4" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Stock Alert Email Template</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Template</source_model> + </field> + <field id="email_identity" translate="label" type="select" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Alert Email Sender</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Identity</source_model> + </field> + </group> + <group id="productalert_cron" translate="label" module="Mage_ProductAlert" type="text" sortOrder="260" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Product Alerts Run Settings</label> + <field id="frequency" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Frequency</label> + <source_model>Mage_Cron_Model_Config_Source_Frequency</source_model> + <backend_model>Mage_Cron_Model_Config_Backend_Product_Alert</backend_model> + </field> + <field id="time" translate="label" type="time" sortOrder="2" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Start Time</label> + </field> + <field id="error_email" translate="label" type="text" sortOrder="3" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Error Email Recipient</label> + <validate>validate-email</validate> + </field> + <field id="error_email_identity" translate="label" type="select" sortOrder="4" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Error Email Sender</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Identity</source_model> + </field> + <field id="error_email_template" translate="label" type="select" sortOrder="5" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Error Email Template</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Template</source_model> + </field> + </group> + </section> + </system> +</config> diff --git a/app/code/core/Mage/ProductAlert/etc/system.xml b/app/code/core/Mage/ProductAlert/etc/system.xml deleted file mode 100644 index 5f916b87a9c83fd48af02d93ffc4147419b22aa1..0000000000000000000000000000000000000000 --- a/app/code/core/Mage/ProductAlert/etc/system.xml +++ /dev/null @@ -1,146 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * 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 Mage_ProductAlert - * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<config> - <sections> - <catalog> - <groups> - <productalert translate="label" module="Mage_ProductAlert"> - <label>Product Alerts</label> - <frontend_type>text</frontend_type> - <sort_order>250</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <allow_price translate="label"> - <label>Allow Alert When Product Price Changes</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </allow_price> - <allow_stock translate="label"> - <label>Allow Alert When Product Comes Back in Stock</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>3</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </allow_stock> - - <email_price_template translate="label"> - <label>Price Alert Email Template</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Template</source_model> - <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> - </email_price_template> - <email_stock_template translate="label"> - <label>Stock Alert Email Template</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Template</source_model> - <sort_order>4</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </email_stock_template> - <email_identity translate="label"> - <label>Alert Email Sender</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Identity</source_model> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </email_identity> - </fields> - </productalert> - <productalert_cron translate="label" module="Mage_ProductAlert"> - <label>Product Alerts Run Settings</label> - <frontend_type>text</frontend_type> - <sort_order>260</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - <fields> - <frequency translate="label"> - <label>Frequency</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Cron_Frequency</source_model> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Product_Alert_Cron</backend_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </frequency> - <time translate="label"> - <label>Start Time</label> - <frontend_type>time</frontend_type> - <sort_order>2</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </time> - <error_email translate="label"> - <label>Error Email Recipient</label> - <frontend_type>text</frontend_type> - <validate>validate-email</validate> - <sort_order>3</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </error_email> - <error_email_identity translate="label"> - <label>Error Email Sender</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Identity</source_model> - <sort_order>4</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </error_email_identity> - <error_email_template translate="label"> - <label>Error Email Template</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Template</source_model> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </error_email_template> - </fields> - </productalert_cron> - </groups> - </catalog> - </sections> -</config> diff --git a/app/code/core/Mage/Reports/etc/adminhtml/system.xml b/app/code/core/Mage/Reports/etc/adminhtml/system.xml new file mode 100644 index 0000000000000000000000000000000000000000..8362ac87481445e203b173ac07790e4377a05d5b --- /dev/null +++ b/app/code/core/Mage/Reports/etc/adminhtml/system.xml @@ -0,0 +1,64 @@ +<?xml version="1.0"?> +<!-- +/** + * 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 Mage_Reports + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> + <system> + <section id="catalog"> + <group id="recently_products" translate="label" module="Mage_Reports" type="text" sortOrder="350" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Recently Viewed/Compared Products</label> + <field id="scope" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Show for Current</label> + <source_model>Mage_Backend_Model_Config_Source_Reports_Scope</source_model> + <hide_in_single_store_mode>1</hide_in_single_store_mode> + </field> + <field id="viewed_count" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Default Recently Viewed Products Count</label> + </field> + <field id="compared_count" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Default Recently Compared Products Count</label> + </field> + </group> + </section> + <section id="reports" translate="label" module="Mage_Reports" type="text" sortOrder="1000" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Reports</label> + <tab>general</tab> + <resource>Mage_Reports::reports</resource> + <group id="dashboard" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Dashboard</label> + <field id="ytd_start" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Year-To-Date Starts</label> + <frontend_model>Mage_Adminhtml_Block_Report_Config_Form_Field_YtdStart</frontend_model> + </field> + <field id="mtd_start" translate="label comment" type="select" sortOrder="2" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Current Month Starts</label> + <frontend_model>Mage_Adminhtml_Block_Report_Config_Form_Field_MtdStart</frontend_model> + <comment>Select day of the month.</comment> + </field> + </group> + </section> + </system> +</config> diff --git a/app/code/core/Mage/Reports/etc/system.xml b/app/code/core/Mage/Reports/etc/system.xml deleted file mode 100644 index 09358d180450f2c2a5118fd44d605647266b90ee..0000000000000000000000000000000000000000 --- a/app/code/core/Mage/Reports/etc/system.xml +++ /dev/null @@ -1,112 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * 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 Mage_Reports - * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<config> - <sections> - <catalog> - <groups> - <recently_products translate="label" module="Mage_Reports"> - <label>Recently Viewed/Compared Products</label> - <frontend_type>text</frontend_type> - <sort_order>350</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <fields> - <scope translate="label"> - <label>Show for Current</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Reports_Scope</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <hide_in_single_store_mode>1</hide_in_single_store_mode> - </scope> - <viewed_count translate="label"> - <label>Default Recently Viewed Products Count</label> - <frontend_type>text</frontend_type> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </viewed_count> - <compared_count translate="label"> - <label>Default Recently Compared Products Count</label> - <frontend_type>text</frontend_type> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </compared_count> - </fields> - </recently_products> - </groups> - </catalog> - <reports translate="label" module="Mage_Reports"> - <label>Reports</label> - <tab>general</tab> - <frontend_type>text</frontend_type> - <sort_order>1000</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - <resource>Mage_Reports::reports</resource> - <groups> - <dashboard translate="label"> - <label>Dashboard</label> - <frontend_type>text</frontend_type> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - <fields> - <ytd_start translate="label"> - <label>Year-To-Date Starts</label> - <frontend_type>select</frontend_type> - <frontend_model>Mage_Adminhtml_Block_Report_Config_Form_Field_YtdStart</frontend_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </ytd_start> - <mtd_start translate="label comment"> - <label>Current Month Starts</label> - <frontend_type>select</frontend_type> - <frontend_model>Mage_Adminhtml_Block_Report_Config_Form_Field_MtdStart</frontend_model> - <comment>Select day of the month.</comment> - <sort_order>2</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </mtd_start> - </fields> - </dashboard> - </groups> - </reports> - </sections> -</config> diff --git a/app/code/core/Mage/Review/etc/adminhtml/system.xml b/app/code/core/Mage/Review/etc/adminhtml/system.xml new file mode 100644 index 0000000000000000000000000000000000000000..43797af6e5cdae6974407bbd91fd2b4d2829cd68 --- /dev/null +++ b/app/code/core/Mage/Review/etc/adminhtml/system.xml @@ -0,0 +1,40 @@ +<?xml version="1.0"?> +<!-- +/** + * 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 Mage_Review + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> + <system> + <section id="catalog"> + <group id="review" translate="label" module="Mage_Review" type="text" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Product Reviews</label> + <field id="allow_guest" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Allow Guests to Write Reviews</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + </group> + </section> + </system> +</config> diff --git a/app/code/core/Mage/Review/etc/system.xml b/app/code/core/Mage/Review/etc/system.xml deleted file mode 100644 index 5db7c578392044e0cac5a47651708592988084a6..0000000000000000000000000000000000000000 --- a/app/code/core/Mage/Review/etc/system.xml +++ /dev/null @@ -1,54 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * 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 Mage_Review - * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<config> - <sections> - <catalog> - <groups> - <review translate="label" module="Mage_Review"> - <label>Product Reviews</label> - <frontend_type>text</frontend_type> - <sort_order>100</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <fields> - <allow_guest translate="label"> - <label>Allow Guests to Write Reviews</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </allow_guest> - </fields> - </review> - </groups> - </catalog> - </sections> -</config> diff --git a/app/code/core/Mage/Rss/Block/List.php b/app/code/core/Mage/Rss/Block/List.php index 96991844beb7a3a5cce5236bc524f7c18c14692b..492eb85150b81e5e83a12ca2931de38dae0dcb31 100644 --- a/app/code/core/Mage/Rss/Block/List.php +++ b/app/code/core/Mage/Rss/Block/List.php @@ -115,19 +115,6 @@ class Mage_Rss_Block_List extends Mage_Core_Block_Template $this->resetRssFeed(); $this->CategoriesRssFeed(); return $this->getRssFeeds(); - -/* $section = Mage::getSingleton('Mage_Adminhtml_Model_Config')->getSections(); - $catalogFeeds = $section->rss->groups->catalog->fields[0]; - $res = array(); - foreach($catalogFeeds as $code => $feed){ - $prefix = self::XML_PATH_RSS_METHODS.'/catalog/'.$code; - if (!Mage::getStoreConfig($prefix) || $code=='tag') { - continue; - } - $res[$code] = $feed; - } - return $res; -*/ } public function getRssMiscFeeds() diff --git a/app/code/core/Mage/Rss/etc/adminhtml/system.xml b/app/code/core/Mage/Rss/etc/adminhtml/system.xml new file mode 100644 index 0000000000000000000000000000000000000000..35eafffabcd2a8bb64eee9c27fc62f15ebe99acd --- /dev/null +++ b/app/code/core/Mage/Rss/etc/adminhtml/system.xml @@ -0,0 +1,77 @@ +<?xml version="1.0"?> +<!-- +/** + * 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 Mage_Rss + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> + <system> + <section id="rss" translate="label" module="Mage_Rss" type="text" sortOrder="80" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>RSS Feeds</label> + <tab>catalog</tab> + <resource>Mage_Rss::rss</resource> + <group id="config" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Rss Config</label> + <field id="active" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Enable RSS</label> + <source_model>Mage_Backend_Model_Config_Source_Enabledisable</source_model> + <backend_model>Mage_Rss_Model_System_Config_Backend_Links</backend_model> + </field> + </group> + <group id="wishlist" translate="label" type="text" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Wishlist</label> + <field id="active" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Enable RSS</label> + <source_model>Mage_Backend_Model_Config_Source_Enabledisable</source_model> + </field> + </group> + <group id="catalog" translate="label" type="text" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Catalog</label> + <field id="new" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>New Products</label> + <source_model>Mage_Backend_Model_Config_Source_Enabledisable</source_model> + </field> + <field id="special" translate="label" type="select" sortOrder="11" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Special Products</label> + <source_model>Mage_Backend_Model_Config_Source_Enabledisable</source_model> + </field> + <field id="salesrule" translate="label" type="select" sortOrder="12" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Coupons/Discounts</label> + <source_model>Mage_Backend_Model_Config_Source_Enabledisable</source_model> + </field> + <field id="category" translate="label" type="select" sortOrder="14" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Top Level Category</label> + <source_model>Mage_Backend_Model_Config_Source_Enabledisable</source_model> + </field> + </group> + <group id="order" type="text" sortOrder="4" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Order</label> + <field id="status_notified" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Customer Order Status Notification</label> + <source_model>Mage_Backend_Model_Config_Source_Enabledisable</source_model> + </field> + </group> + </section> + </system> +</config> diff --git a/app/code/core/Mage/Rss/etc/system.xml b/app/code/core/Mage/Rss/etc/system.xml deleted file mode 100644 index 1efe450b636d869f5f503c41cb36517803f3e259..0000000000000000000000000000000000000000 --- a/app/code/core/Mage/Rss/etc/system.xml +++ /dev/null @@ -1,151 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * 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 Mage_Rss - * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<config> - <sections> - <rss translate="label" module="Mage_Rss"> - <label>RSS Feeds</label> - <tab>catalog</tab> - <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> - <resource>Mage_Rss::rss</resource> - <groups> - <config translate="label"> - <label>Rss Config</label> - <frontend_type>text</frontend_type> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <active translate="label"> - <label>Enable RSS</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Enabledisable</source_model> - <backend_model>Mage_Rss_Model_System_Config_Backend_Links</backend_model> - <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> - </active> - </fields> - </config> - - <wishlist translate="label"> - <label>Wishlist</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> - <fields> - <active translate="label"> - <label>Enable RSS</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Enabledisable</source_model> - <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> - </active> - </fields> - </wishlist> - - <catalog translate="label"> - <label>Catalog</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> - <fields> - <new translate="label"> - <label>New Products</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Enabledisable</source_model> - <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> - </new> - <special translate="label"> - <label>Special Products</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Enabledisable</source_model> - <sort_order>11</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </special> - <salesrule translate="label"> - <label>Coupons/Discounts</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Enabledisable</source_model> - <sort_order>12</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </salesrule> - <category translate="label"> - <label>Top Level Category</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Enabledisable</source_model> - <sort_order>14</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </category> - </fields> - </catalog> - - <order> - <label>Order</label> - <frontend_type>text</frontend_type> - <sort_order>4</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <status_notified translate="label"> - <label>Customer Order Status Notification</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Enabledisable</source_model> - <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> - </status_notified> - </fields> - </order> - - </groups> - </rss> - </sections> -</config> diff --git a/app/code/core/Mage/Rule/Block/Editable.php b/app/code/core/Mage/Rule/Block/Editable.php index fad69543aed3ae06195b2f797ab282c5d91cd928..c51a676d144253172f7f1be85aabab17d901f7c3 100644 --- a/app/code/core/Mage/Rule/Block/Editable.php +++ b/app/code/core/Mage/Rule/Block/Editable.php @@ -65,7 +65,7 @@ class Mage_Rule_Block_Editable extends Mage_Core_Block_Abstract if ($element->getExplicitApply()) { $html .= ' <a href="javascript:void(0)" class="rule-param-apply"><img src="' - . $this->getSkinUrl('images/rule_component_apply.gif') . '" class="v-middle" alt="' + . $this->getViewFileUrl('images/rule_component_apply.gif') . '" class="v-middle" alt="' . $this->__('Apply') . '" title="' . $this->__('Apply') . '" /></a> '; } diff --git a/app/code/core/Mage/Rule/Model/Action/Abstract.php b/app/code/core/Mage/Rule/Model/Action/Abstract.php index cf33aef4fb71693e509170967dd225bf10f604e3..46daef1a65c8cd3d3cc5b4165c6fd4621cfbfd6c 100644 --- a/app/code/core/Mage/Rule/Model/Action/Abstract.php +++ b/app/code/core/Mage/Rule/Model/Action/Abstract.php @@ -209,7 +209,7 @@ abstract class Mage_Rule_Model_Action_Abstract extends Varien_Object implements public function getAddLinkHtml() { - $src = Mage::getDesign()->getSkinUrl('images/rule_component_add.gif'); + $src = Mage::getDesign()->getViewFileUrl('images/rule_component_add.gif'); $html = '<img src="'.$src.'" alt="" class="rule-param-add v-middle" />'; return $html; } @@ -217,7 +217,7 @@ abstract class Mage_Rule_Model_Action_Abstract extends Varien_Object implements public function getRemoveLinkHtml() { - $src = Mage::getDesign()->getSkinUrl('images/rule_component_remove.gif'); + $src = Mage::getDesign()->getViewFileUrl('images/rule_component_remove.gif'); $html = '<span class="rule-param"><a href="javascript:void(0)" class="rule-param-remove"><img src="' . $src . '" alt="" class="v-middle" /></a></span>'; return $html; diff --git a/app/code/core/Mage/Rule/Model/Condition/Abstract.php b/app/code/core/Mage/Rule/Model/Condition/Abstract.php index 5d13e98a0ce267fc6fe766e1e354f250e1983cf3..483fffa613169cb88df1333323dd7851e022a91b 100644 --- a/app/code/core/Mage/Rule/Model/Condition/Abstract.php +++ b/app/code/core/Mage/Rule/Model/Condition/Abstract.php @@ -487,14 +487,14 @@ abstract class Mage_Rule_Model_Condition_Abstract public function getAddLinkHtml() { - $src = Mage::getDesign()->getSkinUrl('images/rule_component_add.gif'); + $src = Mage::getDesign()->getViewFileUrl('images/rule_component_add.gif'); $html = '<img src="' . $src . '" class="rule-param-add v-middle" alt="" title="' . Mage::helper('Mage_Rule_Helper_Data')->__('Add') . '"/>'; return $html; } public function getRemoveLinkHtml() { - $src = Mage::getDesign()->getSkinUrl('images/rule_component_remove.gif'); + $src = Mage::getDesign()->getViewFileUrl('images/rule_component_remove.gif'); $html = ' <span class="rule-param"><a href="javascript:void(0)" class="rule-param-remove" title="' . Mage::helper('Mage_Rule_Helper_Data')->__('Remove') . '"><img src="' . $src . '" alt="" class="v-middle" /></a></span>'; return $html; } diff --git a/app/code/core/Mage/Rule/Model/Condition/Product/Abstract.php b/app/code/core/Mage/Rule/Model/Condition/Product/Abstract.php index 3cf645acd5c73378acfe2fdfff270beaa36f6478..007fb0c9f2588d6671975be1a36a7bbaec0109fa 100644 --- a/app/code/core/Mage/Rule/Model/Condition/Product/Abstract.php +++ b/app/code/core/Mage/Rule/Model/Condition/Product/Abstract.php @@ -229,7 +229,7 @@ abstract class Mage_Rule_Model_Condition_Product_Abstract extends Mage_Rule_Mode switch ($this->getAttribute()) { case 'sku': case 'category_ids': - $image = Mage::getDesign()->getSkinUrl('images/rule_chooser_trigger.gif'); + $image = Mage::getDesign()->getViewFileUrl('images/rule_chooser_trigger.gif'); break; } @@ -348,7 +348,7 @@ abstract class Mage_Rule_Model_Condition_Product_Abstract extends Mage_Rule_Mode if (is_object($this->getAttributeObject())) { switch ($this->getAttributeObject()->getFrontendInput()) { case 'date': - $element->setImage(Mage::getDesign()->getSkinUrl('images/grid-cal.gif')); + $element->setImage(Mage::getDesign()->getViewFileUrl('images/grid-cal.gif')); break; } } diff --git a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Fieldset/Order/Statuses.php b/app/code/core/Mage/Sales/Block/Adminhtml/System/Config/Form/Fieldset/Order/Statuses.php similarity index 79% rename from app/code/core/Mage/Adminhtml/Block/System/Config/Form/Fieldset/Order/Statuses.php rename to app/code/core/Mage/Sales/Block/Adminhtml/System/Config/Form/Fieldset/Order/Statuses.php index 95f72e21dd4211f6b4e972523a6a40a302023dd5..9b6d7b64f83dea41c49e40b897a988efc1b4b443 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Fieldset/Order/Statuses.php +++ b/app/code/core/Mage/Sales/Block/Adminhtml/System/Config/Form/Fieldset/Order/Statuses.php @@ -19,49 +19,73 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Sales * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ - -class Mage_Adminhtml_Block_System_Config_Form_Fieldset_Order_Statuses - extends Mage_Adminhtml_Block_System_Config_Form_Fieldset +class Mage_Sales_Block_Adminhtml_System_Config_Form_Fieldset_Order_Statuses + extends Mage_Backend_Block_System_Config_Form_Fieldset { + /** + * @var Varien_Object + */ protected $_dummyElement; + + /** + * @var Mage_Backend_Block_System_Config_Form_Field + */ protected $_fieldRenderer; + + /** + * @var array + */ protected $_values; + /** + * @param Varien_Data_Form_Element_Abstract $element + * @return string + */ public function render(Varien_Data_Form_Element_Abstract $element) { - $html = ''; //$this->_getHeaderHtml($element); + $html = ''; $statuses = Mage::getResourceModel('Mage_Sales_Model_Resource_Order_Status_Collection')->load()->toOptionHash(); foreach ($statuses as $id => $status) { $html.= $this->_getFieldHtml($element, $id, $status); } - #$html .= $this->_getFooterHtml($element); - return $html; } + /** + * @return Varien_Object + */ protected function _getDummyElement() { if (empty($this->_dummyElement)) { - $this->_dummyElement = new Varien_Object(array('show_in_default'=>1, 'show_in_website'=>1)); + $this->_dummyElement = new Varien_Object(array('showInDefault' => 1, 'showInWebsite' => 1)); } return $this->_dummyElement; } + /** + * @return Mage_Backend_Block_System_Config_Form_Field + */ protected function _getFieldRenderer() { if (empty($this->_fieldRenderer)) { - $this->_fieldRenderer = Mage::getBlockSingleton('Mage_Adminhtml_Block_System_Config_Form_Field'); + $this->_fieldRenderer = Mage::getBlockSingleton('Mage_Backend_Block_System_Config_Form_Field'); } return $this->_fieldRenderer; } + /** + * @param Varien_Data_Form_Element_Fieldset $fieldset + * @param string $id + * @param string $status + * @return string + */ protected function _getFieldHtml($fieldset, $id, $status) { $configData = $this->getConfigData(); @@ -84,5 +108,4 @@ class Mage_Adminhtml_Block_System_Config_Form_Fieldset_Order_Statuses return $field->toHtml(); } - } diff --git a/app/code/core/Mage/Sales/Helper/Guest.php b/app/code/core/Mage/Sales/Helper/Guest.php index 2481823649551661581143744b7d96e4efabbd18..55f98c0bf225e211169478b51fc1898a3234e60e 100644 --- a/app/code/core/Mage/Sales/Helper/Guest.php +++ b/app/code/core/Mage/Sales/Helper/Guest.php @@ -135,16 +135,16 @@ class Mage_Sales_Helper_Guest extends Mage_Core_Helper_Data $breadcrumbs->addCrumb( 'home', array( - 'label' => Mage::helper('Mage_Cms_Helper_Data')->__('Home'), - 'title' => Mage::helper('Mage_Cms_Helper_Data')->__('Go to Home Page'), + 'label' => Mage::helper('Mage_Sales_Helper_Guest')->__('Home'), + 'title' => Mage::helper('Mage_Sales_Helper_Guest')->__('Go to Home Page'), 'link' => Mage::getBaseUrl() ) ); $breadcrumbs->addCrumb( 'cms_page', array( - 'label' => 'Order Information', - 'title' => 'Order Information' + 'label' => Mage::helper('Mage_Sales_Helper_Guest')->__('Order Information'), + 'title' => Mage::helper('Mage_Sales_Helper_Guest')->__('Order Information') ) ); } diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Order/Status.php b/app/code/core/Mage/Sales/Model/Config/Source/Order/Status.php similarity index 88% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Order/Status.php rename to app/code/core/Mage/Sales/Model/Config/Source/Order/Status.php index 0fa4aa566173635410de8d48123af551a2699e1d..1b8485756e9592637106e5a9594eb3c9e32a1eb3 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Order/Status.php +++ b/app/code/core/Mage/Sales/Model/Config/Source/Order/Status.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Sales * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -27,12 +27,11 @@ /** * Order Statuses source model */ -class Mage_Adminhtml_Model_System_Config_Source_Order_Status +class Mage_Sales_Model_Config_Source_Order_Status implements Mage_Core_Model_Option_ArrayInterface { // set null to enable all possible protected $_stateStatuses = array( Mage_Sales_Model_Order::STATE_NEW, -// Mage_Sales_Model_Order::STATE_PENDING_PAYMENT, Mage_Sales_Model_Order::STATE_PROCESSING, Mage_Sales_Model_Order::STATE_COMPLETE, Mage_Sales_Model_Order::STATE_CLOSED, @@ -51,7 +50,7 @@ class Mage_Adminhtml_Model_System_Config_Source_Order_Status $options = array(); $options[] = array( 'value' => '', - 'label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('-- Please Select --') + 'label' => Mage::helper('Mage_Sales_Helper_Data')->__('-- Please Select --') ); foreach ($statuses as $code=>$label) { $options[] = array( diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Order/Status/New.php b/app/code/core/Mage/Sales/Model/Config/Source/Order/Status/New.php similarity index 86% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Order/Status/New.php rename to app/code/core/Mage/Sales/Model/Config/Source/Order/Status/New.php index 4f87b182f3701fa4a3d336b4c75484cfd8bc0699..fed0b91c5fa4950e52426cb225d1f845840de546 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Order/Status/New.php +++ b/app/code/core/Mage/Sales/Model/Config/Source/Order/Status/New.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Sales * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -27,7 +27,7 @@ /** * Order Statuses source model */ -class Mage_Adminhtml_Model_System_Config_Source_Order_Status_New extends Mage_Adminhtml_Model_System_Config_Source_Order_Status +class Mage_Sales_Model_Config_Source_Order_Status_New extends Mage_Sales_Model_Config_Source_Order_Status { protected $_stateStatuses = Mage_Sales_Model_Order::STATE_NEW; } diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Order/Status/Newprocessing.php b/app/code/core/Mage/Sales/Model/Config/Source/Order/Status/Newprocessing.php similarity index 86% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Order/Status/Newprocessing.php rename to app/code/core/Mage/Sales/Model/Config/Source/Order/Status/Newprocessing.php index 7a71d272de4128498284668d57822c52c9d175d8..904a15ddabf0e8d8d6b98a4b89c081931a815fba 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Order/Status/Newprocessing.php +++ b/app/code/core/Mage/Sales/Model/Config/Source/Order/Status/Newprocessing.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Sales * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -27,7 +27,7 @@ /** * Order Statuses source model */ -class Mage_Adminhtml_Model_System_Config_Source_Order_Status_Newprocessing extends Mage_Adminhtml_Model_System_Config_Source_Order_Status +class Mage_Sales_Model_Config_Source_Order_Status_Newprocessing extends Mage_Sales_Model_Config_Source_Order_Status { protected $_stateStatuses = array( Mage_Sales_Model_Order::STATE_NEW, diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Order/Status/Processing.php b/app/code/core/Mage/Sales/Model/Config/Source/Order/Status/Processing.php similarity index 86% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Order/Status/Processing.php rename to app/code/core/Mage/Sales/Model/Config/Source/Order/Status/Processing.php index 42892359248d8ada677ff5c79c2860c60cc24d48..633f7ffa0988f1735532c976d3449407989a0eef 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Order/Status/Processing.php +++ b/app/code/core/Mage/Sales/Model/Config/Source/Order/Status/Processing.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Sales * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -27,7 +27,7 @@ /** * Order Statuses source model */ -class Mage_Adminhtml_Model_System_Config_Source_Order_Status_Processing extends Mage_Adminhtml_Model_System_Config_Source_Order_Status +class Mage_Sales_Model_Config_Source_Order_Status_Processing extends Mage_Sales_Model_Config_Source_Order_Status { protected $_stateStatuses = Mage_Sales_Model_Order::STATE_PROCESSING; } diff --git a/app/code/core/Mage/Sales/etc/adminhtml/system.xml b/app/code/core/Mage/Sales/etc/adminhtml/system.xml new file mode 100644 index 0000000000000000000000000000000000000000..2b5942461f1ef66da7f9687c19a18f0b769f13ed --- /dev/null +++ b/app/code/core/Mage/Sales/etc/adminhtml/system.xml @@ -0,0 +1,382 @@ +<?xml version="1.0"?> +<!-- +/** + * 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 Mage_Sales + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> + <system> + <tab id="sales" translate="label" module="Mage_Sales" sortOrder="400"> + <label>Sales</label> + </tab> + <section id="sales" translate="label" module="Mage_Sales" type="text" sortOrder="300" showInDefault="1" showInWebsite="1" showInStore="1"> + <class>separator-top</class> + <label>Sales</label> + <tab>sales</tab> + <resource>Mage_Sales::config_sales</resource> + <group id="general" translate="label" type="text" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>General</label> + <field id="hide_customer_ip" translate="label comment" type="select" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Hide Customer IP</label> + <comment>Controls whether customer IP is shown in orders, invoices, shipments, credit memos.</comment> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + </group> + <group id="totals_sort" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Checkout Totals Sort Order</label> + <field id="discount" translate="label" type="text" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Discount</label> + </field> + <field id="grand_total" translate="label" type="text" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Grand Total</label> + </field> + <field id="shipping" translate="label" type="text" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Shipping</label> + </field> + <field id="subtotal" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Subtotal</label> + </field> + <field id="tax" translate="label" type="text" sortOrder="4" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Tax</label> + </field> + </group> + <group id="reorder" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Reorder</label> + <field id="allow" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Allow Reorder</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + </group> + <group id="identity" translate="label" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Invoice and Packing Slip Design</label> + <field id="logo" translate="label comment" type="image" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Logo for PDF Print-outs (200x50)</label> + <backend_model>Mage_Backend_Model_Config_Backend_Image_Pdf</backend_model> + <upload_dir config="system/filesystem/media" scope_info="1">sales/store/logo</upload_dir> + <base_url type="media" scope_info="1">sales/store/logo</base_url> + <comment> + <![CDATA[Default logo, will be used in PDF and HTML documents.<br />(jpeg, tiff, png) If you see image distortion in PDF, try to use larger image]]> +</comment> + </field> + <field id="logo_html" translate="label comment" type="image" sortOrder="150" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Logo for HTML Print View</label> + <backend_model>Mage_Backend_Model_Config_Backend_Image</backend_model> + <upload_dir config="system/filesystem/media" scope_info="1">sales/store/logo_html</upload_dir> + <base_url type="media" scope_info="1">sales/store/logo_html</base_url> + <comment> + <![CDATA[Logo for HTML documents only. If empty, default will be used.<br />(jpeg, gif, png)]]> +</comment> + </field> + <field id="address" translate="label" type="textarea" sortOrder="200" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Address</label> + </field> + </group> + <group id="minimum_order" translate="label" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Minimum Order Amount</label> + <field id="active" translate="label" sortOrder="5" type="select" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Enable</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="amount" translate="label comment" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Minimum Amount</label> + <comment>Subtotal after discount.</comment> + </field> + <field id="description" translate="label comment" sortOrder="20" type="textarea" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Description Message</label> + <comment>This message will be shown in shopping cart when subtotal after discount less than minimum amount.</comment> + </field> + <field id="error_message" translate="label" sortOrder="30" type="textarea" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Error to Show in Shopping Cart</label> + </field> + <field id="multi_address" translate="label" sortOrder="40" type="select" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Validate Each Address Separately in Multi-address Checkout</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="multi_address_description" translate="label comment" sortOrder="50" type="textarea" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Multi-address Description Message</label> + <comment>If empty, the default description above will be used.</comment> + </field> + <field id="multi_address_error_message" translate="label comment" sortOrder="60" type="textarea" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Multi-address Error to Show in Shopping Cart</label> + <comment>If empty, the default error above will be used.</comment> + </field> + </group> + <group id="dashboard" translate="label,comment" sortOrder="60" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Dashboard</label> + <field id="use_aggregated_data" translate="label" sortOrder="10" type="select" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Use Aggregated Data (beta)</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + <comment>Improves dashboard performance but provides non-realtime data.</comment> + </field> + </group> + </section> + <section id="sales_email" translate="label" module="Mage_Sales" type="text" sortOrder="301" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Sales Emails</label> + <tab>sales</tab> + <resource>Mage_Sales::sales_email</resource> + <group id="order" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Order</label> + <field id="enabled" translate="label" type="select" sortOrder="0" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Enabled</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="identity" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>New Order Confirmation Email Sender</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Identity</source_model> + </field> + <field id="template" translate="label" type="select" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>New Order Confirmation Template</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Template</source_model> + </field> + <field id="guest_template" translate="label" type="select" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>New Order Confirmation Template for Guest</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Template</source_model> + </field> + <field id="copy_to" translate="label comment" type="text" sortOrder="4" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Send Order Email Copy To</label> + <comment>Comma-separated.</comment> + </field> + <field id="copy_method" translate="label" type="select" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Send Order Email Copy Method</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Method</source_model> + </field> + </group> + <group id="order_comment" translate="label" type="text" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Order Comments</label> + <field id="enabled" translate="label" type="select" sortOrder="0" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Enabled</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="identity" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Order Comment Email Sender</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Identity</source_model> + </field> + <field id="template" translate="label" type="select" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Order Comment Email Template</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Template</source_model> + </field> + <field id="guest_template" translate="label" type="select" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Order Comment Email Template for Guest</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Template</source_model> + </field> + <field id="copy_to" translate="label comment" type="text" sortOrder="4" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Send Order Comment Email Copy To</label> + <comment>Comma-separated.</comment> + </field> + <field id="copy_method" translate="label" type="select" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Send Order Comments Email Copy Method</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Method</source_model> + </field> + </group> + <group id="invoice" translate="label" type="text" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Invoice</label> + <field id="enabled" translate="label" type="select" sortOrder="0" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Enabled</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="identity" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Invoice Email Sender</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Identity</source_model> + </field> + <field id="template" translate="label" type="select" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Invoice Email Template</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Template</source_model> + </field> + <field id="guest_template" translate="label" type="select" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Invoice Email Template for Guest</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Template</source_model> + </field> + <field id="copy_to" translate="label comment" type="text" sortOrder="4" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Send Invoice Email Copy To</label> + <comment>Comma-separated.</comment> + </field> + <field id="copy_method" translate="label" type="select" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Send Invoice Email Copy Method</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Method</source_model> + </field> + </group> + <group id="invoice_comment" translate="label" type="text" sortOrder="4" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Invoice Comments</label> + <field id="enabled" translate="label" type="select" sortOrder="0" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Enabled</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="identity" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Invoice Comment Email Sender</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Identity</source_model> + </field> + <field id="template" translate="label" type="select" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Invoice Comment Email Template</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Template</source_model> + </field> + <field id="guest_template" translate="label" type="select" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Invoice Comment Email Template for Guest</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Template</source_model> + </field> + <field id="copy_to" translate="label comment" type="text" sortOrder="4" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Send Invoice Comment Email Copy To</label> + <comment>Comma-separated.</comment> + </field> + <field id="copy_method" translate="label" type="select" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Send Invoice Comments Email Copy Method</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Method</source_model> + </field> + </group> + <group id="shipment" translate="label" type="text" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Shipment</label> + <field id="enabled" translate="label" type="select" sortOrder="0" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Enabled</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="identity" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Shipment Email Sender</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Identity</source_model> + </field> + <field id="template" translate="label" type="select" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Shipment Email Template</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Template</source_model> + </field> + <field id="guest_template" translate="label" type="select" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Shipment Email Template for Guest</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Template</source_model> + </field> + <field id="copy_to" translate="label comment" type="text" sortOrder="4" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Send Shipment Email Copy To</label> + <comment>Comma-separated.</comment> + </field> + <field id="copy_method" translate="label" type="select" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Send Shipment Email Copy Method</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Method</source_model> + </field> + </group> + <group id="shipment_comment" translate="label" type="text" sortOrder="6" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Shipment Comments</label> + <field id="enabled" translate="label" type="select" sortOrder="0" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Enabled</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="identity" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Shipment Comment Email Sender</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Identity</source_model> + </field> + <field id="template" translate="label" type="select" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Shipment Comment Email Template</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Template</source_model> + </field> + <field id="guest_template" translate="label" type="select" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Shipment Comment Email Template for Guest</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Template</source_model> + </field> + <field id="copy_to" translate="label comment" type="text" sortOrder="4" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Send Shipment Comment Email Copy To</label> + <comment>Comma-separated.</comment> + </field> + <field id="copy_method" translate="label" type="select" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Send Shipment Comments Email Copy Method</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Method</source_model> + </field> + </group> + <group id="creditmemo" translate="label" type="text" sortOrder="7" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Credit Memo</label> + <field id="enabled" translate="label" type="select" sortOrder="0" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Enabled</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="identity" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Credit Memo Email Sender</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Identity</source_model> + </field> + <field id="template" translate="label" type="select" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Credit Memo Email Template</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Template</source_model> + </field> + <field id="guest_template" translate="label" type="select" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Credit Memo Email Template for Guest</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Template</source_model> + </field> + <field id="copy_to" translate="label comment" type="text" sortOrder="4" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Send Credit Memo Email Copy To</label> + <comment>Comma-separated.</comment> + </field> + <field id="copy_method" translate="label" type="select" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Send Credit Memo Email Copy Method</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Method</source_model> + </field> + </group> + <group id="creditmemo_comment" translate="label" type="text" sortOrder="8" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Credit Memo Comments</label> + <field id="enabled" translate="label" type="select" sortOrder="0" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Enabled</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="identity" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Credit Memo Comment Email Sender</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Identity</source_model> + </field> + <field id="template" translate="label" type="select" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Credit Memo Comment Email Template</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Template</source_model> + </field> + <field id="guest_template" translate="label" type="select" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Credit Memo Comment Email Template for Guest</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Template</source_model> + </field> + <field id="copy_to" translate="label comment" type="text" sortOrder="4" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Send Credit Memo Comment Email Copy To</label> + <comment>Comma-separated.</comment> + </field> + <field id="copy_method" translate="label" type="select" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Send Credit Memo Comments Email Copy Method</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Method</source_model> + </field> + </group> + </section> + <section id="sales_pdf" translate="label" module="Mage_Sales" type="text" sortOrder="302" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>PDF Print-outs</label> + <tab>sales</tab> + <resource>Mage_Sales::sales_pdf</resource> + <group id="invoice" translate="label" type="text" sortOrder="1" showInDefault="10" showInWebsite="1" showInStore="1"> + <label>Invoice</label> + <field id="put_order_id" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Display Order ID in Header</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + </group> + <group id="shipment" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Shipment</label> + <field id="put_order_id" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Display Order ID in Header</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + </group> + <group id="creditmemo" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Credit Memo</label> + <field id="put_order_id" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Display Order ID in Header</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + </group> + </section> + </system> +</config> diff --git a/app/code/core/Mage/Sales/etc/system.xml b/app/code/core/Mage/Sales/etc/system.xml deleted file mode 100644 index 7a34c558e5a40aeed167739a9dc701ae242a371d..0000000000000000000000000000000000000000 --- a/app/code/core/Mage/Sales/etc/system.xml +++ /dev/null @@ -1,866 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * 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 Mage_Sales - * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<config> - <tabs> - <sales translate="label" module="Mage_Sales"> - <label>Sales</label> - <sort_order>400</sort_order> - </sales> - </tabs> - <sections> - <sales translate="label" module="Mage_Sales"> - <class>separator-top</class> - <label>Sales</label> - <tab>sales</tab> - <frontend_type>text</frontend_type> - <sort_order>300</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <resource>Mage_Sales::config_sales</resource> - <groups> - <general translate="label"> - <label>General</label> - <frontend_type>text</frontend_type> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <hide_customer_ip translate="label comment"> - <label>Hide Customer IP</label> - <comment>Controls whether customer IP is shown in orders, invoices, shipments, credit memos.</comment> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </hide_customer_ip> - </fields> - </general> - <totals_sort translate="label"> - <label>Checkout Totals Sort Order</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>0</show_in_store> - <fields> - <discount translate="label"> - <label>Discount</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>0</show_in_store> - </discount> - <grand_total translate="label"> - <label>Grand Total</label> - <frontend_type>text</frontend_type> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </grand_total> - <shipping translate="label"> - <label>Shipping</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>0</show_in_store> - </shipping> - <subtotal translate="label"> - <label>Subtotal</label> - <frontend_type>text</frontend_type> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </subtotal> - <tax translate="label"> - <label>Tax</label> - <frontend_type>text</frontend_type> - <sort_order>4</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </tax> - </fields> - </totals_sort> - <reorder translate="label"> - <label>Reorder</label> - <frontend_type>text</frontend_type> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <allow translate="label"> - <label>Allow Reorder</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </allow> - </fields> - </reorder> - <identity translate="label"> - <label>Invoice and Packing Slip Design</label> - <sort_order>40</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <logo translate="label comment"> - <label>Logo for PDF Print-outs (200x50)</label> - <frontend_type>image</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Image_Pdf</backend_model> - <upload_dir config="system/filesystem/media" scope_info="1">sales/store/logo</upload_dir> - <base_url type="media" scope_info="1">sales/store/logo</base_url> - <sort_order>100</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <comment><![CDATA[Default logo, will be used in PDF and HTML documents.<br />(jpeg, tiff, png) If you see image distortion in PDF, try to use larger image]]></comment> - </logo> - <logo_html translate="label comment"> - <label>Logo for HTML Print View</label> - <frontend_type>image</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Image</backend_model> - <upload_dir config="system/filesystem/media" scope_info="1">sales/store/logo_html</upload_dir> - <base_url type="media" scope_info="1">sales/store/logo_html</base_url> - <sort_order>150</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <comment><![CDATA[Logo for HTML documents only. If empty, default will be used.<br />(jpeg, gif, png)]]></comment> - </logo_html> - <address translate="label"> - <label>Address</label> - <frontend_type>textarea</frontend_type> - <sort_order>200</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </address> - </fields> - </identity> - - <minimum_order translate="label"> - <label>Minimum Order Amount</label> - <sort_order>50</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <active translate="label"> - <label>Enable</label> - <sort_order>5</sort_order> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </active> - <amount translate="label comment"> - <label>Minimum Amount</label> - <sort_order>10</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <comment>Subtotal after discount.</comment> - </amount> - <description translate="label comment"> - <label>Description Message</label> - <sort_order>20</sort_order> - <frontend_type>textarea</frontend_type> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <comment>This message will be shown in shopping cart when subtotal after discount less than minimum amount.</comment> - </description> - <error_message translate="label"> - <label>Error to Show in Shopping Cart</label> - <sort_order>30</sort_order> - <frontend_type>textarea</frontend_type> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </error_message> - <multi_address translate="label"> - <label>Validate Each Address Separately in Multi-address Checkout</label> - <sort_order>40</sort_order> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </multi_address> - <multi_address_description translate="label comment"> - <label>Multi-address Description Message</label> - <sort_order>50</sort_order> - <frontend_type>textarea</frontend_type> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <comment>If empty, the default description above will be used.</comment> - </multi_address_description> - <multi_address_error_message translate="label comment"> - <label>Multi-address Error to Show in Shopping Cart</label> - <sort_order>60</sort_order> - <frontend_type>textarea</frontend_type> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <comment>If empty, the default error above will be used.</comment> - </multi_address_error_message> - </fields> - </minimum_order> - <dashboard translate="label,comment"> - <label>Dashboard</label> - <sort_order>60</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - <fields> - <use_aggregated_data translate="label"> - <label>Use Aggregated Data (beta)</label> - <sort_order>10</sort_order> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - <comment>Improves dashboard performance but provides non-realtime data.</comment> - </use_aggregated_data> - </fields> - </dashboard> - </groups> - </sales> - <sales_email translate="label" module="Mage_Sales"> - <label>Sales Emails</label> - <tab>sales</tab> - <frontend_type>text</frontend_type> - <sort_order>301</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <resource>Mage_Sales::sales_email</resource> - <groups> - <order translate="label"> - <label>Order</label> - <frontend_type>text</frontend_type> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <enabled translate="label"> - <label>Enabled</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>0</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </enabled> - <identity translate="label"> - <label>New Order Confirmation Email Sender</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Identity</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </identity> - <template translate="label"> - <label>New Order Confirmation Template</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Template</source_model> - <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> - </template> - <guest_template translate="label"> - <label>New Order Confirmation Template for Guest</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Template</source_model> - <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> - </guest_template> - <copy_to translate="label comment"> - <label>Send Order Email Copy To</label> - <frontend_type>text</frontend_type> - <sort_order>4</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <comment>Comma-separated.</comment> - </copy_to> - <copy_method translate="label"> - <label>Send Order Email Copy Method</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Method</source_model> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </copy_method> - </fields> - </order> - - <order_comment translate="label"> - <label>Order Comments</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> - <fields> - <enabled translate="label"> - <label>Enabled</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>0</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </enabled> - <identity translate="label"> - <label>Order Comment Email Sender</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Identity</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </identity> - <template translate="label"> - <label>Order Comment Email Template</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Template</source_model> - <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> - </template> - <guest_template translate="label"> - <label>Order Comment Email Template for Guest</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Template</source_model> - <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> - </guest_template> - <copy_to translate="label comment"> - <label>Send Order Comment Email Copy To</label> - <frontend_type>text</frontend_type> - <sort_order>4</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <comment>Comma-separated.</comment> - </copy_to> - <copy_method translate="label"> - <label>Send Order Comments Email Copy Method</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Method</source_model> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </copy_method> - </fields> - </order_comment> - - <invoice translate="label"> - <label>Invoice</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> - <fields> - <enabled translate="label"> - <label>Enabled</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>0</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </enabled> - <identity translate="label"> - <label>Invoice Email Sender</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Identity</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </identity> - <template translate="label"> - <label>Invoice Email Template</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Template</source_model> - <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> - </template> - <guest_template translate="label"> - <label>Invoice Email Template for Guest</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Template</source_model> - <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> - </guest_template> - <copy_to translate="label comment"> - <label>Send Invoice Email Copy To</label> - <frontend_type>text</frontend_type> - <sort_order>4</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <comment>Comma-separated.</comment> - </copy_to> - <copy_method translate="label"> - <label>Send Invoice Email Copy Method</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Method</source_model> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </copy_method> - </fields> - </invoice> - <invoice_comment translate="label"> - <label>Invoice Comments</label> - <frontend_type>text</frontend_type> - <sort_order>4</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <enabled translate="label"> - <label>Enabled</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>0</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </enabled> - <identity translate="label"> - <label>Invoice Comment Email Sender</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Identity</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </identity> - <template translate="label"> - <label>Invoice Comment Email Template</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Template</source_model> - <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> - </template> - <guest_template translate="label"> - <label>Invoice Comment Email Template for Guest</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Template</source_model> - <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> - </guest_template> - <copy_to translate="label comment"> - <label>Send Invoice Comment Email Copy To</label> - <frontend_type>text</frontend_type> - <sort_order>4</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <comment>Comma-separated.</comment> - </copy_to> - <copy_method translate="label"> - <label>Send Invoice Comments Email Copy Method</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Method</source_model> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </copy_method> - </fields> - </invoice_comment> - - <shipment translate="label"> - <label>Shipment</label> - <frontend_type>text</frontend_type> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <enabled translate="label"> - <label>Enabled</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>0</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </enabled> - <identity translate="label"> - <label>Shipment Email Sender</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Identity</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </identity> - <template translate="label"> - <label>Shipment Email Template</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Template</source_model> - <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> - </template> - <guest_template translate="label"> - <label>Shipment Email Template for Guest</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Template</source_model> - <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> - </guest_template> - <copy_to translate="label comment"> - <label>Send Shipment Email Copy To</label> - <frontend_type>text</frontend_type> - <sort_order>4</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <comment>Comma-separated.</comment> - </copy_to> - <copy_method translate="label"> - <label>Send Shipment Email Copy Method</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Method</source_model> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </copy_method> - </fields> - </shipment> - <shipment_comment translate="label"> - <label>Shipment Comments</label> - <frontend_type>text</frontend_type> - <sort_order>6</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <enabled translate="label"> - <label>Enabled</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>0</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </enabled> - <identity translate="label"> - <label>Shipment Comment Email Sender</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Identity</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </identity> - <template translate="label"> - <label>Shipment Comment Email Template</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Template</source_model> - <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> - </template> - <guest_template translate="label"> - <label>Shipment Comment Email Template for Guest</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Template</source_model> - <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> - </guest_template> - <copy_to translate="label comment"> - <label>Send Shipment Comment Email Copy To</label> - <frontend_type>text</frontend_type> - <sort_order>4</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <comment>Comma-separated.</comment> - </copy_to> - <copy_method translate="label"> - <label>Send Shipment Comments Email Copy Method</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Method</source_model> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </copy_method> - </fields> - </shipment_comment> - - <creditmemo translate="label"> - <label>Credit Memo</label> - <frontend_type>text</frontend_type> - <sort_order>7</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <enabled translate="label"> - <label>Enabled</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>0</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </enabled> - <identity translate="label"> - <label>Credit Memo Email Sender</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Identity</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </identity> - <template translate="label"> - <label>Credit Memo Email Template</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Template</source_model> - <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> - </template> - <guest_template translate="label"> - <label>Credit Memo Email Template for Guest</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Template</source_model> - <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> - </guest_template> - <copy_to translate="label comment"> - <label>Send Credit Memo Email Copy To</label> - <frontend_type>text</frontend_type> - <sort_order>4</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <comment>Comma-separated.</comment> - </copy_to> - <copy_method translate="label"> - <label>Send Credit Memo Email Copy Method</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Method</source_model> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </copy_method> - </fields> - </creditmemo> - <creditmemo_comment translate="label"> - <label>Credit Memo Comments</label> - <frontend_type>text</frontend_type> - <sort_order>8</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <enabled translate="label"> - <label>Enabled</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>0</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </enabled> - <identity translate="label"> - <label>Credit Memo Comment Email Sender</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Identity</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </identity> - <template translate="label"> - <label>Credit Memo Comment Email Template</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Template</source_model> - <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> - </template> - <guest_template translate="label"> - <label>Credit Memo Comment Email Template for Guest</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Template</source_model> - <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> - </guest_template> - <copy_to translate="label comment"> - <label>Send Credit Memo Comment Email Copy To</label> - <frontend_type>text</frontend_type> - <sort_order>4</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <comment>Comma-separated.</comment> - </copy_to> - <copy_method translate="label"> - <label>Send Credit Memo Comments Email Copy Method</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Method</source_model> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </copy_method> - </fields> - </creditmemo_comment> - </groups> - </sales_email> - <sales_pdf translate="label" module="Mage_Sales"> - <label>PDF Print-outs</label> - <tab>sales</tab> - <frontend_type>text</frontend_type> - <sort_order>302</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <resource>Mage_Sales::sales_pdf</resource> - <groups> - <invoice translate="label"> - <label>Invoice</label> - <frontend_type>text</frontend_type> - <sort_order>1</sort_order> - <show_in_default>10</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <put_order_id translate="label"> - <label>Display Order ID in Header</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </put_order_id> - </fields> - </invoice> - <shipment translate="label"> - <label>Shipment</label> - <frontend_type>text</frontend_type> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <put_order_id translate="label"> - <label>Display Order ID in Header</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </put_order_id> - </fields> - </shipment> - <creditmemo translate="label"> - <label>Credit Memo</label> - <frontend_type>text</frontend_type> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <put_order_id translate="label"> - <label>Display Order ID in Header</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </put_order_id> - </fields> - </creditmemo> - </groups> - </sales_pdf> - </sections> -</config> diff --git a/app/code/core/Mage/Sales/view/frontend/widget/guest/form.phtml b/app/code/core/Mage/Sales/view/frontend/widget/guest/form.phtml index 531ec68a88eea3a4cee5990a9b02ec8a03044ee1..eaadad2f8f1d2ac3aa1d7600ec58b5296ea82369 100644 --- a/app/code/core/Mage/Sales/view/frontend/widget/guest/form.phtml +++ b/app/code/core/Mage/Sales/view/frontend/widget/guest/form.phtml @@ -38,8 +38,8 @@ <label class="required"><?php echo Mage::helper('Mage_Sales_Helper_Data')->__('Find Order By:') ?></label> <div class="input-box"> <select name="oar_type" id="quick_search_type_id" class="select" title="" onchange="showIdentifyBlock(this.value);"> - <option value="email">Email Address</option> - <option value="zip">ZIP Code</option> + <option value="email"><?php echo Mage::helper('Mage_Sales_Helper_Data')->__('Email Address') ?></option> + <option value="zip"><?php echo Mage::helper('Mage_Sales_Helper_Data')->__('ZIP Code') ?></option> </select> </div> </li> 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 3712538ba96b28bc59899dcd4c398fc1cbafb1d2..2fe34081f0a897ad7efcdb945270b736e8c5c1e6 100644 --- a/app/code/core/Mage/SalesRule/Model/Rule/Condition/Address.php +++ b/app/code/core/Mage/SalesRule/Model/Rule/Condition/Address.php @@ -79,22 +79,22 @@ class Mage_SalesRule_Model_Rule_Condition_Address extends Mage_Rule_Model_Condit if (!$this->hasData('value_select_options')) { switch ($this->getAttribute()) { case 'country_id': - $options = Mage::getModel('Mage_Adminhtml_Model_System_Config_Source_Country') + $options = Mage::getModel('Mage_Directory_Model_Config_Source_Country') ->toOptionArray(); break; case 'region_id': - $options = Mage::getModel('Mage_Adminhtml_Model_System_Config_Source_Allregion') + $options = Mage::getModel('Mage_Directory_Model_Config_Source_Allregion') ->toOptionArray(); break; case 'shipping_method': - $options = Mage::getModel('Mage_Adminhtml_Model_System_Config_Source_Shipping_Allmethods') + $options = Mage::getModel('Mage_Shipping_Model_Config_Source_Allmethods') ->toOptionArray(); break; case 'payment_method': - $options = Mage::getModel('Mage_Adminhtml_Model_System_Config_Source_Payment_Allmethods') + $options = Mage::getModel('Mage_Payment_Model_Config_Source_Allmethods') ->toOptionArray(); break; diff --git a/app/code/core/Mage/SalesRule/etc/adminhtml/system.xml b/app/code/core/Mage/SalesRule/etc/adminhtml/system.xml new file mode 100644 index 0000000000000000000000000000000000000000..7155511bd7e6b6b45717e4acba264d429fe903cb --- /dev/null +++ b/app/code/core/Mage/SalesRule/etc/adminhtml/system.xml @@ -0,0 +1,60 @@ +<?xml version="1.0"?> +<!-- +/** + * 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 Mage_SalesRule + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> + <system> + <section id="promo" translate="label" module="Mage_SalesRule" type="text" sortOrder="400" showInDefault="1" showInWebsite="0" showInStore="0"> + <class>separator-top</class> + <label>Promotions</label> + <tab>customer</tab> + <resource>Mage_SalesRule::config_promo</resource> + <group id="auto_generated_coupon_codes" translate="label" module="Mage_SalesRule" showInDefault="1" sortOrder="10"> + <label>Auto Generated Specific Coupon Codes</label> + <field id="length" translate="label comment" module="Mage_SalesRule" type="text" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Code Length</label> + <comment>Excluding prefix, suffix and separators.</comment> + <frontend_class>validate-digits</frontend_class> + </field> + <field id="format" translate="label" module="Mage_SalesRule" type="select" sortOrder="20" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Code Format</label> + <source_model>Mage_SalesRule_Model_System_Config_Source_Coupon_Format</source_model> + </field> + <field id="prefix" translate="label" module="Mage_SalesRule" type="text" sortOrder="30" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Code Prefix</label> + </field> + <field id="suffix" translate="label" module="Mage_SalesRule" type="text" sortOrder="40" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Code Suffix</label> + </field> + <field id="dash" translate="label comment" module="Mage_SalesRule" type="text" sortOrder="50" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Dash Every X Characters</label> + <comment>If empty no separation.</comment> + <frontend_class>validate-digits</frontend_class> + </field> + </group> + </section> + </system> +</config> diff --git a/app/code/core/Mage/SalesRule/etc/system.xml b/app/code/core/Mage/SalesRule/etc/system.xml deleted file mode 100644 index 8b79f4aa8aaec746290c083bc499a42d5a72d686..0000000000000000000000000000000000000000 --- a/app/code/core/Mage/SalesRule/etc/system.xml +++ /dev/null @@ -1,96 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * 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 Mage_SalesRule - * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<config> - <sections> - <promo translate="label" module="Mage_SalesRule"> - <class>separator-top</class> - <label>Promotions</label> - <tab>customer</tab> - <frontend_type>text</frontend_type> - <sort_order>400</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - <resource>Mage_SalesRule::config_promo</resource> - <groups> - <auto_generated_coupon_codes translate="label" module="Mage_SalesRule"> - <label>Auto Generated Specific Coupon Codes</label> - <show_in_default>1</show_in_default> - <sort_order>10</sort_order> - <fields> - <length translate="label comment" module="Mage_SalesRule"> - <label>Code Length</label> - <frontend_type>text</frontend_type> - <sort_order>10</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - <comment>Excluding prefix, suffix and separators.</comment> - <frontend_class>validate-digits</frontend_class> - </length> - <format translate="label" module="Mage_SalesRule"> - <label>Code Format</label> - <frontend_type>select</frontend_type> - <source_model>Mage_SalesRule_Model_System_Config_Source_Coupon_Format</source_model> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </format> - <prefix translate="label" module="Mage_SalesRule"> - <label>Code Prefix</label> - <frontend_type>text</frontend_type> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </prefix> - <suffix translate="label" module="Mage_SalesRule"> - <label>Code Suffix</label> - <frontend_type>text</frontend_type> - <sort_order>40</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </suffix> - <dash translate="label comment" module="Mage_SalesRule"> - <label>Dash Every X Characters</label> - <frontend_type>text</frontend_type> - <sort_order>50</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - <comment>If empty no separation.</comment> - <frontend_class>validate-digits</frontend_class> - </dash> - </fields> - </auto_generated_coupon_codes> - </groups> - </promo> - </sections> -</config> diff --git a/app/code/core/Mage/Sendfriend/etc/adminhtml/system.xml b/app/code/core/Mage/Sendfriend/etc/adminhtml/system.xml new file mode 100644 index 0000000000000000000000000000000000000000..e86714b53928e09e000e84957574c6867c60465f --- /dev/null +++ b/app/code/core/Mage/Sendfriend/etc/adminhtml/system.xml @@ -0,0 +1,63 @@ +<?xml version="1.0"?> +<!-- +/** + * 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 Mage_Sendfriend + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> + <system> + <section id="sendfriend" translate="label" module="Mage_Sendfriend" type="text" sortOrder="120" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Email to a Friend</label> + <tab>catalog</tab> + <resource>Mage_Adminhtml::sendfriend</resource> + <group id="email" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Email Templates</label> + <field id="enabled" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Enabled</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="template" translate="label" type="select" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Select Email Template</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Template</source_model> + </field> + <field id="allow_guest" translate="label" type="select" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Allow for Guests</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="max_recipients" translate="label" type="text" sortOrder="4" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Max Recipients</label> + <frontend_class>validate-digits</frontend_class> + </field> + <field id="max_per_hour" translate="label" type="text" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Max Products Sent in 1 Hour</label> + <frontend_class>validate-digits</frontend_class> + </field> + <field id="check_by" translate="label" type="select" sortOrder="6" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Limit Sending By</label> + <source_model>Mage_Backend_Model_Config_Source_Checktype</source_model> + </field> + </group> + </section> + </system> +</config> diff --git a/app/code/core/Mage/Sendfriend/etc/system.xml b/app/code/core/Mage/Sendfriend/etc/system.xml deleted file mode 100644 index b1ebd0e928b275382af9a0de0597ba2c148008b2..0000000000000000000000000000000000000000 --- a/app/code/core/Mage/Sendfriend/etc/system.xml +++ /dev/null @@ -1,107 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * 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 Mage_Sendfriend - * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<config> - <sections> - <sendfriend translate="label" module="Mage_Sendfriend"> - <label>Email to a Friend</label> - <tab>catalog</tab> - <frontend_type>text</frontend_type> - <sort_order>120</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <resource>Mage_Adminhtml::sendfriend</resource> - <groups> - <email translate="label"> - <label>Email Templates</label> - <frontend_type>text</frontend_type> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <enabled translate="label"> - <label>Enabled</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </enabled> - <template translate="label"> - <label>Select Email Template</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Template</source_model> - <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> - </template> - <allow_guest translate="label"> - <label>Allow for Guests</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <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> - </allow_guest> - <max_recipients translate="label"> - <label>Max Recipients</label> - <frontend_type>text</frontend_type> - <sort_order>4</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <frontend_class>validate-digits</frontend_class> - </max_recipients> - <max_per_hour translate="label"> - <label>Max Products Sent in 1 Hour</label> - <frontend_type>text</frontend_type> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <frontend_class>validate-digits</frontend_class> - </max_per_hour> - <check_by translate="label"> - <label>Limit Sending By</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Checktype</source_model> - <sort_order>6</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </check_by> - </fields> - </email> - </groups> - </sendfriend> - </sections> -</config> diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Shipping/Tablerate.php b/app/code/core/Mage/Shipping/Model/Config/Backend/Tablerate.php similarity index 88% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Shipping/Tablerate.php rename to app/code/core/Mage/Shipping/Model/Config/Backend/Tablerate.php index 91fe5ff23f2d37e63110f57d2a1dd7082bda3f86..abab1852f8ae315a79f11f7226c6adab34722a3b 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Shipping/Tablerate.php +++ b/app/code/core/Mage/Shipping/Model/Config/Backend/Tablerate.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Shipping * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -28,11 +28,11 @@ * Backend model for shipping table rates CSV importing * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Shipping * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Adminhtml_Model_System_Config_Backend_Shipping_Tablerate extends Mage_Core_Model_Config_Data +class Mage_Shipping_Model_Config_Backend_Tablerate extends Mage_Core_Model_Config_Data { public function _afterSave() { diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Shipping/Allmethods.php b/app/code/core/Mage/Shipping/Model/Config/Source/Allmethods.php similarity index 94% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Shipping/Allmethods.php rename to app/code/core/Mage/Shipping/Model/Config/Source/Allmethods.php index 81bf95798b6157320f10c418b97973a516c3ef90..0e543005601cc5e947598923a8293dfeeac5fa1f 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Shipping/Allmethods.php +++ b/app/code/core/Mage/Shipping/Model/Config/Source/Allmethods.php @@ -19,12 +19,12 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Shipping * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Adminhtml_Model_System_Config_Source_Shipping_Allmethods +class Mage_Shipping_Model_Config_Source_Allmethods implements Mage_Core_Model_Option_ArrayInterface { /** * Return array of carriers. diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Payment/Allspecificcountries.php b/app/code/core/Mage/Shipping/Model/Config/Source/Allspecificcountries.php similarity index 73% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Payment/Allspecificcountries.php rename to app/code/core/Mage/Shipping/Model/Config/Source/Allspecificcountries.php index 4fc42b8451e8799531af96c5f2abb7181feb7584..18ee7014f82d02381e72f3b1defef8d349a15a33 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Payment/Allspecificcountries.php +++ b/app/code/core/Mage/Shipping/Model/Config/Source/Allspecificcountries.php @@ -19,19 +19,19 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Shipping * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Adminhtml_Model_System_Config_Source_Payment_Allspecificcountries +class Mage_Shipping_Model_Config_Source_Allspecificcountries implements Mage_Core_Model_Option_ArrayInterface { public function toOptionArray() { return array( - array('value'=>0, 'label'=>Mage::helper('Mage_Adminhtml_Helper_Data')->__('All Allowed Countries')), - array('value'=>1, 'label'=>Mage::helper('Mage_Adminhtml_Helper_Data')->__('Specific Countries')), + array('value'=>0, 'label'=>Mage::helper('Mage_Shipping_Helper_Data')->__('All Allowed Countries')), + array('value'=>1, 'label'=>Mage::helper('Mage_Shipping_Helper_Data')->__('Specific Countries')), ); } } diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Shipping/Flatrate.php b/app/code/core/Mage/Shipping/Model/Config/Source/Flatrate.php similarity index 70% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Shipping/Flatrate.php rename to app/code/core/Mage/Shipping/Model/Config/Source/Flatrate.php index c16ec105968548cf2c119cdf3df9790e7c4d9fb7..fe838399dcd894095407bb1a24010ed3f207310f 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Shipping/Flatrate.php +++ b/app/code/core/Mage/Shipping/Model/Config/Source/Flatrate.php @@ -19,20 +19,20 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Shipping * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Adminhtml_Model_System_Config_Source_Shipping_Flatrate +class Mage_Shipping_Model_Config_Source_Flatrate implements Mage_Core_Model_Option_ArrayInterface { public function toOptionArray() { return array( - array('value'=>'', 'label'=> Mage::helper('Mage_Adminhtml_Helper_Data')->__('None')), - array('value'=>'O', 'label'=>Mage::helper('Mage_Adminhtml_Helper_Data')->__('Per Order')), - array('value'=>'I', 'label'=>Mage::helper('Mage_Adminhtml_Helper_Data')->__('Per Item')), + array('value'=>'', 'label'=> Mage::helper('Mage_Shipping_Helper_Data')->__('None')), + array('value'=>'O', 'label'=>Mage::helper('Mage_Shipping_Helper_Data')->__('Per Order')), + array('value'=>'I', 'label'=>Mage::helper('Mage_Shipping_Helper_Data')->__('Per Item')), ); } } diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Shipping/Tablerate.php b/app/code/core/Mage/Shipping/Model/Config/Source/Tablerate.php similarity index 90% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Shipping/Tablerate.php rename to app/code/core/Mage/Shipping/Model/Config/Source/Tablerate.php index c0a039be5e5dc0525836abb1626f77905ee8bd97..9390a590e379ec58292369992903bdfbbdd30d5f 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Shipping/Tablerate.php +++ b/app/code/core/Mage/Shipping/Model/Config/Source/Tablerate.php @@ -19,13 +19,13 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Shipping * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Adminhtml_Model_System_Config_Source_Shipping_Tablerate +class Mage_Shipping_Model_Config_Source_Tablerate implements Mage_Core_Model_Option_ArrayInterface { public function toOptionArray() { diff --git a/app/code/core/Mage/Shipping/etc/adminhtml/system.xml b/app/code/core/Mage/Shipping/etc/adminhtml/system.xml new file mode 100644 index 0000000000000000000000000000000000000000..74cd548705184abf5484ce74884fc784006f0ade --- /dev/null +++ b/app/code/core/Mage/Shipping/etc/adminhtml/system.xml @@ -0,0 +1,217 @@ +<?xml version="1.0"?> +<!-- +/** + * 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 Mage_Shipping + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> + <system> + <section id="shipping" translate="label" module="Mage_Shipping" type="text" sortOrder="310" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Shipping Settings</label> + <tab>sales</tab> + <resource>Mage_Shipping::config_shipping</resource> + <group id="option" translate="label" type="text" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Options</label> + <field id="checkout_multiple" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Allow Shipping to Multiple Addresses</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="checkout_multiple_maximum_qty" translate="label" type="text" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Maximum Qty Allowed for Shipping to Multiple Addresses</label> + <validate>validate-number</validate> + </field> + </group> + <group id="origin" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Origin</label> + <field id="country_id" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Country</label> + <frontend_class>countries</frontend_class> + <source_model>Mage_Directory_Model_Config_Source_Country</source_model> + </field> + <field id="region_id" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Region/State</label> + </field> + <field id="postcode" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>ZIP/Postal Code</label> + </field> + <field id="city" translate="label" type="text" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>City</label> + </field> + <field id="street_line1" translate="label" type="text" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Street Address</label> + </field> + <field id="street_line2" translate="label" type="text" sortOrder="60" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Street Address Line 2</label> + </field> + </group> + </section> + <section id="carriers" translate="label" module="Mage_Shipping" type="text" sortOrder="320" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Shipping Methods</label> + <tab>sales</tab> + <resource>Mage_Shipping::carriers</resource> + <group id="flatrate" translate="label" type="text" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Flat Rate</label> + <field id="active" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Enabled</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="name" translate="label" type="text" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Method Name</label> + </field> + <field id="price" translate="label" type="text" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Price</label> + <validate>validate-number validate-zero-or-greater</validate> + </field> + <field id="handling_type" translate="label" type="select" sortOrder="7" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Calculate Handling Fee</label> + <source_model>Mage_Shipping_Model_Source_HandlingType</source_model> + </field> + <field id="handling_fee" translate="label" type="text" sortOrder="8" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Handling Fee</label> + <validate>validate-number validate-zero-or-greater</validate> + </field> + <field id="sort_order" translate="label" type="text" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Sort Order</label> + </field> + <field id="title" translate="label" type="text" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Title</label> + </field> + <field id="type" translate="label" type="select" sortOrder="4" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Type</label> + <source_model>Mage_Shipping_Model_Config_Source_Flatrate</source_model> + </field> + <field id="sallowspecific" translate="label" type="select" sortOrder="90" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Ship to Applicable Countries</label> + <frontend_class>shipping-applicable-country</frontend_class> + <source_model>Mage_Shipping_Model_Config_Source_Allspecificcountries</source_model> + </field> + <field id="specificcountry" translate="label" type="multiselect" sortOrder="91" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Ship to Specific Countries</label> + <source_model>Mage_Directory_Model_Config_Source_Country</source_model> + <can_be_empty>1</can_be_empty> + </field> + <field id="showmethod" translate="label" type="select" sortOrder="92" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Show Method if Not Applicable</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="specificerrmsg" translate="label" type="textarea" sortOrder="80" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Displayed Error Message</label> + </field> + </group> + <group id="freeshipping" translate="label" type="text" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Free Shipping</label> + <field id="active" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Enabled</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="free_shipping_subtotal" translate="label" type="text" sortOrder="4" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Minimum Order Amount</label> + <validate>validate-number validate-zero-or-greater</validate> + </field> + <field id="name" translate="label" type="text" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Method Name</label> + </field> + <field id="sort_order" translate="label" type="text" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Sort Order</label> + </field> + <field id="title" translate="label" type="text" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Title</label> + </field> + <field id="sallowspecific" translate="label" type="select" sortOrder="90" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Ship to Applicable Countries</label> + <frontend_class>shipping-applicable-country</frontend_class> + <source_model>Mage_Shipping_Model_Config_Source_Allspecificcountries</source_model> + </field> + <field id="specificcountry" translate="label" type="multiselect" sortOrder="91" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Ship to Specific Countries</label> + <source_model>Mage_Directory_Model_Config_Source_Country</source_model> + <can_be_empty>1</can_be_empty> + </field> + <field id="showmethod" translate="label" type="select" sortOrder="92" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Show Method if Not Applicable</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="specificerrmsg" translate="label" type="textarea" sortOrder="80" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Displayed Error Message</label> + </field> + </group> + <group id="tablerate" translate="label" type="text" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Table Rates</label> + <field id="handling_type" translate="label" type="select" sortOrder="7" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Calculate Handling Fee</label> + <source_model>Mage_Shipping_Model_Source_HandlingType</source_model> + </field> + <field id="handling_fee" translate="label" type="text" sortOrder="8" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Handling Fee</label> + <validate>validate-number validate-zero-or-greater</validate> + </field> + <field id="active" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Enabled</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="condition_name" translate="label" type="select" sortOrder="4" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Condition</label> + <source_model>Mage_Shipping_Model_Config_Source_Tablerate</source_model> + </field> + <field id="include_virtual_price" translate="label" type="select" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Include Virtual Products in Price Calculation</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="export" translate="label" type="export" sortOrder="5" showInDefault="0" showInWebsite="1" showInStore="0"> + <label>Export</label> + </field> + <field id="import" translate="label" type="import" sortOrder="6" showInDefault="0" showInWebsite="1" showInStore="0"> + <label>Import</label> + <backend_model>Mage_Shipping_Model_Config_Backend_Tablerate</backend_model> + </field> + <field id="name" translate="label" type="text" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Method Name</label> + </field> + <field id="sort_order" translate="label" type="text" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Sort Order</label> + </field> + <field id="title" translate="label" type="text" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Title</label> + </field> + <field id="sallowspecific" translate="label" type="select" sortOrder="90" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Ship to Applicable Countries</label> + <frontend_class>shipping-applicable-country</frontend_class> + <source_model>Mage_Shipping_Model_Config_Source_Allspecificcountries</source_model> + </field> + <field id="specificcountry" translate="label" type="multiselect" sortOrder="91" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Ship to Specific Countries</label> + <source_model>Mage_Directory_Model_Config_Source_Country</source_model> + <can_be_empty>1</can_be_empty> + </field> + <field id="showmethod" translate="label" type="select" sortOrder="92" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Show Method if Not Applicable</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="specificerrmsg" translate="label" type="textarea" sortOrder="80" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Displayed Error Message</label> + </field> + </group> + </section> + </system> +</config> diff --git a/app/code/core/Mage/Shipping/etc/system.xml b/app/code/core/Mage/Shipping/etc/system.xml deleted file mode 100644 index 6540deee6e02879a059cb3d0a8266865b54304ef..0000000000000000000000000000000000000000 --- a/app/code/core/Mage/Shipping/etc/system.xml +++ /dev/null @@ -1,481 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * 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 Mage_Shipping - * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<config> - <sections> - <shipping translate="label" module="Mage_Shipping"> - <label>Shipping Settings</label> - <tab>sales</tab> - <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>0</show_in_store> - <resource>Mage_Shipping::config_shipping</resource> - <groups> - <option translate="label"> - <label>Options</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>0</show_in_store> - <fields> - <checkout_multiple translate="label"> - <label>Allow Shipping to Multiple Addresses</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </checkout_multiple> - <checkout_multiple_maximum_qty translate="label"> - <label>Maximum Qty Allowed for Shipping to Multiple Addresses</label> - <frontend_type>text</frontend_type> - <validate>validate-number</validate> - <sort_order>2</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </checkout_multiple_maximum_qty> - </fields> - </option> - <origin translate="label"> - <label>Origin</label> - <frontend_type>text</frontend_type> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <fields> - <country_id translate="label"> - <label>Country</label> - <frontend_type>select</frontend_type> - <frontend_class>countries</frontend_class> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Country</source_model> - <sort_order>10</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </country_id> - <region_id translate="label"> - <label>Region/State</label> - <frontend_type>text</frontend_type> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </region_id> - <postcode translate="label"> - <label>ZIP/Postal Code</label> - <frontend_type>text</frontend_type> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </postcode> - <city translate="label"> - <label>City</label> - <frontend_type>text</frontend_type> - <sort_order>40</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </city> - <street_line1 translate="label"> - <label>Street Address</label> - <frontend_type>text</frontend_type> - <sort_order>50</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </street_line1> - <street_line2 translate="label"> - <label>Street Address Line 2</label> - <frontend_type>text</frontend_type> - <sort_order>60</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </street_line2> - </fields> - </origin> - </groups> - </shipping> - <carriers translate="label" module="Mage_Shipping"> - <label>Shipping Methods</label> - <tab>sales</tab> - <frontend_type>text</frontend_type> - <sort_order>320</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <resource>Mage_Shipping::carriers</resource> - <groups> - <flatrate translate="label"> - <label>Flat Rate</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> - <fields> - <active translate="label"> - <label>Enabled</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </active> - <name translate="label"> - <label>Method Name</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> - </name> - <price translate="label"> - <label>Price</label> - <frontend_type>text</frontend_type> - <validate>validate-number validate-zero-or-greater</validate> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </price> - <handling_type translate="label"> - <label>Calculate Handling Fee</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Shipping_Model_Source_HandlingType</source_model> - <sort_order>7</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </handling_type> - <handling_fee translate="label"> - <label>Handling Fee</label> - <frontend_type>text</frontend_type> - <validate>validate-number validate-zero-or-greater</validate> - <sort_order>8</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </handling_fee> - <sort_order translate="label"> - <label>Sort Order</label> - <frontend_type>text</frontend_type> - <sort_order>100</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </sort_order> - <title translate="label"> - <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> - </title> - <type translate="label"> - <label>Type</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Shipping_Flatrate</source_model> - <sort_order>4</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </type> - <sallowspecific translate="label"> - <label>Ship to Applicable Countries</label> - <frontend_type>select</frontend_type> - <sort_order>90</sort_order> - <frontend_class>shipping-applicable-country</frontend_class> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Shipping_Allspecificcountries</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </sallowspecific> - <specificcountry translate="label"> - <label>Ship to Specific Countries</label> - <frontend_type>multiselect</frontend_type> - <sort_order>91</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Country</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <can_be_empty>1</can_be_empty> - </specificcountry> - <showmethod translate="label"> - <label>Show Method if Not Applicable</label> - <frontend_type>select</frontend_type> - <sort_order>92</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </showmethod> - <specificerrmsg translate="label"> - <label>Displayed Error Message</label> - <frontend_type>textarea</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> - </specificerrmsg> - </fields> - </flatrate> - <freeshipping translate="label"> - <label>Free Shipping</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> - <fields> - <active translate="label"> - <label>Enabled</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </active> - <free_shipping_subtotal translate="label"> - <label>Minimum Order Amount</label> - <frontend_type>text</frontend_type> - <validate>validate-number validate-zero-or-greater</validate> - <sort_order>4</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </free_shipping_subtotal> - <name translate="label"> - <label>Method Name</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> - </name> - <sort_order translate="label"> - <label>Sort Order</label> - <frontend_type>text</frontend_type> - <sort_order>100</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </sort_order> - <title translate="label"> - <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> - </title> - <sallowspecific translate="label"> - <label>Ship to Applicable Countries</label> - <frontend_type>select</frontend_type> - <sort_order>90</sort_order> - <frontend_class>shipping-applicable-country</frontend_class> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Shipping_Allspecificcountries</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </sallowspecific> - <specificcountry translate="label"> - <label>Ship to Specific Countries</label> - <frontend_type>multiselect</frontend_type> - <sort_order>91</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Country</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <can_be_empty>1</can_be_empty> - </specificcountry> - <showmethod translate="label"> - <label>Show Method if Not Applicable</label> - <frontend_type>select</frontend_type> - <sort_order>92</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </showmethod> - <specificerrmsg translate="label"> - <label>Displayed Error Message</label> - <frontend_type>textarea</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> - </specificerrmsg> - </fields> - </freeshipping> - <tablerate translate="label"> - <label>Table Rates</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> - <fields> - <handling_type translate="label"> - <label>Calculate Handling Fee</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Shipping_Model_Source_HandlingType</source_model> - <sort_order>7</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </handling_type> - <handling_fee translate="label"> - <label>Handling Fee</label> - <frontend_type>text</frontend_type> - <validate>validate-number validate-zero-or-greater</validate> - <sort_order>8</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </handling_fee> - <active translate="label"> - <label>Enabled</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </active> - <condition_name translate="label"> - <label>Condition</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Shipping_Tablerate</source_model> - <sort_order>4</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </condition_name> - <include_virtual_price translate="label"> - <label>Include Virtual Products in Price Calculation</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </include_virtual_price> - <export translate="label"> - <label>Export</label> - <frontend_type>export</frontend_type> - <sort_order>5</sort_order> - <show_in_default>0</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </export> - <import translate="label"> - <label>Import</label> - <frontend_type>import</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Shipping_Tablerate</backend_model> - <sort_order>6</sort_order> - <show_in_default>0</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </import> - <name translate="label"> - <label>Method Name</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> - </name> - <sort_order translate="label"> - <label>Sort Order</label> - <frontend_type>text</frontend_type> - <sort_order>100</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </sort_order> - <title translate="label"> - <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> - </title> - <sallowspecific translate="label"> - <label>Ship to Applicable Countries</label> - <frontend_type>select</frontend_type> - <sort_order>90</sort_order> - <frontend_class>shipping-applicable-country</frontend_class> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Shipping_Allspecificcountries</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </sallowspecific> - <specificcountry translate="label"> - <label>Ship to Specific Countries</label> - <frontend_type>multiselect</frontend_type> - <sort_order>91</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Country</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <can_be_empty>1</can_be_empty> - </specificcountry> - <showmethod translate="label"> - <label>Show Method if Not Applicable</label> - <frontend_type>select</frontend_type> - <sort_order>92</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </showmethod> - <specificerrmsg translate="label"> - <label>Displayed Error Message</label> - <frontend_type>textarea</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> - </specificerrmsg> - </fields> - </tablerate> - </groups> - </carriers> - </sections> -</config> diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Sitemap.php b/app/code/core/Mage/Sitemap/Model/Config/Backend/Priority.php similarity index 92% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Sitemap.php rename to app/code/core/Mage/Sitemap/Model/Config/Backend/Priority.php index dc7c042260f16d4b5dac081d4264c2f5be4e7890..8220b12a8adc70e9768954b7c7524f1fcef08e7c 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Sitemap.php +++ b/app/code/core/Mage/Sitemap/Model/Config/Backend/Priority.php @@ -19,13 +19,13 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Sitemap * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Adminhtml_Model_System_Config_Backend_Sitemap extends Mage_Core_Model_Config_Data +class Mage_Sitemap_Model_Config_Backend_Priority extends Mage_Core_Model_Config_Data { protected function _beforeSave() diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Frequency.php b/app/code/core/Mage/Sitemap/Model/Config/Source/Frequency.php similarity index 93% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Frequency.php rename to app/code/core/Mage/Sitemap/Model/Config/Source/Frequency.php index ecdd2004b7437526fe09a4503610c3cc3c4ed7a2..b829d251befad46d3a7a44430df486814f0c3b67 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Frequency.php +++ b/app/code/core/Mage/Sitemap/Model/Config/Source/Frequency.php @@ -19,13 +19,13 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Adminhtml_Model_System_Config_Source_Frequency +class Mage_Sitemap_Model_Config_Source_Frequency implements Mage_Core_Model_Option_ArrayInterface { public function toOptionArray() { diff --git a/app/code/core/Mage/Sitemap/etc/adminhtml/system.xml b/app/code/core/Mage/Sitemap/etc/adminhtml/system.xml new file mode 100644 index 0000000000000000000000000000000000000000..22cb12416db414d3ec9c9849e172d6f97686e3ba --- /dev/null +++ b/app/code/core/Mage/Sitemap/etc/adminhtml/system.xml @@ -0,0 +1,120 @@ +<?xml version="1.0"?> +<!-- +/** + * 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 Mage_Sitemap + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> + <system> + <section id="sitemap" translate="label" module="Mage_Sitemap" type="text" sortOrder="70" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>XML Sitemap</label> + <tab>catalog</tab> + <resource>Mage_Sitemap::config_sitemap</resource> + <group id="category" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Categories Options</label> + <field id="changefreq" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Frequency</label> + <source_model>Mage_Sitemap_Model_Config_Source_Frequency</source_model> + </field> + <field id="priority" translate="label comment" type="text" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Priority</label> + <backend_model>Mage_Sitemap_Model_Config_Backend_Priority</backend_model> + <comment>Valid values range: from 0.0 to 1.0.</comment> + </field> + </group> + <group id="product" translate="label" type="text" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Products Options</label> + <field id="changefreq" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Frequency</label> + <source_model>Mage_Sitemap_Model_Config_Source_Frequency</source_model> + </field> + <field id="priority" translate="label comment" type="text" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Priority</label> + <backend_model>Mage_Sitemap_Model_Config_Backend_Priority</backend_model> + <comment>Valid values range: from 0.0 to 1.0.</comment> + </field> + <field id="image_include" translate="label" type="select" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Add Images into Sitemap</label> + <source_model>Mage_Sitemap_Model_Source_Product_Image_Include</source_model> + </field> + </group> + <group id="page" translate="label" type="text" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>CMS Pages Options</label> + <field id="changefreq" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Frequency</label> + <source_model>Mage_Sitemap_Model_Config_Source_Frequency</source_model> + </field> + <field id="priority" translate="label comment" type="text" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Priority</label> + <backend_model>Mage_Sitemap_Model_Config_Backend_Priority</backend_model> + <comment>Valid values range: from 0.0 to 1.0.</comment> + </field> + </group> + <group id="generate" translate="label" type="text" sortOrder="4" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Generation Settings</label> + <field id="enabled" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Enabled</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="error_email" translate="label" type="text" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Error Email Recipient</label> + <validate>validate-email</validate> + </field> + <field id="error_email_identity" translate="label" type="select" sortOrder="6" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Error Email Sender</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Identity</source_model> + </field> + <field id="error_email_template" translate="label" type="select" sortOrder="7" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Error Email Template</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Template</source_model> + </field> + <field id="frequency" translate="label" type="select" sortOrder="4" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Frequency</label> + <source_model>Mage_Cron_Model_Config_Source_Frequency</source_model> + <backend_model>Mage_Cron_Model_Config_Backend_Sitemap</backend_model> + </field> + <field id="time" translate="label" type="time" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Start Time</label> + </field> + </group> + <group id="limit" translate="label" type="text" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Sitemap File Limits</label> + <field id="max_lines" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Maximum No of URLs Per File</label> + </field> + <field id="max_file_size" translate="label comment" type="text" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Maximum File Size</label> + <comment>File size in bytes.</comment> + </field> + </group> + <group id="search_engines" translate="label" type="text" sortOrder="6" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Search Engine Submission Settings</label> + <field id="submission_robots" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Enable Submission to Robots.txt</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + </group> + </section> + </system> +</config> diff --git a/app/code/core/Mage/Sitemap/etc/system.xml b/app/code/core/Mage/Sitemap/etc/system.xml deleted file mode 100644 index cb49b5d3046fc58abd50e4e0ffec466e1047a328..0000000000000000000000000000000000000000 --- a/app/code/core/Mage/Sitemap/etc/system.xml +++ /dev/null @@ -1,249 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * 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 Mage_Sitemap - * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<config> - <sections> - <sitemap translate="label" module="Mage_Sitemap"> - <label>XML Sitemap</label> - <tab>catalog</tab> - <frontend_type>text</frontend_type> - <sort_order>70</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <resource>Mage_Sitemap::config_sitemap</resource> - <groups> - <category translate="label"> - <label>Categories Options</label> - <frontend_type>text</frontend_type> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <changefreq translate="label"> - <label>Frequency</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Frequency</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </changefreq> - <priority translate="label comment"> - <label>Priority</label> - <frontend_type>text</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Sitemap</backend_model> - <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> - <comment>Valid values range: from 0.0 to 1.0.</comment> - </priority> - </fields> - </category> - <product translate="label"> - <label>Products Options</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> - <fields> - <changefreq translate="label"> - <label>Frequency</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Frequency</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </changefreq> - <priority translate="label comment"> - <label>Priority</label> - <frontend_type>text</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Sitemap</backend_model> - <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> - <comment>Valid values range: from 0.0 to 1.0.</comment> - </priority> - <image_include translate="label"> - <label>Add Images into Sitemap</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Sitemap_Model_Source_Product_Image_Include</source_model> - <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> - </image_include> - </fields> - </product> - <page translate="label"> - <label>CMS Pages Options</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> - <fields> - <changefreq translate="label"> - <label>Frequency</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Frequency</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </changefreq> - <priority translate="label comment"> - <label>Priority</label> - <frontend_type>text</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Sitemap</backend_model> - <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> - <comment>Valid values range: from 0.0 to 1.0.</comment> - </priority> - </fields> - </page> - <generate translate="label"> - <label>Generation Settings</label> - <frontend_type>text</frontend_type> - <sort_order>4</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - <fields> - <enabled translate="label"> - <label>Enabled</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </enabled> - <error_email translate="label"> - <label>Error Email Recipient</label> - <frontend_type>text</frontend_type> - <validate>validate-email</validate> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </error_email> - <error_email_identity translate="label"> - <label>Error Email Sender</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Identity</source_model> - <sort_order>6</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </error_email_identity> - <error_email_template translate="label"> - <label>Error Email Template</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Template</source_model> - <sort_order>7</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </error_email_template> - <frequency translate="label"> - <label>Frequency</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Cron_Frequency</source_model> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Sitemap_Cron</backend_model> - <sort_order>4</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </frequency> - <time translate="label"> - <label>Start Time</label> - <frontend_type>time</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> - </time> - </fields> - </generate> - <limit translate="label"> - <label>Sitemap File Limits</label> - <frontend_type>text</frontend_type> - <sort_order>5</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <max_lines translate="label"> - <label>Maximum No of URLs Per File</label> - <frontend_type>text</frontend_type> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </max_lines> - <max_file_size translate="label comment"> - <label>Maximum File Size</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> - <comment>File size in bytes.</comment> - </max_file_size> - </fields> - </limit> - <search_engines translate="label"> - <label>Search Engine Submission Settings</label> - <frontend_type>text</frontend_type> - <sort_order>6</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <submission_robots translate="label"> - <label>Enable Submission to Robots.txt</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </submission_robots> - </fields> - </search_engines> - </groups> - </sitemap> - </sections> -</config> diff --git a/app/code/core/Mage/Tag/Block/Adminhtml/Catalog/Product/Edit/Tab/Tag.php b/app/code/core/Mage/Tag/Block/Adminhtml/Catalog/Product/Edit/Tab/Tag.php index 8acbc66c5a073e7186260b56353f2660ed875e7c..f67c3aac31c1293505c5b5dd21c11f3aab9a3a2e 100644 --- a/app/code/core/Mage/Tag/Block/Adminhtml/Catalog/Product/Edit/Tab/Tag.php +++ b/app/code/core/Mage/Tag/Block/Adminhtml/Catalog/Product/Edit/Tab/Tag.php @@ -64,29 +64,35 @@ class Mage_Tag_Block_Adminhtml_Catalog_Product_Edit_Tab_Tag * @param Mage_Core_Controller_Request_Http $request * @param Mage_Core_Model_Layout $layout * @param Mage_Core_Model_Event_Manager $eventManager + * @param Mage_Backend_Model_Url $urlBuilder * @param Mage_Core_Model_Translate $translator * @param Mage_Core_Model_Cache $cache * @param Mage_Core_Model_Design_Package $designPackage * @param Mage_Core_Model_Session $session * @param Mage_Core_Model_Store_Config $storeConfig * @param Mage_Core_Controller_Varien_Front $frontController + * @param Mage_Core_Model_Factory_Helper $helperFactory * @param Mage_Core_Model_Authorization $authSession * @param array $data + * + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct(Mage_Core_Controller_Request_Http $request, Mage_Core_Model_Layout $layout, Mage_Core_Model_Event_Manager $eventManager, + Mage_Backend_Model_Url $urlBuilder, Mage_Core_Model_Translate $translator, Mage_Core_Model_Cache $cache, Mage_Core_Model_Design_Package $designPackage, Mage_Core_Model_Session $session, Mage_Core_Model_Store_Config $storeConfig, Mage_Core_Controller_Varien_Front $frontController, + Mage_Core_Model_Factory_Helper $helperFactory, Mage_Core_Model_Authorization $authSession, array $data = array() ) { - parent::__construct($request, $layout, $eventManager, $translator, $cache, $designPackage, $session, - $storeConfig, $frontController, $data + parent::__construct($request, $layout, $eventManager, $urlBuilder, $translator, $cache, $designPackage, + $session, $storeConfig, $frontController, $helperFactory, $data ); if (isset($data['helpers'])) { diff --git a/app/code/core/Mage/Tag/Block/Adminhtml/Catalog/Product/Edit/Tab/Tag/Customer.php b/app/code/core/Mage/Tag/Block/Adminhtml/Catalog/Product/Edit/Tab/Tag/Customer.php index 8cf5a6d72bd017cb338b0dff9a5bd9fe03a0ef63..b2bc8100959d0171ea1b319725b1af400fe95e80 100644 --- a/app/code/core/Mage/Tag/Block/Adminhtml/Catalog/Product/Edit/Tab/Tag/Customer.php +++ b/app/code/core/Mage/Tag/Block/Adminhtml/Catalog/Product/Edit/Tab/Tag/Customer.php @@ -64,29 +64,36 @@ class Mage_Tag_Block_Adminhtml_Catalog_Product_Edit_Tab_Tag_Customer * @param Mage_Core_Controller_Request_Http $request * @param Mage_Core_Model_Layout $layout * @param Mage_Core_Model_Event_Manager $eventManager + * @param Mage_Backend_Model_Url $urlBuilder * @param Mage_Core_Model_Translate $translator * @param Mage_Core_Model_Cache $cache * @param Mage_Core_Model_Design_Package $designPackage * @param Mage_Core_Model_Session $session * @param Mage_Core_Model_Store_Config $storeConfig * @param Mage_Core_Controller_Varien_Front $frontController + * @param Mage_Core_Model_Factory_Helper $helperFactory, * @param Mage_Core_Model_Authorization $authSession * @param array $data + * + * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ - public function __construct(Mage_Core_Controller_Request_Http $request, + public function __construct( + Mage_Core_Controller_Request_Http $request, Mage_Core_Model_Layout $layout, Mage_Core_Model_Event_Manager $eventManager, + Mage_Backend_Model_Url $urlBuilder, Mage_Core_Model_Translate $translator, Mage_Core_Model_Cache $cache, Mage_Core_Model_Design_Package $designPackage, Mage_Core_Model_Session $session, Mage_Core_Model_Store_Config $storeConfig, Mage_Core_Controller_Varien_Front $frontController, + Mage_Core_Model_Factory_Helper $helperFactory, Mage_Core_Model_Authorization $authSession, array $data = array() ) { - parent::__construct($request, $layout, $eventManager, $translator, $cache, $designPackage, $session, - $storeConfig, $frontController, $data + parent::__construct($request, $layout, $eventManager, $urlBuilder, $translator, $cache, $designPackage, $session, + $storeConfig, $frontController, $helperFactory, $data ); if (isset($data['helpers'])) { diff --git a/app/code/core/Mage/Tag/Block/Adminhtml/Catalog/Product/Edit/Tab/Tag/Customer/Grid.php b/app/code/core/Mage/Tag/Block/Adminhtml/Catalog/Product/Edit/Tab/Tag/Customer/Grid.php index 8e35ea3d25441a0c0ae51b8ec608f7d7886ed5dc..3fbce83e6e2bb5b9e1893d2a5c0c99c2b21d54f7 100644 --- a/app/code/core/Mage/Tag/Block/Adminhtml/Catalog/Product/Edit/Tab/Tag/Customer/Grid.php +++ b/app/code/core/Mage/Tag/Block/Adminhtml/Catalog/Product/Edit/Tab/Tag/Customer/Grid.php @@ -34,7 +34,8 @@ * @method Mage_Tag_Block_Adminhtml_Catalog_Product_Edit_Tab_Tag_Customer_Grid setUseAjax() setUseAjax(bool $flag) * @method int getProductId() getProductId() */ -class Mage_Tag_Block_Adminhtml_Catalog_Product_Edit_Tab_Tag_Customer_Grid extends Mage_Backend_Block_Widget_Grid +class Mage_Tag_Block_Adminhtml_Catalog_Product_Edit_Tab_Tag_Customer_Grid + extends Mage_Backend_Block_Widget_Grid_Extended { protected function _construct() { diff --git a/app/code/core/Mage/Tag/Block/Adminhtml/Catalog/Product/Edit/Tab/Tag/Grid.php b/app/code/core/Mage/Tag/Block/Adminhtml/Catalog/Product/Edit/Tab/Tag/Grid.php index 946c125c916e0ccb21e0ea751d085e4f6eab7d5c..9b3bb6684410d1b4a1e1b82a4897ceec863ab555 100644 --- a/app/code/core/Mage/Tag/Block/Adminhtml/Catalog/Product/Edit/Tab/Tag/Grid.php +++ b/app/code/core/Mage/Tag/Block/Adminhtml/Catalog/Product/Edit/Tab/Tag/Grid.php @@ -32,7 +32,7 @@ * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Tag_Block_Adminhtml_Catalog_Product_Edit_Tab_Tag_Grid extends Mage_Backend_Block_Widget_Grid +class Mage_Tag_Block_Adminhtml_Catalog_Product_Edit_Tab_Tag_Grid extends Mage_Backend_Block_Widget_Grid_Extended { protected function _construct() { diff --git a/app/code/core/Mage/Tag/Block/Adminhtml/Customer/Edit/Tab/Tag.php b/app/code/core/Mage/Tag/Block/Adminhtml/Customer/Edit/Tab/Tag.php index 0ec59e932749eacf45d44a6a38339920dca0faf9..bc4bd58cc9d88bb72f78f96b1acd6594eb3f2e22 100644 --- a/app/code/core/Mage/Tag/Block/Adminhtml/Customer/Edit/Tab/Tag.php +++ b/app/code/core/Mage/Tag/Block/Adminhtml/Customer/Edit/Tab/Tag.php @@ -58,12 +58,14 @@ class Mage_Tag_Block_Adminhtml_Customer_Edit_Tab_Tag extends Mage_Backend_Block_ * @param Mage_Core_Controller_Request_Http $request * @param Mage_Core_Model_Layout $layout * @param Mage_Core_Model_Event_Manager $eventManager + * @param Mage_Backend_Model_Url $urlBuilder * @param Mage_Core_Model_Translate $translator * @param Mage_Core_Model_Cache $cache * @param Mage_Core_Model_Design_Package $designPackage * @param Mage_Core_Model_Session $session * @param Mage_Core_Model_Store_Config $storeConfig * @param Mage_Core_Controller_Varien_Front $frontController + * @param Mage_Core_Model_Factory_Helper $helperFactory * @param Mage_Core_Model_Authorization $authSession * @param array $data * @@ -72,17 +74,19 @@ class Mage_Tag_Block_Adminhtml_Customer_Edit_Tab_Tag extends Mage_Backend_Block_ public function __construct(Mage_Core_Controller_Request_Http $request, Mage_Core_Model_Layout $layout, Mage_Core_Model_Event_Manager $eventManager, + Mage_Backend_Model_Url $urlBuilder, Mage_Core_Model_Translate $translator, Mage_Core_Model_Cache $cache, Mage_Core_Model_Design_Package $designPackage, Mage_Core_Model_Session $session, Mage_Core_Model_Store_Config $storeConfig, Mage_Core_Controller_Varien_Front $frontController, + Mage_Core_Model_Factory_Helper $helperFactory, Mage_Core_Model_Authorization $authSession, array $data = array() ) { - parent::__construct($request, $layout, $eventManager, $translator, $cache, $designPackage, $session, - $storeConfig, $frontController, $data + parent::__construct($request, $layout, $eventManager, $urlBuilder, $translator, $cache, $designPackage, + $session, $storeConfig, $frontController, $helperFactory, $data ); $this->_authSession = $authSession; diff --git a/app/code/core/Mage/Tag/Block/Adminhtml/Customer/Edit/Tab/Tag/Grid.php b/app/code/core/Mage/Tag/Block/Adminhtml/Customer/Edit/Tab/Tag/Grid.php index 5723267f219fddbc2fd2b8647b8f7e96feaabfdb..804628c16e1151b50e337cc7bc2b988e1bdf8b4b 100644 --- a/app/code/core/Mage/Tag/Block/Adminhtml/Customer/Edit/Tab/Tag/Grid.php +++ b/app/code/core/Mage/Tag/Block/Adminhtml/Customer/Edit/Tab/Tag/Grid.php @@ -35,7 +35,7 @@ * @method Mage_Tag_Block_Adminhtml_Customer_Edit_Tab_Tag_Grid setCustomerId() setCustomerId(int $customerId) * @method Mage_Tag_Block_Adminhtml_Customer_Edit_Tab_Tag_Grid setUseAjax() setUseAjax(boolean $useAjax) */ -class Mage_Tag_Block_Adminhtml_Customer_Edit_Tab_Tag_Grid extends Mage_Backend_Block_Widget_Grid +class Mage_Tag_Block_Adminhtml_Customer_Edit_Tab_Tag_Grid extends Mage_Backend_Block_Widget_Grid_Extended { /** * Initialize grid parameters diff --git a/app/code/core/Mage/Tag/Block/Adminhtml/Report/Popular.php b/app/code/core/Mage/Tag/Block/Adminhtml/Report/Popular.php index e7fa741e832ad9b659b796b6d0cce20665aea751..a3c23ad7075fb245df8195764688aa9d3ddfaed3 100644 --- a/app/code/core/Mage/Tag/Block/Adminhtml/Report/Popular.php +++ b/app/code/core/Mage/Tag/Block/Adminhtml/Report/Popular.php @@ -46,10 +46,10 @@ class Mage_Tag_Block_Adminhtml_Report_Popular extends Mage_Adminhtml_Block_Widge protected function _prepareLayout() { $this->setChild('store_switcher', - $this->getLayout()->createBlock('Mage_Adminhtml_Block_Store_Switcher') + $this->getLayout()->createBlock('Mage_Backend_Block_Store_Switcher') ->setUseConfirm(false) ->setSwitchUrl($this->getUrl('*/*/*', array('store'=>null))) - ->setTemplate('report/store/switcher.phtml') + ->setTemplate('Mage_Adminhtml::report/store/switcher.phtml') ); return parent::_prepareLayout(); diff --git a/app/code/core/Mage/Tag/Block/Adminhtml/Store/Switcher.php b/app/code/core/Mage/Tag/Block/Adminhtml/Store/Switcher.php index b46b347d573cb20ec59525dc4a8a8f0328881817..1ccbc2113200faa8f0395e10bc91e6a916d89ad8 100644 --- a/app/code/core/Mage/Tag/Block/Adminhtml/Store/Switcher.php +++ b/app/code/core/Mage/Tag/Block/Adminhtml/Store/Switcher.php @@ -31,7 +31,7 @@ * @package Mage_Tag * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Tag_Block_Adminhtml_Store_Switcher extends Mage_Adminhtml_Block_Store_Switcher +class Mage_Tag_Block_Adminhtml_Store_Switcher extends Mage_Backend_Block_Store_Switcher { /** * @var bool diff --git a/app/code/core/Mage/Tag/Block/Catalog/Product/Rss/Link.php b/app/code/core/Mage/Tag/Block/Catalog/Product/Rss/Link.php index 5ad5a95c558ecb736d33163d522ce83800d1f9e4..785e9f377cf23476842e556c02747ede16cf86bf 100644 --- a/app/code/core/Mage/Tag/Block/Catalog/Product/Rss/Link.php +++ b/app/code/core/Mage/Tag/Block/Catalog/Product/Rss/Link.php @@ -59,64 +59,30 @@ class Mage_Tag_Block_Catalog_Product_Rss_Link extends Mage_Core_Block_Template protected $_coreUrlModel; /** - * @param Mage_Core_Controller_Request_Http $request - * @param Mage_Core_Model_Layout $layout - * @param Mage_Core_Model_Event_Manager $eventManager - * @param Mage_Core_Model_Translate $translator - * @param Mage_Core_Model_Cache $cache - * @param Mage_Core_Model_Design_Package $designPackage - * @param Mage_Core_Model_Session $session - * @param Mage_Core_Model_Store_Config $storeConfig - * @param Mage_Core_Controller_Varien_Front $frontController - * @param array $data - * - * @SuppressWarnings(PHPMD.ExcessiveParameterList) + * Initialize object */ - public function __construct( - Mage_Core_Controller_Request_Http $request, - Mage_Core_Model_Layout $layout, - Mage_Core_Model_Event_Manager $eventManager, - Mage_Core_Model_Translate $translator, - Mage_Core_Model_Cache $cache, - Mage_Core_Model_Design_Package $designPackage, - Mage_Core_Model_Session $session, - Mage_Core_Model_Store_Config $storeConfig, - Mage_Core_Controller_Varien_Front $frontController, - array $data = array() - ) { - parent::__construct( - $request, - $layout, - $eventManager, - $translator, - $cache, - $designPackage, - $session, - $storeConfig, - $frontController, - $data - ); - - if (isset($data['rss_catalog_tag_enabled'])) { - $this->_isRssEnabled = $data['rss_catalog_tag_enabled']; + protected function _construct() + { + if ($this->hasData('rss_catalog_tag_enabled')) { + $this->_isRssEnabled = $this->getData('rss_catalog_tag_enabled'); } else { $this->_isRssEnabled = $this->_storeConfig->getConfig('rss/catalog/tag'); } - if (isset($data['tag_id'])) { - $this->_tagId = $data['tag_id']; + if ($this->hasData('tag_id')) { + $this->_tagId = $this->getData('tag_id'); } else { $this->_tagId = $this->getRequest()->getParam('tagId'); } - if (isset($data['tag_model'])) { - $this->_tagModel = $data['tag_model']; + if ($this->hasData('tag_model')) { + $this->_tagModel = $this->getData('tag_model'); } else { $this->_tagModel = Mage::getModel('Mage_Tag_Model_Tag'); } - if (isset($data['core_url_model'])) { - $this->_coreUrlModel = $data['core_url_model']; + if ($this->hasData('core_url_model')) { + $this->_coreUrlModel = $this->getData('core_url_model'); } else { $this->_coreUrlModel = Mage::getModel('Mage_Core_Model_Url'); } diff --git a/app/code/core/Mage/Tag/etc/adminhtml/system.xml b/app/code/core/Mage/Tag/etc/adminhtml/system.xml new file mode 100644 index 0000000000000000000000000000000000000000..f153ea4e14354daec9a22c2d52a6d64a74e05583 --- /dev/null +++ b/app/code/core/Mage/Tag/etc/adminhtml/system.xml @@ -0,0 +1,39 @@ +<?xml version="1.0"?> +<!-- +/** + * 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 Mage_Rss + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> + <system> + <section id="rss"> + <group id="catalog" translate="label"> + <field id="tag" translate="label" type="select" sortOrder="13" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Tags Products</label> + <source_model>Mage_Backend_Model_Config_Source_Enabledisable</source_model> + </field> + </group> + </section> + </system> +</config> diff --git a/app/code/core/Mage/Tag/view/frontend/list.phtml b/app/code/core/Mage/Tag/view/frontend/list.phtml index 283767b504eff2cf7e4a33f6270c39ea02616732..9abc5de5bc44d97e150b45c071a7e8ec33180d94 100644 --- a/app/code/core/Mage/Tag/view/frontend/list.phtml +++ b/app/code/core/Mage/Tag/view/frontend/list.phtml @@ -53,12 +53,12 @@ <p class="note"><?php echo $this->__("Use spaces to separate tags. Use single quotes (') for phrases.") ?></p> <script type="text/javascript"> (function($) { - head.js("<?php echo $this->getSkinUrl('jquery/jquery.validate.js')?>", - "<?php echo $this->getSkinUrl('jquery/additional-methods.js')?>", - "<?php echo $this->getSkinUrl('jquery/jquery.metadata.js')?>", - "<?php echo $this->getSkinUrl('jquery/jquery.hook.js')?>", - "<?php echo $this->getSkinUrl('mage/validation/validate.js')?>", - "<?php echo $this->getSkinUrl('Mage_Tag::list.js')?>", function() { + head.js("<?php echo $this->getViewFileUrl('jquery/jquery.validate.js')?>", + "<?php echo $this->getViewFileUrl('jquery/additional-methods.js')?>", + "<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js')?>", + "<?php echo $this->getViewFileUrl('jquery/jquery.hook.js')?>", + "<?php echo $this->getViewFileUrl('mage/validation/validate.js')?>", + "<?php echo $this->getViewFileUrl('Mage_Tag::list.js')?>", function() { $('#addTagForm').tags(); } ) diff --git a/app/code/core/Mage/Tax/Block/Adminhtml/Frontend/Region/Updater.php b/app/code/core/Mage/Tax/Block/Adminhtml/Frontend/Region/Updater.php index a7983cff74fcee0eb758c5a3f484b075234c7344..11f8f866b3ed2f9f1f2236440c40a165331343ad 100644 --- a/app/code/core/Mage/Tax/Block/Adminhtml/Frontend/Region/Updater.php +++ b/app/code/core/Mage/Tax/Block/Adminhtml/Frontend/Region/Updater.php @@ -25,7 +25,7 @@ */ class Mage_Tax_Block_Adminhtml_Frontend_Region_Updater - extends Mage_Adminhtml_Block_System_Config_Form_Field + extends Mage_Backend_Block_System_Config_Form_Field { protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) { diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Tax/Apply/On.php b/app/code/core/Mage/Tax/Model/Config/Source/Apply/On.php similarity index 91% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Tax/Apply/On.php rename to app/code/core/Mage/Tax/Model/Config/Source/Apply/On.php index 327166b01da1690e35acdda12ec861d9e05fb392..4af31813875d6c5a84acf547ef25c9208d11d15d 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Tax/Apply/On.php +++ b/app/code/core/Mage/Tax/Model/Config/Source/Apply/On.php @@ -19,11 +19,11 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Tax * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Adminhtml_Model_System_Config_Source_Tax_Apply_On +class Mage_Tax_Model_Config_Source_Apply_On implements Mage_Core_Model_Option_ArrayInterface { public function toOptionArray() { diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Tax/Basedon.php b/app/code/core/Mage/Tax/Model/Config/Source/Basedon.php similarity index 82% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Tax/Basedon.php rename to app/code/core/Mage/Tax/Model/Config/Source/Basedon.php index 2a6f595d8d1b05f3af286f4b382aca8946ccf721..6b8b7863cb2e943a82036a0ffa143e140f6052e5 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Tax/Basedon.php +++ b/app/code/core/Mage/Tax/Model/Config/Source/Basedon.php @@ -19,18 +19,18 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Tax * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Adminhtml_Model_System_Config_Source_Tax_Basedon +class Mage_Tax_Model_Config_Source_Basedon implements Mage_Core_Model_Option_ArrayInterface { public function toOptionArray() { return array( - array('value'=>'shipping', 'label'=>Mage::helper('Mage_Adminhtml_Helper_Data')->__('Shipping Address')), - array('value'=>'billing', 'label'=>Mage::helper('Mage_Adminhtml_Helper_Data')->__('Billing Address')), - array('value'=>'origin', 'label'=>Mage::helper('Mage_Adminhtml_Helper_Data')->__("Shipping Origin")), + array('value'=>'shipping', 'label'=>Mage::helper('Mage_Tax_Helper_Data')->__('Shipping Address')), + array('value'=>'billing', 'label'=>Mage::helper('Mage_Tax_Helper_Data')->__('Billing Address')), + array('value'=>'origin', 'label'=>Mage::helper('Mage_Tax_Helper_Data')->__("Shipping Origin")), ); } diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Tax/Catalog.php b/app/code/core/Mage/Tax/Model/Config/Source/Catalog.php similarity index 69% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Tax/Catalog.php rename to app/code/core/Mage/Tax/Model/Config/Source/Catalog.php index 48c735ea4d84210d337eefff3da75465341cfc67..570ec686473255ed85c8b3dd12db9a1ecbcf57b5 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Tax/Catalog.php +++ b/app/code/core/Mage/Tax/Model/Config/Source/Catalog.php @@ -19,18 +19,18 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Tax * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Adminhtml_Model_System_Config_Source_Tax_Catalog +class Mage_Tax_Model_Config_Source_Catalog implements Mage_Core_Model_Option_ArrayInterface { public function toOptionArray() { return array( - array('value'=>0, 'label'=>Mage::helper('Mage_Adminhtml_Helper_Data')->__('No (price without tax)')), - array('value'=>1, 'label'=>Mage::helper('Mage_Adminhtml_Helper_Data')->__('Yes (only price with tax)')), - array('value'=>2, 'label'=>Mage::helper('Mage_Adminhtml_Helper_Data')->__("Both (without and with tax)")), + array('value'=>0, 'label'=>Mage::helper('Mage_Tax_Helper_Data')->__('No (price without tax)')), + array('value'=>1, 'label'=>Mage::helper('Mage_Tax_Helper_Data')->__('Yes (only price with tax)')), + array('value'=>2, 'label'=>Mage::helper('Mage_Tax_Helper_Data')->__("Both (without and with tax)")), ); } diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Tax/Class/Customer.php b/app/code/core/Mage/Tax/Model/Config/Source/Class/Customer.php similarity index 85% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Tax/Class/Customer.php rename to app/code/core/Mage/Tax/Model/Config/Source/Class/Customer.php index 0a4b4d5df9503574bd156d538e665137bbf32683..7d76b656c5f46fbec0da038e35f56ca0adce938c 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Tax/Class/Customer.php +++ b/app/code/core/Mage/Tax/Model/Config/Source/Class/Customer.php @@ -19,12 +19,18 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Tax * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Adminhtml_Model_System_Config_Source_Tax_Class_Customer + +class Mage_Tax_Model_Config_Source_Class_Customer implements Mage_Core_Model_Option_ArrayInterface { + /** + * Retrieve a list of customer tax classes + * + * @return array + */ public function toOptionArray() { $taxClasses = Mage::getModel('Mage_Tax_Model_Class_Source_Customer')->toOptionArray(); diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Tax/Class/Product.php b/app/code/core/Mage/Tax/Model/Config/Source/Class/Product.php similarity index 84% rename from app/code/core/Mage/Adminhtml/Model/System/Config/Source/Tax/Class/Product.php rename to app/code/core/Mage/Tax/Model/Config/Source/Class/Product.php index bcd5c7c6ed995cacfcba5a716c6904775124c4f3..38d6ba644ff14ba6b95b306cc9cfa575ad329a71 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Tax/Class/Product.php +++ b/app/code/core/Mage/Tax/Model/Config/Source/Class/Product.php @@ -19,12 +19,17 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Tax * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Adminhtml_Model_System_Config_Source_Tax_Class_Product +class Mage_Tax_Model_Config_Source_Class_Product implements Mage_Core_Model_Option_ArrayInterface { + /** + * Retrieve list of products + * + * @return array + */ public function toOptionArray() { return Mage::getModel('Mage_Tax_Model_Class_Source_Product')->toOptionArray(); diff --git a/app/code/core/Mage/Tax/Model/System/Config/Source/Tax/Country.php b/app/code/core/Mage/Tax/Model/System/Config/Source/Tax/Country.php index a7d8e961ac18a6ce2b605b37d42c08d4b6a47725..532d983b9c364f04c9427a8a7e98ff81c617ae53 100644 --- a/app/code/core/Mage/Tax/Model/System/Config/Source/Tax/Country.php +++ b/app/code/core/Mage/Tax/Model/System/Config/Source/Tax/Country.php @@ -25,7 +25,7 @@ */ -class Mage_Tax_Model_System_Config_Source_Tax_Country extends Mage_Adminhtml_Model_System_Config_Source_Country +class Mage_Tax_Model_System_Config_Source_Tax_Country extends Mage_Directory_Model_Config_Source_Country { protected $_options; diff --git a/app/code/core/Mage/Tax/data/tax_setup/data-install-1.6.0.0.php b/app/code/core/Mage/Tax/data/tax_setup/data-install-1.6.0.0.php index f07f6c3dfd790d9bc8852d936aa243892b30ae5c..4f97bfe6d3fee2a892b5a5ea86886e41a1866773 100644 --- a/app/code/core/Mage/Tax/data/tax_setup/data-install-1.6.0.0.php +++ b/app/code/core/Mage/Tax/data/tax_setup/data-install-1.6.0.0.php @@ -38,11 +38,6 @@ $data = array( 'class_id' => 3, 'class_name' => 'Retail Customer', 'class_type' => Mage_Tax_Model_Class::TAX_CLASS_TYPE_CUSTOMER - ), - array( - 'class_id' => 4, - 'class_name' => 'Shipping', - 'class_type' => Mage_Tax_Model_Class::TAX_CLASS_TYPE_PRODUCT ) ); foreach ($data as $row) { diff --git a/app/code/core/Mage/Tax/etc/adminhtml/menu.xml b/app/code/core/Mage/Tax/etc/adminhtml/menu.xml index eb990db419d400d7d5f354dffcc527bf988c5461..dd9bc7cdd8187740f094d414b5f1dddddab21dfb 100644 --- a/app/code/core/Mage/Tax/etc/adminhtml/menu.xml +++ b/app/code/core/Mage/Tax/etc/adminhtml/menu.xml @@ -30,6 +30,6 @@ <add id="Mage_Tax::sales_tax" title="Tax" module="Mage_Tax" sortOrder="105" parent="Mage_Adminhtml::system" resource="Mage_Tax::manage_tax"/> <add id="Mage_Tax::sales_tax_rules" title="Manage Tax Rules" module="Mage_Tax" parent="Mage_Tax::sales_tax" action="adminhtml/tax_rule" resource="Mage_Tax::manage_tax"/> <add id="Mage_Tax::sales_tax_rates" title="Manage Tax Zones & Rates" module="Mage_Tax" parent="Mage_Tax::sales_tax" action="adminhtml/tax_rate" resource="Mage_Tax::manage_tax"/> - <add id="Mage_Tax::system_convert_tax" title="Import / Export Tax Rates" sortOrder="50" module="Mage_Tax" parent="Mage_Adminhtml::system_convert" action="adminhtml/tax_rate/importExport" resource="Mage_Tax::import_export"/> + <add id="Mage_Tax::system_convert_tax" title="Import/Export Tax Rates" sortOrder="50" module="Mage_Tax" parent="Mage_Adminhtml::system_convert" action="adminhtml/tax_rate/importExport" resource="Mage_Tax::import_export"/> </menu> </config> diff --git a/app/code/core/Mage/Tax/etc/adminhtml/system.xml b/app/code/core/Mage/Tax/etc/adminhtml/system.xml new file mode 100644 index 0000000000000000000000000000000000000000..35f6df8b8774600df80f982ae56f96003eeeb28f --- /dev/null +++ b/app/code/core/Mage/Tax/etc/adminhtml/system.xml @@ -0,0 +1,168 @@ +<?xml version="1.0"?> +<!-- +/** + * 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 Mage_Tax + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> + <system> + <section id="tax" translate="label" module="Mage_Tax" sortOrder="303" showInDefault="1" showInWebsite="1" showInStore="1"> + <class>separator-top</class> + <label>Tax</label> + <tab>sales</tab> + <resource>Mage_Tax::config_tax</resource> + <group id="classes" translate="label" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Tax Classes</label> + <field id="shipping_tax_class" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Tax Class for Shipping</label> + <source_model>Mage_Tax_Model_Config_Source_Class_Product</source_model> + </field> + <field id="default_product_tax_class" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Default Tax Class for Product</label> + <source_model>Mage_Tax_Model_Config_Source_Class_Product</source_model> + </field> + <field id="default_customer_tax_class" translate="label" type="select" sortOrder="30" showInDefault="1" showInWebsite="0" showInStore="0"> + <label>Default Tax Class for Customer</label> + <source_model>Mage_Tax_Model_Config_Source_Class_Customer</source_model> + </field> + </group> + <group id="calculation" translate="label" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Calculation Settings</label> + <field id="algorithm" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Tax Calculation Method Based On</label> + <source_model>Mage_Tax_Model_System_Config_Source_Algorithm</source_model> + </field> + <field id="based_on" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Tax Calculation Based On</label> + <source_model>Mage_Tax_Model_Config_Source_Basedon</source_model> + </field> + <field id="price_includes_tax" translate="label comment" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Catalog Prices</label> + <comment>Whether catalog prices entered by admin include tax.</comment> + <backend_model>Mage_Tax_Model_Config_Price_Include</backend_model> + <source_model>Mage_Tax_Model_System_Config_Source_PriceType</source_model> + </field> + <field id="shipping_includes_tax" translate="label comment" type="select" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Shipping Prices</label> + <comment>Whether shipping amounts entered by admin or obtained from gateways include tax.</comment> + <backend_model>Mage_Tax_Model_Config_Price_Include</backend_model> + <source_model>Mage_Tax_Model_System_Config_Source_PriceType</source_model> + </field> + <field id="apply_after_discount" translate="label comment" type="select" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Apply Customer Tax</label> + <source_model>Mage_Tax_Model_System_Config_Source_Apply</source_model> + </field> + <field id="discount_tax" translate="label comment" type="select" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Apply Discount On Prices</label> + <source_model>Mage_Tax_Model_System_Config_Source_PriceType</source_model> + <comment>Apply discount on price including tax is calculated based on store tax, if "Apply Tax after Discount" is selected.</comment> + </field> + <field id="apply_tax_on" translate="label comment" type="select" sortOrder="60" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Apply Tax On</label> + <source_model>Mage_Tax_Model_Config_Source_Apply_On</source_model> + </field> + </group> + <group id="defaults" translate="label" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Default Tax Destination Calculation</label> + <field id="country" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Default Country</label> + <source_model>Mage_Tax_Model_System_Config_Source_Tax_Country</source_model> + </field> + <field id="region" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Default State</label> + <frontend_model>Mage_Tax_Block_Adminhtml_Frontend_Region_Updater</frontend_model> + <source_model>Mage_Tax_Model_System_Config_Source_Tax_Region</source_model> + </field> + <field id="postcode" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Default Post Code</label> + </field> + </group> + <group id="display" translate="label" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Price Display Settings</label> + <field id="type" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Display Product Prices In Catalog</label> + <source_model>Mage_Tax_Model_System_Config_Source_Tax_Display_Type</source_model> + </field> + <field id="shipping" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Display Shipping Prices</label> + <source_model>Mage_Tax_Model_System_Config_Source_Tax_Display_Type</source_model> + </field> + </group> + <group id="cart_display" translate="label" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Shopping Cart Display Settings</label> + <field id="price" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Display Prices</label> + <source_model>Mage_Tax_Model_System_Config_Source_Tax_Display_Type</source_model> + </field> + <field id="subtotal" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Display Subtotal</label> + <source_model>Mage_Tax_Model_System_Config_Source_Tax_Display_Type</source_model> + </field> + <field id="shipping" translate="label" type="select" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Display Shipping Amount</label> + <source_model>Mage_Tax_Model_System_Config_Source_Tax_Display_Type</source_model> + </field> + <field id="grandtotal" translate="label" type="select" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Include Tax In Grand Total</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="full_summary" translate="label" type="select" sortOrder="60" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Display Full Tax Summary</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="zero_tax" translate="label" type="select" sortOrder="120" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Display Zero Tax Subtotal</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + </group> + <group id="sales_display" translate="label" sortOrder="60" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Orders, Invoices, Credit Memos Display Settings</label> + <field id="price" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Display Prices</label> + <source_model>Mage_Tax_Model_System_Config_Source_Tax_Display_Type</source_model> + </field> + <field id="subtotal" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Display Subtotal</label> + <source_model>Mage_Tax_Model_System_Config_Source_Tax_Display_Type</source_model> + </field> + <field id="shipping" translate="label" type="select" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Display Shipping Amount</label> + <source_model>Mage_Tax_Model_System_Config_Source_Tax_Display_Type</source_model> + </field> + <field id="grandtotal" translate="label" type="select" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Include Tax In Grand Total</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="full_summary" translate="label" type="select" sortOrder="60" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Display Full Tax Summary</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="zero_tax" translate="label" type="select" sortOrder="120" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Display Zero Tax Subtotal</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + </group> + </section> + </system> +</config> diff --git a/app/code/core/Mage/Tax/etc/system.xml b/app/code/core/Mage/Tax/etc/system.xml deleted file mode 100644 index 7cf241fceefb432e0bfe9d4ea2b3a4959f301861..0000000000000000000000000000000000000000 --- a/app/code/core/Mage/Tax/etc/system.xml +++ /dev/null @@ -1,363 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * 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 Mage_Tax - * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<config> - <sections> - <tax translate="label" module="Mage_Tax"> - <class>separator-top</class> - <label>Tax</label> - <tab>sales</tab> - <sort_order>303</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <resource>Mage_Tax::config_tax</resource> - <groups> - <classes translate="label"> - <label>Tax Classes</label> - <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> - <fields> - <shipping_tax_class translate="label"> - <label>Tax Class for Shipping</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Tax_Class_Product</source_model> - <sort_order>10</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </shipping_tax_class> - <default_product_tax_class translate="label"> - <label>Default Tax Class for Product</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Tax_Class_Product</source_model> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </default_product_tax_class> - <default_customer_tax_class translate="label"> - <label>Default Tax Class for Customer</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Tax_Class_Customer</source_model> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>0</show_in_website> - <show_in_store>0</show_in_store> - </default_customer_tax_class> - </fields> - </classes> - <calculation translate="label"> - <label>Calculation Settings</label> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <algorithm translate="label"> - <label>Tax Calculation Method Based On</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Tax_Model_System_Config_Source_Algorithm</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </algorithm> - <based_on translate="label"> - <label>Tax Calculation Based On</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Tax_Basedon</source_model> - <sort_order>10</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </based_on> - <price_includes_tax translate="label comment"> - <label>Catalog Prices</label> - <comment>Whether catalog prices entered by admin include tax.</comment> - <frontend_type>select</frontend_type> - <backend_model>Mage_Tax_Model_Config_Price_Include</backend_model> - <source_model>Mage_Tax_Model_System_Config_Source_PriceType</source_model> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </price_includes_tax> - <shipping_includes_tax translate="label comment"> - <label>Shipping Prices</label> - <comment>Whether shipping amounts entered by admin or obtained from gateways include tax.</comment> - <frontend_type>select</frontend_type> - <backend_model>Mage_Tax_Model_Config_Price_Include</backend_model> - <source_model>Mage_Tax_Model_System_Config_Source_PriceType</source_model> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </shipping_includes_tax> - <apply_after_discount translate="label comment"> - <label>Apply Customer Tax</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Tax_Model_System_Config_Source_Apply</source_model> - <sort_order>40</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </apply_after_discount> - <discount_tax translate="label comment"> - <label>Apply Discount On Prices</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Tax_Model_System_Config_Source_PriceType</source_model> - <sort_order>50</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <comment>Apply discount on price including tax is calculated based on store tax, if "Apply Tax after Discount" is selected.</comment> - </discount_tax> - <apply_tax_on translate="label comment"> - <label>Apply Tax On</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Tax_Apply_On</source_model> - <sort_order>60</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </apply_tax_on> - </fields> - </calculation> - <defaults translate="label"> - <label>Default Tax Destination Calculation</label> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <country translate="label"> - <label>Default Country</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Tax_Model_System_Config_Source_Tax_Country</source_model> - <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> - </country> - <region translate="label"> - <label>Default State</label> - <frontend_type>select</frontend_type> - <frontend_model>Mage_Tax_Block_Adminhtml_Frontend_Region_Updater</frontend_model> - <source_model>Mage_Tax_Model_System_Config_Source_Tax_Region</source_model> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </region> - <postcode translate="label"> - <label>Default Post Code</label> - <frontend_type>text</frontend_type> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </postcode> - </fields> - </defaults> - <display translate="label"> - <label>Price Display Settings</label> - <sort_order>40</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <type translate="label"> - <label>Display Product Prices In Catalog</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Tax_Model_System_Config_Source_Tax_Display_Type</source_model> - <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> - </type> - <shipping translate="label"> - <label>Display Shipping Prices</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Tax_Model_System_Config_Source_Tax_Display_Type</source_model> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </shipping> - </fields> - </display> - <cart_display translate="label"> - <label>Shopping Cart Display Settings</label> - <sort_order>50</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <price translate="label"> - <label>Display Prices</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Tax_Model_System_Config_Source_Tax_Display_Type</source_model> - <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> - </price> - <subtotal translate="label"> - <label>Display Subtotal</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Tax_Model_System_Config_Source_Tax_Display_Type</source_model> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </subtotal> - <shipping translate="label"> - <label>Display Shipping Amount</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Tax_Model_System_Config_Source_Tax_Display_Type</source_model> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </shipping> - <!--<discount translate="label"> - <label>Display Discount Amount</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Tax_Model_System_Config_Source_Tax_Display_Type</source_model> - <sort_order>40</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </discount>--> - <grandtotal translate="label"> - <label>Include Tax In Grand Total</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>50</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </grandtotal> - <full_summary translate="label"> - <label>Display Full Tax Summary</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>60</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </full_summary> - <zero_tax translate="label"> - <label>Display Zero Tax Subtotal</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>120</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </zero_tax> - </fields> - </cart_display> - <sales_display translate="label"> - <label>Orders, Invoices, Credit Memos Display Settings</label> - <sort_order>60</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <price translate="label"> - <label>Display Prices</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Tax_Model_System_Config_Source_Tax_Display_Type</source_model> - <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> - </price> - <subtotal translate="label"> - <label>Display Subtotal</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Tax_Model_System_Config_Source_Tax_Display_Type</source_model> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </subtotal> - <shipping translate="label"> - <label>Display Shipping Amount</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Tax_Model_System_Config_Source_Tax_Display_Type</source_model> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </shipping> - <!--<discount translate="label"> - <label>Display Discount Amount</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Tax_Model_System_Config_Source_Tax_Display_Type</source_model> - <sort_order>40</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </discount>--> - <grandtotal translate="label"> - <label>Include Tax In Grand Total</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>50</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </grandtotal> - <full_summary translate="label"> - <label>Display Full Tax Summary</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>60</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </full_summary> - <zero_tax translate="label"> - <label>Display Zero Tax Subtotal</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>120</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </zero_tax> - </fields> - </sales_display> - </groups> - </tax> - </sections> -</config> diff --git a/app/code/core/Mage/Theme/Block/Adminhtml/System/Design/Theme/Edit.php b/app/code/core/Mage/Theme/Block/Adminhtml/System/Design/Theme/Edit.php index 2feb7475ff5d60ec738591f0d9cf84f704761b5b..291f2a05be58b3df4420182538119cb2b1394132 100644 --- a/app/code/core/Mage/Theme/Block/Adminhtml/System/Design/Theme/Edit.php +++ b/app/code/core/Mage/Theme/Block/Adminhtml/System/Design/Theme/Edit.php @@ -40,16 +40,26 @@ class Mage_Theme_Block_Adminhtml_System_Design_Theme_Edit extends Mage_Backend_B $this->_controller = 'Adminhtml_System_Design_Theme'; $this->setId('theme_edit'); - $this->_addButton('save_and_continue', array( - 'label' => $this->__('Save and Continue Edit'), - 'onclick' => "editForm.submit($('edit_form').action+'back/edit/');", - 'class' => 'save', - ), 1); - /** @var $theme Mage_Core_Model_Theme */ $theme = Mage::registry('current_theme'); - if ($theme && $theme->getId() && !$theme->isDeletable()) { + if ($theme && !$theme->isVirtual()) { $this->_removeButton('delete'); + $this->_removeButton('save'); + $this->_removeButton('reset'); + } else { + $this->_addButton('save_and_continue', array( + 'label' => $this->__('Save and Continue Edit'), + 'onclick' => "editForm.submit($('edit_form').action+'back/edit/');", + 'class' => 'save', + ), 1); + + if ($theme->hasChildThemes()) { + $onClick = 'deleteConfirm(\'' . $this->__('Theme contains child themes. Their parent will be modified.') + . ' ' . $this->__('Are you sure you want to do this?') + . '\', \'' . $this->getUrl('*/*/delete', array('id' => $theme->getId())) . '\')'; + + $this->_updateButton('delete', 'onclick', $onClick); + } } return parent::_prepareLayout(); diff --git a/app/code/core/Mage/Theme/Block/Adminhtml/System/Design/Theme/Edit/Tab/General.php b/app/code/core/Mage/Theme/Block/Adminhtml/System/Design/Theme/Edit/Tab/General.php index 18cfa8e6fae20c516a0f059d18b1a6275867633f..fb0e3cada48e2403e19c6713a353006241450b97 100644 --- a/app/code/core/Mage/Theme/Block/Adminhtml/System/Design/Theme/Edit/Tab/General.php +++ b/app/code/core/Mage/Theme/Block/Adminhtml/System/Design/Theme/Edit/Tab/General.php @@ -31,6 +31,13 @@ class Mage_Theme_Block_Adminhtml_System_Design_Theme_Edit_Tab_General extends Mage_Backend_Block_Widget_Form implements Mage_Backend_Block_Widget_Tab_Interface { + /** + * Whether theme is editable + * + * @var bool + */ + protected $_isThemeEditable = false; + /** * Create a form element with necessary controls * @@ -41,7 +48,8 @@ class Mage_Theme_Block_Adminhtml_System_Design_Theme_Edit_Tab_General /** @var $session Mage_Backend_Model_Session */ $session = Mage::getSingleton('Mage_Backend_Model_Session'); $formDataFromSession = $session->getThemeData(); - $formData = Mage::registry('current_theme')->getData(); + $this->_isThemeEditable = $this->_getCurrentTheme()->isVirtual(); + $formData = $this->_getCurrentTheme()->getData(); if ($formDataFromSession && isset($formData['theme_id'])) { unset($formDataFromSession['preview_image']); $formData = array_merge($formData, $formDataFromSession); @@ -83,30 +91,41 @@ class Mage_Theme_Block_Adminhtml_System_Design_Theme_Edit_Tab_General )); } - /** @var $themesCollections Mage_Core_Model_Resource_Theme_Collection */ - $themesCollections = Mage::getResourceModel('Mage_Core_Model_Resource_Theme_Collection'); - if ($this->getIsThemeExist()) { - $themesCollections->addFieldToFilter('theme_id', array('neq' => $formData['theme_id'])); - $onChangeScript = ''; - } else { - /** @var $helper Mage_Core_Helper_Data */ - $helper = Mage::helper('Mage_Core_Helper_Data'); - - $onChangeScript = sprintf('parentThemeOnChange(this.value, %s)', - str_replace('"', '\'', $helper->jsonEncode($this->_getDefaultsInherited($themesCollections))) - ); - } + /** @var $themesCollections Mage_Core_Model_Theme_Collection */ + $themesCollections = Mage::getResourceModel('Mage_Core_Model_Theme_Collection'); + + /** @var $helper Mage_Core_Helper_Data */ + $helper = Mage::helper('Mage_Core_Helper_Data'); - $themeFieldset->addField('parent_id', 'select', array( - 'label' => $this->__('Parent theme'), - 'title' => $this->__('Parent theme'), - 'name' => 'parent_id', - 'values' => $themesCollections->toOptionArray(), - 'required' => false, - 'class' => 'no-changes', - 'onchange' => $onChangeScript + $onChangeScript = sprintf('parentThemeOnChange(this.value, %s)', str_replace( + '"', '\'', $helper->jsonEncode($this->_getDefaultsInherited($themesCollections->addDefaultPattern())) )); + /** @var $parentTheme Mage_Core_Model_Theme */ + $parentTheme = Mage::getModel('Mage_Core_Model_Theme'); + if (!empty($formData['parent_id'])) { + $parentTheme->load($formData['parent_id']); + } + + if ($this->_isThemeEditable) { + $themeFieldset->addField('parent_id', 'select', array( + 'label' => $this->__('Parent theme'), + 'title' => $this->__('Parent theme'), + 'name' => 'parent_id', + 'values' => $themesCollections->toOptionArray(!$parentTheme->getId()), + 'required' => true, + 'class' => 'no-changes', + 'onchange' => $onChangeScript + )); + } else if (!empty($formData['parent_id'])) { + $themeFieldset->addField('parent_title', 'note', array( + 'label' => $this->__('Parent theme'), + 'title' => $this->__('Parent theme'), + 'name' => 'parent_title', + 'text' => $parentTheme->getId() ? $parentTheme->getThemeTitle() : '' + )); + } + if (!empty($formData['theme_path'])) { $themeFieldset->addField('theme_path', 'label', array( 'label' => $this->__('Theme Path'), @@ -115,34 +134,44 @@ class Mage_Theme_Block_Adminhtml_System_Design_Theme_Edit_Tab_General )); } - $themeFieldset->addField('theme_version', 'text', array( + $themeFieldset->addField('theme_version', $this->_getFieldTextType(), array( 'label' => $this->__('Theme Version'), 'title' => $this->__('Theme Version'), 'name' => 'theme_version', - 'required' => true, - 'note' => $this->__('Example: 0.0.0.1 or 123.1.0.25-alpha1') + 'required' => $this->_getFieldAttrRequired(), + 'note' => $this->_filterFieldNote($this->__('Example: 0.0.0.1 or 123.1.0.25-alpha1')) )); - $themeFieldset->addField('theme_title', 'text', array( + $themeFieldset->addField('theme_title', $this->_getFieldTextType(), array( 'label' => $this->__('Theme Title'), 'title' => $this->__('Theme Title'), 'name' => 'theme_title', - 'required' => true + 'required' => $this->_getFieldAttrRequired() )); - $maxImageSize = $this->getImageMaxSize(); - if ($maxImageSize) { - $previewImageNote = $this->__('Max image size: %s', $maxImageSize); - } else { - $previewImageNote = $this->__("System doesn't allow to get file upload settings"); + if ($this->_isThemeEditable) { + $maxImageSize = Mage::helper('Mage_Core_Helper_File_Storage')->getMaxFileSizeInMb(); + if ($maxImageSize) { + $previewImageNote = $this->__('Max image size %sM', $maxImageSize); + } else { + $previewImageNote = $this->__('System doesn\'t allow to get file upload settings'); + } + $themeFieldset->addField('preview_image', 'image', array( + 'label' => $this->__('Theme Preview Image'), + 'title' => $this->__('Theme Preview Image'), + 'name' => 'preview_image', + 'required' => false, + 'note' => $previewImageNote + )); + } else if (!empty($formData['preview_image'])) { + $themeFieldset->addField('preview_image', 'note', array( + 'label' => $this->__('Theme Preview Image'), + 'title' => $this->__('Theme Preview Image'), + 'name' => 'preview_image', + 'after_element_html' => '<img width="50" src="' . Mage_Core_Model_Theme::getPreviewImageDirectoryUrl() + . $formData['preview_image'] . '" />' + )); } - $themeFieldset->addField('preview_image', 'image', array( - 'label' => $this->__('Theme Preview Image'), - 'title' => $this->__('Theme Preview Image'), - 'name' => 'preview_image', - 'required' => false, - 'note' => $previewImageNote - )); return $this; } @@ -159,25 +188,56 @@ class Mage_Theme_Block_Adminhtml_System_Design_Theme_Edit_Tab_General 'legend' => $this->__('Magento Requirements'), )); - $requirementsFieldset->addField('magento_version_from', 'text', array( + $requirementsFieldset->addField('magento_version_from', $this->_getFieldTextType(), array( 'label' => $this->__('Magento Version From'), 'title' => $this->__('Magento Version From'), 'name' => 'magento_version_from', - 'required' => true, - 'note' => $this->__('Example: 1.6.0.0 or *') + 'required' => $this->_getFieldAttrRequired(), + 'note' => $this->_filterFieldNote($this->__('Example: 1.6.0.0 or *')) )); - $requirementsFieldset->addField('magento_version_to', 'text', array( + $requirementsFieldset->addField('magento_version_to', $this->_getFieldTextType(), array( 'label' => $this->__('Magento Version To'), 'title' => $this->__('Magento Version To'), 'name' => 'magento_version_to', - 'required' => true, - 'note' => $this->__('Example: 1.6.0.0 or *') + 'required' => $this->_getFieldAttrRequired(), + 'note' => $this->_filterFieldNote($this->__('Example: 1.6.0.0 or *')) )); return $this; } + /** + * No field notes if theme is not editable + * + * @param $text + * @return string + */ + protected function _filterFieldNote($text) + { + return $this->_isThemeEditable ? $text : ''; + } + + /** + * Field is not marked as required if theme is not editable + * + * @return bool + */ + protected function _getFieldAttrRequired() + { + return $this->_isThemeEditable ? true : false; + } + + /** + * Text field replaced to label if theme is not editable + * + * @return string + */ + protected function _getFieldTextType() + { + return $this->_isThemeEditable ? 'text' : 'label'; + } + /** * Set additional form field type for theme preview image * @@ -190,6 +250,16 @@ class Mage_Theme_Block_Adminhtml_System_Design_Theme_Edit_Tab_General return array('image' => $element); } + /** + * Get current theme + * + * @return Mage_Core_Model_Theme + */ + protected function _getCurrentTheme() + { + return Mage::registry('current_theme'); + } + /** * Prepare label for tab * @@ -230,16 +300,6 @@ class Mage_Theme_Block_Adminhtml_System_Design_Theme_Edit_Tab_General return false; } - /** - * Get max file size - * - * @return string|bool - */ - public function getImageMaxSize() - { - return min(ini_get('post_max_size'), ini_get('upload_max_filesize')); - } - /** * Get theme default values * @@ -264,10 +324,14 @@ class Mage_Theme_Block_Adminhtml_System_Design_Theme_Edit_Tab_General */ protected function _getDefaultsInherited($themesCollections) { - $data = array( - '' => $this->_getDefaults() - ); + $data = array('' => $this->_getDefaults()); + + /** @var $theme Mage_Core_Model_Theme */ foreach ($themesCollections as $theme) { + $theme->load($theme->getThemePath(), 'theme_path'); + if (!$theme->getId()) { + continue; + } $data[$theme->getId()] = array( 'theme_title' => $this->__('Copy of %s', $theme->getThemeTitle()), 'magento_version_from' => $theme->getMagentoVersionFrom(), diff --git a/app/code/core/Mage/Theme/Block/Adminhtml/System/Design/Theme/Grid.php b/app/code/core/Mage/Theme/Block/Adminhtml/System/Design/Theme/Grid.php index 9deed328bbd5d5f3dd3f1e8c3f4c2d2ff7abfa77..f2e6d65d2a354274941529f898bbd80f5e892a88 100644 --- a/app/code/core/Mage/Theme/Block/Adminhtml/System/Design/Theme/Grid.php +++ b/app/code/core/Mage/Theme/Block/Adminhtml/System/Design/Theme/Grid.php @@ -98,27 +98,6 @@ class Mage_Theme_Block_Adminhtml_System_Design_Theme_Grid extends Mage_Adminhtml 'filter_index' => 'main_table.magento_version_to' )); - $this->addColumn('action', array( - 'header' => $this->__('Action'), - 'width' => '100px', - 'type' => 'action', - 'getter' => 'getId', - 'actions' => array( - array( - 'caption' => $this->__('Edit'), - 'url' => array('base' => '*/*/edit'), - 'field' => 'id', - ), - array( - 'caption' => $this->__('Delete'), - 'url' => array('base' => '*/*/delete'), - 'field' => 'id', - )), - 'filter' => false, - 'sortable' => false, - 'index' => 'theme', - )); - return parent::_prepareColumns(); } diff --git a/app/code/core/Mage/Usa/Block/Adminhtml/Dhl/Unitofmeasure.php b/app/code/core/Mage/Usa/Block/Adminhtml/Dhl/Unitofmeasure.php index 1766570c89f2db2383cfbfb52f1f3832cc4033e5..8bbb534c59a65a61d8154489c92631c8ec50d767 100644 --- a/app/code/core/Mage/Usa/Block/Adminhtml/Dhl/Unitofmeasure.php +++ b/app/code/core/Mage/Usa/Block/Adminhtml/Dhl/Unitofmeasure.php @@ -31,7 +31,7 @@ * @package Mage_Usa * @author Magento Core Team <core@magentocommerce.com> */ -class Mage_Usa_Block_Adminhtml_Dhl_Unitofmeasure extends Mage_Adminhtml_Block_System_Config_Form_Field +class Mage_Usa_Block_Adminhtml_Dhl_Unitofmeasure extends Mage_Backend_Block_System_Config_Form_Field { /** diff --git a/app/code/core/Mage/Usa/Model/Shipping/Carrier/Dhl/Label/Pdf/PageBuilder.php b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Dhl/Label/Pdf/PageBuilder.php index 7aa84f59d21c24fbbe0f03be00889cb83d2dd4bb..6d3e507bea8e1324169a37a3efbf8efc12fd1abd 100644 --- a/app/code/core/Mage/Usa/Model/Shipping/Carrier/Dhl/Label/Pdf/PageBuilder.php +++ b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Dhl/Label/Pdf/PageBuilder.php @@ -114,7 +114,7 @@ class Mage_Usa_Model_Shipping_Carrier_Dhl_Label_Pdf_PageBuilder $y = $this->_y(0); $image = new Zend_Pdf_Resource_Image_Jpeg( - Mage::getDesign()->getSkinFile('dhl/logo.jpg', array('area' => 'adminhtml')) + Mage::getDesign()->getViewFile('dhl/logo.jpg', array('area' => 'adminhtml')) ); $this->_page->drawImage($image, $x + 191, $this->_y(27), $x + 287, $this->_y(1)); diff --git a/app/code/core/Mage/Usa/etc/adminhtml/system.xml b/app/code/core/Mage/Usa/etc/adminhtml/system.xml new file mode 100644 index 0000000000000000000000000000000000000000..5a14e03e80c68030e10ca5a3ebc7deb24f3cd9bd --- /dev/null +++ b/app/code/core/Mage/Usa/etc/adminhtml/system.xml @@ -0,0 +1,698 @@ +<?xml version="1.0"?> +<!-- +/** + * 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 Mage_Usa + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> + <system> + <section id="carriers"> + <group id="dhl" translate="label" module="Mage_Usa" type="text" sortOrder="130" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>DHL (Deprecated)</label> + <field id="account" translate="label" type="text" sortOrder="70" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Account Number</label> + </field> + <field id="active" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Enabled for Checkout</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="allowed_methods" translate="label" type="multiselect" sortOrder="170" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Allowed Methods</label> + <source_model>Mage_Usa_Model_Shipping_Carrier_Dhl_Source_Method</source_model> + <can_be_empty>1</can_be_empty> + </field> + <field id="contentdesc" translate="label" type="text" sortOrder="120" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Package Description</label> + </field> + <field id="free_shipping_enable" translate="label" type="select" sortOrder="1210" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Free Shipping with Minimum Order Amount</label> + <source_model>Mage_Backend_Model_Config_Source_Enabledisable</source_model> + </field> + <field id="free_shipping_subtotal" translate="label" type="text" sortOrder="1220" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Minimum Order Amount for Free Shipping</label> + <validate>validate-number validate-zero-or-greater</validate> + </field> + <field id="dutiable" translate="label" type="select" sortOrder="130" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Shipment Dutiable</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="dutypaymenttype" translate="label" type="select" sortOrder="140" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Shipment Duty Payment Type</label> + <source_model>Mage_Usa_Model_Shipping_Carrier_Dhl_Source_Dutypaymenttype</source_model> + </field> + <field id="free_method" translate="label" type="select" sortOrder="1200" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Free Method</label> + <frontend_class>free-method</frontend_class> + <source_model>Mage_Usa_Model_Shipping_Carrier_Dhl_Source_Freemethod</source_model> + </field> + <field id="gateway_url" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Gateway URL</label> + </field> + <field id="handling_type" translate="label" type="select" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Calculate Handling Fee</label> + <source_model>Mage_Shipping_Model_Source_HandlingType</source_model> + </field> + <field id="handling_action" translate="label" type="select" sortOrder="110" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Handling Applied</label> + <source_model>Mage_Shipping_Model_Source_HandlingAction</source_model> + </field> + <field id="handling_fee" translate="label" type="text" sortOrder="120" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Handling Fee</label> + <validate>validate-number validate-zero-or-greater</validate> + </field> + <field id="max_package_weight" translate="label" type="text" sortOrder="130" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Maximum Package Weight (Please consult your shipping carrier for maximum supported shipping weight)</label> + <validate>validate-number validate-zero-or-greater</validate> + </field> + <field id="id" translate="label" type="obscure" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Access ID</label> + <backend_model>Mage_Backend_Model_Config_Backend_Encrypted</backend_model> + </field> + <field id="password" translate="label" type="obscure" sortOrder="60" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Password</label> + <backend_model>Mage_Backend_Model_Config_Backend_Encrypted</backend_model> + </field> + <field id="shipment_requesttype" translate="label" type="select" sortOrder="85" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Packages Request Type</label> + <source_model>Mage_Usa_Model_Shipping_Carrier_Abstract_Source_Requesttype</source_model> + </field> + <field id="shipment_type" translate="label" type="select" sortOrder="90" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Shipment Type</label> + <source_model>Mage_Usa_Model_Shipping_Carrier_Dhl_Source_Shipmenttype</source_model> + </field> + <field id="shipping_intlkey" translate="label" type="obscure" sortOrder="80" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Shipping Key (International)</label> + <backend_model>Mage_Backend_Model_Config_Backend_Encrypted</backend_model> + </field> + <field id="shipping_key" translate="label" type="obscure" sortOrder="80" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Shipping Key</label> + <backend_model>Mage_Backend_Model_Config_Backend_Encrypted</backend_model> + </field> + <field id="sort_order" translate="label" type="text" sortOrder="2000" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Sort Order</label> + </field> + <field id="title" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Title</label> + </field> + <field id="sallowspecific" translate="label" type="select" sortOrder="1900" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Ship to Applicable Countries</label> + <frontend_class>shipping-applicable-country</frontend_class> + <source_model>Mage_Shipping_Model_Config_Source_Allspecificcountries</source_model> + </field> + <field id="specificcountry" translate="label" type="multiselect" sortOrder="1910" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Ship to Specific Countries</label> + <source_model>Mage_Directory_Model_Config_Source_Country</source_model> + <can_be_empty>1</can_be_empty> + </field> + <field id="showmethod" translate="label" type="select" sortOrder="1940" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Show Method if Not Applicable</label> + <frontend_class>shipping-skip-hide</frontend_class> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="specificerrmsg" translate="label" type="textarea" sortOrder="800" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Displayed Error Message</label> + </field> + <field id="additional_protection_enabled" translate="label" type="select" sortOrder="1300" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Additional Protection Enabled</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="additional_protection_min_value" translate="label" type="text" sortOrder="1310" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Additional Protection Min Subtotal</label> + <validate>validate-number validate-zero-or-greater</validate> + </field> + <field id="additional_protection_use_subtotal" translate="label" type="select" sortOrder="1320" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Additional Protection Value</label> + <source_model>Mage_Usa_Model_Shipping_Carrier_Dhl_Source_Protection_Value</source_model> + </field> + <field id="additional_protection_value" translate="label comment" type="text" sortOrder="1330" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Additional Protection Configuration Value</label> + <comment>Used only when "Additional Protection Value" is set to "Configuration". Can contain only numeric amount.</comment> + </field> + <field id="additional_protection_rounding" translate="label" type="select" sortOrder="1340" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Additional Protection Value Rounding Method</label> + <source_model>Mage_Usa_Model_Shipping_Carrier_Dhl_Source_Protection_Rounding</source_model> + </field> + <field id="hazardous_materials" translate="label" type="select" sortOrder="1350" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Shipment Contains Hazardous Materials</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="default_length" translate="label" type="text" sortOrder="1360" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Default Package Length</label> + </field> + <field id="default_width" translate="label" type="text" sortOrder="1370" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Default Package Width</label> + </field> + <field id="default_height" translate="label" type="text" sortOrder="1380" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Default Package Height</label> + </field> + <field id="shipment_days" translate="label" type="multiselect" sortOrder="1390" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Domestic Shipment Days</label> + <source_model>Mage_Backend_Model_Config_Source_Locale_Weekdays</source_model> + <can_be_empty>1</can_be_empty> + </field> + <field id="intl_shipment_days" translate="label" type="multiselect" sortOrder="1400" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>International Shipment Days</label> + <source_model>Mage_Backend_Model_Config_Source_Locale_Weekdays</source_model> + <can_be_empty>1</can_be_empty> + </field> + <field id="debug" translate="label" type="select" sortOrder="1950" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Debug</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + </group> + <group id="fedex" translate="label" module="Mage_Usa" type="text" sortOrder="120" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>FedEx</label> + <field id="active" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Enabled for Checkout</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="title" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Title</label> + </field> + <field id="account" translate="label comment" type="obscure" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Account ID</label> + <backend_model>Mage_Backend_Model_Config_Backend_Encrypted</backend_model> + <comment>Please make sure to use only digits here. No dashes are allowed.</comment> + </field> + <field id="meter_number" translate="label" type="obscure" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Meter Number</label> + <backend_model>Mage_Backend_Model_Config_Backend_Encrypted</backend_model> + </field> + <field id="key" translate="label" type="obscure" sortOrder="60" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Key</label> + <backend_model>Mage_Backend_Model_Config_Backend_Encrypted</backend_model> + </field> + <field id="password" translate="label" type="obscure" sortOrder="70" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Password</label> + <backend_model>Mage_Backend_Model_Config_Backend_Encrypted</backend_model> + </field> + <field id="sandbox_mode" translate="label" type="select" sortOrder="75" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Sandbox Mode</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="shipment_requesttype" translate="label" type="select" sortOrder="77" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Packages Request Type</label> + <source_model>Mage_Usa_Model_Shipping_Carrier_Abstract_Source_Requesttype</source_model> + </field> + <field id="packaging" translate="label" type="select" sortOrder="80" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Packaging</label> + <source_model>Mage_Usa_Model_Shipping_Carrier_Fedex_Source_Packaging</source_model> + </field> + <field id="dropoff" translate="label" type="select" sortOrder="90" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Dropoff</label> + <source_model>Mage_Usa_Model_Shipping_Carrier_Fedex_Source_Dropoff</source_model> + </field> + <field id="max_package_weight" translate="label" type="text" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Maximum Package Weight (Please consult your shipping carrier for maximum supported shipping weight)</label> + <validate>validate-number validate-zero-or-greater</validate> + </field> + <field id="handling_type" translate="label" type="select" sortOrder="110" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Calculate Handling Fee</label> + <source_model>Mage_Shipping_Model_Source_HandlingType</source_model> + </field> + <field id="handling_action" translate="label" type="select" sortOrder="120" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Handling Applied</label> + <source_model>Mage_Shipping_Model_Source_HandlingAction</source_model> + </field> + <field id="handling_fee" translate="label" type="text" sortOrder="130" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Handling Fee</label> + <validate>validate-number validate-zero-or-greater</validate> + </field> + <field id="residence_delivery" translate="label" type="select" sortOrder="140" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Residential Delivery</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="allowed_methods" translate="label" type="multiselect" sortOrder="150" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Allowed Methods</label> + <source_model>Mage_Usa_Model_Shipping_Carrier_Fedex_Source_Method</source_model> + <can_be_empty>1</can_be_empty> + </field> + <field id="smartpost_hubid" translate="label comment" type="text" sortOrder="155" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Hub ID</label> + <comment>The field is applicable if the Smart Post method is selected.</comment> + </field> + <field id="free_method" translate="label" type="select" sortOrder="160" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Free Method</label> + <frontend_class>free-method</frontend_class> + <source_model>Mage_Usa_Model_Shipping_Carrier_Fedex_Source_Freemethod</source_model> + </field> + <field id="free_shipping_enable" translate="label" type="select" sortOrder="170" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Free Shipping with Minimum Order Amount</label> + <source_model>Mage_Backend_Model_Config_Source_Enabledisable</source_model> + </field> + <field id="free_shipping_subtotal" translate="label" type="text" sortOrder="180" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Minimum Order Amount for Free Shipping</label> + <validate>validate-number validate-zero-or-greater</validate> + </field> + <field id="specificerrmsg" translate="label" type="textarea" sortOrder="190" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Displayed Error Message</label> + </field> + <field id="sallowspecific" translate="label" type="select" sortOrder="200" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Ship to Applicable Countries</label> + <frontend_class>shipping-applicable-country</frontend_class> + <source_model>Mage_Shipping_Model_Config_Source_Allspecificcountries</source_model> + </field> + <field id="specificcountry" translate="label" type="multiselect" sortOrder="210" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Ship to Specific Countries</label> + <source_model>Mage_Directory_Model_Config_Source_Country</source_model> + <can_be_empty>1</can_be_empty> + </field> + <field id="debug" translate="label" type="select" sortOrder="220" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Debug</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="showmethod" translate="label" type="select" sortOrder="230" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Show Method if Not Applicable</label> + <frontend_class>shipping-skip-hide</frontend_class> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="sort_order" translate="label" type="text" sortOrder="240" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Sort Order</label> + </field> + </group> + <group id="ups" translate="label" module="Mage_Usa" type="text" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>UPS</label> + <field id="access_license_number" translate="label" type="obscure" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Access License Number</label> + <backend_model>Mage_Backend_Model_Config_Backend_Encrypted</backend_model> + </field> + <field id="active" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Enabled for Checkout</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="allowed_methods" translate="label" type="multiselect" sortOrder="170" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Allowed Methods</label> + <source_model>Mage_Usa_Model_Shipping_Carrier_Ups_Source_Method</source_model> + <can_be_empty>1</can_be_empty> + </field> + <field id="shipment_requesttype" translate="label" type="select" sortOrder="47" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Packages Request Type</label> + <source_model>Mage_Usa_Model_Shipping_Carrier_Abstract_Source_Requesttype</source_model> + </field> + <field id="container" translate="label" type="select" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Container</label> + <source_model>Mage_Usa_Model_Shipping_Carrier_Ups_Source_Container</source_model> + </field> + <field id="free_shipping_enable" translate="label" type="select" sortOrder="210" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Free Shipping with Minimum Order Amount</label> + <source_model>Mage_Backend_Model_Config_Source_Enabledisable</source_model> + </field> + <field id="free_shipping_subtotal" translate="label" type="text" sortOrder="220" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Minimum Order Amount for Free Shipping</label> + <validate>validate-number validate-zero-or-greater</validate> + </field> + <field id="dest_type" translate="label" type="select" sortOrder="60" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Destination Type</label> + <source_model>Mage_Usa_Model_Shipping_Carrier_Ups_Source_DestType</source_model> + </field> + <field id="free_method" translate="label" type="select" sortOrder="200" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Free Method</label> + <frontend_class>free-method</frontend_class> + <source_model>Mage_Usa_Model_Shipping_Carrier_Ups_Source_Freemethod</source_model> + </field> + <field id="gateway_url" translate="label" type="text" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Gateway URL</label> + </field> + <field id="gateway_xml_url" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Gateway XML URL</label> + </field> + <field id="handling_type" translate="label" type="select" sortOrder="110" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Calculate Handling Fee</label> + <source_model>Mage_Shipping_Model_Source_HandlingType</source_model> + </field> + <field id="handling_action" translate="label" type="select" sortOrder="120" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Handling Applied</label> + <source_model>Mage_Shipping_Model_Source_HandlingAction</source_model> + </field> + <field id="handling_fee" translate="label" type="text" sortOrder="130" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Handling Fee</label> + <validate>validate-number validate-zero-or-greater</validate> + </field> + <field id="max_package_weight" translate="label" type="text" sortOrder="80" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Maximum Package Weight (Please consult your shipping carrier for maximum supported shipping weight)</label> + <validate>validate-number validate-zero-or-greater</validate> + </field> + <field id="min_package_weight" translate="label" type="text" sortOrder="90" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Minimum Package Weight (Please consult your shipping carrier for minimum supported shipping weight)</label> + <validate>validate-number validate-zero-or-greater</validate> + </field> + <field id="origin_shipment" translate="label" type="select" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Origin of the Shipment</label> + <source_model>Mage_Usa_Model_Shipping_Carrier_Ups_Source_OriginShipment</source_model> + </field> + <field id="password" translate="label" type="obscure" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Password</label> + <backend_model>Mage_Backend_Model_Config_Backend_Encrypted</backend_model> + </field> + <field id="pickup" translate="label" type="select" sortOrder="80" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Pickup Method</label> + <source_model>Mage_Usa_Model_Shipping_Carrier_Ups_Source_Pickup</source_model> + </field> + <field id="sort_order" translate="label" type="text" sortOrder="1000" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Sort Order</label> + </field> + <field id="title" translate="label" type="text" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Title</label> + </field> + <field id="tracking_xml_url" translate="label" type="text" sortOrder="60" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Tracking XML URL</label> + </field> + <field id="type" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>UPS Type</label> + <source_model>Mage_Usa_Model_Shipping_Carrier_Ups_Source_Type</source_model> + </field> + <field id="unit_of_measure" translate="label comment" type="select" sortOrder="60" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Weight Unit</label> + <source_model>Mage_Usa_Model_Shipping_Carrier_Ups_Source_Unitofmeasure</source_model> + </field> + <field id="username" translate="label" type="obscure" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>User ID</label> + <backend_model>Mage_Backend_Model_Config_Backend_Encrypted</backend_model> + </field> + <field id="negotiated_active" translate="label" type="select" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Enable Negotiated Rates</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="shipper_number" translate="label comment" type="text" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Shipper Number</label> + <comment>Required for negotiated rates; 6-character UPS.</comment> + </field> + <field id="sallowspecific" translate="label" type="select" sortOrder="900" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Ship to Applicable Countries</label> + <frontend_class>shipping-applicable-country</frontend_class> + <source_model>Mage_Shipping_Model_Config_Source_Allspecificcountries</source_model> + </field> + <field id="specificcountry" translate="label" type="multiselect" sortOrder="910" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Ship to Specific Countries</label> + <source_model>Mage_Directory_Model_Config_Source_Country</source_model> + <can_be_empty>1</can_be_empty> + </field> + <field id="showmethod" translate="label" type="select" sortOrder="920" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Show Method if Not Applicable</label> + <frontend_class>shipping-skip-hide</frontend_class> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="specificerrmsg" translate="label" type="textarea" sortOrder="800" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Displayed Error Message</label> + </field> + <field id="mode_xml" translate="label comment" type="select" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Mode</label> + <comment>Enables/Disables SSL verification of Magento server by UPS.</comment> + <source_model>Mage_Usa_Model_Shipping_Carrier_Abstract_Source_Mode</source_model> + </field> + <field id="debug" translate="label" type="select" sortOrder="920" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Debug</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + </group> + <group id="usps" translate="label" module="Mage_Usa" type="text" sortOrder="110" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>USPS</label> + <field id="active" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Enabled for Checkout</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="gateway_url" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Gateway URL</label> + </field> + <field id="gateway_secure_url" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Secure Gateway URL</label> + </field> + <field id="title" translate="label" type="text" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Title</label> + </field> + <field id="userid" translate="label" type="obscure" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>User ID</label> + <backend_model>Mage_Backend_Model_Config_Backend_Encrypted</backend_model> + </field> + <field id="password" translate="label" type="obscure" sortOrder="53" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Password</label> + <backend_model>Mage_Backend_Model_Config_Backend_Encrypted</backend_model> + </field> + <field id="mode" translate="label" type="select" sortOrder="54" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Mode</label> + <source_model>Mage_Usa_Model_Shipping_Carrier_Abstract_Source_Mode</source_model> + </field> + <field id="shipment_requesttype" translate="label" type="select" sortOrder="55" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Packages Request Type</label> + <source_model>Mage_Usa_Model_Shipping_Carrier_Abstract_Source_Requesttype</source_model> + </field> + <field id="container" translate="label" type="select" sortOrder="60" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Container</label> + <source_model>Mage_Usa_Model_Shipping_Carrier_Usps_Source_Container</source_model> + </field> + <field id="size" translate="label" type="select" sortOrder="70" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Size</label> + <source_model>Mage_Usa_Model_Shipping_Carrier_Usps_Source_Size</source_model> + </field> + <field id="width" translate="label" type="text" sortOrder="73" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Width</label> + <depends> + <field id="size">LARGE</field> + </depends> + </field> + <field id="length" translate="label" type="text" sortOrder="72" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Length</label> + <depends> + <field id="size">LARGE</field> + </depends> + </field> + <field id="height" translate="label" type="text" sortOrder="74" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Height</label> + <depends> + <field id="size">LARGE</field> + </depends> + </field> + <field id="girth" translate="label" type="text" sortOrder="76" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Girth</label> + <depends> + <field id="size">LARGE</field> + </depends> + </field> + <field id="machinable" translate="label" type="select" sortOrder="80" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Machinable</label> + <source_model>Mage_Usa_Model_Shipping_Carrier_Usps_Source_Machinable</source_model> + </field> + <field id="max_package_weight" translate="label" type="text" sortOrder="90" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Maximum Package Weight (Please consult your shipping carrier for maximum supported shipping weight)</label> + <validate>validate-number validate-zero-or-greater</validate> + </field> + <field id="handling_type" translate="label" type="select" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Calculate Handling Fee</label> + <source_model>Mage_Shipping_Model_Source_HandlingType</source_model> + </field> + <field id="handling_action" translate="label" type="select" sortOrder="110" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Handling Applied</label> + <source_model>Mage_Shipping_Model_Source_HandlingAction</source_model> + </field> + <field id="handling_fee" translate="label" type="text" sortOrder="120" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Handling Fee</label> + <validate>validate-number validate-zero-or-greater</validate> + </field> + <field id="allowed_methods" translate="label" type="multiselect" sortOrder="130" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Allowed Methods</label> + <source_model>Mage_Usa_Model_Shipping_Carrier_Usps_Source_Method</source_model> + <can_be_empty>1</can_be_empty> + </field> + <field id="free_method" translate="label" type="select" sortOrder="140" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Free Method</label> + <frontend_class>free-method</frontend_class> + <source_model>Mage_Usa_Model_Shipping_Carrier_Usps_Source_Freemethod</source_model> + </field> + <field id="free_shipping_enable" translate="label" type="select" sortOrder="1500" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Free Shipping with Minimum Order Amount</label> + <source_model>Mage_Backend_Model_Config_Source_Enabledisable</source_model> + </field> + <field id="free_shipping_subtotal" translate="label" type="text" sortOrder="160" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Minimum Order Amount for Free Shipping</label> + <validate>validate-number validate-zero-or-greater</validate> + </field> + <field id="specificerrmsg" translate="label" type="textarea" sortOrder="170" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Displayed Error Message</label> + </field> + <field id="sallowspecific" translate="label" type="select" sortOrder="180" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Ship to Applicable Countries</label> + <frontend_class>shipping-applicable-country</frontend_class> + <source_model>Mage_Shipping_Model_Config_Source_Allspecificcountries</source_model> + </field> + <field id="specificcountry" translate="label" type="multiselect" sortOrder="190" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Ship to Specific Countries</label> + <source_model>Mage_Directory_Model_Config_Source_Country</source_model> + <can_be_empty>1</can_be_empty> + </field> + <field id="debug" translate="label" type="select" sortOrder="200" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Debug</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="showmethod" translate="label" type="select" sortOrder="210" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Show Method if Not Applicable</label> + <frontend_class>shipping-skip-hide</frontend_class> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="sort_order" translate="label" type="text" sortOrder="220" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Sort Order</label> + </field> + </group> + <group id="dhlint" translate="label" module="Mage_Usa" type="text" sortOrder="140" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>DHL</label> + <field id="active" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Enabled for Checkout</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="gateway_url" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Gateway URL</label> + </field> + <field id="title" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Title</label> + </field> + <field id="id" translate="label" type="obscure" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Access ID</label> + <backend_model>Mage_Backend_Model_Config_Backend_Encrypted</backend_model> + </field> + <field id="password" translate="label" type="obscure" sortOrder="60" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Password</label> + <backend_model>Mage_Backend_Model_Config_Backend_Encrypted</backend_model> + </field> + <field id="account" translate="label" type="text" sortOrder="70" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Account Number</label> + </field> + <field id="content_type" translate="label" type="select" sortOrder="90" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Content Type</label> + <source_model>Mage_Usa_Model_Shipping_Carrier_Dhl_International_Source_Contenttype</source_model> + </field> + <field id="handling_type" translate="label" type="select" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Calculate Handling Fee</label> + <source_model>Mage_Shipping_Model_Source_HandlingType</source_model> + </field> + <field id="handling_action" translate="label comment" type="select" sortOrder="110" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Handling Applied</label> + <comment>"Per Order" allows single handling fee for entire order. "Per Package" allows individual handling fee for each package.</comment> + <source_model>Mage_Shipping_Model_Source_HandlingAction</source_model> + </field> + <field id="handling_fee" translate="label" type="text" sortOrder="120" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Handling Fee</label> + <validate>validate-number validate-zero-or-greater</validate> + </field> + <field id="divide_order_weight" translate="label comment" type="select" sortOrder="130" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Divide Order Weight</label> + <comment>Allows breaking total order weight into smaller pieces if it exeeds 70 kg to ensure accurate calculation of shipping charges.</comment> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="unit_of_measure" translate="label" type="select" sortOrder="140" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Weight Unit</label> + <source_model>Mage_Usa_Model_Shipping_Carrier_Dhl_International_Source_Method_Unitofmeasure</source_model> + <frontend_model>Mage_Usa_Block_Adminhtml_Dhl_Unitofmeasure</frontend_model> + </field> + <field id="size" translate="label" type="select" sortOrder="150" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Size</label> + <source_model>Mage_Usa_Model_Shipping_Carrier_Dhl_International_Source_Method_Size</source_model> + </field> + <field id="height" translate="label" type="text" sortOrder="151" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Height</label> + <depends> + <field id="size">1</field> + </depends> + </field> + <field id="depth" translate="label" type="text" sortOrder="152" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Depth</label> + <depends> + <field id="size">1</field> + </depends> + </field> + <field id="width" translate="label" type="text" sortOrder="153" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Width</label> + <depends> + <field id="size">1</field> + </depends> + </field> + <field id="doc_methods" translate="label" type="multiselect" sortOrder="170" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Allowed Methods</label> + <source_model>Mage_Usa_Model_Shipping_Carrier_Dhl_International_Source_Method_Doc</source_model> + <depends> + <field id="content_type">D</field> + </depends> + </field> + <field id="nondoc_methods" translate="label" type="multiselect" sortOrder="170" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Allowed Methods</label> + <source_model>Mage_Usa_Model_Shipping_Carrier_Dhl_International_Source_Method_Nondoc</source_model> + <depends> + <field id="content_type">N</field> + </depends> + </field> + <field id="ready_time" type="text" sortOrder="180" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Ready time</label> + <comment>Package ready time after order submission (in hours)</comment> + </field> + <field id="specificerrmsg" translate="label" type="textarea" sortOrder="800" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Displayed Error Message</label> + </field> + <field id="free_method_doc" translate="label" type="select" sortOrder="1200" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Free Method</label> + <frontend_class>free-method</frontend_class> + <source_model>Mage_Usa_Model_Shipping_Carrier_Dhl_International_Source_Method_Freedoc</source_model> + <depends> + <field id="content_type">D</field> + </depends> + </field> + <field id="free_method_nondoc" translate="label" type="select" sortOrder="1200" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Free Method</label> + <frontend_class>free-method</frontend_class> + <source_model>Mage_Usa_Model_Shipping_Carrier_Dhl_International_Source_Method_Freenondoc</source_model> + <depends> + <field id="content_type">N</field> + </depends> + </field> + <field id="free_shipping_enable" translate="label" type="select" sortOrder="1210" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Free Shipping with Minimum Order Amount</label> + <source_model>Mage_Backend_Model_Config_Source_Enabledisable</source_model> + </field> + <field id="free_shipping_subtotal" translate="label" type="text" sortOrder="1220" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Minimum Order Amount for Free Shipping</label> + <validate>validate-number validate-zero-or-greater</validate> + </field> + <field id="sallowspecific" translate="label" type="select" sortOrder="1900" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Ship to Applicable Countries</label> + <frontend_class>shipping-applicable-country</frontend_class> + <source_model>Mage_Shipping_Model_Config_Source_Allspecificcountries</source_model> + </field> + <field id="specificcountry" translate="label" type="multiselect" sortOrder="1910" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Ship to Specific Countries</label> + <source_model>Mage_Directory_Model_Config_Source_Country</source_model> + <can_be_empty>1</can_be_empty> + </field> + <field id="showmethod" translate="label" type="select" sortOrder="1940" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Show Method if Not Applicable</label> + <frontend_class>shipping-skip-hide</frontend_class> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="sort_order" translate="label" type="text" sortOrder="2000" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Sort Order</label> + </field> + <field id="debug" translate="label" type="select" sortOrder="1950" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Debug</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + </group> + </section> + </system> +</config> diff --git a/app/code/core/Mage/Usa/etc/config.xml b/app/code/core/Mage/Usa/etc/config.xml index 62be19e8782f12f6a13b51eadc11cc9cd7369624..e1e7e331cbcec2020ecb7aeedd819dd9c1c1b952 100644 --- a/app/code/core/Mage/Usa/etc/config.xml +++ b/app/code/core/Mage/Usa/etc/config.xml @@ -112,13 +112,13 @@ <dutypaymenttype>R</dutypaymenttype> <free_method>G</free_method> <gateway_url>https://eCommerce.airborne.com/ApiLandingTest.asp</gateway_url> - <id backend_model="Mage_Adminhtml_Model_System_Config_Backend_Encrypted"/> + <id backend_model="Mage_Backend_Model_Config_Backend_Encrypted"/> <model>Mage_Usa_Model_Shipping_Carrier_Dhl</model> - <password backend_model="Mage_Adminhtml_Model_System_Config_Backend_Encrypted"/> + <password backend_model="Mage_Backend_Model_Config_Backend_Encrypted"/> <shipment_requesttype>0</shipment_requesttype> <shipment_type>P</shipment_type> - <shipping_key backend_model="Mage_Adminhtml_Model_System_Config_Backend_Encrypted"/> - <shipping_intlkey backend_model="Mage_Adminhtml_Model_System_Config_Backend_Encrypted"/> + <shipping_key backend_model="Mage_Backend_Model_Config_Backend_Encrypted"/> + <shipping_intlkey backend_model="Mage_Backend_Model_Config_Backend_Encrypted"/> <title>DHL (Deprecated)</title> <specificerrmsg>This shipping method is currently unavailable. If you would like to ship using this shipping method, please contact us.</specificerrmsg> <max_package_weight>150</max_package_weight> @@ -129,10 +129,10 @@ <additional_protection_rounding>0</additional_protection_rounding> </dhl> <fedex> - <account backend_model="Mage_Adminhtml_Model_System_Config_Backend_Encrypted"/> - <meter_number backend_model="Mage_Adminhtml_Model_System_Config_Backend_Encrypted"/> - <key backend_model="Mage_Adminhtml_Model_System_Config_Backend_Encrypted"/> - <password backend_model="Mage_Adminhtml_Model_System_Config_Backend_Encrypted"/> + <account backend_model="Mage_Backend_Model_Config_Backend_Encrypted"/> + <meter_number backend_model="Mage_Backend_Model_Config_Backend_Encrypted"/> + <key backend_model="Mage_Backend_Model_Config_Backend_Encrypted"/> + <password backend_model="Mage_Backend_Model_Config_Backend_Encrypted"/> <sandbox_mode>0</sandbox_mode> <shipment_requesttype>0</shipment_requesttype> <active>0</active> @@ -151,7 +151,7 @@ <handling_action>O</handling_action> </fedex> <ups> - <access_license_number backend_model="Mage_Adminhtml_Model_System_Config_Backend_Encrypted"/> + <access_license_number backend_model="Mage_Backend_Model_Config_Backend_Encrypted"/> <active>0</active> <sallowspecific>0</sallowspecific> <allowed_methods>1DM,1DML,1DA,1DAL,1DAPI,1DP,1DPL,2DM,2DML,2DA,2DAL,3DS,GND,GNDCOM,GNDRES,STD,XPR,WXS,XPRL,XDM,XDML,XPD,01,02,03,07,08,11,12,14,54,59,65</allowed_methods> @@ -169,8 +169,8 @@ <title>United Parcel Service</title> <tracking_xml_url>https://www.ups.com/ups.app/xml/Track</tracking_xml_url> <unit_of_measure>LBS</unit_of_measure> - <username backend_model="Mage_Adminhtml_Model_System_Config_Backend_Encrypted"/> - <password backend_model="Mage_Adminhtml_Model_System_Config_Backend_Encrypted"/> + <username backend_model="Mage_Backend_Model_Config_Backend_Encrypted"/> + <password backend_model="Mage_Backend_Model_Config_Backend_Encrypted"/> <specificerrmsg>This shipping method is currently unavailable. If you would like to ship using this shipping method, please contact us.</specificerrmsg> <min_package_weight>0.1</min_package_weight> <max_package_weight>150</max_package_weight> @@ -196,8 +196,8 @@ <model>Mage_Usa_Model_Shipping_Carrier_Usps</model> <size>REGULAR</size> <title>United States Postal Service</title> - <userid backend_model="Mage_Adminhtml_Model_System_Config_Backend_Encrypted"/> - <password backend_model="Mage_Adminhtml_Model_System_Config_Backend_Encrypted"/> + <userid backend_model="Mage_Backend_Model_Config_Backend_Encrypted"/> + <password backend_model="Mage_Backend_Model_Config_Backend_Encrypted"/> <isproduction>0</isproduction> <specificerrmsg>This shipping method is currently unavailable. If you would like to ship using this shipping method, please contact us.</specificerrmsg> <max_package_weight>70</max_package_weight> @@ -214,8 +214,8 @@ <doc_methods>2,5,6,7,9,B,C,D,U,K,L,G,W,I,N,O,R,S,T,X</doc_methods> <free_method>G</free_method> <gateway_url>https://xmlpi-ea.dhl.com/XMLShippingServlet</gateway_url> - <id backend_model="Mage_Adminhtml_Model_System_Config_Backend_Encrypted"/> - <password backend_model="Mage_Adminhtml_Model_System_Config_Backend_Encrypted"/> + <id backend_model="Mage_Backend_Model_Config_Backend_Encrypted"/> + <password backend_model="Mage_Backend_Model_Config_Backend_Encrypted"/> <shipment_type>N</shipment_type> <specificerrmsg>This shipping method is currently unavailable. If you would like to ship using this shipping method, please contact us.</specificerrmsg> <divide_order_weight>1</divide_order_weight> diff --git a/app/code/core/Mage/Usa/etc/system.xml b/app/code/core/Mage/Usa/etc/system.xml deleted file mode 100644 index 6bf96a9b119ce755f932db0006b0931675f94594..0000000000000000000000000000000000000000 --- a/app/code/core/Mage/Usa/etc/system.xml +++ /dev/null @@ -1,1502 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * 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 Mage_Usa - * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<config> - <sections> - <carriers> - <groups> - <dhl translate="label" module="Mage_Usa"> - <label>DHL (Deprecated)</label> - <frontend_type>text</frontend_type> - <sort_order>130</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <account translate="label"> - <label>Account Number</label> - <frontend_type>text</frontend_type> - <sort_order>70</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </account> - <active translate="label"> - <label>Enabled for Checkout</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>10</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </active> - <allowed_methods translate="label"> - <label>Allowed Methods</label> - <frontend_type>multiselect</frontend_type> - <source_model>Mage_Usa_Model_Shipping_Carrier_Dhl_Source_Method</source_model> - <sort_order>170</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <can_be_empty>1</can_be_empty> - </allowed_methods> - <contentdesc translate="label"> - <label>Package Description</label> - <frontend_type>text</frontend_type> - <sort_order>120</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </contentdesc> - <!-- - If the free_shipping_enable flag enable, the system will check free_shipping_subtotal to give free shipping - otherwise will use shopping cart price rule behaviour - --> - <free_shipping_enable translate="label"> - <label>Free Shipping with Minimum Order Amount</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Enabledisable</source_model> - <sort_order>1210</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </free_shipping_enable> - <free_shipping_subtotal translate="label"> - <label>Minimum Order Amount for Free Shipping</label> - <frontend_type>text</frontend_type> - <validate>validate-number validate-zero-or-greater</validate> - <sort_order>1220</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </free_shipping_subtotal> - <dutiable translate="label"> - <label>Shipment Dutiable</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>130</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </dutiable> - <dutypaymenttype translate="label"> - <label>Shipment Duty Payment Type</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Usa_Model_Shipping_Carrier_Dhl_Source_Dutypaymenttype</source_model> - <sort_order>140</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </dutypaymenttype> - <free_method translate="label"> - <label>Free Method</label> - <frontend_type>select</frontend_type> - <frontend_class>free-method</frontend_class> - <source_model>Mage_Usa_Model_Shipping_Carrier_Dhl_Source_Freemethod</source_model> - <sort_order>1200</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </free_method> - <gateway_url translate="label"> - <label>Gateway URL</label> - <frontend_type>text</frontend_type> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </gateway_url> - <handling_type translate="label"> - <label>Calculate Handling Fee</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Shipping_Model_Source_HandlingType</source_model> - <sort_order>100</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </handling_type> - <handling_action translate="label"> - <label>Handling Applied</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Shipping_Model_Source_HandlingAction</source_model> - <sort_order>110</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </handling_action> - <handling_fee translate="label"> - <label>Handling Fee</label> - <frontend_type>text</frontend_type> - <validate>validate-number validate-zero-or-greater</validate> - <sort_order>120</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </handling_fee> - <max_package_weight translate="label"> - <label>Maximum Package Weight (Please consult your shipping carrier for maximum supported shipping weight)</label> - <frontend_type>text</frontend_type> - <validate>validate-number validate-zero-or-greater</validate> - <sort_order>130</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </max_package_weight> - <id translate="label"> - <label>Access ID</label> - <frontend_type>obscure</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Encrypted</backend_model> - <sort_order>50</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </id> - <password translate="label"> - <label>Password</label> - <frontend_type>obscure</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Encrypted</backend_model> - <sort_order>60</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </password> - <shipment_requesttype translate="label"> - <label>Packages Request Type</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Usa_Model_Shipping_Carrier_Abstract_Source_Requesttype</source_model> - <sort_order>85</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </shipment_requesttype> - <shipment_type translate="label"> - <label>Shipment Type</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Usa_Model_Shipping_Carrier_Dhl_Source_Shipmenttype</source_model> - <sort_order>90</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </shipment_type> - <shipping_intlkey translate="label"> - <label>Shipping Key (International)</label> - <frontend_type>obscure</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Encrypted</backend_model> - <sort_order>80</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </shipping_intlkey> - <shipping_key translate="label"> - <label>Shipping Key</label> - <frontend_type>obscure</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Encrypted</backend_model> - <sort_order>80</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </shipping_key> - <sort_order translate="label"> - <label>Sort Order</label> - <frontend_type>text</frontend_type> - <sort_order>2000</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </sort_order> - <title translate="label"> - <label>Title</label> - <frontend_type>text</frontend_type> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </title> - <sallowspecific translate="label"> - <label>Ship to Applicable Countries</label> - <frontend_type>select</frontend_type> - <sort_order>1900</sort_order> - <frontend_class>shipping-applicable-country</frontend_class> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Shipping_Allspecificcountries</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </sallowspecific> - <specificcountry translate="label"> - <label>Ship to Specific Countries</label> - <frontend_type>multiselect</frontend_type> - <sort_order>1910</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Country</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <can_be_empty>1</can_be_empty> - </specificcountry> - <showmethod translate="label"> - <label>Show Method if Not Applicable</label> - <frontend_type>select</frontend_type> - <sort_order>1940</sort_order> - <frontend_class>shipping-skip-hide</frontend_class> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </showmethod> - <specificerrmsg translate="label"> - <label>Displayed Error Message</label> - <frontend_type>textarea</frontend_type> - <sort_order>800</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </specificerrmsg> - - <additional_protection_enabled translate="label"> - <label>Additional Protection Enabled</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>1300</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </additional_protection_enabled> - <additional_protection_min_value translate="label"> - <label>Additional Protection Min Subtotal</label> - <frontend_type>text</frontend_type> - <validate>validate-number validate-zero-or-greater</validate> - <sort_order>1310</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </additional_protection_min_value> - <additional_protection_use_subtotal translate="label"> - <label>Additional Protection Value</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Usa_Model_Shipping_Carrier_Dhl_Source_Protection_Value</source_model> - <sort_order>1320</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </additional_protection_use_subtotal> - <additional_protection_value translate="label comment"> - <label>Additional Protection Configuration Value</label> - <comment>Used only when "Additional Protection Value" is set to "Configuration". Can contain only numeric amount.</comment> - <frontend_type>text</frontend_type> - <sort_order>1330</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </additional_protection_value> - - <additional_protection_rounding translate="label"> - <label>Additional Protection Value Rounding Method</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Usa_Model_Shipping_Carrier_Dhl_Source_Protection_Rounding</source_model> - <sort_order>1340</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </additional_protection_rounding> - - <hazardous_materials translate="label"> - <label>Shipment Contains Hazardous Materials</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>1350</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </hazardous_materials> - - <default_length translate="label"> - <label>Default Package Length</label> - <frontend_type>text</frontend_type> - <sort_order>1360</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </default_length> - <default_width translate="label"> - <label>Default Package Width</label> - <frontend_type>text</frontend_type> - <sort_order>1370</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </default_width> - <default_height translate="label"> - <label>Default Package Height</label> - <frontend_type>text</frontend_type> - <sort_order>1380</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </default_height> - - <shipment_days translate="label"> - <label>Domestic Shipment Days</label> - <frontend_type>multiselect</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Locale_Weekdays</source_model> - <sort_order>1390</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <can_be_empty>1</can_be_empty> - </shipment_days> - - <intl_shipment_days translate="label"> - <label>International Shipment Days</label> - <frontend_type>multiselect</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Locale_Weekdays</source_model> - <sort_order>1400</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <can_be_empty>1</can_be_empty> - </intl_shipment_days> - <debug translate="label"> - <label>Debug</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>1950</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </debug> - </fields> - </dhl> - <fedex translate="label" module="Mage_Usa"> - <label>FedEx</label> - <frontend_type>text</frontend_type> - <sort_order>120</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <active translate="label"> - <label>Enabled for Checkout</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>10</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </active> - <title translate="label"> - <label>Title</label> - <frontend_type>text</frontend_type> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </title> - <account translate="label comment"> - <label>Account ID</label> - <frontend_type>obscure</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Encrypted</backend_model> - <sort_order>40</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <comment>Please make sure to use only digits here. No dashes are allowed.</comment> - </account> - <meter_number translate="label"> - <label>Meter Number</label> - <frontend_type>obscure</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Encrypted</backend_model> - <sort_order>50</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </meter_number> - <key translate="label"> - <label>Key</label> - <frontend_type>obscure</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Encrypted</backend_model> - <sort_order>60</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </key> - <password translate="label"> - <label>Password</label> - <frontend_type>obscure</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Encrypted</backend_model> - <sort_order>70</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </password> - <sandbox_mode translate="label"> - <label>Sandbox Mode</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>75</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </sandbox_mode> - <shipment_requesttype translate="label"> - <label>Packages Request Type</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Usa_Model_Shipping_Carrier_Abstract_Source_Requesttype</source_model> - <sort_order>77</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </shipment_requesttype> - <packaging translate="label"> - <label>Packaging</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Usa_Model_Shipping_Carrier_Fedex_Source_Packaging</source_model> - <sort_order>80</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </packaging> - <dropoff translate="label"> - <label>Dropoff</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Usa_Model_Shipping_Carrier_Fedex_Source_Dropoff</source_model> - <sort_order>90</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </dropoff> - <max_package_weight translate="label"> - <label>Maximum Package Weight (Please consult your shipping carrier for maximum supported shipping weight)</label> - <frontend_type>text</frontend_type> - <validate>validate-number validate-zero-or-greater</validate> - <sort_order>100</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </max_package_weight> - <handling_type translate="label"> - <label>Calculate Handling Fee</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Shipping_Model_Source_HandlingType</source_model> - <sort_order>110</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </handling_type> - <handling_action translate="label"> - <label>Handling Applied</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Shipping_Model_Source_HandlingAction</source_model> - <sort_order>120</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </handling_action> - <handling_fee translate="label"> - <label>Handling Fee</label> - <frontend_type>text</frontend_type> - <validate>validate-number validate-zero-or-greater</validate> - <sort_order>130</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </handling_fee> - <residence_delivery translate="label"> - <label>Residential Delivery</label> - <frontend_type>select</frontend_type> - <sort_order>140</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </residence_delivery> - <allowed_methods translate="label"> - <label>Allowed Methods</label> - <frontend_type>multiselect</frontend_type> - <source_model>Mage_Usa_Model_Shipping_Carrier_Fedex_Source_Method</source_model> - <sort_order>150</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <can_be_empty>1</can_be_empty> - </allowed_methods> - <smartpost_hubid translate="label comment"> - <label>Hub ID</label> - <frontend_type>text</frontend_type> - <sort_order>155</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <comment>The field is applicable if the Smart Post method is selected.</comment> - </smartpost_hubid> - <free_method translate="label"> - <label>Free Method</label> - <frontend_type>select</frontend_type> - <frontend_class>free-method</frontend_class> - <source_model>Mage_Usa_Model_Shipping_Carrier_Fedex_Source_Freemethod</source_model> - <sort_order>160</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </free_method> - <free_shipping_enable translate="label"> - <label>Free Shipping with Minimum Order Amount</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Enabledisable</source_model> - <sort_order>170</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </free_shipping_enable> - <free_shipping_subtotal translate="label"> - <label>Minimum Order Amount for Free Shipping</label> - <frontend_type>text</frontend_type> - <validate>validate-number validate-zero-or-greater</validate> - <sort_order>180</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </free_shipping_subtotal> - <specificerrmsg translate="label"> - <label>Displayed Error Message</label> - <frontend_type>textarea</frontend_type> - <sort_order>190</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </specificerrmsg> - <sallowspecific translate="label"> - <label>Ship to Applicable Countries</label> - <frontend_type>select</frontend_type> - <sort_order>200</sort_order> - <frontend_class>shipping-applicable-country</frontend_class> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Shipping_Allspecificcountries</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </sallowspecific> - <specificcountry translate="label"> - <label>Ship to Specific Countries</label> - <frontend_type>multiselect</frontend_type> - <sort_order>210</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Country</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <can_be_empty>1</can_be_empty> - </specificcountry> - <debug translate="label"> - <label>Debug</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>220</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </debug> - <showmethod translate="label"> - <label>Show Method if Not Applicable</label> - <frontend_type>select</frontend_type> - <sort_order>230</sort_order> - <frontend_class>shipping-skip-hide</frontend_class> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </showmethod> - <sort_order translate="label"> - <label>Sort Order</label> - <frontend_type>text</frontend_type> - <sort_order>240</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - 0</sort_order> - </fields> - </fedex> - <ups translate="label" module="Mage_Usa"> - <label>UPS</label> - <frontend_type>text</frontend_type> - <sort_order>100</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <access_license_number translate="label"> - <label>Access License Number</label> - <frontend_type>obscure</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Encrypted</backend_model> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </access_license_number> - <active translate="label"> - <label>Enabled for Checkout</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>10</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </active> - <allowed_methods translate="label"> - <label>Allowed Methods</label> - <frontend_type>multiselect</frontend_type> - <source_model>Mage_Usa_Model_Shipping_Carrier_Ups_Source_Method</source_model> - <sort_order>170</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <can_be_empty>1</can_be_empty> - </allowed_methods> - <shipment_requesttype translate="label"> - <label>Packages Request Type</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Usa_Model_Shipping_Carrier_Abstract_Source_Requesttype</source_model> - <sort_order>47</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </shipment_requesttype> - <container translate="label"> - <label>Container</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Usa_Model_Shipping_Carrier_Ups_Source_Container</source_model> - <sort_order>50</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </container> - <free_shipping_enable translate="label"> - <label>Free Shipping with Minimum Order Amount</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Enabledisable</source_model> - <sort_order>210</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </free_shipping_enable> - <free_shipping_subtotal translate="label"> - <label>Minimum Order Amount for Free Shipping</label> - <frontend_type>text</frontend_type> - <validate>validate-number validate-zero-or-greater</validate> - <sort_order>220</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </free_shipping_subtotal> - <dest_type translate="label"> - <label>Destination Type</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Usa_Model_Shipping_Carrier_Ups_Source_DestType</source_model> - <sort_order>60</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </dest_type> - <free_method translate="label"> - <label>Free Method</label> - <frontend_type>select</frontend_type> - <frontend_class>free-method</frontend_class> - <source_model>Mage_Usa_Model_Shipping_Carrier_Ups_Source_Freemethod</source_model> - <sort_order>200</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </free_method> - <gateway_url translate="label"> - <label>Gateway URL</label> - <frontend_type>text</frontend_type> - <sort_order>40</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </gateway_url> - <gateway_xml_url translate="label"> - <label>Gateway XML URL</label> - <frontend_type>text</frontend_type> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </gateway_xml_url> - <handling_type translate="label"> - <label>Calculate Handling Fee</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Shipping_Model_Source_HandlingType</source_model> - <sort_order>110</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </handling_type> - <handling_action translate="label"> - <label>Handling Applied</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Shipping_Model_Source_HandlingAction</source_model> - <sort_order>120</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </handling_action> - <handling_fee translate="label"> - <label>Handling Fee</label> - <frontend_type>text</frontend_type> - <validate>validate-number validate-zero-or-greater</validate> - <sort_order>130</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </handling_fee> - <max_package_weight translate="label"> - <label>Maximum Package Weight (Please consult your shipping carrier for maximum supported shipping weight)</label> - <frontend_type>text</frontend_type> - <validate>validate-number validate-zero-or-greater</validate> - <sort_order>80</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </max_package_weight> - <min_package_weight translate="label"> - <label>Minimum Package Weight (Please consult your shipping carrier for minimum supported shipping weight)</label> - <frontend_type>text</frontend_type> - <validate>validate-number validate-zero-or-greater</validate> - <sort_order>90</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </min_package_weight> - <origin_shipment translate="label"> - <label>Origin of the Shipment</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Usa_Model_Shipping_Carrier_Ups_Source_OriginShipment</source_model> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </origin_shipment> - <password translate="label"> - <label>Password</label> - <frontend_type>obscure</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Encrypted</backend_model> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </password> - <pickup translate="label"> - <label>Pickup Method</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Usa_Model_Shipping_Carrier_Ups_Source_Pickup</source_model> - <sort_order>80</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </pickup> - <sort_order translate="label"> - <label>Sort Order</label> - <frontend_type>text</frontend_type> - <sort_order>1000</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - 0</sort_order> - <title translate="label"> - <label>Title</label> - <frontend_type>text</frontend_type> - <sort_order>40</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </title> - <tracking_xml_url translate="label"> - <label>Tracking XML URL</label> - <frontend_type>text</frontend_type> - <sort_order>60</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </tracking_xml_url> - <type translate="label"> - <label>UPS Type</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Usa_Model_Shipping_Carrier_Ups_Source_Type</source_model> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </type> - <unit_of_measure translate="label comment"> - <label>Weight Unit</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Usa_Model_Shipping_Carrier_Ups_Source_Unitofmeasure</source_model> - <sort_order>60</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </unit_of_measure> - <username translate="label"> - <label>User ID</label> - <frontend_type>obscure</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Encrypted</backend_model> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </username> - <negotiated_active translate="label"> - <label>Enable Negotiated Rates</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>40</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </negotiated_active> - <shipper_number translate="label comment"> - <label>Shipper Number</label> - <frontend_type>text</frontend_type> - <sort_order>50</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <comment>Required for negotiated rates; 6-character UPS.</comment> - </shipper_number> - <sallowspecific translate="label"> - <label>Ship to Applicable Countries</label> - <frontend_type>select</frontend_type> - <sort_order>900</sort_order> - <frontend_class>shipping-applicable-country</frontend_class> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Shipping_Allspecificcountries</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </sallowspecific> - <specificcountry translate="label"> - <label>Ship to Specific Countries</label> - <frontend_type>multiselect</frontend_type> - <sort_order>910</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Country</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <can_be_empty>1</can_be_empty> - </specificcountry> - <showmethod translate="label"> - <label>Show Method if Not Applicable</label> - <frontend_type>select</frontend_type> - <sort_order>920</sort_order> - <frontend_class>shipping-skip-hide</frontend_class> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </showmethod> - <specificerrmsg translate="label"> - <label>Displayed Error Message</label> - <frontend_type>textarea</frontend_type> - <sort_order>800</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </specificerrmsg> - <mode_xml translate="label comment"> - <label>Mode</label> - <comment>Enables/Disables SSL verification of Magento server by UPS.</comment> - <frontend_type>select</frontend_type> - <source_model>Mage_Usa_Model_Shipping_Carrier_Abstract_Source_Mode</source_model> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </mode_xml> - <debug translate="label"> - <label>Debug</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>920</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </debug> - </fields> - </ups> - <usps translate="label" module="Mage_Usa"> - <label>USPS</label> - <frontend_type>text</frontend_type> - <sort_order>110</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <active translate="label"> - <label>Enabled for Checkout</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>10</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </active> - <gateway_url translate="label"> - <label>Gateway URL</label> - <frontend_type>text</frontend_type> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </gateway_url> - <gateway_secure_url translate="label"> - <label>Secure Gateway URL</label> - <frontend_type>text</frontend_type> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </gateway_secure_url> - <title translate="label"> - <label>Title</label> - <frontend_type>text</frontend_type> - <sort_order>40</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </title> - <userid translate="label"> - <label>User ID</label> - <frontend_type>obscure</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Encrypted</backend_model> - <sort_order>50</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </userid> - <password translate="label"> - <label>Password</label> - <frontend_type>obscure</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Encrypted</backend_model> - <sort_order>53</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </password> - <mode translate="label"> - <label>Mode</label> - <frontend_type>select</frontend_type> - <sort_order>54</sort_order> - <source_model>Mage_Usa_Model_Shipping_Carrier_Abstract_Source_Mode</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </mode> - <shipment_requesttype translate="label"> - <label>Packages Request Type</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Usa_Model_Shipping_Carrier_Abstract_Source_Requesttype</source_model> - <sort_order>55</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </shipment_requesttype> - <container translate="label"> - <label>Container</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Usa_Model_Shipping_Carrier_Usps_Source_Container</source_model> - <sort_order>60</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </container> - <size translate="label"> - <label>Size</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Usa_Model_Shipping_Carrier_Usps_Source_Size</source_model> - <sort_order>70</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </size> - <width translate="label"> - <label>Width</label> - <frontend_type>text</frontend_type> - <sort_order>73</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <depends><size>LARGE</size></depends> - </width> - <length translate="label"> - <label>Length</label> - <frontend_type>text</frontend_type> - <sort_order>72</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <depends><size>LARGE</size></depends> - </length> - <height translate="label"> - <label>Height</label> - <frontend_type>text</frontend_type> - <sort_order>74</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <depends><size>LARGE</size></depends> - </height> - <girth translate="label"> - <label>Girth</label> - <frontend_type>text</frontend_type> - <sort_order>76</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <depends><size>LARGE</size></depends> - </girth> - <machinable translate="label"> - <label>Machinable</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Usa_Model_Shipping_Carrier_Usps_Source_Machinable</source_model> - <sort_order>80</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </machinable> - <max_package_weight translate="label"> - <label>Maximum Package Weight (Please consult your shipping carrier for maximum supported shipping weight)</label> - <frontend_type>text</frontend_type> - <validate>validate-number validate-zero-or-greater</validate> - <sort_order>90</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </max_package_weight> - <handling_type translate="label"> - <label>Calculate Handling Fee</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Shipping_Model_Source_HandlingType</source_model> - <sort_order>100</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </handling_type> - <handling_action translate="label"> - <label>Handling Applied</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Shipping_Model_Source_HandlingAction</source_model> - <sort_order>110</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </handling_action> - <handling_fee translate="label"> - <label>Handling Fee</label> - <frontend_type>text</frontend_type> - <validate>validate-number validate-zero-or-greater</validate> - <sort_order>120</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </handling_fee> - <allowed_methods translate="label"> - <label>Allowed Methods</label> - <frontend_type>multiselect</frontend_type> - <source_model>Mage_Usa_Model_Shipping_Carrier_Usps_Source_Method</source_model> - <sort_order>130</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <can_be_empty>1</can_be_empty> - </allowed_methods> - <free_method translate="label"> - <label>Free Method</label> - <frontend_type>select</frontend_type> - <frontend_class>free-method</frontend_class> - <source_model>Mage_Usa_Model_Shipping_Carrier_Usps_Source_Freemethod</source_model> - <sort_order>140</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </free_method> - <free_shipping_enable translate="label"> - <label>Free Shipping with Minimum Order Amount</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Enabledisable</source_model> - <sort_order>1500</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </free_shipping_enable> - <free_shipping_subtotal translate="label"> - <label>Minimum Order Amount for Free Shipping</label> - <frontend_type>text</frontend_type> - <validate>validate-number validate-zero-or-greater</validate> - <sort_order>160</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </free_shipping_subtotal> - <specificerrmsg translate="label"> - <label>Displayed Error Message</label> - <frontend_type>textarea</frontend_type> - <sort_order>170</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </specificerrmsg> - <sallowspecific translate="label"> - <label>Ship to Applicable Countries</label> - <frontend_type>select</frontend_type> - <sort_order>180</sort_order> - <frontend_class>shipping-applicable-country</frontend_class> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Shipping_Allspecificcountries</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </sallowspecific> - <specificcountry translate="label"> - <label>Ship to Specific Countries</label> - <frontend_type>multiselect</frontend_type> - <sort_order>190</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Country</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <can_be_empty>1</can_be_empty> - </specificcountry> - <debug translate="label"> - <label>Debug</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>200</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </debug> - <showmethod translate="label"> - <label>Show Method if Not Applicable</label> - <frontend_type>select</frontend_type> - <sort_order>210</sort_order> - <frontend_class>shipping-skip-hide</frontend_class> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </showmethod> - <sort_order translate="label"> - <label>Sort Order</label> - <frontend_type>text</frontend_type> - <sort_order>220</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - 0</sort_order> - </fields> - </usps> - <dhlint translate="label" module="Mage_Usa"> - <label>DHL</label> - <frontend_type>text</frontend_type> - <sort_order>140</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <active translate="label"> - <label>Enabled for Checkout</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>10</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </active> - <gateway_url translate="label"> - <label>Gateway URL</label> - <frontend_type>text</frontend_type> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </gateway_url> - <title translate="label"> - <label>Title</label> - <frontend_type>text</frontend_type> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </title> - <id translate="label"> - <label>Access ID</label> - <frontend_type>obscure</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Encrypted</backend_model> - <sort_order>50</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </id> - <password translate="label"> - <label>Password</label> - <frontend_type>obscure</frontend_type> - <backend_model>Mage_Adminhtml_Model_System_Config_Backend_Encrypted</backend_model> - <sort_order>60</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </password> - <account translate="label"> - <label>Account Number</label> - <frontend_type>text</frontend_type> - <sort_order>70</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </account> - <content_type translate="label"> - <label>Content Type</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Usa_Model_Shipping_Carrier_Dhl_International_Source_Contenttype</source_model> - <sort_order>90</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </content_type> - <handling_type translate="label"> - <label>Calculate Handling Fee</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Shipping_Model_Source_HandlingType</source_model> - <sort_order>100</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </handling_type> - <handling_action translate="label comment"> - <label>Handling Applied</label> - <comment>"Per Order" allows single handling fee for entire order. "Per Package" allows individual handling fee for each package.</comment> - <frontend_type>select</frontend_type> - <source_model>Mage_Shipping_Model_Source_HandlingAction</source_model> - <sort_order>110</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </handling_action> - <handling_fee translate="label"> - <label>Handling Fee</label> - <frontend_type>text</frontend_type> - <validate>validate-number validate-zero-or-greater</validate> - <sort_order>120</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </handling_fee> - <divide_order_weight translate="label comment"> - <label>Divide Order Weight</label> - <comment>Allows breaking total order weight into smaller pieces if it exeeds 70 kg to ensure accurate calculation of shipping charges.</comment> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>130</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </divide_order_weight> - <unit_of_measure translate="label"> - <label>Weight Unit</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Usa_Model_Shipping_Carrier_Dhl_International_Source_Method_Unitofmeasure</source_model> - <frontend_model>Mage_Usa_Block_Adminhtml_Dhl_Unitofmeasure</frontend_model> - <sort_order>140</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </unit_of_measure> - <size translate="label"> - <label>Size</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Usa_Model_Shipping_Carrier_Dhl_International_Source_Method_Size</source_model> - <sort_order>150</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </size> - <height translate="label"> - <label>Height</label> - <frontend_type>text</frontend_type> - <sort_order>151</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <depends><size>1</size></depends> - </height> - <depth translate="label"> - <label>Depth</label> - <frontend_type>text</frontend_type> - <sort_order>152</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <depends><size>1</size></depends> - </depth> - <width translate="label"> - <label>Width</label> - <frontend_type>text</frontend_type> - <sort_order>153</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <depends><size>1</size></depends> - </width> - <doc_methods translate="label"> - <label>Allowed Methods</label> - <frontend_type>multiselect</frontend_type> - <source_model>Mage_Usa_Model_Shipping_Carrier_Dhl_International_Source_Method_Doc</source_model> - <sort_order>170</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <depends><content_type>D</content_type></depends> - </doc_methods> - <nondoc_methods translate="label"> - <label>Allowed Methods</label> - <frontend_type>multiselect</frontend_type> - <source_model>Mage_Usa_Model_Shipping_Carrier_Dhl_International_Source_Method_Nondoc</source_model> - <sort_order>170</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <depends><content_type>N</content_type></depends> - </nondoc_methods> - <ready_time> - <label>Ready time</label> - <comment>Package ready time after order submission (in hours)</comment> - <frontend_type>text</frontend_type> - <sort_order>180</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </ready_time> - <specificerrmsg translate="label"> - <label>Displayed Error Message</label> - <frontend_type>textarea</frontend_type> - <sort_order>800</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </specificerrmsg> - <!-- - If the free_shipping_enable flag enable, the system will check free_shipping_subtotal to give free shipping - otherwise will use shopping cart price rule behaviour - --> - <free_method_doc translate="label"> - <label>Free Method</label> - <frontend_type>select</frontend_type> - <frontend_class>free-method</frontend_class> - <source_model>Mage_Usa_Model_Shipping_Carrier_Dhl_International_Source_Method_Freedoc</source_model> - <sort_order>1200</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <depends><content_type>D</content_type></depends> - </free_method_doc> - <free_method_nondoc translate="label"> - <label>Free Method</label> - <frontend_type>select</frontend_type> - <frontend_class>free-method</frontend_class> - <source_model>Mage_Usa_Model_Shipping_Carrier_Dhl_International_Source_Method_Freenondoc</source_model> - <sort_order>1200</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <depends><content_type>N</content_type></depends> - </free_method_nondoc> - <free_shipping_enable translate="label"> - <label>Free Shipping with Minimum Order Amount</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Enabledisable</source_model> - <sort_order>1210</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </free_shipping_enable> - <free_shipping_subtotal translate="label"> - <label>Minimum Order Amount for Free Shipping</label> - <frontend_type>text</frontend_type> - <validate>validate-number validate-zero-or-greater</validate> - <sort_order>1220</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </free_shipping_subtotal> - <sallowspecific translate="label"> - <label>Ship to Applicable Countries</label> - <frontend_type>select</frontend_type> - <sort_order>1900</sort_order> - <frontend_class>shipping-applicable-country</frontend_class> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Shipping_Allspecificcountries</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </sallowspecific> - <specificcountry translate="label"> - <label>Ship to Specific Countries</label> - <frontend_type>multiselect</frontend_type> - <sort_order>1910</sort_order> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Country</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <can_be_empty>1</can_be_empty> - </specificcountry> - <showmethod translate="label"> - <label>Show Method if Not Applicable</label> - <frontend_type>select</frontend_type> - <sort_order>1940</sort_order> - <frontend_class>shipping-skip-hide</frontend_class> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </showmethod> - <sort_order translate="label"> - <label>Sort Order</label> - <frontend_type>text</frontend_type> - <sort_order>2000</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </sort_order> - <debug translate="label"> - <label>Debug</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>1950</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </debug> - </fields> - </dhlint> - </groups> - </carriers> - </sections> -</config> diff --git a/app/code/core/Mage/User/view/adminhtml/admin/forgotpassword.phtml b/app/code/core/Mage/User/view/adminhtml/admin/forgotpassword.phtml index 62c9260ed5ae26ab05d71bd9698651252faf0fb9..50591ab760bba7be8bb364d9aa175b77afcd7fcc 100644 --- a/app/code/core/Mage/User/view/adminhtml/admin/forgotpassword.phtml +++ b/app/code/core/Mage/User/view/adminhtml/admin/forgotpassword.phtml @@ -29,21 +29,21 @@ <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title><?php echo Mage::helper('Mage_User_Helper_Data')->__('Log into Magento Admin Page'); ?></title> - <link type="text/css" rel="stylesheet" href="<?php echo $this->getSkinUrl('reset.css'); ?>" media="all" /> - <link type="text/css" rel="stylesheet" href="<?php echo $this->getSkinUrl('boxes.css'); ?>" media="all" /> - <link rel="icon" href="<?php echo $this->getSkinUrl('Mage_Page::favicon.ico'); ?>" type="image/x-icon" /> - <link rel="shortcut icon" href="<?php echo $this->getSkinUrl('Mage_Page::favicon.ico'); ?>" type="image/x-icon" /> + <link type="text/css" rel="stylesheet" href="<?php echo $this->getViewFileUrl('reset.css'); ?>" media="all" /> + <link type="text/css" rel="stylesheet" href="<?php echo $this->getViewFileUrl('boxes.css'); ?>" media="all" /> + <link rel="icon" href="<?php echo $this->getViewFileUrl('Mage_Page::favicon.ico'); ?>" type="image/x-icon" /> + <link rel="shortcut icon" href="<?php echo $this->getViewFileUrl('Mage_Page::favicon.ico'); ?>" type="image/x-icon" /> - <script type="text/javascript" src="<?php echo $this->getSkinUrl('prototype/prototype.js'); ?>"></script> - <script type="text/javascript" src="<?php echo $this->getSkinUrl('prototype/validation.js'); ?>"></script> - <script type="text/javascript" src="<?php echo $this->getSkinUrl('mage/adminhtml/events.js'); ?>"></script> - <script type="text/javascript" src="<?php echo $this->getSkinUrl('mage/adminhtml/form.js'); ?>"></script> - <script type="text/javascript" src="<?php echo $this->getSkinUrl('scriptaculous/effects.js'); ?>"></script> - <script type="text/javascript" src="<?php echo $this->getSkinUrl('mage/captcha.js') ?>"></script> + <script type="text/javascript" src="<?php echo $this->getViewFileUrl('prototype/prototype.js'); ?>"></script> + <script type="text/javascript" src="<?php echo $this->getViewFileUrl('prototype/validation.js'); ?>"></script> + <script type="text/javascript" src="<?php echo $this->getViewFileUrl('mage/adminhtml/events.js'); ?>"></script> + <script type="text/javascript" src="<?php echo $this->getViewFileUrl('mage/adminhtml/form.js'); ?>"></script> + <script type="text/javascript" src="<?php echo $this->getViewFileUrl('scriptaculous/effects.js'); ?>"></script> + <script type="text/javascript" src="<?php echo $this->getViewFileUrl('mage/captcha.js') ?>"></script> - <!--[if IE]> <link rel="stylesheet" href="<?php echo $this->getSkinUrl('iestyles.css'); ?>" type="text/css" media="all" /> <![endif]--> - <!--[if lt IE 7]> <link rel="stylesheet" href="<?php echo $this->getSkinUrl('below_ie7.css'); ?>" type="text/css" media="all" /> <![endif]--> - <!--[if IE 7]> <link rel="stylesheet" href="<?php echo $this->getSkinUrl('ie7.css'); ?>" type="text/css" media="all" /> <![endif]--> + <!--[if IE]> <link rel="stylesheet" href="<?php echo $this->getViewFileUrl('iestyles.css'); ?>" type="text/css" media="all" /> <![endif]--> + <!--[if lt IE 7]> <link rel="stylesheet" href="<?php echo $this->getViewFileUrl('below_ie7.css'); ?>" type="text/css" media="all" /> <![endif]--> + <!--[if IE 7]> <link rel="stylesheet" href="<?php echo $this->getViewFileUrl('ie7.css'); ?>" type="text/css" media="all" /> <![endif]--> </head> <body id="page-login"> <div class="login-container"> diff --git a/app/code/core/Mage/User/view/adminhtml/admin/resetforgottenpassword.phtml b/app/code/core/Mage/User/view/adminhtml/admin/resetforgottenpassword.phtml index f7421df982d5d1dc0ed57b5fef05acea695be41e..1ee6e1608ea05540193bba215e7b6494806b30eb 100644 --- a/app/code/core/Mage/User/view/adminhtml/admin/resetforgottenpassword.phtml +++ b/app/code/core/Mage/User/view/adminhtml/admin/resetforgottenpassword.phtml @@ -29,20 +29,20 @@ <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title><?php echo Mage::helper('Mage_User_Helper_Data')->__('Reset a Password'); ?></title> - <link type="text/css" rel="stylesheet" href="<?php echo $this->getSkinUrl('reset.css'); ?>" media="all" /> - <link type="text/css" rel="stylesheet" href="<?php echo $this->getSkinUrl('boxes.css'); ?>" media="all" /> - <link rel="icon" href="<?php echo $this->getSkinUrl('Mage_Page::favicon.ico'); ?>" type="image/x-icon" /> - <link rel="shortcut icon" href="<?php echo $this->getSkinUrl('Mage_Page::favicon.ico'); ?>" type="image/x-icon" /> + <link type="text/css" rel="stylesheet" href="<?php echo $this->getViewFileUrl('reset.css'); ?>" media="all" /> + <link type="text/css" rel="stylesheet" href="<?php echo $this->getViewFileUrl('boxes.css'); ?>" media="all" /> + <link rel="icon" href="<?php echo $this->getViewFileUrl('Mage_Page::favicon.ico'); ?>" type="image/x-icon" /> + <link rel="shortcut icon" href="<?php echo $this->getViewFileUrl('Mage_Page::favicon.ico'); ?>" type="image/x-icon" /> - <script type="text/javascript" src="<?php echo $this->getSkinUrl('prototype/prototype.js'); ?>"></script> - <script type="text/javascript" src="<?php echo $this->getSkinUrl('prototype/validation.js'); ?>"></script> - <script type="text/javascript" src="<?php echo $this->getSkinUrl('mage/adminhtml/events.js'); ?>"></script> - <script type="text/javascript" src="<?php echo $this->getSkinUrl('mage/adminhtml/form.js'); ?>"></script> - <script type="text/javascript" src="<?php echo $this->getSkinUrl('scriptaculous/effects.js'); ?>"></script> + <script type="text/javascript" src="<?php echo $this->getViewFileUrl('prototype/prototype.js'); ?>"></script> + <script type="text/javascript" src="<?php echo $this->getViewFileUrl('prototype/validation.js'); ?>"></script> + <script type="text/javascript" src="<?php echo $this->getViewFileUrl('mage/adminhtml/events.js'); ?>"></script> + <script type="text/javascript" src="<?php echo $this->getViewFileUrl('mage/adminhtml/form.js'); ?>"></script> + <script type="text/javascript" src="<?php echo $this->getViewFileUrl('scriptaculous/effects.js'); ?>"></script> - <!--[if IE]> <link rel="stylesheet" href="<?php echo $this->getSkinUrl('iestyles.css'); ?>" type="text/css" media="all" /> <![endif]--> - <!--[if lt IE 7]> <link rel="stylesheet" href="<?php echo $this->getSkinUrl('below_ie7.css'); ?>" type="text/css" media="all" /> <![endif]--> - <!--[if IE 7]> <link rel="stylesheet" href="<?php echo $this->getSkinUrl('ie7.css'); ?>" type="text/css" media="all" /> <![endif]--> + <!--[if IE]> <link rel="stylesheet" href="<?php echo $this->getViewFileUrl('iestyles.css'); ?>" type="text/css" media="all" /> <![endif]--> + <!--[if lt IE 7]> <link rel="stylesheet" href="<?php echo $this->getViewFileUrl('below_ie7.css'); ?>" type="text/css" media="all" /> <![endif]--> + <!--[if IE 7]> <link rel="stylesheet" href="<?php echo $this->getViewFileUrl('ie7.css'); ?>" type="text/css" media="all" /> <![endif]--> </head> <body id="page-login"> <div class="login-container"> diff --git a/app/code/core/Mage/Weee/Block/Renderer/Weee/Tax.php b/app/code/core/Mage/Weee/Block/Renderer/Weee/Tax.php index 9c200798b3d4464381ae6b332a811c2e1bed74ff..390465939198ffbf4c25486c69610a60ba225d12 100644 --- a/app/code/core/Mage/Weee/Block/Renderer/Weee/Tax.php +++ b/app/code/core/Mage/Weee/Block/Renderer/Weee/Tax.php @@ -99,7 +99,7 @@ class Mage_Weee_Block_Renderer_Weee_Tax extends Mage_Adminhtml_Block_Widget impl public function getCountries() { if (is_null($this->_countries)) { - $this->_countries = Mage::getModel('Mage_Adminhtml_Model_System_Config_Source_Country') + $this->_countries = Mage::getModel('Mage_Directory_Model_Config_Source_Country') ->toOptionArray(); } diff --git a/app/code/core/Mage/Weee/Model/Config/Source/Display.php b/app/code/core/Mage/Weee/Model/Config/Source/Display.php index 4893921a6439e0c0856eae3b35f2982875c3eb0f..cdd9b63dbfec790dcdc0ac580acb84a432bbf75b 100644 --- a/app/code/core/Mage/Weee/Model/Config/Source/Display.php +++ b/app/code/core/Mage/Weee/Model/Config/Source/Display.php @@ -23,7 +23,7 @@ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Weee_Model_Config_Source_Display +class Mage_Weee_Model_Config_Source_Display implements Mage_Core_Model_Option_ArrayInterface { /** * Retrieve list of available options to display FPT diff --git a/app/code/core/Mage/Weee/etc/adminhtml/system.xml b/app/code/core/Mage/Weee/etc/adminhtml/system.xml new file mode 100644 index 0000000000000000000000000000000000000000..68a5f0bcb5e53a3e988ff60a515e6894d702eb9b --- /dev/null +++ b/app/code/core/Mage/Weee/etc/adminhtml/system.xml @@ -0,0 +1,75 @@ +<?xml version="1.0"?> +<!-- +/** + * 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 Mage_Weee + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> + <system> + <section id="tax"> + <group id="weee" translate="label" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Fixed Product Taxes</label> + <field id="enable" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Enable FPT</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="display_list" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Display Prices In Product Lists</label> + <source_model>Mage_Weee_Model_Config_Source_Display</source_model> + </field> + <field id="display" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Display Prices On Product View Page</label> + <source_model>Mage_Weee_Model_Config_Source_Display</source_model> + </field> + <field id="display_sales" translate="label" type="select" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Display Prices In Sales Modules</label> + <source_model>Mage_Weee_Model_Config_Source_Display</source_model> + </field> + <field id="display_email" translate="label" type="select" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Display Prices In Emails</label> + <source_model>Mage_Weee_Model_Config_Source_Display</source_model> + </field> + <field id="discount" translate="label" type="select" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Apply Discounts To FPT</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="apply_vat" translate="label" type="select" sortOrder="60" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Apply Tax To FPT</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + <field id="include_in_subtotal" translate="label" type="select" sortOrder="70" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Include FPT In Subtotal</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + </group> + </section> + <section id="sales"> + <group id="totals_sort"> + <field id="weee" translate="label" type="text" sortOrder="4" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Fixed Product Tax</label> + </field> + </group> + </section> + </system> +</config> diff --git a/app/code/core/Mage/Weee/etc/system.xml b/app/code/core/Mage/Weee/etc/system.xml deleted file mode 100644 index c8f53007e1d51362bf32fac85e826e49b92aa93d..0000000000000000000000000000000000000000 --- a/app/code/core/Mage/Weee/etc/system.xml +++ /dev/null @@ -1,132 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * 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 Mage_Weee - * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<config> - <sections> - <tax> - <groups> - <weee translate="label"> - <label>Fixed Product Taxes</label> - <sort_order>100</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <enable translate="label"> - <label>Enable FPT</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </enable> - <display_list translate="label"> - <label>Display Prices In Product Lists</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Weee_Model_Config_Source_Display</source_model> - <sort_order>10</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </display_list> - <display translate="label"> - <label>Display Prices On Product View Page</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Weee_Model_Config_Source_Display</source_model> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </display> - <display_sales translate="label"> - <label>Display Prices In Sales Modules</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Weee_Model_Config_Source_Display</source_model> - <sort_order>30</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </display_sales> - <display_email translate="label"> - <label>Display Prices In Emails</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Weee_Model_Config_Source_Display</source_model> - <sort_order>40</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </display_email> - <discount translate="label"> - <label>Apply Discounts To FPT</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>50</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </discount> - <apply_vat translate="label"> - <label>Apply Tax To FPT</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>60</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </apply_vat> - <include_in_subtotal translate="label"> - <label>Include FPT In Subtotal</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>70</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </include_in_subtotal> - </fields> - </weee> - </groups> - </tax> - <sales> - <groups> - <totals_sort> - <fields> - <weee translate="label"> - <label>Fixed Product Tax</label> - <frontend_type>text</frontend_type> - <sort_order>4</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </weee> - </fields> - </totals_sort> - </groups> - </sales> - </sections> -</config> diff --git a/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main.php b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main.php index 623b293df9623e8def494b90dd6c0f42c9b4cee2..0ffd6662248b97782c463835cec0216989229dc8 100644 --- a/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main.php +++ b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main.php @@ -154,7 +154,7 @@ class Mage_Widget_Block_Adminhtml_Widget_Instance_Edit_Tab_Main 'required' => true, 'values' => Mage::getSingleton('Mage_Core_Model_System_Store')->getStoreValuesForForm(false, true), )); - $renderer = $this->getLayout()->createBlock('Mage_Adminhtml_Block_Store_Switcher_Form_Renderer_Fieldset_Element'); + $renderer = $this->getLayout()->createBlock('Mage_Backend_Block_Store_Switcher_Form_Renderer_Fieldset_Element'); $field->setRenderer($renderer); } diff --git a/app/code/core/Mage/Widget/Model/Widget.php b/app/code/core/Mage/Widget/Model/Widget.php index de01e8f6a04897b159894135c3a3a6368ea4e7d9..eb99f4fd665ac18da01beaf37ba6a2825faacaae 100644 --- a/app/code/core/Mage/Widget/Model/Widget.php +++ b/app/code/core/Mage/Widget/Model/Widget.php @@ -262,10 +262,10 @@ class Mage_Widget_Model_Widget extends Varien_Object if (is_object($widgetXml)) { $placeholder = (string)$widgetXml->placeholder_image; } - if (!$placeholder || !Mage::getDesign()->getSkinFile($placeholder)) { + if (!$placeholder || !Mage::getDesign()->getViewFile($placeholder)) { $placeholder = 'Mage_Widget::placeholder.gif'; } - return Mage::getDesign()->getSkinUrl($placeholder); + return Mage::getDesign()->getViewFileUrl($placeholder); } /** diff --git a/app/code/core/Mage/Widget/Model/Widget/Config.php b/app/code/core/Mage/Widget/Model/Widget/Config.php index eba3297e9ca25ac248eca97f6420419f1ca70717..57ffd778207274686a78403414ab06e6efe36fe5 100644 --- a/app/code/core/Mage/Widget/Model/Widget/Config.php +++ b/app/code/core/Mage/Widget/Model/Widget/Config.php @@ -44,7 +44,7 @@ class Mage_Widget_Model_Widget_Config extends Varien_Object { $settings = array( 'widget_plugin_src' => - Mage::getDesign()->getSkinUrl('mage/adminhtml/wysiwyg/tiny_mce/plugins/magentowidget/editor_plugin.js'), + Mage::getDesign()->getViewFileUrl('mage/adminhtml/wysiwyg/tiny_mce/plugins/magentowidget/editor_plugin.js'), 'widget_placeholders' => Mage::getModel('Mage_Widget_Model_Widget')->getPlaceholderImageUrls(), 'widget_window_url' => $this->getWidgetWindowUrl($config) ); @@ -77,7 +77,7 @@ class Mage_Widget_Model_Widget_Config extends Varien_Object if (count($skipped) > 0) { $params['skip_widgets'] = $this->encodeWidgetsToQuery($skipped); } - return Mage::getSingleton('Mage_Adminhtml_Model_Url')->getUrl('*/widget/index', $params); + return Mage::getSingleton('Mage_Backend_Model_Url')->getUrl('*/widget/index', $params); } /** diff --git a/app/code/core/Mage/Widget/view/adminhtml/instance/edit/layout.phtml b/app/code/core/Mage/Widget/view/adminhtml/instance/edit/layout.phtml index 40417c23171903dc0061119f342443b10ef91651..dd63d35372808d1026bef4ab95f583db51546a4f 100644 --- a/app/code/core/Mage/Widget/view/adminhtml/instance/edit/layout.phtml +++ b/app/code/core/Mage/Widget/view/adminhtml/instance/edit/layout.phtml @@ -88,10 +88,10 @@ var pageGroupTemplate = '<div class="options-box page_group_container" id="page_ '<p>' + '<input type="text" class="input-text entities" name="widget_instance[{{id}}][<?php echo $container['name'] ?>][entities]" value="{{<?php echo $container['name'] ?>_entities}}" readonly="readonly" /> ' + '<a class="widget-option-chooser" href="javascript:void(0)" onclick="WidgetInstance.displayEntityChooser(\'<?php echo $container['code'] ?>\', \'<?php echo $container['name'] ?>_ids_{{id}}\')" title="<?php echo $this->helper('Mage_Core_Helper_Data')->jsQuoteEscape(Mage::helper('Mage_Widget_Helper_Data')->__('Open Chooser')) ?>">' + - '<img src="<?php echo Mage::getDesign()->getSkinUrl('images/rule_chooser_trigger.gif') ?>" class="v-middle" alt="<?php echo $this->helper('Mage_Core_Helper_Data')->jsQuoteEscape(Mage::helper('Mage_Widget_Helper_Data')->__('Open Chooser')); ?>" />' + + '<img src="<?php echo Mage::getDesign()->getViewFileUrl('images/rule_chooser_trigger.gif') ?>" class="v-middle" alt="<?php echo $this->helper('Mage_Core_Helper_Data')->jsQuoteEscape(Mage::helper('Mage_Widget_Helper_Data')->__('Open Chooser')); ?>" />' + '</a> ' + '<a href="javascript:void(0)" onclick="WidgetInstance.hideEntityChooser(\'<?php echo $container['name'] ?>_ids_{{id}}\')" title="<?php echo $this->helper('Mage_Core_Helper_Data')->jsQuoteEscape(Mage::helper('Mage_Widget_Helper_Data')->__('Apply')); ?>">' + - '<img src="<?php echo Mage::getDesign()->getSkinUrl('images/rule_component_apply.gif') ?>" class="v-middle" alt="<?php echo $this->helper('Mage_Core_Helper_Data')->jsQuoteEscape(Mage::helper('Mage_Widget_Helper_Data')->__('Apply')); ?>" />' + + '<img src="<?php echo Mage::getDesign()->getViewFileUrl('images/rule_component_apply.gif') ?>" class="v-middle" alt="<?php echo $this->helper('Mage_Core_Helper_Data')->jsQuoteEscape(Mage::helper('Mage_Widget_Helper_Data')->__('Apply')); ?>" />' + '</a>' + '</p>'+ '<div class="chooser"></div>'+ diff --git a/app/code/core/Mage/Wishlist/Model/Config/Source/Summary.php b/app/code/core/Mage/Wishlist/Model/Config/Source/Summary.php index 485240fbb1aa7786cec2eca89f6984dbe379011d..d4774e04f922cf1487ea9aa34caf471adb3ac998 100644 --- a/app/code/core/Mage/Wishlist/Model/Config/Source/Summary.php +++ b/app/code/core/Mage/Wishlist/Model/Config/Source/Summary.php @@ -23,7 +23,7 @@ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Wishlist_Model_Config_Source_Summary +class Mage_Wishlist_Model_Config_Source_Summary implements Mage_Core_Model_Option_ArrayInterface { public function toOptionArray() { diff --git a/app/code/core/Mage/Wishlist/etc/adminhtml/system.xml b/app/code/core/Mage/Wishlist/etc/adminhtml/system.xml new file mode 100644 index 0000000000000000000000000000000000000000..54c6744bb00f5fb71defa28e6fdb7980c3ca8a0b --- /dev/null +++ b/app/code/core/Mage/Wishlist/etc/adminhtml/system.xml @@ -0,0 +1,61 @@ +<?xml version="1.0"?> +<!-- +/** + * 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 Mage_Wishlist + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> + <system> + <section id="wishlist" translate="label" module="Mage_Wishlist" type="text" sortOrder="140" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Wishlist</label> + <tab>customer</tab> + <resource>Mage_Wishlist::config_wishlist</resource> + <group id="email" translate="label" type="text" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Share Options</label> + <field id="email_identity" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Email Sender</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Identity</source_model> + </field> + <field id="email_template" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Email Template</label> + <source_model>Mage_Backend_Model_Config_Source_Email_Template</source_model> + </field> + </group> + <group id="general" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>General Options</label> + <field id="active" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1"> + <label>Enabled</label> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> + </field> + </group> + <group id="wishlist_link" translate="label" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>My Wishlist Link</label> + <field id="use_qty" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="0"> + <label>Display Wishlist Summary</label> + <source_model>Mage_Wishlist_Model_Config_Source_Summary</source_model> + </field> + </group> + </section> + </system> +</config> diff --git a/app/code/core/Mage/Wishlist/etc/system.xml b/app/code/core/Mage/Wishlist/etc/system.xml deleted file mode 100644 index 42065e34f598dd53270bc685078f6782a4241439..0000000000000000000000000000000000000000 --- a/app/code/core/Mage/Wishlist/etc/system.xml +++ /dev/null @@ -1,108 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * 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 Mage_Wishlist - * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<config> - <sections> - <wishlist translate="label" module="Mage_Wishlist"> - <label>Wishlist</label> - <tab>customer</tab> - <frontend_type>text</frontend_type> - <sort_order>140</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <resource>Mage_Wishlist::config_wishlist</resource> - <groups> - <email translate="label"> - <label>Share Options</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> - <fields> - <email_identity translate="label"> - <label>Email Sender</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Identity</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </email_identity> - <email_template translate="label"> - <label>Email Template</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Email_Template</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </email_template> - </fields> - </email> - <general translate="label"> - <label>General Options</label> - <frontend_type>text</frontend_type> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <fields> - <active translate="label"> - <label>Enabled</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </active> - </fields> - </general> - <wishlist_link translate="label"> - <label>My Wishlist Link</label> - <sort_order>3</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - <fields> - <use_qty translate="label"> - <label>Display Wishlist Summary</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Wishlist_Model_Config_Source_Summary</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>0</show_in_store> - </use_qty> - </fields> - </wishlist_link> - </groups> - </wishlist> - </sections> -</config> diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Design/Accordion/Images.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Design/Accordion/Images.php index e0adfde59c16ddf6affedf2f2c01cbf8dde4569f..fbda699a0f42a4f656d4da8048091bf8e2ee916c 100644 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Design/Accordion/Images.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Design/Accordion/Images.php @@ -144,9 +144,9 @@ class Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_Design_Accordion_Images } /** - * Retrieve url for images in the skin folder + * Retrieve url for images in the theme folder * - * @param string $name - path to file name relative to the skin dir + * @param string $name - path to file name relative to the theme dir * @return string */ protected function _getDesignPreviewImageUrl($name) diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Flurryanalytics.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Flurryanalytics.php index 2674fa7ab59c4eb70dcbac4674583eaebeaab6a1..0507a09cd96f47a324a2156955c0a30a27ba5f99 100755 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Flurryanalytics.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Flurryanalytics.php @@ -60,7 +60,7 @@ class Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_Flurryanalytics $this->setForm($form); $data = Mage::helper('Mage_XmlConnect_Helper_Data')->getApplication()->getFormData(); - $yesNoValues = Mage::getModel('Mage_Adminhtml_Model_System_Config_Source_Yesno')->toOptionArray(); + $yesNoValues = Mage::getModel('Mage_Backend_Model_Config_Source_Yesno')->toOptionArray(); $fieldset = $form->addFieldset('flurryAnalytics', array('legend' => $this->__('Flurry Analytics'))); diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/General.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/General.php index f2ef239cac6376c8d0efe469afa086b2bdee5325..2411fa6acddfeee4d65c549e44a6c13fb45e7bd4 100644 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/General.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/General.php @@ -112,7 +112,7 @@ class Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_General 'value' => $model->getType(), )); - $yesNoValues = Mage::getModel('Mage_Adminhtml_Model_System_Config_Source_Yesno')->toOptionArray(); + $yesNoValues = Mage::getModel('Mage_Backend_Model_Config_Source_Yesno')->toOptionArray(); $fieldset->addField('browsing_mode', 'select', array( 'label' => $this->__('Catalog Only App?'), diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Notification.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Notification.php index c546c5851a45e78cb73e0c37b6f04a62cfff276f..0b1e13530a437143594b9c0a526efbeec3c37b2c 100755 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Notification.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Notification.php @@ -59,7 +59,7 @@ class Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_Notification $data = Mage::helper('Mage_XmlConnect_Helper_Data')->getApplication()->getFormData(); - $yesNoValues = Mage::getModel('Mage_Adminhtml_Model_System_Config_Source_Yesno')->toOptionArray(); + $yesNoValues = Mage::getModel('Mage_Backend_Model_Config_Source_Yesno')->toOptionArray(); $fieldset = $form->addFieldset('notifications', array( 'legend' => $this->__('Urban Airship Push Notification'), diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Payment.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Payment.php index 3c6b18150ca7586d347b6b10e679ac8374652167..fb78ce461471dd5bef1a5c1d0218c51dfbff19f3 100644 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Payment.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Payment.php @@ -60,7 +60,7 @@ class Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_Payment $this->setForm($form); $data = Mage::helper('Mage_XmlConnect_Helper_Data')->getApplication()->getFormData(); - $yesNoValues = Mage::getModel('Mage_Adminhtml_Model_System_Config_Source_Yesno')->toOptionArray(); + $yesNoValues = Mage::getModel('Mage_Backend_Model_Config_Source_Yesno')->toOptionArray(); $fieldset = $form->addFieldset('onepage_checkout', array('legend' => $this->__('Standard Checkout'))); @@ -145,7 +145,7 @@ class Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_Payment 'value' => $paypalMepAllow )); - $countries = Mage::getModel('Mage_Adminhtml_Model_System_Config_Source_Country')->toOptionArray(true); + $countries = Mage::getModel('Mage_Directory_Model_Config_Source_Country')->toOptionArray(true); if (empty($data['config_data[payment][paypalmep/allowspecific]'])) { $countrySelected = array(); diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Social.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Social.php index 94f5536e680123b9240d2fe27e64bedbda86cdb0..589c1446e97ebece47e13e8335d285d545721153 100755 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Social.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Social.php @@ -49,7 +49,7 @@ class Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_Social $data = Mage::helper('Mage_XmlConnect_Helper_Data')->getApplication()->getFormData(); - $yesNoValues = Mage::getModel('Mage_Adminhtml_Model_System_Config_Source_Yesno')->toOptionArray(); + $yesNoValues = Mage::getModel('Mage_Backend_Model_Config_Source_Yesno')->toOptionArray(); /** * Default values for social networks is DISABLED diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Edit/Form.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Edit/Form.php index a107f3293d22c2901369dffb55269bf5659f85cd..b8b6152f6e177d14a5644d82d56587606af174e9 100755 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Edit/Form.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Edit/Form.php @@ -89,7 +89,7 @@ class Mage_XmlConnect_Block_Adminhtml_Queue_Edit_Form 'time_format' => Mage::app()->getLocale()->getTimeFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT), 'label' => $this->__('Start Date'), 'title' => $this->__('Start Date'), - 'image' => $this->getSkinUrl('images/grid-cal.gif'), + 'image' => $this->getViewFileUrl('images/grid-cal.gif'), 'note' => $this->__('If leave this field empty, the message will be sent immediately'), 'disabled' => !$this->_fieldsEnabled, 'required' => false, diff --git a/app/code/core/Mage/XmlConnect/Helper/Android.php b/app/code/core/Mage/XmlConnect/Helper/Android.php index 4ad8845b4901d4510ebf02ac914c2a2a962e3506..71304bfe0f5903685a26a2f39efa3a5abecb6e22 100755 --- a/app/code/core/Mage/XmlConnect/Helper/Android.php +++ b/app/code/core/Mage/XmlConnect/Helper/Android.php @@ -150,37 +150,37 @@ class Mage_XmlConnect_Helper_Android extends Mage_Core_Helper_Abstract $this->_tabs = array( array( 'label' => Mage::helper('Mage_XmlConnect_Helper_Data')->__('Home'), - 'image' => $design->getSkinUrl('Mage_XmlConnect::images/tab_home_android.png'), + 'image' => $design->getViewFileUrl('Mage_XmlConnect::images/tab_home_android.png'), 'action' => 'Home', 'menu' => self::TAGS_ID_FOR_TITLE_BAR, ), array( 'label' => Mage::helper('Mage_XmlConnect_Helper_Data')->__('Search'), - 'image' => $design->getSkinUrl('Mage_XmlConnect::images/tab_search_android.png'), + 'image' => $design->getViewFileUrl('Mage_XmlConnect::images/tab_search_android.png'), 'action' => 'Search', 'menu' => self::TAGS_ID_FOR_TITLE_BAR, ), array( 'label' => Mage::helper('Mage_XmlConnect_Helper_Data')->__('Account'), - 'image' => $design->getSkinUrl('Mage_XmlConnect::images/tab_account_android.png'), + 'image' => $design->getViewFileUrl('Mage_XmlConnect::images/tab_account_android.png'), 'action' => 'Account', 'menu' => self::TAGS_ID_FOR_TITLE_BAR, ), array( 'label' => Mage::helper('Mage_XmlConnect_Helper_Data')->__('Shop'), - 'image' => $design->getSkinUrl('Mage_XmlConnect::images/tab_shop_android.png'), + 'image' => $design->getViewFileUrl('Mage_XmlConnect::images/tab_shop_android.png'), 'action' => 'Shop', 'menu' => self::TAGS_ID_FOR_OPTION_MENU, ), array( 'label' => Mage::helper('Mage_XmlConnect_Helper_Data')->__('Cart'), - 'image' => $design->getSkinUrl('Mage_XmlConnect::images/tab_cart_android.png'), + 'image' => $design->getViewFileUrl('Mage_XmlConnect::images/tab_cart_android.png'), 'action' => 'Cart', 'menu' => self::TAGS_ID_FOR_OPTION_MENU, ), array( 'label' => Mage::helper('Mage_XmlConnect_Helper_Data')->__('More Info'), - 'image' => $design->getSkinUrl('Mage_XmlConnect::images/tab_info_android.png'), + 'image' => $design->getViewFileUrl('Mage_XmlConnect::images/tab_info_android.png'), 'action' => 'AboutUs', 'menu' => self::TAGS_ID_FOR_OPTION_MENU, ), diff --git a/app/code/core/Mage/XmlConnect/Helper/Image.php b/app/code/core/Mage/XmlConnect/Helper/Image.php index e7606c6f86652cc4ec0e00c1e0ecd59cdfcaf3a4..56a1182f98dc900c42ac338cec9a8310264fd132 100644 --- a/app/code/core/Mage/XmlConnect/Helper/Image.php +++ b/app/code/core/Mage/XmlConnect/Helper/Image.php @@ -278,7 +278,7 @@ class Mage_XmlConnect_Helper_Image extends Mage_Core_Helper_Abstract */ public function getSkinImagesUrl($name = null) { - return Mage::getDesign()->getSkinUrl('Mage_XmlConnect::images/' . $name); + return Mage::getDesign()->getViewFileUrl('Mage_XmlConnect::images/' . $name); } /** diff --git a/app/code/core/Mage/XmlConnect/Helper/Ipad.php b/app/code/core/Mage/XmlConnect/Helper/Ipad.php index 9458b4724855c19b24ca50a26316b8200ecdc77e..40c8407672369631e0d67f920f3588e14a3583b1 100755 --- a/app/code/core/Mage/XmlConnect/Helper/Ipad.php +++ b/app/code/core/Mage/XmlConnect/Helper/Ipad.php @@ -131,22 +131,22 @@ class Mage_XmlConnect_Helper_Ipad extends Mage_Core_Helper_Abstract $this->_tabs = array( array( 'label' => Mage::helper('Mage_XmlConnect_Helper_Data')->__('Home'), - 'image' => $design->getSkinUrl('Mage_XmlConnect::images/tab_home.png'), + 'image' => $design->getViewFileUrl('Mage_XmlConnect::images/tab_home.png'), 'action' => 'Home', ), array( 'label' => Mage::helper('Mage_XmlConnect_Helper_Data')->__('Search'), - 'image' => $design->getSkinUrl('Mage_XmlConnect::images/tab_search.png'), + 'image' => $design->getViewFileUrl('Mage_XmlConnect::images/tab_search.png'), 'action' => 'Search', ), array( 'label' => Mage::helper('Mage_XmlConnect_Helper_Data')->__('Cart'), - 'image' => $design->getSkinUrl('Mage_XmlConnect::images/tab_cart.png'), + 'image' => $design->getViewFileUrl('Mage_XmlConnect::images/tab_cart.png'), 'action' => 'Cart', ), array( 'label' => Mage::helper('Mage_XmlConnect_Helper_Data')->__('Account'), - 'image' => $design->getSkinUrl('Mage_XmlConnect::images/tab_account_ipad.png'), + 'image' => $design->getViewFileUrl('Mage_XmlConnect::images/tab_account_ipad.png'), 'action' => 'Account', ), ); diff --git a/app/code/core/Mage/XmlConnect/Helper/Iphone.php b/app/code/core/Mage/XmlConnect/Helper/Iphone.php index a744e5d8a856a287f28e12c24408ca3f647f671a..f884c229747c3ecd71c51cd1ad522f5c1990f82f 100644 --- a/app/code/core/Mage/XmlConnect/Helper/Iphone.php +++ b/app/code/core/Mage/XmlConnect/Helper/Iphone.php @@ -193,37 +193,37 @@ class Mage_XmlConnect_Helper_Iphone extends Mage_Core_Helper_Abstract $this->_tabs = array( array( 'label' => Mage::helper('Mage_XmlConnect_Helper_Data')->__('Home'), - 'image' => $design->getSkinUrl('Mage_XmlConnect::images/tab_home.png'), + 'image' => $design->getViewFileUrl('Mage_XmlConnect::images/tab_home.png'), 'action' => 'Home', ), array( 'label' => Mage::helper('Mage_XmlConnect_Helper_Data')->__('Shop'), - 'image' => $design->getSkinUrl('Mage_XmlConnect::images/tab_shop.png'), + 'image' => $design->getViewFileUrl('Mage_XmlConnect::images/tab_shop.png'), 'action' => 'Shop', ), array( 'label' => Mage::helper('Mage_XmlConnect_Helper_Data')->__('Search'), - 'image' => $design->getSkinUrl('Mage_XmlConnect::images/tab_search.png'), + 'image' => $design->getViewFileUrl('Mage_XmlConnect::images/tab_search.png'), 'action' => 'Search', ), array( 'label' => Mage::helper('Mage_XmlConnect_Helper_Data')->__('Cart'), - 'image' => $design->getSkinUrl('Mage_XmlConnect::images/tab_cart.png'), + 'image' => $design->getViewFileUrl('Mage_XmlConnect::images/tab_cart.png'), 'action' => 'Cart', ), array( 'label' => Mage::helper('Mage_XmlConnect_Helper_Data')->__('More'), - 'image' => $design->getSkinUrl('Mage_XmlConnect::images/tab_more.png'), + 'image' => $design->getViewFileUrl('Mage_XmlConnect::images/tab_more.png'), 'action' => 'More', ), array( 'label' => Mage::helper('Mage_XmlConnect_Helper_Data')->__('Account'), - 'image' => $design->getSkinUrl('Mage_XmlConnect::images/tab_account.png'), + 'image' => $design->getViewFileUrl('Mage_XmlConnect::images/tab_account.png'), 'action' => 'Account', ), array( 'label' => Mage::helper('Mage_XmlConnect_Helper_Data')->__('More Info'), - 'image' => $design->getSkinUrl('Mage_XmlConnect::images/tab_page.png'), + 'image' => $design->getViewFileUrl('Mage_XmlConnect::images/tab_page.png'), 'action' => 'AboutUs', ), ); diff --git a/app/code/core/Mage/XmlConnect/Model/Adminhtml/System/Config/Backend/Baseurl.php b/app/code/core/Mage/XmlConnect/Model/Adminhtml/System/Config/Backend/Baseurl.php index b92be073efc6fb8d2a6ccb594fad055c55cad2d3..6473a164dc6765343fbf9aa39cb78b9d4ebb3578 100644 --- a/app/code/core/Mage/XmlConnect/Model/Adminhtml/System/Config/Backend/Baseurl.php +++ b/app/code/core/Mage/XmlConnect/Model/Adminhtml/System/Config/Backend/Baseurl.php @@ -32,7 +32,7 @@ * @author Magento Core Team <core@magentocommerce.com> */ class Mage_XmlConnect_Model_Adminhtml_System_Config_Backend_Baseurl - extends Mage_Adminhtml_Model_System_Config_Backend_Baseurl + extends Mage_Backend_Model_Config_Backend_Baseurl { /** * Update all applications "updated at" parameter with current date diff --git a/app/code/core/Mage/XmlConnect/Model/Adminhtml/System/Config/Backend/Currency/Default.php b/app/code/core/Mage/XmlConnect/Model/Adminhtml/System/Config/Backend/Currency/Default.php index a4f7a7452fe7b2c3249706892cc7563f3b9a8013..0b97cd7bfc755cf6d960d2fb10624ba94404bc6e 100644 --- a/app/code/core/Mage/XmlConnect/Model/Adminhtml/System/Config/Backend/Currency/Default.php +++ b/app/code/core/Mage/XmlConnect/Model/Adminhtml/System/Config/Backend/Currency/Default.php @@ -32,7 +32,7 @@ * @author Magento Core Team <core@magentocommerce.com> */ class Mage_XmlConnect_Model_Adminhtml_System_Config_Backend_Currency_Default - extends Mage_Adminhtml_Model_System_Config_Backend_Currency_Default + extends Mage_Backend_Model_Config_Backend_Currency_Default { /** * Update all applications "updated at" parameter with current date diff --git a/app/code/core/Mage/XmlConnect/Model/Catalog/Category/Image.php b/app/code/core/Mage/XmlConnect/Model/Catalog/Category/Image.php index 0c96242488d177f3385123cb28a73981bffb3fcc..7986b5ab1634e88e9876e5673b379fc47a9cb79b 100644 --- a/app/code/core/Mage/XmlConnect/Model/Catalog/Category/Image.php +++ b/app/code/core/Mage/XmlConnect/Model/Catalog/Category/Image.php @@ -136,9 +136,9 @@ class Mage_XmlConnect_Model_Catalog_Category_Image extends Mage_Catalog_Model_Pr } elseif (file_exists($baseDir . '/watermark/' . $file)) { $filePath = $baseDir . '/watermark/' . $file; } else { - $skinFile = Mage::getDesign()->getSkinFile($file); - if (file_exists($skinFile)) { - $filePath = $skinFile; + $viewFile = Mage::getDesign()->getViewFile($file); + if (file_exists($viewFile)) { + $filePath = $viewFile; } } @@ -182,7 +182,7 @@ class Mage_XmlConnect_Model_Catalog_Category_Image extends Mage_Catalog_Model_Pr public function getUrl() { if ($this->_newFile === true) { - $url = Mage::getDesign()->getSkinUrl( + $url = Mage::getDesign()->getViewFileUrl( 'Mage_XmlConnect::images/catalog/category/placeholder/' . $this->getDestinationSubdir(). '.jpg' ); } else { diff --git a/app/code/core/Mage/XmlConnect/etc/adminhtml/system.xml b/app/code/core/Mage/XmlConnect/etc/adminhtml/system.xml new file mode 100644 index 0000000000000000000000000000000000000000..24894bdbe82166cd4b7c6381ef12b69ea6bf2408 --- /dev/null +++ b/app/code/core/Mage/XmlConnect/etc/adminhtml/system.xml @@ -0,0 +1,45 @@ +<?xml version="1.0"?> +<!-- +/** + * 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 Mage_XmlConnect + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> + <system> + <section id="web"> + <group id="secure"> + <field id="base_url" module="Mage_XmlConnect"> + <backend_model>Mage_XmlConnect_Model_Adminhtml_System_Config_Backend_Baseurl</backend_model> + </field> + </group> + </section> + <section id="currency"> + <group id="options"> + <field id="default" module="Mage_XmlConnect"> + <backend_model>Mage_XmlConnect_Model_Adminhtml_System_Config_Backend_Currency_Default</backend_model> + </field> + </group> + </section> + </system> +</config> diff --git a/app/code/core/Mage/XmlConnect/etc/system.xml b/app/code/core/Mage/XmlConnect/etc/system.xml deleted file mode 100644 index 5958369b9489fa470eee85d9556366dc108a1ec3..0000000000000000000000000000000000000000 --- a/app/code/core/Mage/XmlConnect/etc/system.xml +++ /dev/null @@ -1,53 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * 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 Mage_XmlConnect - * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<config> - <sections> - <web> - <groups> - <secure> - <fields> - <base_url module="Mage_XmlConnect"> - <backend_model>Mage_XmlConnect_Model_Adminhtml_System_Config_Backend_Baseurl</backend_model> - </base_url> - </fields> - </secure> - </groups> - </web> - <currency> - <groups> - <options> - <fields> - <default module="Mage_XmlConnect"> - <backend_model>Mage_XmlConnect_Model_Adminhtml_System_Config_Backend_Currency_Default</backend_model> - </default> - </fields> - </options> - </groups> - </currency> - </sections> -</config> diff --git a/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design.phtml b/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design.phtml index f8de94e6cef8c2ade4e336c5341ac85314c447bc..77ad252b088348a891ca8bd9ebea9c75f90ae377 100644 --- a/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design.phtml +++ b/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design.phtml @@ -37,6 +37,6 @@ </table> <script type="text/javascript"> // <![CDATA[ -jscolor.dir = '<?php echo $this->getSkinUrl('jscolor/') ?>'; +jscolor.dir = '<?php echo $this->getViewFileUrl('jscolor/') ?>'; // ]]> </script> diff --git a/app/design/adminhtml/default/default/skin/default/below_ie7.css b/app/design/adminhtml/default/basic/below_ie7.css similarity index 100% rename from app/design/adminhtml/default/default/skin/default/below_ie7.css rename to app/design/adminhtml/default/basic/below_ie7.css diff --git a/app/design/adminhtml/default/default/skin/default/boxes.css b/app/design/adminhtml/default/basic/boxes.css similarity index 100% rename from app/design/adminhtml/default/default/skin/default/boxes.css rename to app/design/adminhtml/default/basic/boxes.css diff --git a/app/design/adminhtml/default/default/skin/default/custom.css b/app/design/adminhtml/default/basic/custom.css similarity index 100% rename from app/design/adminhtml/default/default/skin/default/custom.css rename to app/design/adminhtml/default/basic/custom.css diff --git a/app/design/adminhtml/default/default/skin/default/ie7.css b/app/design/adminhtml/default/basic/ie7.css similarity index 100% rename from app/design/adminhtml/default/default/skin/default/ie7.css rename to app/design/adminhtml/default/basic/ie7.css diff --git a/app/design/adminhtml/default/default/skin/default/iestyles.css b/app/design/adminhtml/default/basic/iestyles.css similarity index 100% rename from app/design/adminhtml/default/default/skin/default/iestyles.css rename to app/design/adminhtml/default/basic/iestyles.css diff --git a/app/design/adminhtml/default/default/skin/default/images/accordion_close.gif b/app/design/adminhtml/default/basic/images/accordion_close.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/accordion_close.gif rename to app/design/adminhtml/default/basic/images/accordion_close.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/accordion_close.png b/app/design/adminhtml/default/basic/images/accordion_close.png similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/accordion_close.png rename to app/design/adminhtml/default/basic/images/accordion_close.png diff --git a/app/design/adminhtml/default/default/skin/default/images/accordion_open.gif b/app/design/adminhtml/default/basic/images/accordion_open.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/accordion_open.gif rename to app/design/adminhtml/default/basic/images/accordion_open.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/accordion_open.png b/app/design/adminhtml/default/basic/images/accordion_open.png similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/accordion_open.png rename to app/design/adminhtml/default/basic/images/accordion_open.png diff --git a/app/design/adminhtml/default/default/skin/default/images/add_btn_icon-disabled.gif b/app/design/adminhtml/default/basic/images/add_btn_icon-disabled.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/add_btn_icon-disabled.gif rename to app/design/adminhtml/default/basic/images/add_btn_icon-disabled.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/add_btn_icon.gif b/app/design/adminhtml/default/basic/images/add_btn_icon.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/add_btn_icon.gif rename to app/design/adminhtml/default/basic/images/add_btn_icon.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/address_list_li.gif b/app/design/adminhtml/default/basic/images/address_list_li.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/address_list_li.gif rename to app/design/adminhtml/default/basic/images/address_list_li.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/address_list_on_arrow.gif b/app/design/adminhtml/default/basic/images/address_list_on_arrow.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/address_list_on_arrow.gif rename to app/design/adminhtml/default/basic/images/address_list_on_arrow.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/address_list_over_arrow.gif b/app/design/adminhtml/default/basic/images/address_list_over_arrow.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/address_list_over_arrow.gif rename to app/design/adminhtml/default/basic/images/address_list_over_arrow.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/address_list_over_bg.gif b/app/design/adminhtml/default/basic/images/address_list_over_bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/address_list_over_bg.gif rename to app/design/adminhtml/default/basic/images/address_list_over_bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/ajax-loader-tr.gif b/app/design/adminhtml/default/basic/images/ajax-loader-tr.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/ajax-loader-tr.gif rename to app/design/adminhtml/default/basic/images/ajax-loader-tr.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/ajax-loader.gif b/app/design/adminhtml/default/basic/images/ajax-loader.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/ajax-loader.gif rename to app/design/adminhtml/default/basic/images/ajax-loader.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/application_view_tile.gif b/app/design/adminhtml/default/basic/images/application_view_tile.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/application_view_tile.gif rename to app/design/adminhtml/default/basic/images/application_view_tile.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/arrow_sort_move.gif b/app/design/adminhtml/default/basic/images/arrow_sort_move.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/arrow_sort_move.gif rename to app/design/adminhtml/default/basic/images/arrow_sort_move.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/bg_collapse.gif b/app/design/adminhtml/default/basic/images/bg_collapse.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/bg_collapse.gif rename to app/design/adminhtml/default/basic/images/bg_collapse.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/bg_create_order_totals.gif b/app/design/adminhtml/default/basic/images/bg_create_order_totals.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/bg_create_order_totals.gif rename to app/design/adminhtml/default/basic/images/bg_create_order_totals.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/bg_notifications.gif b/app/design/adminhtml/default/basic/images/bg_notifications.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/bg_notifications.gif rename to app/design/adminhtml/default/basic/images/bg_notifications.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/bg_window_mask.png b/app/design/adminhtml/default/basic/images/bg_window_mask.png similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/bg_window_mask.png rename to app/design/adminhtml/default/basic/images/bg_window_mask.png diff --git a/app/design/adminhtml/default/default/skin/default/images/bkg_btn-close.gif b/app/design/adminhtml/default/basic/images/bkg_btn-close.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/bkg_btn-close.gif rename to app/design/adminhtml/default/basic/images/bkg_btn-close.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/bkg_btn-close2.gif b/app/design/adminhtml/default/basic/images/bkg_btn-close2.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/bkg_btn-close2.gif rename to app/design/adminhtml/default/basic/images/bkg_btn-close2.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/blank.gif b/app/design/adminhtml/default/basic/images/blank.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/blank.gif rename to app/design/adminhtml/default/basic/images/blank.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/box_bg.gif b/app/design/adminhtml/default/basic/images/box_bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/box_bg.gif rename to app/design/adminhtml/default/basic/images/box_bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/breadcrumb_bg.gif b/app/design/adminhtml/default/basic/images/breadcrumb_bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/breadcrumb_bg.gif rename to app/design/adminhtml/default/basic/images/breadcrumb_bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/btn_add-image_icon.gif b/app/design/adminhtml/default/basic/images/btn_add-image_icon.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/btn_add-image_icon.gif rename to app/design/adminhtml/default/basic/images/btn_add-image_icon.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/btn_add-variable_icon.gif b/app/design/adminhtml/default/basic/images/btn_add-variable_icon.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/btn_add-variable_icon.gif rename to app/design/adminhtml/default/basic/images/btn_add-variable_icon.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/btn_add-widget_icon.gif b/app/design/adminhtml/default/basic/images/btn_add-widget_icon.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/btn_add-widget_icon.gif rename to app/design/adminhtml/default/basic/images/btn_add-widget_icon.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/btn_add-widget_icon2.gif b/app/design/adminhtml/default/basic/images/btn_add-widget_icon2.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/btn_add-widget_icon2.gif rename to app/design/adminhtml/default/basic/images/btn_add-widget_icon2.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/btn_back_bg.gif b/app/design/adminhtml/default/basic/images/btn_back_bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/btn_back_bg.gif rename to app/design/adminhtml/default/basic/images/btn_back_bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/btn_bare_bg.gif b/app/design/adminhtml/default/basic/images/btn_bare_bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/btn_bare_bg.gif rename to app/design/adminhtml/default/basic/images/btn_bare_bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/btn_bg-disabled.gif b/app/design/adminhtml/default/basic/images/btn_bg-disabled.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/btn_bg-disabled.gif rename to app/design/adminhtml/default/basic/images/btn_bg-disabled.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/btn_bg.png b/app/design/adminhtml/default/basic/images/btn_bg.png similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/btn_bg.png rename to app/design/adminhtml/default/basic/images/btn_bg.png diff --git a/app/design/adminhtml/default/default/skin/default/images/btn_cancel_bg.gif b/app/design/adminhtml/default/basic/images/btn_cancel_bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/btn_cancel_bg.gif rename to app/design/adminhtml/default/basic/images/btn_cancel_bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/btn_delete_bg.gif b/app/design/adminhtml/default/basic/images/btn_delete_bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/btn_delete_bg.gif rename to app/design/adminhtml/default/basic/images/btn_delete_bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/btn_go.gif b/app/design/adminhtml/default/basic/images/btn_go.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/btn_go.gif rename to app/design/adminhtml/default/basic/images/btn_go.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/btn_gr_bg.gif b/app/design/adminhtml/default/basic/images/btn_gr_bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/btn_gr_bg.gif rename to app/design/adminhtml/default/basic/images/btn_gr_bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/btn_gr_on.gif b/app/design/adminhtml/default/basic/images/btn_gr_on.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/btn_gr_on.gif rename to app/design/adminhtml/default/basic/images/btn_gr_on.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/btn_gr_over.gif b/app/design/adminhtml/default/basic/images/btn_gr_over.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/btn_gr_over.gif rename to app/design/adminhtml/default/basic/images/btn_gr_over.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/btn_loading-icon.gif b/app/design/adminhtml/default/basic/images/btn_loading-icon.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/btn_loading-icon.gif rename to app/design/adminhtml/default/basic/images/btn_loading-icon.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/btn_login.gif b/app/design/adminhtml/default/basic/images/btn_login.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/btn_login.gif rename to app/design/adminhtml/default/basic/images/btn_login.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/btn_show-hide_icon.gif b/app/design/adminhtml/default/basic/images/btn_show-hide_icon.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/btn_show-hide_icon.gif rename to app/design/adminhtml/default/basic/images/btn_show-hide_icon.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/btn_task_bg.gif b/app/design/adminhtml/default/basic/images/btn_task_bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/btn_task_bg.gif rename to app/design/adminhtml/default/basic/images/btn_task_bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/button-close.png b/app/design/adminhtml/default/basic/images/button-close.png similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/button-close.png rename to app/design/adminhtml/default/basic/images/button-close.png diff --git a/app/design/adminhtml/default/default/skin/default/images/cancel_btn_active_bg.gif b/app/design/adminhtml/default/basic/images/cancel_btn_active_bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/cancel_btn_active_bg.gif rename to app/design/adminhtml/default/basic/images/cancel_btn_active_bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/cancel_btn_bg.gif b/app/design/adminhtml/default/basic/images/cancel_btn_bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/cancel_btn_bg.gif rename to app/design/adminhtml/default/basic/images/cancel_btn_bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/cancel_btn_icon.gif b/app/design/adminhtml/default/basic/images/cancel_btn_icon.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/cancel_btn_icon.gif rename to app/design/adminhtml/default/basic/images/cancel_btn_icon.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/cancel_btn_over_bg.gif b/app/design/adminhtml/default/basic/images/cancel_btn_over_bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/cancel_btn_over_bg.gif rename to app/design/adminhtml/default/basic/images/cancel_btn_over_bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/cancel_icon.gif b/app/design/adminhtml/default/basic/images/cancel_icon.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/cancel_icon.gif rename to app/design/adminhtml/default/basic/images/cancel_icon.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/config_tab_dt_bg.gif b/app/design/adminhtml/default/basic/images/config_tab_dt_bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/config_tab_dt_bg.gif rename to app/design/adminhtml/default/basic/images/config_tab_dt_bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/dashboard-close.gif b/app/design/adminhtml/default/basic/images/dashboard-close.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/dashboard-close.gif rename to app/design/adminhtml/default/basic/images/dashboard-close.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/db-graph-bg.gif b/app/design/adminhtml/default/basic/images/db-graph-bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/db-graph-bg.gif rename to app/design/adminhtml/default/basic/images/db-graph-bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/db-graph-bottom-bg.gif b/app/design/adminhtml/default/basic/images/db-graph-bottom-bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/db-graph-bottom-bg.gif rename to app/design/adminhtml/default/basic/images/db-graph-bottom-bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/db-graph-line-bg.gif b/app/design/adminhtml/default/basic/images/db-graph-line-bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/db-graph-line-bg.gif rename to app/design/adminhtml/default/basic/images/db-graph-line-bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/db-graph-line2-bg.gif b/app/design/adminhtml/default/basic/images/db-graph-line2-bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/db-graph-line2-bg.gif rename to app/design/adminhtml/default/basic/images/db-graph-line2-bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/db-graph-x-bg.png b/app/design/adminhtml/default/basic/images/db-graph-x-bg.png similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/db-graph-x-bg.png rename to app/design/adminhtml/default/basic/images/db-graph-x-bg.png diff --git a/app/design/adminhtml/default/default/skin/default/images/db-header-bg.png b/app/design/adminhtml/default/basic/images/db-header-bg.png similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/db-header-bg.png rename to app/design/adminhtml/default/basic/images/db-header-bg.png diff --git a/app/design/adminhtml/default/default/skin/default/images/db-menu-bg-hov.gif b/app/design/adminhtml/default/basic/images/db-menu-bg-hov.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/db-menu-bg-hov.gif rename to app/design/adminhtml/default/basic/images/db-menu-bg-hov.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/db-menu-bg-up.gif b/app/design/adminhtml/default/basic/images/db-menu-bg-up.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/db-menu-bg-up.gif rename to app/design/adminhtml/default/basic/images/db-menu-bg-up.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/db-menu-bg.gif b/app/design/adminhtml/default/basic/images/db-menu-bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/db-menu-bg.gif rename to app/design/adminhtml/default/basic/images/db-menu-bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/db-menu-sep-last.gif b/app/design/adminhtml/default/basic/images/db-menu-sep-last.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/db-menu-sep-last.gif rename to app/design/adminhtml/default/basic/images/db-menu-sep-last.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/db-menu-sep.gif b/app/design/adminhtml/default/basic/images/db-menu-sep.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/db-menu-sep.gif rename to app/design/adminhtml/default/basic/images/db-menu-sep.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/db-menu-start.gif b/app/design/adminhtml/default/basic/images/db-menu-start.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/db-menu-start.gif rename to app/design/adminhtml/default/basic/images/db-menu-start.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/db-scroll-bg.gif b/app/design/adminhtml/default/basic/images/db-scroll-bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/db-scroll-bg.gif rename to app/design/adminhtml/default/basic/images/db-scroll-bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/db-scroll-but-bot-roll.png b/app/design/adminhtml/default/basic/images/db-scroll-but-bot-roll.png similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/db-scroll-but-bot-roll.png rename to app/design/adminhtml/default/basic/images/db-scroll-but-bot-roll.png diff --git a/app/design/adminhtml/default/default/skin/default/images/db-scroll-but-bot.png b/app/design/adminhtml/default/basic/images/db-scroll-but-bot.png similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/db-scroll-but-bot.png rename to app/design/adminhtml/default/basic/images/db-scroll-but-bot.png diff --git a/app/design/adminhtml/default/default/skin/default/images/db-scroll-but-top-roll.png b/app/design/adminhtml/default/basic/images/db-scroll-but-top-roll.png similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/db-scroll-but-top-roll.png rename to app/design/adminhtml/default/basic/images/db-scroll-but-top-roll.png diff --git a/app/design/adminhtml/default/default/skin/default/images/db-scroll-but-top.png b/app/design/adminhtml/default/basic/images/db-scroll-but-top.png similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/db-scroll-but-top.png rename to app/design/adminhtml/default/basic/images/db-scroll-but-top.png diff --git a/app/design/adminhtml/default/default/skin/default/images/db-scroll-roller.png b/app/design/adminhtml/default/basic/images/db-scroll-roller.png similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/db-scroll-roller.png rename to app/design/adminhtml/default/basic/images/db-scroll-roller.png diff --git a/app/design/adminhtml/default/default/skin/default/images/db-tab-bottom-left-bg.gif b/app/design/adminhtml/default/basic/images/db-tab-bottom-left-bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/db-tab-bottom-left-bg.gif rename to app/design/adminhtml/default/basic/images/db-tab-bottom-left-bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/db-tab-bottom-mid-bg.gif b/app/design/adminhtml/default/basic/images/db-tab-bottom-mid-bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/db-tab-bottom-mid-bg.gif rename to app/design/adminhtml/default/basic/images/db-tab-bottom-mid-bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/db-tab-bottom-right-bg.gif b/app/design/adminhtml/default/basic/images/db-tab-bottom-right-bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/db-tab-bottom-right-bg.gif rename to app/design/adminhtml/default/basic/images/db-tab-bottom-right-bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/db-tab-footer.gif b/app/design/adminhtml/default/basic/images/db-tab-footer.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/db-tab-footer.gif rename to app/design/adminhtml/default/basic/images/db-tab-footer.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/db-tab-header-sep.gif b/app/design/adminhtml/default/basic/images/db-tab-header-sep.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/db-tab-header-sep.gif rename to app/design/adminhtml/default/basic/images/db-tab-header-sep.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/db-tab-header.gif b/app/design/adminhtml/default/basic/images/db-tab-header.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/db-tab-header.gif rename to app/design/adminhtml/default/basic/images/db-tab-header.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/db-tab-left.gif b/app/design/adminhtml/default/basic/images/db-tab-left.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/db-tab-left.gif rename to app/design/adminhtml/default/basic/images/db-tab-left.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/db-tab-right.gif b/app/design/adminhtml/default/basic/images/db-tab-right.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/db-tab-right.gif rename to app/design/adminhtml/default/basic/images/db-tab-right.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/dotted_divider_dark.gif b/app/design/adminhtml/default/basic/images/dotted_divider_dark.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/dotted_divider_dark.gif rename to app/design/adminhtml/default/basic/images/dotted_divider_dark.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/dotted_divider_light.gif b/app/design/adminhtml/default/basic/images/dotted_divider_light.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/dotted_divider_light.gif rename to app/design/adminhtml/default/basic/images/dotted_divider_light.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/edit_icon.gif b/app/design/adminhtml/default/basic/images/edit_icon.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/edit_icon.gif rename to app/design/adminhtml/default/basic/images/edit_icon.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/entry_edit_head_arrow_down.gif b/app/design/adminhtml/default/basic/images/entry_edit_head_arrow_down.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/entry_edit_head_arrow_down.gif rename to app/design/adminhtml/default/basic/images/entry_edit_head_arrow_down.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/entry_edit_head_arrow_down2.gif b/app/design/adminhtml/default/basic/images/entry_edit_head_arrow_down2.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/entry_edit_head_arrow_down2.gif rename to app/design/adminhtml/default/basic/images/entry_edit_head_arrow_down2.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/entry_edit_head_arrow_up.gif b/app/design/adminhtml/default/basic/images/entry_edit_head_arrow_up.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/entry_edit_head_arrow_up.gif rename to app/design/adminhtml/default/basic/images/entry_edit_head_arrow_up.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/entry_edit_head_bg.gif b/app/design/adminhtml/default/basic/images/entry_edit_head_bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/entry_edit_head_bg.gif rename to app/design/adminhtml/default/basic/images/entry_edit_head_bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/error-msg.png b/app/design/adminhtml/default/basic/images/error-msg.png similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/error-msg.png rename to app/design/adminhtml/default/basic/images/error-msg.png diff --git a/app/design/adminhtml/default/default/skin/default/images/fam_account.gif b/app/design/adminhtml/default/basic/images/fam_account.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/fam_account.gif rename to app/design/adminhtml/default/basic/images/fam_account.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/fam_application_form_delete.png b/app/design/adminhtml/default/basic/images/fam_application_form_delete.png similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/fam_application_form_delete.png rename to app/design/adminhtml/default/basic/images/fam_application_form_delete.png diff --git a/app/design/adminhtml/default/default/skin/default/images/fam_application_view_tile.gif b/app/design/adminhtml/default/basic/images/fam_application_view_tile.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/fam_application_view_tile.gif rename to app/design/adminhtml/default/basic/images/fam_application_view_tile.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/fam_asterisk_orange.gif b/app/design/adminhtml/default/basic/images/fam_asterisk_orange.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/fam_asterisk_orange.gif rename to app/design/adminhtml/default/basic/images/fam_asterisk_orange.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/fam_bin.gif b/app/design/adminhtml/default/basic/images/fam_bin.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/fam_bin.gif rename to app/design/adminhtml/default/basic/images/fam_bin.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/fam_bullet_disk.gif b/app/design/adminhtml/default/basic/images/fam_bullet_disk.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/fam_bullet_disk.gif rename to app/design/adminhtml/default/basic/images/fam_bullet_disk.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/fam_calendar.gif b/app/design/adminhtml/default/basic/images/fam_calendar.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/fam_calendar.gif rename to app/design/adminhtml/default/basic/images/fam_calendar.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/fam_cart.gif b/app/design/adminhtml/default/basic/images/fam_cart.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/fam_cart.gif rename to app/design/adminhtml/default/basic/images/fam_cart.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/fam_comment.gif b/app/design/adminhtml/default/basic/images/fam_comment.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/fam_comment.gif rename to app/design/adminhtml/default/basic/images/fam_comment.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/fam_creditcards.gif b/app/design/adminhtml/default/basic/images/fam_creditcards.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/fam_creditcards.gif rename to app/design/adminhtml/default/basic/images/fam_creditcards.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/fam_folder_database.gif b/app/design/adminhtml/default/basic/images/fam_folder_database.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/fam_folder_database.gif rename to app/design/adminhtml/default/basic/images/fam_folder_database.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/fam_folder_palette.gif b/app/design/adminhtml/default/basic/images/fam_folder_palette.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/fam_folder_palette.gif rename to app/design/adminhtml/default/basic/images/fam_folder_palette.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/fam_folder_table.gif b/app/design/adminhtml/default/basic/images/fam_folder_table.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/fam_folder_table.gif rename to app/design/adminhtml/default/basic/images/fam_folder_table.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/fam_group.gif b/app/design/adminhtml/default/basic/images/fam_group.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/fam_group.gif rename to app/design/adminhtml/default/basic/images/fam_group.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/fam_help.gif b/app/design/adminhtml/default/basic/images/fam_help.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/fam_help.gif rename to app/design/adminhtml/default/basic/images/fam_help.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/fam_house.gif b/app/design/adminhtml/default/basic/images/fam_house.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/fam_house.gif rename to app/design/adminhtml/default/basic/images/fam_house.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/fam_layout.gif b/app/design/adminhtml/default/basic/images/fam_layout.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/fam_layout.gif rename to app/design/adminhtml/default/basic/images/fam_layout.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/fam_leaf.png b/app/design/adminhtml/default/basic/images/fam_leaf.png similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/fam_leaf.png rename to app/design/adminhtml/default/basic/images/fam_leaf.png diff --git a/app/design/adminhtml/default/default/skin/default/images/fam_link.gif b/app/design/adminhtml/default/basic/images/fam_link.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/fam_link.gif rename to app/design/adminhtml/default/basic/images/fam_link.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/fam_lorry.gif b/app/design/adminhtml/default/basic/images/fam_lorry.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/fam_lorry.gif rename to app/design/adminhtml/default/basic/images/fam_lorry.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/fam_money.gif b/app/design/adminhtml/default/basic/images/fam_money.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/fam_money.gif rename to app/design/adminhtml/default/basic/images/fam_money.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/fam_money_add.gif b/app/design/adminhtml/default/basic/images/fam_money_add.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/fam_money_add.gif rename to app/design/adminhtml/default/basic/images/fam_money_add.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/fam_monitor.gif b/app/design/adminhtml/default/basic/images/fam_monitor.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/fam_monitor.gif rename to app/design/adminhtml/default/basic/images/fam_monitor.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/fam_newspaper.gif b/app/design/adminhtml/default/basic/images/fam_newspaper.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/fam_newspaper.gif rename to app/design/adminhtml/default/basic/images/fam_newspaper.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/fam_newspaper_delete.gif b/app/design/adminhtml/default/basic/images/fam_newspaper_delete.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/fam_newspaper_delete.gif rename to app/design/adminhtml/default/basic/images/fam_newspaper_delete.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/fam_newspaper_error.gif b/app/design/adminhtml/default/basic/images/fam_newspaper_error.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/fam_newspaper_error.gif rename to app/design/adminhtml/default/basic/images/fam_newspaper_error.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/fam_newspaper_go.gif b/app/design/adminhtml/default/basic/images/fam_newspaper_go.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/fam_newspaper_go.gif rename to app/design/adminhtml/default/basic/images/fam_newspaper_go.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/fam_package.gif b/app/design/adminhtml/default/basic/images/fam_package.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/fam_package.gif rename to app/design/adminhtml/default/basic/images/fam_package.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/fam_package_go.gif b/app/design/adminhtml/default/basic/images/fam_package_go.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/fam_package_go.gif rename to app/design/adminhtml/default/basic/images/fam_package_go.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/fam_page_white.gif b/app/design/adminhtml/default/basic/images/fam_page_white.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/fam_page_white.gif rename to app/design/adminhtml/default/basic/images/fam_page_white.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/fam_page_white_edit.gif b/app/design/adminhtml/default/basic/images/fam_page_white_edit.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/fam_page_white_edit.gif rename to app/design/adminhtml/default/basic/images/fam_page_white_edit.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/fam_rainbow.gif b/app/design/adminhtml/default/basic/images/fam_rainbow.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/fam_rainbow.gif rename to app/design/adminhtml/default/basic/images/fam_rainbow.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/fam_refresh.gif b/app/design/adminhtml/default/basic/images/fam_refresh.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/fam_refresh.gif rename to app/design/adminhtml/default/basic/images/fam_refresh.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/fam_server_database.gif b/app/design/adminhtml/default/basic/images/fam_server_database.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/fam_server_database.gif rename to app/design/adminhtml/default/basic/images/fam_server_database.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/fam_status_online.gif b/app/design/adminhtml/default/basic/images/fam_status_online.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/fam_status_online.gif rename to app/design/adminhtml/default/basic/images/fam_status_online.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/fam_tag_orange.gif b/app/design/adminhtml/default/basic/images/fam_tag_orange.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/fam_tag_orange.gif rename to app/design/adminhtml/default/basic/images/fam_tag_orange.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/fam_user.gif b/app/design/adminhtml/default/basic/images/fam_user.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/fam_user.gif rename to app/design/adminhtml/default/basic/images/fam_user.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/fam_user_comment.gif b/app/design/adminhtml/default/basic/images/fam_user_comment.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/fam_user_comment.gif rename to app/design/adminhtml/default/basic/images/fam_user_comment.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/fam_user_edit.gif b/app/design/adminhtml/default/basic/images/fam_user_edit.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/fam_user_edit.gif rename to app/design/adminhtml/default/basic/images/fam_user_edit.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/filter_row_bg.gif b/app/design/adminhtml/default/basic/images/filter_row_bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/filter_row_bg.gif rename to app/design/adminhtml/default/basic/images/filter_row_bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/footer_bg.gif b/app/design/adminhtml/default/basic/images/footer_bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/footer_bg.gif rename to app/design/adminhtml/default/basic/images/footer_bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/gift-message-collapse.gif b/app/design/adminhtml/default/basic/images/gift-message-collapse.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/gift-message-collapse.gif rename to app/design/adminhtml/default/basic/images/gift-message-collapse.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/gift-message-expand.gif b/app/design/adminhtml/default/basic/images/gift-message-expand.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/gift-message-expand.gif rename to app/design/adminhtml/default/basic/images/gift-message-expand.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/gift-message-grid-column-bg.gif b/app/design/adminhtml/default/basic/images/gift-message-grid-column-bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/gift-message-grid-column-bg.gif rename to app/design/adminhtml/default/basic/images/gift-message-grid-column-bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/grid-cal.gif b/app/design/adminhtml/default/basic/images/grid-cal.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/grid-cal.gif rename to app/design/adminhtml/default/basic/images/grid-cal.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/grid_sort_asc.gif b/app/design/adminhtml/default/basic/images/grid_sort_asc.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/grid_sort_asc.gif rename to app/design/adminhtml/default/basic/images/grid_sort_asc.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/grid_sort_desc.gif b/app/design/adminhtml/default/basic/images/grid_sort_desc.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/grid_sort_desc.gif rename to app/design/adminhtml/default/basic/images/grid_sort_desc.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/grid_th_bg.gif b/app/design/adminhtml/default/basic/images/grid_th_bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/grid_th_bg.gif rename to app/design/adminhtml/default/basic/images/grid_th_bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/grid_th_onclick_bg.gif b/app/design/adminhtml/default/basic/images/grid_th_onclick_bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/grid_th_onclick_bg.gif rename to app/design/adminhtml/default/basic/images/grid_th_onclick_bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/grouped_to_order_icon.png b/app/design/adminhtml/default/basic/images/grouped_to_order_icon.png similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/grouped_to_order_icon.png rename to app/design/adminhtml/default/basic/images/grouped_to_order_icon.png diff --git a/app/design/adminhtml/default/default/skin/default/images/header_bg.gif b/app/design/adminhtml/default/basic/images/header_bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/header_bg.gif rename to app/design/adminhtml/default/basic/images/header_bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/header_top_bg.gif b/app/design/adminhtml/default/basic/images/header_top_bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/header_top_bg.gif rename to app/design/adminhtml/default/basic/images/header_top_bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/horiz_tabs_ul_bg.gif b/app/design/adminhtml/default/basic/images/horiz_tabs_ul_bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/horiz_tabs_ul_bg.gif rename to app/design/adminhtml/default/basic/images/horiz_tabs_ul_bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/i_notice.gif b/app/design/adminhtml/default/basic/images/i_notice.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/i_notice.gif rename to app/design/adminhtml/default/basic/images/i_notice.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/i_question-mark.png b/app/design/adminhtml/default/basic/images/i_question-mark.png similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/i_question-mark.png rename to app/design/adminhtml/default/basic/images/i_question-mark.png diff --git a/app/design/adminhtml/default/default/skin/default/images/ico_success.gif b/app/design/adminhtml/default/basic/images/ico_success.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/ico_success.gif rename to app/design/adminhtml/default/basic/images/ico_success.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/icon-tooltip.png b/app/design/adminhtml/default/basic/images/icon-tooltip.png similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/icon-tooltip.png rename to app/design/adminhtml/default/basic/images/icon-tooltip.png diff --git a/app/design/adminhtml/default/default/skin/default/images/icon_btn_add.gif b/app/design/adminhtml/default/basic/images/icon_btn_add.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/icon_btn_add.gif rename to app/design/adminhtml/default/basic/images/icon_btn_add.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/icon_btn_back.gif b/app/design/adminhtml/default/basic/images/icon_btn_back.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/icon_btn_back.gif rename to app/design/adminhtml/default/basic/images/icon_btn_back.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/icon_btn_delete.gif b/app/design/adminhtml/default/basic/images/icon_btn_delete.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/icon_btn_delete.gif rename to app/design/adminhtml/default/basic/images/icon_btn_delete.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/icon_btn_save.gif b/app/design/adminhtml/default/basic/images/icon_btn_save.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/icon_btn_save.gif rename to app/design/adminhtml/default/basic/images/icon_btn_save.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/icon_edit_address.gif b/app/design/adminhtml/default/basic/images/icon_edit_address.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/icon_edit_address.gif rename to app/design/adminhtml/default/basic/images/icon_edit_address.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/icon_export.gif b/app/design/adminhtml/default/basic/images/icon_export.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/icon_export.gif rename to app/design/adminhtml/default/basic/images/icon_export.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/icon_export.png b/app/design/adminhtml/default/basic/images/icon_export.png similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/icon_export.png rename to app/design/adminhtml/default/basic/images/icon_export.png diff --git a/app/design/adminhtml/default/default/skin/default/images/icon_feed.gif b/app/design/adminhtml/default/basic/images/icon_feed.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/icon_feed.gif rename to app/design/adminhtml/default/basic/images/icon_feed.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/icon_feed.png b/app/design/adminhtml/default/basic/images/icon_feed.png similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/icon_feed.png rename to app/design/adminhtml/default/basic/images/icon_feed.png diff --git a/app/design/adminhtml/default/default/skin/default/images/icon_note_list.gif b/app/design/adminhtml/default/basic/images/icon_note_list.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/icon_note_list.gif rename to app/design/adminhtml/default/basic/images/icon_note_list.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/icon_remove_address.gif b/app/design/adminhtml/default/basic/images/icon_remove_address.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/icon_remove_address.gif rename to app/design/adminhtml/default/basic/images/icon_remove_address.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/login_box_bg.gif b/app/design/adminhtml/default/basic/images/login_box_bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/login_box_bg.gif rename to app/design/adminhtml/default/basic/images/login_box_bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/login_box_bg.jpg b/app/design/adminhtml/default/basic/images/login_box_bg.jpg similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/login_box_bg.jpg rename to app/design/adminhtml/default/basic/images/login_box_bg.jpg diff --git a/app/design/adminhtml/default/default/skin/default/images/login_box_bg_auth.jpg b/app/design/adminhtml/default/basic/images/login_box_bg_auth.jpg similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/login_box_bg_auth.jpg rename to app/design/adminhtml/default/basic/images/login_box_bg_auth.jpg diff --git a/app/design/adminhtml/default/default/skin/default/images/login_box_bottom.jpg b/app/design/adminhtml/default/basic/images/login_box_bottom.jpg similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/login_box_bottom.jpg rename to app/design/adminhtml/default/basic/images/login_box_bottom.jpg diff --git a/app/design/adminhtml/default/default/skin/default/images/login_box_legal_bg.gif b/app/design/adminhtml/default/basic/images/login_box_legal_bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/login_box_legal_bg.gif rename to app/design/adminhtml/default/basic/images/login_box_legal_bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/login_logo.gif b/app/design/adminhtml/default/basic/images/login_logo.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/login_logo.gif rename to app/design/adminhtml/default/basic/images/login_logo.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/logo-large.gif b/app/design/adminhtml/default/basic/images/logo-large.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/logo-large.gif rename to app/design/adminhtml/default/basic/images/logo-large.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/logo.gif b/app/design/adminhtml/default/basic/images/logo.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/logo.gif rename to app/design/adminhtml/default/basic/images/logo.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/massaction_bg.gif b/app/design/adminhtml/default/basic/images/massaction_bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/massaction_bg.gif rename to app/design/adminhtml/default/basic/images/massaction_bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/massaction_button_bg.gif b/app/design/adminhtml/default/basic/images/massaction_button_bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/massaction_button_bg.gif rename to app/design/adminhtml/default/basic/images/massaction_button_bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/massaction_links_delimiter.gif b/app/design/adminhtml/default/basic/images/massaction_links_delimiter.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/massaction_links_delimiter.gif rename to app/design/adminhtml/default/basic/images/massaction_links_delimiter.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/middle_bg.gif b/app/design/adminhtml/default/basic/images/middle_bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/middle_bg.gif rename to app/design/adminhtml/default/basic/images/middle_bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/more_arrow.gif b/app/design/adminhtml/default/basic/images/more_arrow.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/more_arrow.gif rename to app/design/adminhtml/default/basic/images/more_arrow.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/nav1_active.gif b/app/design/adminhtml/default/basic/images/nav1_active.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/nav1_active.gif rename to app/design/adminhtml/default/basic/images/nav1_active.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/nav1_bg.gif b/app/design/adminhtml/default/basic/images/nav1_bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/nav1_bg.gif rename to app/design/adminhtml/default/basic/images/nav1_bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/nav1_off.gif b/app/design/adminhtml/default/basic/images/nav1_off.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/nav1_off.gif rename to app/design/adminhtml/default/basic/images/nav1_off.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/nav1_on.gif b/app/design/adminhtml/default/basic/images/nav1_on.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/nav1_on.gif rename to app/design/adminhtml/default/basic/images/nav1_on.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/nav1_over.gif b/app/design/adminhtml/default/basic/images/nav1_over.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/nav1_over.gif rename to app/design/adminhtml/default/basic/images/nav1_over.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/nav1_sep.gif b/app/design/adminhtml/default/basic/images/nav1_sep.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/nav1_sep.gif rename to app/design/adminhtml/default/basic/images/nav1_sep.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/nav2_last_li_bg.png b/app/design/adminhtml/default/basic/images/nav2_last_li_bg.png similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/nav2_last_li_bg.png rename to app/design/adminhtml/default/basic/images/nav2_last_li_bg.png diff --git a/app/design/adminhtml/default/default/skin/default/images/nav2_last_li_over_bg.png b/app/design/adminhtml/default/basic/images/nav2_last_li_over_bg.png similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/nav2_last_li_over_bg.png rename to app/design/adminhtml/default/basic/images/nav2_last_li_over_bg.png diff --git a/app/design/adminhtml/default/default/skin/default/images/nav2_li_bg.gif b/app/design/adminhtml/default/basic/images/nav2_li_bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/nav2_li_bg.gif rename to app/design/adminhtml/default/basic/images/nav2_li_bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/nav2_li_bg.png b/app/design/adminhtml/default/basic/images/nav2_li_bg.png similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/nav2_li_bg.png rename to app/design/adminhtml/default/basic/images/nav2_li_bg.png diff --git a/app/design/adminhtml/default/default/skin/default/images/nav2_li_over_bg.png b/app/design/adminhtml/default/basic/images/nav2_li_over_bg.png similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/nav2_li_over_bg.png rename to app/design/adminhtml/default/basic/images/nav2_li_over_bg.png diff --git a/app/design/adminhtml/default/default/skin/default/images/nav2_link_bg.gif b/app/design/adminhtml/default/basic/images/nav2_link_bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/nav2_link_bg.gif rename to app/design/adminhtml/default/basic/images/nav2_link_bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/nav2_parent_arrow.gif b/app/design/adminhtml/default/basic/images/nav2_parent_arrow.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/nav2_parent_arrow.gif rename to app/design/adminhtml/default/basic/images/nav2_parent_arrow.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/nav3_bg.png b/app/design/adminhtml/default/basic/images/nav3_bg.png similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/nav3_bg.png rename to app/design/adminhtml/default/basic/images/nav3_bg.png diff --git a/app/design/adminhtml/default/default/skin/default/images/nav_bg.gif b/app/design/adminhtml/default/basic/images/nav_bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/nav_bg.gif rename to app/design/adminhtml/default/basic/images/nav_bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/nav_list_bg.gif b/app/design/adminhtml/default/basic/images/nav_list_bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/nav_list_bg.gif rename to app/design/adminhtml/default/basic/images/nav_list_bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/nav_nest_link_bg.gif b/app/design/adminhtml/default/basic/images/nav_nest_link_bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/nav_nest_link_bg.gif rename to app/design/adminhtml/default/basic/images/nav_nest_link_bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/nav_nest_link_over_bg.gif b/app/design/adminhtml/default/basic/images/nav_nest_link_over_bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/nav_nest_link_over_bg.gif rename to app/design/adminhtml/default/basic/images/nav_nest_link_over_bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/nav_on_bg.gif b/app/design/adminhtml/default/basic/images/nav_on_bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/nav_on_bg.gif rename to app/design/adminhtml/default/basic/images/nav_on_bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/nav_parent_arrow.gif b/app/design/adminhtml/default/basic/images/nav_parent_arrow.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/nav_parent_arrow.gif rename to app/design/adminhtml/default/basic/images/nav_parent_arrow.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/note_bg.gif b/app/design/adminhtml/default/basic/images/note_bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/note_bg.gif rename to app/design/adminhtml/default/basic/images/note_bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/note_cell_bg.gif b/app/design/adminhtml/default/basic/images/note_cell_bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/note_cell_bg.gif rename to app/design/adminhtml/default/basic/images/note_cell_bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/notice-msg.png b/app/design/adminhtml/default/basic/images/notice-msg.png similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/notice-msg.png rename to app/design/adminhtml/default/basic/images/notice-msg.png diff --git a/app/design/adminhtml/default/default/skin/default/images/pager_arrow_left.gif b/app/design/adminhtml/default/basic/images/pager_arrow_left.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/pager_arrow_left.gif rename to app/design/adminhtml/default/basic/images/pager_arrow_left.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/pager_arrow_left_off.gif b/app/design/adminhtml/default/basic/images/pager_arrow_left_off.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/pager_arrow_left_off.gif rename to app/design/adminhtml/default/basic/images/pager_arrow_left_off.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/pager_arrow_right.gif b/app/design/adminhtml/default/basic/images/pager_arrow_right.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/pager_arrow_right.gif rename to app/design/adminhtml/default/basic/images/pager_arrow_right.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/pager_arrow_right_off.gif b/app/design/adminhtml/default/basic/images/pager_arrow_right_off.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/pager_arrow_right_off.gif rename to app/design/adminhtml/default/basic/images/pager_arrow_right_off.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/process_spinner.gif b/app/design/adminhtml/default/basic/images/process_spinner.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/process_spinner.gif rename to app/design/adminhtml/default/basic/images/process_spinner.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/product_rating_blank_star.gif b/app/design/adminhtml/default/basic/images/product_rating_blank_star.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/product_rating_blank_star.gif rename to app/design/adminhtml/default/basic/images/product_rating_blank_star.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/product_rating_full_star.gif b/app/design/adminhtml/default/basic/images/product_rating_full_star.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/product_rating_full_star.gif rename to app/design/adminhtml/default/basic/images/product_rating_full_star.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/rule-ajax-loader.gif b/app/design/adminhtml/default/basic/images/rule-ajax-loader.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/rule-ajax-loader.gif rename to app/design/adminhtml/default/basic/images/rule-ajax-loader.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/rule_chooser_trigger.gif b/app/design/adminhtml/default/basic/images/rule_chooser_trigger.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/rule_chooser_trigger.gif rename to app/design/adminhtml/default/basic/images/rule_chooser_trigger.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/rule_component_add.gif b/app/design/adminhtml/default/basic/images/rule_component_add.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/rule_component_add.gif rename to app/design/adminhtml/default/basic/images/rule_component_add.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/rule_component_apply.gif b/app/design/adminhtml/default/basic/images/rule_component_apply.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/rule_component_apply.gif rename to app/design/adminhtml/default/basic/images/rule_component_apply.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/rule_component_remove.gif b/app/design/adminhtml/default/basic/images/rule_component_remove.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/rule_component_remove.gif rename to app/design/adminhtml/default/basic/images/rule_component_remove.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/save_btn_icon.gif b/app/design/adminhtml/default/basic/images/save_btn_icon.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/save_btn_icon.gif rename to app/design/adminhtml/default/basic/images/save_btn_icon.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/sec_nav_bg.gif b/app/design/adminhtml/default/basic/images/sec_nav_bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/sec_nav_bg.gif rename to app/design/adminhtml/default/basic/images/sec_nav_bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/section_menu_bg.gif b/app/design/adminhtml/default/basic/images/section_menu_bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/section_menu_bg.gif rename to app/design/adminhtml/default/basic/images/section_menu_bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/section_menu_bottom.gif b/app/design/adminhtml/default/basic/images/section_menu_bottom.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/section_menu_bottom.gif rename to app/design/adminhtml/default/basic/images/section_menu_bottom.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/section_menu_link_bg.gif b/app/design/adminhtml/default/basic/images/section_menu_link_bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/section_menu_link_bg.gif rename to app/design/adminhtml/default/basic/images/section_menu_link_bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/section_menu_link_over_bg.gif b/app/design/adminhtml/default/basic/images/section_menu_link_over_bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/section_menu_link_over_bg.gif rename to app/design/adminhtml/default/basic/images/section_menu_link_over_bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/section_menu_over_span_bg.gif b/app/design/adminhtml/default/basic/images/section_menu_over_span_bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/section_menu_over_span_bg.gif rename to app/design/adminhtml/default/basic/images/section_menu_over_span_bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/section_menu_span_bg.gif b/app/design/adminhtml/default/basic/images/section_menu_span_bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/section_menu_span_bg.gif rename to app/design/adminhtml/default/basic/images/section_menu_span_bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/section_menu_ul_bg.gif b/app/design/adminhtml/default/basic/images/section_menu_ul_bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/section_menu_ul_bg.gif rename to app/design/adminhtml/default/basic/images/section_menu_ul_bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/side_col_bg.gif b/app/design/adminhtml/default/basic/images/side_col_bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/side_col_bg.gif rename to app/design/adminhtml/default/basic/images/side_col_bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/simple_container_bg.gif b/app/design/adminhtml/default/basic/images/simple_container_bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/simple_container_bg.gif rename to app/design/adminhtml/default/basic/images/simple_container_bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/sort-arrow-down.gif b/app/design/adminhtml/default/basic/images/sort-arrow-down.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/sort-arrow-down.gif rename to app/design/adminhtml/default/basic/images/sort-arrow-down.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/sort-arrow-down.png b/app/design/adminhtml/default/basic/images/sort-arrow-down.png similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/sort-arrow-down.png rename to app/design/adminhtml/default/basic/images/sort-arrow-down.png diff --git a/app/design/adminhtml/default/default/skin/default/images/sort-arrow-up.gif b/app/design/adminhtml/default/basic/images/sort-arrow-up.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/sort-arrow-up.gif rename to app/design/adminhtml/default/basic/images/sort-arrow-up.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/sort-arrow-up.png b/app/design/adminhtml/default/basic/images/sort-arrow-up.png similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/sort-arrow-up.png rename to app/design/adminhtml/default/basic/images/sort-arrow-up.png diff --git a/app/design/adminhtml/default/default/skin/default/images/sort_heading_bg.gif b/app/design/adminhtml/default/basic/images/sort_heading_bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/sort_heading_bg.gif rename to app/design/adminhtml/default/basic/images/sort_heading_bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/sort_on_bg.gif b/app/design/adminhtml/default/basic/images/sort_on_bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/sort_on_bg.gif rename to app/design/adminhtml/default/basic/images/sort_on_bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/sort_row_bg.gif b/app/design/adminhtml/default/basic/images/sort_row_bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/sort_row_bg.gif rename to app/design/adminhtml/default/basic/images/sort_row_bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/spacer.gif b/app/design/adminhtml/default/basic/images/spacer.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/spacer.gif rename to app/design/adminhtml/default/basic/images/spacer.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/sub_button_bg.gif b/app/design/adminhtml/default/basic/images/sub_button_bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/sub_button_bg.gif rename to app/design/adminhtml/default/basic/images/sub_button_bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/success-msg.png b/app/design/adminhtml/default/basic/images/success-msg.png similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/success-msg.png rename to app/design/adminhtml/default/basic/images/success-msg.png diff --git a/app/design/adminhtml/default/default/skin/default/images/tabs_link_bg.gif b/app/design/adminhtml/default/basic/images/tabs_link_bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/tabs_link_bg.gif rename to app/design/adminhtml/default/basic/images/tabs_link_bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/tabs_link_over_bg.gif b/app/design/adminhtml/default/basic/images/tabs_link_over_bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/tabs_link_over_bg.gif rename to app/design/adminhtml/default/basic/images/tabs_link_over_bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/tabs_span_bg.gif b/app/design/adminhtml/default/basic/images/tabs_span_bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/tabs_span_bg.gif rename to app/design/adminhtml/default/basic/images/tabs_span_bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/tag_blue_edit.gif b/app/design/adminhtml/default/basic/images/tag_blue_edit.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/tag_blue_edit.gif rename to app/design/adminhtml/default/basic/images/tag_blue_edit.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/tn_cancel_bg.gif b/app/design/adminhtml/default/basic/images/tn_cancel_bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/tn_cancel_bg.gif rename to app/design/adminhtml/default/basic/images/tn_cancel_bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/tooltip_bg.gif b/app/design/adminhtml/default/basic/images/tooltip_bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/tooltip_bg.gif rename to app/design/adminhtml/default/basic/images/tooltip_bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/tooltip_corner.gif b/app/design/adminhtml/default/basic/images/tooltip_corner.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/tooltip_corner.gif rename to app/design/adminhtml/default/basic/images/tooltip_corner.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/tooltip_top.gif b/app/design/adminhtml/default/basic/images/tooltip_top.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/tooltip_top.gif rename to app/design/adminhtml/default/basic/images/tooltip_top.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/tree_icons/join.gif b/app/design/adminhtml/default/basic/images/tree_icons/join.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/tree_icons/join.gif rename to app/design/adminhtml/default/basic/images/tree_icons/join.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/tree_icons/joinbottom.gif b/app/design/adminhtml/default/basic/images/tree_icons/joinbottom.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/tree_icons/joinbottom.gif rename to app/design/adminhtml/default/basic/images/tree_icons/joinbottom.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/tree_icons/line.gif b/app/design/adminhtml/default/basic/images/tree_icons/line.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/tree_icons/line.gif rename to app/design/adminhtml/default/basic/images/tree_icons/line.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/tree_icons/minus.gif b/app/design/adminhtml/default/basic/images/tree_icons/minus.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/tree_icons/minus.gif rename to app/design/adminhtml/default/basic/images/tree_icons/minus.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/tree_icons/minusbottom.gif b/app/design/adminhtml/default/basic/images/tree_icons/minusbottom.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/tree_icons/minusbottom.gif rename to app/design/adminhtml/default/basic/images/tree_icons/minusbottom.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/tree_icons/nolines_minus.gif b/app/design/adminhtml/default/basic/images/tree_icons/nolines_minus.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/tree_icons/nolines_minus.gif rename to app/design/adminhtml/default/basic/images/tree_icons/nolines_minus.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/tree_icons/nolines_plus.gif b/app/design/adminhtml/default/basic/images/tree_icons/nolines_plus.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/tree_icons/nolines_plus.gif rename to app/design/adminhtml/default/basic/images/tree_icons/nolines_plus.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/validation_advice_bg.gif b/app/design/adminhtml/default/basic/images/validation_advice_bg.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/validation_advice_bg.gif rename to app/design/adminhtml/default/basic/images/validation_advice_bg.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/varien_logo.gif b/app/design/adminhtml/default/basic/images/varien_logo.gif similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/varien_logo.gif rename to app/design/adminhtml/default/basic/images/varien_logo.gif diff --git a/app/design/adminhtml/default/default/skin/default/images/window_close.png b/app/design/adminhtml/default/basic/images/window_close.png similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/window_close.png rename to app/design/adminhtml/default/basic/images/window_close.png diff --git a/app/design/adminhtml/default/default/skin/default/images/window_content.png b/app/design/adminhtml/default/basic/images/window_content.png similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/window_content.png rename to app/design/adminhtml/default/basic/images/window_content.png diff --git a/app/design/adminhtml/default/default/skin/default/images/window_top.png b/app/design/adminhtml/default/basic/images/window_top.png similarity index 100% rename from app/design/adminhtml/default/default/skin/default/images/window_top.png rename to app/design/adminhtml/default/basic/images/window_top.png diff --git a/app/design/adminhtml/default/default/local.xml b/app/design/adminhtml/default/basic/local.xml similarity index 100% rename from app/design/adminhtml/default/default/local.xml rename to app/design/adminhtml/default/basic/local.xml diff --git a/app/design/adminhtml/default/default/locale/en_US/translate.csv b/app/design/adminhtml/default/basic/locale/en_US/translate.csv similarity index 100% rename from app/design/adminhtml/default/default/locale/en_US/translate.csv rename to app/design/adminhtml/default/basic/locale/en_US/translate.csv diff --git a/app/design/adminhtml/default/default/skin/default/media/editor.swf b/app/design/adminhtml/default/basic/media/editor.swf similarity index 100% rename from app/design/adminhtml/default/default/skin/default/media/editor.swf rename to app/design/adminhtml/default/basic/media/editor.swf diff --git a/app/design/adminhtml/default/default/skin/default/media/flex.swf b/app/design/adminhtml/default/basic/media/flex.swf similarity index 100% rename from app/design/adminhtml/default/default/skin/default/media/flex.swf rename to app/design/adminhtml/default/basic/media/flex.swf diff --git a/app/design/adminhtml/default/default/skin/default/media/uploader.swf b/app/design/adminhtml/default/basic/media/uploader.swf similarity index 100% rename from app/design/adminhtml/default/default/skin/default/media/uploader.swf rename to app/design/adminhtml/default/basic/media/uploader.swf diff --git a/app/design/adminhtml/default/default/skin/default/media/uploaderSingle.swf b/app/design/adminhtml/default/basic/media/uploaderSingle.swf similarity index 100% rename from app/design/adminhtml/default/default/skin/default/media/uploaderSingle.swf rename to app/design/adminhtml/default/basic/media/uploaderSingle.swf diff --git a/app/design/adminhtml/default/default/skin/default/menu.css b/app/design/adminhtml/default/basic/menu.css similarity index 100% rename from app/design/adminhtml/default/default/skin/default/menu.css rename to app/design/adminhtml/default/basic/menu.css diff --git a/app/design/adminhtml/default/default/skin/default/print.css b/app/design/adminhtml/default/basic/print.css similarity index 100% rename from app/design/adminhtml/default/default/skin/default/print.css rename to app/design/adminhtml/default/basic/print.css diff --git a/app/design/adminhtml/default/default/skin/default/reset.css b/app/design/adminhtml/default/basic/reset.css similarity index 98% rename from app/design/adminhtml/default/default/skin/default/reset.css rename to app/design/adminhtml/default/basic/reset.css index 853d1e75731bb2d2d8a02aa68f058fecb1ce3d0b..31d696a007d5bbd091c189962e8d1e3d4bdcabd2 100644 --- a/app/design/adminhtml/default/default/skin/default/reset.css +++ b/app/design/adminhtml/default/basic/reset.css @@ -70,4 +70,4 @@ dt { display:block; } /* Size */ small { font-size:.9em; } -big { font-size:1.25em; } \ No newline at end of file +big { font-size:1.25em; } diff --git a/app/design/adminhtml/default/default/theme.xml b/app/design/adminhtml/default/basic/theme.xml similarity index 93% rename from app/design/adminhtml/default/default/theme.xml rename to app/design/adminhtml/default/basic/theme.xml index 349c67c5c2eedc7978de950a3ebe5d1af76669af..43e281a30c5211d8e7f76b358148f7cb24e49cff 100644 --- a/app/design/adminhtml/default/default/theme.xml +++ b/app/design/adminhtml/default/basic/theme.xml @@ -27,8 +27,8 @@ <design> <package code="default"> <title>Default</title> - <theme version="2.0.0.0" code="default"> - <title>Default</title> + <theme version="2.0.0.0" code="basic"> + <title>Magento Basic</title> <requirements> <magento_version from="2.0.0.0-dev1" to="*"/> </requirements> diff --git a/app/design/frontend/default/default/skin/blank/css/print.css b/app/design/frontend/default/blank/css/print.css similarity index 100% rename from app/design/frontend/default/default/skin/blank/css/print.css rename to app/design/frontend/default/blank/css/print.css diff --git a/app/design/frontend/default/default/skin/blank/css/styles-ie.css b/app/design/frontend/default/blank/css/styles-ie.css similarity index 100% rename from app/design/frontend/default/default/skin/blank/css/styles-ie.css rename to app/design/frontend/default/blank/css/styles-ie.css diff --git a/app/design/frontend/default/default/skin/blank/css/styles.css b/app/design/frontend/default/blank/css/styles.css similarity index 100% rename from app/design/frontend/default/default/skin/blank/css/styles.css rename to app/design/frontend/default/blank/css/styles.css diff --git a/app/design/frontend/default/default/skin/blank/images/bkg_button.gif b/app/design/frontend/default/blank/images/bkg_button.gif similarity index 100% rename from app/design/frontend/default/default/skin/blank/images/bkg_button.gif rename to app/design/frontend/default/blank/images/bkg_button.gif diff --git a/app/design/frontend/default/default/skin/blank/images/bkg_collapse.gif b/app/design/frontend/default/blank/images/bkg_collapse.gif similarity index 100% rename from app/design/frontend/default/default/skin/blank/images/bkg_collapse.gif rename to app/design/frontend/default/blank/images/bkg_collapse.gif diff --git a/app/design/frontend/default/default/skin/blank/images/bkg_rating.gif b/app/design/frontend/default/blank/images/bkg_rating.gif similarity index 100% rename from app/design/frontend/default/default/skin/blank/images/bkg_rating.gif rename to app/design/frontend/default/blank/images/bkg_rating.gif diff --git a/app/design/frontend/default/default/skin/blank/images/btn_edit.gif b/app/design/frontend/default/blank/images/btn_edit.gif similarity index 100% rename from app/design/frontend/default/default/skin/blank/images/btn_edit.gif rename to app/design/frontend/default/blank/images/btn_edit.gif diff --git a/app/design/frontend/default/default/skin/blank/images/btn_remove.gif b/app/design/frontend/default/blank/images/btn_remove.gif similarity index 100% rename from app/design/frontend/default/default/skin/blank/images/btn_remove.gif rename to app/design/frontend/default/blank/images/btn_remove.gif diff --git a/app/design/frontend/default/default/skin/blank/images/btn_trash.gif b/app/design/frontend/default/blank/images/btn_trash.gif similarity index 100% rename from app/design/frontend/default/default/skin/blank/images/btn_trash.gif rename to app/design/frontend/default/blank/images/btn_trash.gif diff --git a/app/design/frontend/default/default/skin/blank/images/btn_window_close.gif b/app/design/frontend/default/blank/images/btn_window_close.gif similarity index 100% rename from app/design/frontend/default/default/skin/blank/images/btn_window_close.gif rename to app/design/frontend/default/blank/images/btn_window_close.gif diff --git a/app/design/frontend/default/default/skin/blank/images/fam_book_open.png b/app/design/frontend/default/blank/images/fam_book_open.png similarity index 100% rename from app/design/frontend/default/default/skin/blank/images/fam_book_open.png rename to app/design/frontend/default/blank/images/fam_book_open.png diff --git a/app/design/frontend/default/default/skin/blank/images/i_asc_arrow.gif b/app/design/frontend/default/blank/images/i_asc_arrow.gif similarity index 100% rename from app/design/frontend/default/default/skin/blank/images/i_asc_arrow.gif rename to app/design/frontend/default/blank/images/i_asc_arrow.gif diff --git a/app/design/frontend/default/default/skin/blank/images/i_availability_only_arrow.gif b/app/design/frontend/default/blank/images/i_availability_only_arrow.gif similarity index 100% rename from app/design/frontend/default/default/skin/blank/images/i_availability_only_arrow.gif rename to app/design/frontend/default/blank/images/i_availability_only_arrow.gif diff --git a/app/design/frontend/default/default/skin/blank/images/i_desc_arrow.gif b/app/design/frontend/default/blank/images/i_desc_arrow.gif similarity index 100% rename from app/design/frontend/default/default/skin/blank/images/i_desc_arrow.gif rename to app/design/frontend/default/blank/images/i_desc_arrow.gif diff --git a/app/design/frontend/default/default/skin/blank/images/i_msg-error.gif b/app/design/frontend/default/blank/images/i_msg-error.gif similarity index 100% rename from app/design/frontend/default/default/skin/blank/images/i_msg-error.gif rename to app/design/frontend/default/blank/images/i_msg-error.gif diff --git a/app/design/frontend/default/default/skin/blank/images/i_msg-note.gif b/app/design/frontend/default/blank/images/i_msg-note.gif similarity index 100% rename from app/design/frontend/default/default/skin/blank/images/i_msg-note.gif rename to app/design/frontend/default/blank/images/i_msg-note.gif diff --git a/app/design/frontend/default/default/skin/blank/images/i_msg-success.gif b/app/design/frontend/default/blank/images/i_msg-success.gif similarity index 100% rename from app/design/frontend/default/default/skin/blank/images/i_msg-success.gif rename to app/design/frontend/default/blank/images/i_msg-success.gif diff --git a/app/design/frontend/default/default/skin/blank/images/i_notice.gif b/app/design/frontend/default/blank/images/i_notice.gif similarity index 100% rename from app/design/frontend/default/default/skin/blank/images/i_notice.gif rename to app/design/frontend/default/blank/images/i_notice.gif diff --git a/app/design/frontend/default/default/skin/blank/images/i_pager-next.gif b/app/design/frontend/default/blank/images/i_pager-next.gif similarity index 100% rename from app/design/frontend/default/default/skin/blank/images/i_pager-next.gif rename to app/design/frontend/default/blank/images/i_pager-next.gif diff --git a/app/design/frontend/default/default/skin/blank/images/i_pager-prev.gif b/app/design/frontend/default/blank/images/i_pager-prev.gif similarity index 100% rename from app/design/frontend/default/default/skin/blank/images/i_pager-prev.gif rename to app/design/frontend/default/blank/images/i_pager-prev.gif diff --git a/app/design/frontend/default/default/skin/blank/images/i_print.gif b/app/design/frontend/default/blank/images/i_print.gif similarity index 100% rename from app/design/frontend/default/default/skin/blank/images/i_print.gif rename to app/design/frontend/default/blank/images/i_print.gif diff --git a/app/design/frontend/default/default/skin/blank/images/i_rss-big.png b/app/design/frontend/default/blank/images/i_rss-big.png similarity index 100% rename from app/design/frontend/default/default/skin/blank/images/i_rss-big.png rename to app/design/frontend/default/blank/images/i_rss-big.png diff --git a/app/design/frontend/default/default/skin/blank/images/i_rss.gif b/app/design/frontend/default/blank/images/i_rss.gif similarity index 100% rename from app/design/frontend/default/default/skin/blank/images/i_rss.gif rename to app/design/frontend/default/blank/images/i_rss.gif diff --git a/app/design/frontend/default/default/skin/blank/images/logo.gif b/app/design/frontend/default/blank/images/logo.gif similarity index 100% rename from app/design/frontend/default/default/skin/blank/images/logo.gif rename to app/design/frontend/default/blank/images/logo.gif diff --git a/app/design/frontend/default/default/skin/blank/images/logo_print.gif b/app/design/frontend/default/blank/images/logo_print.gif similarity index 100% rename from app/design/frontend/default/default/skin/blank/images/logo_print.gif rename to app/design/frontend/default/blank/images/logo_print.gif diff --git a/app/design/frontend/default/default/skin/blank/images/magnifier_handle.gif b/app/design/frontend/default/blank/images/magnifier_handle.gif similarity index 100% rename from app/design/frontend/default/default/skin/blank/images/magnifier_handle.gif rename to app/design/frontend/default/blank/images/magnifier_handle.gif diff --git a/app/design/frontend/default/default/skin/blank/images/opc-ajax-loader.gif b/app/design/frontend/default/blank/images/opc-ajax-loader.gif similarity index 100% rename from app/design/frontend/default/default/skin/blank/images/opc-ajax-loader.gif rename to app/design/frontend/default/blank/images/opc-ajax-loader.gif diff --git a/app/design/frontend/default/default/skin/blank/images/pager_arrow_left.gif b/app/design/frontend/default/blank/images/pager_arrow_left.gif similarity index 100% rename from app/design/frontend/default/default/skin/blank/images/pager_arrow_left.gif rename to app/design/frontend/default/blank/images/pager_arrow_left.gif diff --git a/app/design/frontend/default/default/skin/blank/images/pager_arrow_right.gif b/app/design/frontend/default/blank/images/pager_arrow_right.gif similarity index 100% rename from app/design/frontend/default/default/skin/blank/images/pager_arrow_right.gif rename to app/design/frontend/default/blank/images/pager_arrow_right.gif diff --git a/app/design/frontend/default/default/skin/blank/images/slider_bg.gif b/app/design/frontend/default/blank/images/slider_bg.gif similarity index 100% rename from app/design/frontend/default/default/skin/blank/images/slider_bg.gif rename to app/design/frontend/default/blank/images/slider_bg.gif diff --git a/app/design/frontend/default/default/skin/blank/images/slider_btn_zoom_in.gif b/app/design/frontend/default/blank/images/slider_btn_zoom_in.gif similarity index 100% rename from app/design/frontend/default/default/skin/blank/images/slider_btn_zoom_in.gif rename to app/design/frontend/default/blank/images/slider_btn_zoom_in.gif diff --git a/app/design/frontend/default/default/skin/blank/images/slider_btn_zoom_out.gif b/app/design/frontend/default/blank/images/slider_btn_zoom_out.gif similarity index 100% rename from app/design/frontend/default/default/skin/blank/images/slider_btn_zoom_out.gif rename to app/design/frontend/default/blank/images/slider_btn_zoom_out.gif diff --git a/app/design/frontend/default/default/skin/blank/images/spacer.gif b/app/design/frontend/default/blank/images/spacer.gif similarity index 100% rename from app/design/frontend/default/default/skin/blank/images/spacer.gif rename to app/design/frontend/default/blank/images/spacer.gif diff --git a/app/design/frontend/default/default/skin/blank/images/validation_advice_bg.gif b/app/design/frontend/default/blank/images/validation_advice_bg.gif similarity index 100% rename from app/design/frontend/default/default/skin/blank/images/validation_advice_bg.gif rename to app/design/frontend/default/blank/images/validation_advice_bg.gif diff --git a/app/design/frontend/default/default/local.xml b/app/design/frontend/default/blank/local.xml similarity index 100% rename from app/design/frontend/default/default/local.xml rename to app/design/frontend/default/blank/local.xml diff --git a/app/design/frontend/default/default/media/preview_image.jpg b/app/design/frontend/default/blank/media/preview_image.jpg similarity index 100% rename from app/design/frontend/default/default/media/preview_image.jpg rename to app/design/frontend/default/blank/media/preview_image.jpg diff --git a/app/design/frontend/default/blank/theme.xml b/app/design/frontend/default/blank/theme.xml new file mode 100644 index 0000000000000000000000000000000000000000..33c2b5f9a061461a1dbf87c9a9c6597757b2f565 --- /dev/null +++ b/app/design/frontend/default/blank/theme.xml @@ -0,0 +1,40 @@ +<!-- +/** + * 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 Magento + * @package Design + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<design> + <package code="default"> + <title>Default</title> + <theme version="2.0.0.0" code="blank" parent="demo" featured="1"> + <title>Magento Blank</title> + <requirements> + <magento_version from="2.0.0.0-dev1" to="*"/> + </requirements> + <media> + <preview_image>media/preview_image.jpg</preview_image> + </media> + </theme> + </package> +</design> diff --git a/app/design/frontend/default/default/skin/default/css/print.css b/app/design/frontend/default/demo/css/print.css similarity index 100% rename from app/design/frontend/default/default/skin/default/css/print.css rename to app/design/frontend/default/demo/css/print.css diff --git a/app/design/frontend/default/default/skin/default/css/styles-ie.css b/app/design/frontend/default/demo/css/styles-ie.css similarity index 100% rename from app/design/frontend/default/default/skin/default/css/styles-ie.css rename to app/design/frontend/default/demo/css/styles-ie.css diff --git a/app/design/frontend/default/default/skin/default/css/styles.css b/app/design/frontend/default/demo/css/styles.css similarity index 100% rename from app/design/frontend/default/default/skin/default/css/styles.css rename to app/design/frontend/default/demo/css/styles.css diff --git a/app/design/frontend/default/default/skin/blue/images/best_selling_tr_even_bg.gif b/app/design/frontend/default/demo/images/best_selling_tr_even_bg.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/best_selling_tr_even_bg.gif rename to app/design/frontend/default/demo/images/best_selling_tr_even_bg.gif diff --git a/app/design/frontend/default/default/skin/blue/images/best_selling_tr_odd_bg.gif b/app/design/frontend/default/demo/images/best_selling_tr_odd_bg.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/best_selling_tr_odd_bg.gif rename to app/design/frontend/default/demo/images/best_selling_tr_odd_bg.gif diff --git a/app/design/frontend/default/default/skin/blue/images/bkg_account_box.gif b/app/design/frontend/default/demo/images/bkg_account_box.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/bkg_account_box.gif rename to app/design/frontend/default/demo/images/bkg_account_box.gif diff --git a/app/design/frontend/default/default/skin/blue/images/bkg_block-actions.gif b/app/design/frontend/default/demo/images/bkg_block-actions.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/bkg_block-actions.gif rename to app/design/frontend/default/demo/images/bkg_block-actions.gif diff --git a/app/design/frontend/default/default/skin/blue/images/bkg_block-currency.gif b/app/design/frontend/default/demo/images/bkg_block-currency.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/bkg_block-currency.gif rename to app/design/frontend/default/demo/images/bkg_block-currency.gif diff --git a/app/design/frontend/default/default/skin/blue/images/bkg_block-layered-dd.gif b/app/design/frontend/default/demo/images/bkg_block-layered-dd.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/bkg_block-layered-dd.gif rename to app/design/frontend/default/demo/images/bkg_block-layered-dd.gif diff --git a/app/design/frontend/default/default/skin/blue/images/bkg_block-layered-dt.gif b/app/design/frontend/default/demo/images/bkg_block-layered-dt.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/bkg_block-layered-dt.gif rename to app/design/frontend/default/demo/images/bkg_block-layered-dt.gif diff --git a/app/design/frontend/default/default/skin/blue/images/bkg_block-layered-label.gif b/app/design/frontend/default/demo/images/bkg_block-layered-label.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/bkg_block-layered-label.gif rename to app/design/frontend/default/demo/images/bkg_block-layered-label.gif diff --git a/app/design/frontend/default/default/skin/blue/images/bkg_block-layered-li.gif b/app/design/frontend/default/demo/images/bkg_block-layered-li.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/bkg_block-layered-li.gif rename to app/design/frontend/default/demo/images/bkg_block-layered-li.gif diff --git a/app/design/frontend/default/default/skin/blue/images/bkg_block-layered-title.gif b/app/design/frontend/default/demo/images/bkg_block-layered-title.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/bkg_block-layered-title.gif rename to app/design/frontend/default/demo/images/bkg_block-layered-title.gif diff --git a/app/design/frontend/default/default/skin/blue/images/bkg_block-layered1.gif b/app/design/frontend/default/demo/images/bkg_block-layered1.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/bkg_block-layered1.gif rename to app/design/frontend/default/demo/images/bkg_block-layered1.gif diff --git a/app/design/frontend/default/default/skin/blue/images/bkg_block-title-account.gif b/app/design/frontend/default/demo/images/bkg_block-title-account.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/bkg_block-title-account.gif rename to app/design/frontend/default/demo/images/bkg_block-title-account.gif diff --git a/app/design/frontend/default/default/skin/blue/images/bkg_block-title.gif b/app/design/frontend/default/demo/images/bkg_block-title.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/bkg_block-title.gif rename to app/design/frontend/default/demo/images/bkg_block-title.gif diff --git a/app/design/frontend/default/default/skin/default/images/bkg_body.gif b/app/design/frontend/default/demo/images/bkg_body.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/bkg_body.gif rename to app/design/frontend/default/demo/images/bkg_body.gif diff --git a/app/design/frontend/default/default/skin/blue/images/bkg_buttons-set1.gif b/app/design/frontend/default/demo/images/bkg_buttons-set1.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/bkg_buttons-set1.gif rename to app/design/frontend/default/demo/images/bkg_buttons-set1.gif diff --git a/app/design/frontend/default/default/skin/blue/images/bkg_checkout.gif b/app/design/frontend/default/demo/images/bkg_checkout.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/bkg_checkout.gif rename to app/design/frontend/default/demo/images/bkg_checkout.gif diff --git a/app/design/frontend/default/default/skin/blue/images/bkg_collapse-gm.gif b/app/design/frontend/default/demo/images/bkg_collapse-gm.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/bkg_collapse-gm.gif rename to app/design/frontend/default/demo/images/bkg_collapse-gm.gif diff --git a/app/design/frontend/default/default/skin/blue/images/bkg_collapse.gif b/app/design/frontend/default/demo/images/bkg_collapse.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/bkg_collapse.gif rename to app/design/frontend/default/demo/images/bkg_collapse.gif diff --git a/app/design/frontend/default/default/skin/blue/images/bkg_divider1.gif b/app/design/frontend/default/demo/images/bkg_divider1.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/bkg_divider1.gif rename to app/design/frontend/default/demo/images/bkg_divider1.gif diff --git a/app/design/frontend/default/default/skin/default/images/bkg_form-search.gif b/app/design/frontend/default/demo/images/bkg_form-search.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/bkg_form-search.gif rename to app/design/frontend/default/demo/images/bkg_form-search.gif diff --git a/app/design/frontend/default/default/skin/blue/images/bkg_grand-total.gif b/app/design/frontend/default/demo/images/bkg_grand-total.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/bkg_grand-total.gif rename to app/design/frontend/default/demo/images/bkg_grand-total.gif diff --git a/app/design/frontend/default/default/skin/blue/images/bkg_grid.gif b/app/design/frontend/default/demo/images/bkg_grid.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/bkg_grid.gif rename to app/design/frontend/default/demo/images/bkg_grid.gif diff --git a/app/design/frontend/default/default/skin/default/images/bkg_header.jpg b/app/design/frontend/default/demo/images/bkg_header.jpg similarity index 100% rename from app/design/frontend/default/default/skin/default/images/bkg_header.jpg rename to app/design/frontend/default/demo/images/bkg_header.jpg diff --git a/app/design/frontend/default/default/skin/blue/images/bkg_login-box.gif b/app/design/frontend/default/demo/images/bkg_login-box.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/bkg_login-box.gif rename to app/design/frontend/default/demo/images/bkg_login-box.gif diff --git a/app/design/frontend/default/default/skin/blue/images/bkg_main1.gif b/app/design/frontend/default/demo/images/bkg_main1.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/bkg_main1.gif rename to app/design/frontend/default/demo/images/bkg_main1.gif diff --git a/app/design/frontend/default/default/skin/blue/images/bkg_main2.gif b/app/design/frontend/default/demo/images/bkg_main2.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/bkg_main2.gif rename to app/design/frontend/default/demo/images/bkg_main2.gif diff --git a/app/design/frontend/default/default/skin/blue/images/bkg_nav0.jpg b/app/design/frontend/default/demo/images/bkg_nav0.jpg similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/bkg_nav0.jpg rename to app/design/frontend/default/demo/images/bkg_nav0.jpg diff --git a/app/design/frontend/default/default/skin/blue/images/bkg_nav1.gif b/app/design/frontend/default/demo/images/bkg_nav1.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/bkg_nav1.gif rename to app/design/frontend/default/demo/images/bkg_nav1.gif diff --git a/app/design/frontend/default/default/skin/blue/images/bkg_nav2.gif b/app/design/frontend/default/demo/images/bkg_nav2.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/bkg_nav2.gif rename to app/design/frontend/default/demo/images/bkg_nav2.gif diff --git a/app/design/frontend/default/default/skin/blue/images/bkg_opc-title-off.gif b/app/design/frontend/default/demo/images/bkg_opc-title-off.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/bkg_opc-title-off.gif rename to app/design/frontend/default/demo/images/bkg_opc-title-off.gif diff --git a/app/design/frontend/default/default/skin/blue/images/bkg_pipe1.gif b/app/design/frontend/default/demo/images/bkg_pipe1.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/bkg_pipe1.gif rename to app/design/frontend/default/demo/images/bkg_pipe1.gif diff --git a/app/design/frontend/default/default/skin/blue/images/bkg_pipe2.gif b/app/design/frontend/default/demo/images/bkg_pipe2.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/bkg_pipe2.gif rename to app/design/frontend/default/demo/images/bkg_pipe2.gif diff --git a/app/design/frontend/default/default/skin/blue/images/bkg_pipe3.gif b/app/design/frontend/default/demo/images/bkg_pipe3.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/bkg_pipe3.gif rename to app/design/frontend/default/demo/images/bkg_pipe3.gif diff --git a/app/design/frontend/default/default/skin/blue/images/bkg_product-view.gif b/app/design/frontend/default/demo/images/bkg_product-view.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/bkg_product-view.gif rename to app/design/frontend/default/demo/images/bkg_product-view.gif diff --git a/app/design/frontend/default/default/skin/blue/images/bkg_product_collateral.gif b/app/design/frontend/default/demo/images/bkg_product_collateral.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/bkg_product_collateral.gif rename to app/design/frontend/default/demo/images/bkg_product_collateral.gif diff --git a/app/design/frontend/default/default/skin/blue/images/bkg_rating.gif b/app/design/frontend/default/demo/images/bkg_rating.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/bkg_rating.gif rename to app/design/frontend/default/demo/images/bkg_rating.gif diff --git a/app/design/frontend/default/default/skin/blue/images/bkg_sp-methods.gif b/app/design/frontend/default/demo/images/bkg_sp-methods.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/bkg_sp-methods.gif rename to app/design/frontend/default/demo/images/bkg_sp-methods.gif diff --git a/app/design/frontend/default/default/skin/blue/images/bkg_tfoot.gif b/app/design/frontend/default/demo/images/bkg_tfoot.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/bkg_tfoot.gif rename to app/design/frontend/default/demo/images/bkg_tfoot.gif diff --git a/app/design/frontend/default/default/skin/blue/images/bkg_th-v.gif b/app/design/frontend/default/demo/images/bkg_th-v.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/bkg_th-v.gif rename to app/design/frontend/default/demo/images/bkg_th-v.gif diff --git a/app/design/frontend/default/default/skin/blue/images/bkg_th.gif b/app/design/frontend/default/demo/images/bkg_th.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/bkg_th.gif rename to app/design/frontend/default/demo/images/bkg_th.gif diff --git a/app/design/frontend/default/default/skin/blue/images/bkg_toolbar.gif b/app/design/frontend/default/demo/images/bkg_toolbar.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/bkg_toolbar.gif rename to app/design/frontend/default/demo/images/bkg_toolbar.gif diff --git a/app/design/frontend/default/default/skin/default/images/btn_checkout.gif b/app/design/frontend/default/demo/images/btn_checkout.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/btn_checkout.gif rename to app/design/frontend/default/demo/images/btn_checkout.gif diff --git a/app/design/frontend/default/default/skin/blue/images/btn_edit.gif b/app/design/frontend/default/demo/images/btn_edit.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/btn_edit.gif rename to app/design/frontend/default/demo/images/btn_edit.gif diff --git a/app/design/frontend/default/default/skin/blue/images/btn_gm-close.gif b/app/design/frontend/default/demo/images/btn_gm-close.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/btn_gm-close.gif rename to app/design/frontend/default/demo/images/btn_gm-close.gif diff --git a/app/design/frontend/default/default/skin/default/images/btn_place_order.gif b/app/design/frontend/default/demo/images/btn_place_order.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/btn_place_order.gif rename to app/design/frontend/default/demo/images/btn_place_order.gif diff --git a/app/design/frontend/default/default/skin/default/images/btn_previous.gif b/app/design/frontend/default/demo/images/btn_previous.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/btn_previous.gif rename to app/design/frontend/default/demo/images/btn_previous.gif diff --git a/app/design/frontend/default/default/skin/default/images/btn_proceed_to_checkout.gif b/app/design/frontend/default/demo/images/btn_proceed_to_checkout.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/btn_proceed_to_checkout.gif rename to app/design/frontend/default/demo/images/btn_proceed_to_checkout.gif diff --git a/app/design/frontend/default/default/skin/default/images/btn_proceed_to_checkout_dis.gif b/app/design/frontend/default/demo/images/btn_proceed_to_checkout_dis.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/btn_proceed_to_checkout_dis.gif rename to app/design/frontend/default/demo/images/btn_proceed_to_checkout_dis.gif diff --git a/app/design/frontend/default/default/skin/blue/images/btn_remove.gif b/app/design/frontend/default/demo/images/btn_remove.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/btn_remove.gif rename to app/design/frontend/default/demo/images/btn_remove.gif diff --git a/app/design/frontend/default/default/skin/blue/images/btn_remove2.gif b/app/design/frontend/default/demo/images/btn_remove2.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/btn_remove2.gif rename to app/design/frontend/default/demo/images/btn_remove2.gif diff --git a/app/design/frontend/default/default/skin/blue/images/btn_search.gif b/app/design/frontend/default/demo/images/btn_search.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/btn_search.gif rename to app/design/frontend/default/demo/images/btn_search.gif diff --git a/app/design/frontend/default/default/skin/blue/images/btn_trash.gif b/app/design/frontend/default/demo/images/btn_trash.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/btn_trash.gif rename to app/design/frontend/default/demo/images/btn_trash.gif diff --git a/app/design/frontend/default/default/skin/blue/images/btn_window_close.gif b/app/design/frontend/default/demo/images/btn_window_close.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/btn_window_close.gif rename to app/design/frontend/default/demo/images/btn_window_close.gif diff --git a/app/design/frontend/default/default/skin/default/images/calendar.gif b/app/design/frontend/default/demo/images/calendar.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/calendar.gif rename to app/design/frontend/default/demo/images/calendar.gif diff --git a/app/design/frontend/default/default/skin/blue/images/fam_book_open.png b/app/design/frontend/default/demo/images/fam_book_open.png similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/fam_book_open.png rename to app/design/frontend/default/demo/images/fam_book_open.png diff --git a/app/design/frontend/default/default/skin/default/images/free_shipping_callout.jpg b/app/design/frontend/default/demo/images/free_shipping_callout.jpg similarity index 100% rename from app/design/frontend/default/default/skin/default/images/free_shipping_callout.jpg rename to app/design/frontend/default/demo/images/free_shipping_callout.jpg diff --git a/app/design/frontend/default/default/skin/blue/images/grid-cal.gif b/app/design/frontend/default/demo/images/grid-cal.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/grid-cal.gif rename to app/design/frontend/default/demo/images/grid-cal.gif diff --git a/app/design/frontend/default/default/skin/default/images/home_left_callout.jpg b/app/design/frontend/default/demo/images/home_left_callout.jpg similarity index 100% rename from app/design/frontend/default/default/skin/default/images/home_left_callout.jpg rename to app/design/frontend/default/demo/images/home_left_callout.jpg diff --git a/app/design/frontend/default/default/skin/default/images/home_main_callout.jpg b/app/design/frontend/default/demo/images/home_main_callout.jpg similarity index 100% rename from app/design/frontend/default/default/skin/default/images/home_main_callout.jpg rename to app/design/frontend/default/demo/images/home_main_callout.jpg diff --git a/app/design/frontend/default/default/skin/blue/images/i_arrow-top.gif b/app/design/frontend/default/demo/images/i_arrow-top.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/i_arrow-top.gif rename to app/design/frontend/default/demo/images/i_arrow-top.gif diff --git a/app/design/frontend/default/default/skin/blue/images/i_asc_arrow.gif b/app/design/frontend/default/demo/images/i_asc_arrow.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/i_asc_arrow.gif rename to app/design/frontend/default/demo/images/i_asc_arrow.gif diff --git a/app/design/frontend/default/default/skin/blue/images/i_availability_only.gif b/app/design/frontend/default/demo/images/i_availability_only.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/i_availability_only.gif rename to app/design/frontend/default/demo/images/i_availability_only.gif diff --git a/app/design/frontend/default/default/skin/blue/images/i_availability_only_arrow.gif b/app/design/frontend/default/demo/images/i_availability_only_arrow.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/i_availability_only_arrow.gif rename to app/design/frontend/default/demo/images/i_availability_only_arrow.gif diff --git a/app/design/frontend/default/default/skin/blue/images/i_block-cart.gif b/app/design/frontend/default/demo/images/i_block-cart.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/i_block-cart.gif rename to app/design/frontend/default/demo/images/i_block-cart.gif diff --git a/app/design/frontend/default/default/skin/blue/images/i_block-currency.gif b/app/design/frontend/default/demo/images/i_block-currency.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/i_block-currency.gif rename to app/design/frontend/default/demo/images/i_block-currency.gif diff --git a/app/design/frontend/default/default/skin/blue/images/i_block-list.gif b/app/design/frontend/default/demo/images/i_block-list.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/i_block-list.gif rename to app/design/frontend/default/demo/images/i_block-list.gif diff --git a/app/design/frontend/default/default/skin/blue/images/i_block-poll.gif b/app/design/frontend/default/demo/images/i_block-poll.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/i_block-poll.gif rename to app/design/frontend/default/demo/images/i_block-poll.gif diff --git a/app/design/frontend/default/default/skin/blue/images/i_block-related.gif b/app/design/frontend/default/demo/images/i_block-related.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/i_block-related.gif rename to app/design/frontend/default/demo/images/i_block-related.gif diff --git a/app/design/frontend/default/default/skin/blue/images/i_block-subscribe.gif b/app/design/frontend/default/demo/images/i_block-subscribe.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/i_block-subscribe.gif rename to app/design/frontend/default/demo/images/i_block-subscribe.gif diff --git a/app/design/frontend/default/default/skin/blue/images/i_block-tags.gif b/app/design/frontend/default/demo/images/i_block-tags.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/i_block-tags.gif rename to app/design/frontend/default/demo/images/i_block-tags.gif diff --git a/app/design/frontend/default/default/skin/blue/images/i_block-viewed.gif b/app/design/frontend/default/demo/images/i_block-viewed.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/i_block-viewed.gif rename to app/design/frontend/default/demo/images/i_block-viewed.gif diff --git a/app/design/frontend/default/default/skin/blue/images/i_block-wishlist.gif b/app/design/frontend/default/demo/images/i_block-wishlist.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/i_block-wishlist.gif rename to app/design/frontend/default/demo/images/i_block-wishlist.gif diff --git a/app/design/frontend/default/default/skin/blue/images/i_desc_arrow.gif b/app/design/frontend/default/demo/images/i_desc_arrow.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/i_desc_arrow.gif rename to app/design/frontend/default/demo/images/i_desc_arrow.gif diff --git a/app/design/frontend/default/default/skin/blue/images/i_discount.gif b/app/design/frontend/default/demo/images/i_discount.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/i_discount.gif rename to app/design/frontend/default/demo/images/i_discount.gif diff --git a/app/design/frontend/default/default/skin/blue/images/i_folder-table.gif b/app/design/frontend/default/demo/images/i_folder-table.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/i_folder-table.gif rename to app/design/frontend/default/demo/images/i_folder-table.gif diff --git a/app/design/frontend/default/default/skin/blue/images/i_ma-info.gif b/app/design/frontend/default/demo/images/i_ma-info.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/i_ma-info.gif rename to app/design/frontend/default/demo/images/i_ma-info.gif diff --git a/app/design/frontend/default/default/skin/blue/images/i_ma-reviews.gif b/app/design/frontend/default/demo/images/i_ma-reviews.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/i_ma-reviews.gif rename to app/design/frontend/default/demo/images/i_ma-reviews.gif diff --git a/app/design/frontend/default/default/skin/blue/images/i_ma-tags.gif b/app/design/frontend/default/demo/images/i_ma-tags.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/i_ma-tags.gif rename to app/design/frontend/default/demo/images/i_ma-tags.gif diff --git a/app/design/frontend/default/default/skin/blue/images/i_msg-error.gif b/app/design/frontend/default/demo/images/i_msg-error.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/i_msg-error.gif rename to app/design/frontend/default/demo/images/i_msg-error.gif diff --git a/app/design/frontend/default/default/skin/blue/images/i_msg-note.gif b/app/design/frontend/default/demo/images/i_msg-note.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/i_msg-note.gif rename to app/design/frontend/default/demo/images/i_msg-note.gif diff --git a/app/design/frontend/default/default/skin/blue/images/i_msg-success.gif b/app/design/frontend/default/demo/images/i_msg-success.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/i_msg-success.gif rename to app/design/frontend/default/demo/images/i_msg-success.gif diff --git a/app/design/frontend/default/default/skin/blue/images/i_notice.gif b/app/design/frontend/default/demo/images/i_notice.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/i_notice.gif rename to app/design/frontend/default/demo/images/i_notice.gif diff --git a/app/design/frontend/default/default/skin/blue/images/i_page1.gif b/app/design/frontend/default/demo/images/i_page1.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/i_page1.gif rename to app/design/frontend/default/demo/images/i_page1.gif diff --git a/app/design/frontend/default/default/skin/blue/images/i_page2.gif b/app/design/frontend/default/demo/images/i_page2.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/i_page2.gif rename to app/design/frontend/default/demo/images/i_page2.gif diff --git a/app/design/frontend/default/default/skin/blue/images/i_pager-next.gif b/app/design/frontend/default/demo/images/i_pager-next.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/i_pager-next.gif rename to app/design/frontend/default/demo/images/i_pager-next.gif diff --git a/app/design/frontend/default/default/skin/blue/images/i_pager-prev.gif b/app/design/frontend/default/demo/images/i_pager-prev.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/i_pager-prev.gif rename to app/design/frontend/default/demo/images/i_pager-prev.gif diff --git a/app/design/frontend/default/default/skin/blue/images/i_print.gif b/app/design/frontend/default/demo/images/i_print.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/i_print.gif rename to app/design/frontend/default/demo/images/i_print.gif diff --git a/app/design/frontend/default/default/skin/blue/images/i_rss-big.png b/app/design/frontend/default/demo/images/i_rss-big.png similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/i_rss-big.png rename to app/design/frontend/default/demo/images/i_rss-big.png diff --git a/app/design/frontend/default/default/skin/blue/images/i_rss.gif b/app/design/frontend/default/demo/images/i_rss.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/i_rss.gif rename to app/design/frontend/default/demo/images/i_rss.gif diff --git a/app/design/frontend/default/default/skin/blue/images/i_search_criteria.gif b/app/design/frontend/default/demo/images/i_search_criteria.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/i_search_criteria.gif rename to app/design/frontend/default/demo/images/i_search_criteria.gif diff --git a/app/design/frontend/default/default/skin/blue/images/i_shipping.gif b/app/design/frontend/default/demo/images/i_shipping.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/i_shipping.gif rename to app/design/frontend/default/demo/images/i_shipping.gif diff --git a/app/design/frontend/default/default/skin/blue/images/i_tag_add.gif b/app/design/frontend/default/demo/images/i_tag_add.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/i_tag_add.gif rename to app/design/frontend/default/demo/images/i_tag_add.gif diff --git a/app/design/frontend/default/default/skin/blue/images/i_tier.gif b/app/design/frontend/default/demo/images/i_tier.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/i_tier.gif rename to app/design/frontend/default/demo/images/i_tier.gif diff --git a/app/design/frontend/default/default/skin/default/images/i_type_grid.gif b/app/design/frontend/default/demo/images/i_type_grid.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/i_type_grid.gif rename to app/design/frontend/default/demo/images/i_type_grid.gif diff --git a/app/design/frontend/default/default/skin/default/images/i_type_list.gif b/app/design/frontend/default/demo/images/i_type_list.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/i_type_list.gif rename to app/design/frontend/default/demo/images/i_type_list.gif diff --git a/app/design/frontend/default/default/skin/blue/images/logo.gif b/app/design/frontend/default/demo/images/logo.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/logo.gif rename to app/design/frontend/default/demo/images/logo.gif diff --git a/app/design/frontend/default/default/skin/blue/images/logo_print.gif b/app/design/frontend/default/demo/images/logo_print.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/logo_print.gif rename to app/design/frontend/default/demo/images/logo_print.gif diff --git a/app/design/frontend/default/default/skin/blue/images/magnifier_handle.gif b/app/design/frontend/default/demo/images/magnifier_handle.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/magnifier_handle.gif rename to app/design/frontend/default/demo/images/magnifier_handle.gif diff --git a/app/design/frontend/default/default/skin/default/images/map_popup_arrow.gif b/app/design/frontend/default/demo/images/map_popup_arrow.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/map_popup_arrow.gif rename to app/design/frontend/default/demo/images/map_popup_arrow.gif diff --git a/app/design/frontend/default/default/skin/default/images/media/404_callout1.jpg b/app/design/frontend/default/demo/images/media/404_callout1.jpg similarity index 100% rename from app/design/frontend/default/default/skin/default/images/media/404_callout1.jpg rename to app/design/frontend/default/demo/images/media/404_callout1.jpg diff --git a/app/design/frontend/default/default/skin/default/images/media/404_callout2.jpg b/app/design/frontend/default/demo/images/media/404_callout2.jpg similarity index 100% rename from app/design/frontend/default/default/skin/default/images/media/404_callout2.jpg rename to app/design/frontend/default/demo/images/media/404_callout2.jpg diff --git a/app/design/frontend/default/default/skin/default/images/media/best_selling_img01.jpg b/app/design/frontend/default/demo/images/media/best_selling_img01.jpg similarity index 100% rename from app/design/frontend/default/default/skin/default/images/media/best_selling_img01.jpg rename to app/design/frontend/default/demo/images/media/best_selling_img01.jpg diff --git a/app/design/frontend/default/default/skin/default/images/media/best_selling_img02.jpg b/app/design/frontend/default/demo/images/media/best_selling_img02.jpg similarity index 100% rename from app/design/frontend/default/default/skin/default/images/media/best_selling_img02.jpg rename to app/design/frontend/default/demo/images/media/best_selling_img02.jpg diff --git a/app/design/frontend/default/default/skin/default/images/media/best_selling_img03.jpg b/app/design/frontend/default/demo/images/media/best_selling_img03.jpg similarity index 100% rename from app/design/frontend/default/default/skin/default/images/media/best_selling_img03.jpg rename to app/design/frontend/default/demo/images/media/best_selling_img03.jpg diff --git a/app/design/frontend/default/default/skin/default/images/media/best_selling_img04.jpg b/app/design/frontend/default/demo/images/media/best_selling_img04.jpg similarity index 100% rename from app/design/frontend/default/default/skin/default/images/media/best_selling_img04.jpg rename to app/design/frontend/default/demo/images/media/best_selling_img04.jpg diff --git a/app/design/frontend/default/default/skin/default/images/media/best_selling_img05.jpg b/app/design/frontend/default/demo/images/media/best_selling_img05.jpg similarity index 100% rename from app/design/frontend/default/default/skin/default/images/media/best_selling_img05.jpg rename to app/design/frontend/default/demo/images/media/best_selling_img05.jpg diff --git a/app/design/frontend/default/default/skin/default/images/media/best_selling_img06.jpg b/app/design/frontend/default/demo/images/media/best_selling_img06.jpg similarity index 100% rename from app/design/frontend/default/default/skin/default/images/media/best_selling_img06.jpg rename to app/design/frontend/default/demo/images/media/best_selling_img06.jpg diff --git a/app/design/frontend/default/default/skin/default/images/media/cell_phone_landing_banner1.jpg b/app/design/frontend/default/demo/images/media/cell_phone_landing_banner1.jpg similarity index 100% rename from app/design/frontend/default/default/skin/default/images/media/cell_phone_landing_banner1.jpg rename to app/design/frontend/default/demo/images/media/cell_phone_landing_banner1.jpg diff --git a/app/design/frontend/default/default/skin/default/images/media/col_left_callout.jpg b/app/design/frontend/default/demo/images/media/col_left_callout.jpg similarity index 100% rename from app/design/frontend/default/default/skin/default/images/media/col_left_callout.jpg rename to app/design/frontend/default/demo/images/media/col_left_callout.jpg diff --git a/app/design/frontend/default/default/skin/default/images/media/col_right_callout.jpg b/app/design/frontend/default/demo/images/media/col_right_callout.jpg similarity index 100% rename from app/design/frontend/default/default/skin/default/images/media/col_right_callout.jpg rename to app/design/frontend/default/demo/images/media/col_right_callout.jpg diff --git a/app/design/frontend/default/default/skin/default/images/media/electronics_cellphones.jpg b/app/design/frontend/default/demo/images/media/electronics_cellphones.jpg similarity index 100% rename from app/design/frontend/default/default/skin/default/images/media/electronics_cellphones.jpg rename to app/design/frontend/default/demo/images/media/electronics_cellphones.jpg diff --git a/app/design/frontend/default/default/skin/default/images/media/electronics_digitalcameras.jpg b/app/design/frontend/default/demo/images/media/electronics_digitalcameras.jpg similarity index 100% rename from app/design/frontend/default/default/skin/default/images/media/electronics_digitalcameras.jpg rename to app/design/frontend/default/demo/images/media/electronics_digitalcameras.jpg diff --git a/app/design/frontend/default/default/skin/default/images/media/electronics_laptops.jpg b/app/design/frontend/default/demo/images/media/electronics_laptops.jpg similarity index 100% rename from app/design/frontend/default/default/skin/default/images/media/electronics_laptops.jpg rename to app/design/frontend/default/demo/images/media/electronics_laptops.jpg diff --git a/app/design/frontend/default/default/skin/default/images/media/furniture_callout_spot.jpg b/app/design/frontend/default/demo/images/media/furniture_callout_spot.jpg similarity index 100% rename from app/design/frontend/default/default/skin/default/images/media/furniture_callout_spot.jpg rename to app/design/frontend/default/demo/images/media/furniture_callout_spot.jpg diff --git a/app/design/frontend/default/default/skin/default/images/media/furnitures_bed_room.jpg b/app/design/frontend/default/demo/images/media/furnitures_bed_room.jpg similarity index 100% rename from app/design/frontend/default/default/skin/default/images/media/furnitures_bed_room.jpg rename to app/design/frontend/default/demo/images/media/furnitures_bed_room.jpg diff --git a/app/design/frontend/default/default/skin/default/images/media/furnitures_living_room.jpg b/app/design/frontend/default/demo/images/media/furnitures_living_room.jpg similarity index 100% rename from app/design/frontend/default/default/skin/default/images/media/furnitures_living_room.jpg rename to app/design/frontend/default/demo/images/media/furnitures_living_room.jpg diff --git a/app/design/frontend/default/default/skin/default/images/media/head_electronics_cellphones.gif b/app/design/frontend/default/demo/images/media/head_electronics_cellphones.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/media/head_electronics_cellphones.gif rename to app/design/frontend/default/demo/images/media/head_electronics_cellphones.gif diff --git a/app/design/frontend/default/default/skin/default/images/media/head_electronics_digicamera.gif b/app/design/frontend/default/demo/images/media/head_electronics_digicamera.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/media/head_electronics_digicamera.gif rename to app/design/frontend/default/demo/images/media/head_electronics_digicamera.gif diff --git a/app/design/frontend/default/default/skin/default/images/media/head_electronics_laptops.gif b/app/design/frontend/default/demo/images/media/head_electronics_laptops.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/media/head_electronics_laptops.gif rename to app/design/frontend/default/demo/images/media/head_electronics_laptops.gif diff --git a/app/design/frontend/default/default/skin/default/images/media/laptop_callout_mid1.jpg b/app/design/frontend/default/demo/images/media/laptop_callout_mid1.jpg similarity index 100% rename from app/design/frontend/default/default/skin/default/images/media/laptop_callout_mid1.jpg rename to app/design/frontend/default/demo/images/media/laptop_callout_mid1.jpg diff --git a/app/design/frontend/default/default/skin/default/images/media/laptop_callout_mid2.jpg b/app/design/frontend/default/demo/images/media/laptop_callout_mid2.jpg similarity index 100% rename from app/design/frontend/default/default/skin/default/images/media/laptop_callout_mid2.jpg rename to app/design/frontend/default/demo/images/media/laptop_callout_mid2.jpg diff --git a/app/design/frontend/default/default/skin/default/images/media/laptop_callout_mid3.jpg b/app/design/frontend/default/demo/images/media/laptop_callout_mid3.jpg similarity index 100% rename from app/design/frontend/default/default/skin/default/images/media/laptop_callout_mid3.jpg rename to app/design/frontend/default/demo/images/media/laptop_callout_mid3.jpg diff --git a/app/design/frontend/default/default/skin/default/images/media/laptop_callout_spot.jpg b/app/design/frontend/default/demo/images/media/laptop_callout_spot.jpg similarity index 100% rename from app/design/frontend/default/default/skin/default/images/media/laptop_callout_spot.jpg rename to app/design/frontend/default/demo/images/media/laptop_callout_spot.jpg diff --git a/app/design/frontend/default/default/skin/default/images/media/shirts_landing_banner1.jpg b/app/design/frontend/default/demo/images/media/shirts_landing_banner1.jpg similarity index 100% rename from app/design/frontend/default/default/skin/default/images/media/shirts_landing_banner1.jpg rename to app/design/frontend/default/demo/images/media/shirts_landing_banner1.jpg diff --git a/app/design/frontend/default/default/skin/default/images/np_cart_thumb.gif b/app/design/frontend/default/demo/images/np_cart_thumb.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/np_cart_thumb.gif rename to app/design/frontend/default/demo/images/np_cart_thumb.gif diff --git a/app/design/frontend/default/default/skin/default/images/np_more_img.gif b/app/design/frontend/default/demo/images/np_more_img.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/np_more_img.gif rename to app/design/frontend/default/demo/images/np_more_img.gif diff --git a/app/design/frontend/default/default/skin/default/images/np_product_main.gif b/app/design/frontend/default/demo/images/np_product_main.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/np_product_main.gif rename to app/design/frontend/default/demo/images/np_product_main.gif diff --git a/app/design/frontend/default/default/skin/default/images/np_thumb.gif b/app/design/frontend/default/demo/images/np_thumb.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/np_thumb.gif rename to app/design/frontend/default/demo/images/np_thumb.gif diff --git a/app/design/frontend/default/default/skin/default/images/np_thumb2.gif b/app/design/frontend/default/demo/images/np_thumb2.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/np_thumb2.gif rename to app/design/frontend/default/demo/images/np_thumb2.gif diff --git a/app/design/frontend/default/default/skin/blue/images/opc-ajax-loader.gif b/app/design/frontend/default/demo/images/opc-ajax-loader.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/opc-ajax-loader.gif rename to app/design/frontend/default/demo/images/opc-ajax-loader.gif diff --git a/app/design/frontend/default/default/skin/blue/images/pager_arrow_left.gif b/app/design/frontend/default/demo/images/pager_arrow_left.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/pager_arrow_left.gif rename to app/design/frontend/default/demo/images/pager_arrow_left.gif diff --git a/app/design/frontend/default/default/skin/blue/images/pager_arrow_right.gif b/app/design/frontend/default/demo/images/pager_arrow_right.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/pager_arrow_right.gif rename to app/design/frontend/default/demo/images/pager_arrow_right.gif diff --git a/app/design/frontend/default/default/skin/default/images/ph_callout_left_rebel.jpg b/app/design/frontend/default/demo/images/ph_callout_left_rebel.jpg similarity index 100% rename from app/design/frontend/default/default/skin/default/images/ph_callout_left_rebel.jpg rename to app/design/frontend/default/demo/images/ph_callout_left_rebel.jpg diff --git a/app/design/frontend/default/default/skin/default/images/ph_callout_left_top.gif b/app/design/frontend/default/demo/images/ph_callout_left_top.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/ph_callout_left_top.gif rename to app/design/frontend/default/demo/images/ph_callout_left_top.gif diff --git a/app/design/frontend/default/default/skin/blue/images/product_zoom_overlay_magnif.gif b/app/design/frontend/default/demo/images/product_zoom_overlay_magnif.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/product_zoom_overlay_magnif.gif rename to app/design/frontend/default/demo/images/product_zoom_overlay_magnif.gif diff --git a/app/design/frontend/default/default/skin/blue/images/slider_bg.gif b/app/design/frontend/default/demo/images/slider_bg.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/slider_bg.gif rename to app/design/frontend/default/demo/images/slider_bg.gif diff --git a/app/design/frontend/default/default/skin/blue/images/slider_btn_zoom_in.gif b/app/design/frontend/default/demo/images/slider_btn_zoom_in.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/slider_btn_zoom_in.gif rename to app/design/frontend/default/demo/images/slider_btn_zoom_in.gif diff --git a/app/design/frontend/default/default/skin/blue/images/slider_btn_zoom_out.gif b/app/design/frontend/default/demo/images/slider_btn_zoom_out.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/slider_btn_zoom_out.gif rename to app/design/frontend/default/demo/images/slider_btn_zoom_out.gif diff --git a/app/design/frontend/default/default/skin/blue/images/spacer.gif b/app/design/frontend/default/demo/images/spacer.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/spacer.gif rename to app/design/frontend/default/demo/images/spacer.gif diff --git a/app/design/frontend/default/default/skin/blue/images/validation_advice_bg.gif b/app/design/frontend/default/demo/images/validation_advice_bg.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/validation_advice_bg.gif rename to app/design/frontend/default/demo/images/validation_advice_bg.gif diff --git a/app/design/frontend/default/demo/local.xml b/app/design/frontend/default/demo/local.xml new file mode 100644 index 0000000000000000000000000000000000000000..d18da1122073134e517503b128ab9cf4782506bf --- /dev/null +++ b/app/design/frontend/default/demo/local.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +/** + * 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 design + * @package default_default + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<layout version="0.1.0"> + <default> + <reference name="head"> + <action method="addCss"><file>css/styles.css</file></action> + <action method="addCss"><file>css/styles-ie.css</file><params/><if>lt IE 8</if></action> + <action method="addCss"><file>css/print.css</file><params>media="print"</params></action> + </reference> + </default> + + <print> + <reference name="head"> + <action method="addCss"><file>css/styles.css</file></action> + <action method="addCss"><file>css/styles-ie.css</file><params/><if>lt IE 8</if></action> + <action method="addCss"><file>css/print.css</file><params>media="print"</params></action> + </reference> + </print> +</layout> diff --git a/app/design/frontend/default/default/skin/default/locale/de_DE/Mage_Core/logo_email.gif b/app/design/frontend/default/demo/locale/de_DE/Mage_Core/logo_email.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/locale/de_DE/Mage_Core/logo_email.gif rename to app/design/frontend/default/demo/locale/de_DE/Mage_Core/logo_email.gif diff --git a/app/design/frontend/default/default/skin/default/locale/de_DE/images/logo.gif b/app/design/frontend/default/demo/locale/de_DE/images/logo.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/locale/de_DE/images/logo.gif rename to app/design/frontend/default/demo/locale/de_DE/images/logo.gif diff --git a/app/design/frontend/default/default/skin/default/locale/de_DE/images/logo_print.gif b/app/design/frontend/default/demo/locale/de_DE/images/logo_print.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/locale/de_DE/images/logo_print.gif rename to app/design/frontend/default/demo/locale/de_DE/images/logo_print.gif diff --git a/app/design/frontend/default/default/locale/en_US/translate.csv b/app/design/frontend/default/demo/locale/en_US/translate.csv similarity index 100% rename from app/design/frontend/default/default/locale/en_US/translate.csv rename to app/design/frontend/default/demo/locale/en_US/translate.csv diff --git a/app/design/frontend/default/default/skin/default/locale/fr_FR/Mage_Core/logo_email.gif b/app/design/frontend/default/demo/locale/fr_FR/Mage_Core/logo_email.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/locale/fr_FR/Mage_Core/logo_email.gif rename to app/design/frontend/default/demo/locale/fr_FR/Mage_Core/logo_email.gif diff --git a/app/design/frontend/default/default/skin/default/locale/fr_FR/images/logo.gif b/app/design/frontend/default/demo/locale/fr_FR/images/logo.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/locale/fr_FR/images/logo.gif rename to app/design/frontend/default/demo/locale/fr_FR/images/logo.gif diff --git a/app/design/frontend/default/default/skin/default/locale/fr_FR/images/logo_print.gif b/app/design/frontend/default/demo/locale/fr_FR/images/logo_print.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/locale/fr_FR/images/logo_print.gif rename to app/design/frontend/default/demo/locale/fr_FR/images/logo_print.gif diff --git a/app/design/frontend/default/demo/media/preview_image.jpg b/app/design/frontend/default/demo/media/preview_image.jpg new file mode 100644 index 0000000000000000000000000000000000000000..3c9b11dae2719b47bf95d41e69136f1e56ce2904 Binary files /dev/null and b/app/design/frontend/default/demo/media/preview_image.jpg differ diff --git a/app/design/frontend/default/default/theme.xml b/app/design/frontend/default/demo/theme.xml similarity index 92% rename from app/design/frontend/default/default/theme.xml rename to app/design/frontend/default/demo/theme.xml index 92558d3169e9810dd952e7f0662b6a69df249e44..9c9e461021f30932193ec9178dcc8e37825a680c 100644 --- a/app/design/frontend/default/default/theme.xml +++ b/app/design/frontend/default/demo/theme.xml @@ -27,8 +27,8 @@ <design> <package code="default"> <title>Default</title> - <theme version="2.0.0.0" code="default" featured="1"> - <title>Default</title> + <theme version="2.0.0.0" code="demo" featured="1"> + <title>Magento Demo</title> <requirements> <magento_version from="2.0.0.0-dev1" to="*"/> </requirements> diff --git a/app/design/frontend/default/default/skin/blue/css/styles-ie.css b/app/design/frontend/default/demo_blue/css/styles-ie.css similarity index 100% rename from app/design/frontend/default/default/skin/blue/css/styles-ie.css rename to app/design/frontend/default/demo_blue/css/styles-ie.css diff --git a/app/design/frontend/default/default/skin/blue/css/styles.css b/app/design/frontend/default/demo_blue/css/styles.css similarity index 100% rename from app/design/frontend/default/default/skin/blue/css/styles.css rename to app/design/frontend/default/demo_blue/css/styles.css diff --git a/app/design/frontend/default/default/skin/default/images/best_selling_tr_even_bg.gif b/app/design/frontend/default/demo_blue/images/best_selling_tr_even_bg.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/best_selling_tr_even_bg.gif rename to app/design/frontend/default/demo_blue/images/best_selling_tr_even_bg.gif diff --git a/app/design/frontend/default/default/skin/default/images/best_selling_tr_odd_bg.gif b/app/design/frontend/default/demo_blue/images/best_selling_tr_odd_bg.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/best_selling_tr_odd_bg.gif rename to app/design/frontend/default/demo_blue/images/best_selling_tr_odd_bg.gif diff --git a/app/design/frontend/default/default/skin/default/images/bkg_account_box.gif b/app/design/frontend/default/demo_blue/images/bkg_account_box.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/bkg_account_box.gif rename to app/design/frontend/default/demo_blue/images/bkg_account_box.gif diff --git a/app/design/frontend/default/default/skin/default/images/bkg_block-actions.gif b/app/design/frontend/default/demo_blue/images/bkg_block-actions.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/bkg_block-actions.gif rename to app/design/frontend/default/demo_blue/images/bkg_block-actions.gif diff --git a/app/design/frontend/default/default/skin/default/images/bkg_block-currency.gif b/app/design/frontend/default/demo_blue/images/bkg_block-currency.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/bkg_block-currency.gif rename to app/design/frontend/default/demo_blue/images/bkg_block-currency.gif diff --git a/app/design/frontend/default/default/skin/default/images/bkg_block-layered-dd.gif b/app/design/frontend/default/demo_blue/images/bkg_block-layered-dd.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/bkg_block-layered-dd.gif rename to app/design/frontend/default/demo_blue/images/bkg_block-layered-dd.gif diff --git a/app/design/frontend/default/default/skin/default/images/bkg_block-layered-dt.gif b/app/design/frontend/default/demo_blue/images/bkg_block-layered-dt.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/bkg_block-layered-dt.gif rename to app/design/frontend/default/demo_blue/images/bkg_block-layered-dt.gif diff --git a/app/design/frontend/default/default/skin/default/images/bkg_block-layered-label.gif b/app/design/frontend/default/demo_blue/images/bkg_block-layered-label.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/bkg_block-layered-label.gif rename to app/design/frontend/default/demo_blue/images/bkg_block-layered-label.gif diff --git a/app/design/frontend/default/default/skin/default/images/bkg_block-layered-li.gif b/app/design/frontend/default/demo_blue/images/bkg_block-layered-li.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/bkg_block-layered-li.gif rename to app/design/frontend/default/demo_blue/images/bkg_block-layered-li.gif diff --git a/app/design/frontend/default/default/skin/default/images/bkg_block-layered-title.gif b/app/design/frontend/default/demo_blue/images/bkg_block-layered-title.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/bkg_block-layered-title.gif rename to app/design/frontend/default/demo_blue/images/bkg_block-layered-title.gif diff --git a/app/design/frontend/default/default/skin/default/images/bkg_block-layered1.gif b/app/design/frontend/default/demo_blue/images/bkg_block-layered1.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/bkg_block-layered1.gif rename to app/design/frontend/default/demo_blue/images/bkg_block-layered1.gif diff --git a/app/design/frontend/default/default/skin/default/images/bkg_block-title-account.gif b/app/design/frontend/default/demo_blue/images/bkg_block-title-account.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/bkg_block-title-account.gif rename to app/design/frontend/default/demo_blue/images/bkg_block-title-account.gif diff --git a/app/design/frontend/default/default/skin/default/images/bkg_block-title.gif b/app/design/frontend/default/demo_blue/images/bkg_block-title.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/bkg_block-title.gif rename to app/design/frontend/default/demo_blue/images/bkg_block-title.gif diff --git a/app/design/frontend/default/default/skin/blue/images/bkg_body.gif b/app/design/frontend/default/demo_blue/images/bkg_body.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/bkg_body.gif rename to app/design/frontend/default/demo_blue/images/bkg_body.gif diff --git a/app/design/frontend/default/default/skin/blue/images/bkg_body2.gif b/app/design/frontend/default/demo_blue/images/bkg_body2.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/bkg_body2.gif rename to app/design/frontend/default/demo_blue/images/bkg_body2.gif diff --git a/app/design/frontend/default/default/skin/blue/images/bkg_button.gif b/app/design/frontend/default/demo_blue/images/bkg_button.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/bkg_button.gif rename to app/design/frontend/default/demo_blue/images/bkg_button.gif diff --git a/app/design/frontend/default/default/skin/default/images/bkg_buttons-set1.gif b/app/design/frontend/default/demo_blue/images/bkg_buttons-set1.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/bkg_buttons-set1.gif rename to app/design/frontend/default/demo_blue/images/bkg_buttons-set1.gif diff --git a/app/design/frontend/default/default/skin/default/images/bkg_checkout.gif b/app/design/frontend/default/demo_blue/images/bkg_checkout.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/bkg_checkout.gif rename to app/design/frontend/default/demo_blue/images/bkg_checkout.gif diff --git a/app/design/frontend/default/default/skin/default/images/bkg_collapse-gm.gif b/app/design/frontend/default/demo_blue/images/bkg_collapse-gm.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/bkg_collapse-gm.gif rename to app/design/frontend/default/demo_blue/images/bkg_collapse-gm.gif diff --git a/app/design/frontend/default/default/skin/default/images/bkg_collapse.gif b/app/design/frontend/default/demo_blue/images/bkg_collapse.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/bkg_collapse.gif rename to app/design/frontend/default/demo_blue/images/bkg_collapse.gif diff --git a/app/design/frontend/default/default/skin/default/images/bkg_divider1.gif b/app/design/frontend/default/demo_blue/images/bkg_divider1.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/bkg_divider1.gif rename to app/design/frontend/default/demo_blue/images/bkg_divider1.gif diff --git a/app/design/frontend/default/default/skin/blue/images/bkg_form-search.gif b/app/design/frontend/default/demo_blue/images/bkg_form-search.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/bkg_form-search.gif rename to app/design/frontend/default/demo_blue/images/bkg_form-search.gif diff --git a/app/design/frontend/default/default/skin/default/images/bkg_grand-total.gif b/app/design/frontend/default/demo_blue/images/bkg_grand-total.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/bkg_grand-total.gif rename to app/design/frontend/default/demo_blue/images/bkg_grand-total.gif diff --git a/app/design/frontend/default/default/skin/default/images/bkg_grid.gif b/app/design/frontend/default/demo_blue/images/bkg_grid.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/bkg_grid.gif rename to app/design/frontend/default/demo_blue/images/bkg_grid.gif diff --git a/app/design/frontend/default/default/skin/blue/images/bkg_header.jpg b/app/design/frontend/default/demo_blue/images/bkg_header.jpg similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/bkg_header.jpg rename to app/design/frontend/default/demo_blue/images/bkg_header.jpg diff --git a/app/design/frontend/default/default/skin/default/images/bkg_login-box.gif b/app/design/frontend/default/demo_blue/images/bkg_login-box.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/bkg_login-box.gif rename to app/design/frontend/default/demo_blue/images/bkg_login-box.gif diff --git a/app/design/frontend/default/default/skin/default/images/bkg_main1.gif b/app/design/frontend/default/demo_blue/images/bkg_main1.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/bkg_main1.gif rename to app/design/frontend/default/demo_blue/images/bkg_main1.gif diff --git a/app/design/frontend/default/default/skin/default/images/bkg_main2.gif b/app/design/frontend/default/demo_blue/images/bkg_main2.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/bkg_main2.gif rename to app/design/frontend/default/demo_blue/images/bkg_main2.gif diff --git a/app/design/frontend/default/default/skin/default/images/bkg_nav0.jpg b/app/design/frontend/default/demo_blue/images/bkg_nav0.jpg similarity index 100% rename from app/design/frontend/default/default/skin/default/images/bkg_nav0.jpg rename to app/design/frontend/default/demo_blue/images/bkg_nav0.jpg diff --git a/app/design/frontend/default/default/skin/default/images/bkg_nav1.gif b/app/design/frontend/default/demo_blue/images/bkg_nav1.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/bkg_nav1.gif rename to app/design/frontend/default/demo_blue/images/bkg_nav1.gif diff --git a/app/design/frontend/default/default/skin/default/images/bkg_nav2.gif b/app/design/frontend/default/demo_blue/images/bkg_nav2.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/bkg_nav2.gif rename to app/design/frontend/default/demo_blue/images/bkg_nav2.gif diff --git a/app/design/frontend/default/default/skin/default/images/bkg_opc-title-off.gif b/app/design/frontend/default/demo_blue/images/bkg_opc-title-off.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/bkg_opc-title-off.gif rename to app/design/frontend/default/demo_blue/images/bkg_opc-title-off.gif diff --git a/app/design/frontend/default/default/skin/default/images/bkg_pipe1.gif b/app/design/frontend/default/demo_blue/images/bkg_pipe1.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/bkg_pipe1.gif rename to app/design/frontend/default/demo_blue/images/bkg_pipe1.gif diff --git a/app/design/frontend/default/default/skin/default/images/bkg_pipe2.gif b/app/design/frontend/default/demo_blue/images/bkg_pipe2.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/bkg_pipe2.gif rename to app/design/frontend/default/demo_blue/images/bkg_pipe2.gif diff --git a/app/design/frontend/default/default/skin/default/images/bkg_pipe3.gif b/app/design/frontend/default/demo_blue/images/bkg_pipe3.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/bkg_pipe3.gif rename to app/design/frontend/default/demo_blue/images/bkg_pipe3.gif diff --git a/app/design/frontend/default/default/skin/default/images/bkg_product-view.gif b/app/design/frontend/default/demo_blue/images/bkg_product-view.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/bkg_product-view.gif rename to app/design/frontend/default/demo_blue/images/bkg_product-view.gif diff --git a/app/design/frontend/default/default/skin/default/images/bkg_product_collateral.gif b/app/design/frontend/default/demo_blue/images/bkg_product_collateral.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/bkg_product_collateral.gif rename to app/design/frontend/default/demo_blue/images/bkg_product_collateral.gif diff --git a/app/design/frontend/default/default/skin/default/images/bkg_rating.gif b/app/design/frontend/default/demo_blue/images/bkg_rating.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/bkg_rating.gif rename to app/design/frontend/default/demo_blue/images/bkg_rating.gif diff --git a/app/design/frontend/default/default/skin/blue/images/bkg_shadow-bottom.png b/app/design/frontend/default/demo_blue/images/bkg_shadow-bottom.png similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/bkg_shadow-bottom.png rename to app/design/frontend/default/demo_blue/images/bkg_shadow-bottom.png diff --git a/app/design/frontend/default/default/skin/blue/images/bkg_shadow.png b/app/design/frontend/default/demo_blue/images/bkg_shadow.png similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/bkg_shadow.png rename to app/design/frontend/default/demo_blue/images/bkg_shadow.png diff --git a/app/design/frontend/default/default/skin/default/images/bkg_sp-methods.gif b/app/design/frontend/default/demo_blue/images/bkg_sp-methods.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/bkg_sp-methods.gif rename to app/design/frontend/default/demo_blue/images/bkg_sp-methods.gif diff --git a/app/design/frontend/default/default/skin/default/images/bkg_tfoot.gif b/app/design/frontend/default/demo_blue/images/bkg_tfoot.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/bkg_tfoot.gif rename to app/design/frontend/default/demo_blue/images/bkg_tfoot.gif diff --git a/app/design/frontend/default/default/skin/default/images/bkg_th-v.gif b/app/design/frontend/default/demo_blue/images/bkg_th-v.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/bkg_th-v.gif rename to app/design/frontend/default/demo_blue/images/bkg_th-v.gif diff --git a/app/design/frontend/default/default/skin/default/images/bkg_th.gif b/app/design/frontend/default/demo_blue/images/bkg_th.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/bkg_th.gif rename to app/design/frontend/default/demo_blue/images/bkg_th.gif diff --git a/app/design/frontend/default/default/skin/default/images/bkg_toolbar.gif b/app/design/frontend/default/demo_blue/images/bkg_toolbar.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/bkg_toolbar.gif rename to app/design/frontend/default/demo_blue/images/bkg_toolbar.gif diff --git a/app/design/frontend/default/default/skin/blue/images/btn_checkout.gif b/app/design/frontend/default/demo_blue/images/btn_checkout.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/btn_checkout.gif rename to app/design/frontend/default/demo_blue/images/btn_checkout.gif diff --git a/app/design/frontend/default/default/skin/default/images/btn_edit.gif b/app/design/frontend/default/demo_blue/images/btn_edit.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/btn_edit.gif rename to app/design/frontend/default/demo_blue/images/btn_edit.gif diff --git a/app/design/frontend/default/default/skin/default/images/btn_gm-close.gif b/app/design/frontend/default/demo_blue/images/btn_gm-close.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/btn_gm-close.gif rename to app/design/frontend/default/demo_blue/images/btn_gm-close.gif diff --git a/app/design/frontend/default/default/skin/default/images/btn_remove.gif b/app/design/frontend/default/demo_blue/images/btn_remove.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/btn_remove.gif rename to app/design/frontend/default/demo_blue/images/btn_remove.gif diff --git a/app/design/frontend/default/default/skin/default/images/btn_remove2.gif b/app/design/frontend/default/demo_blue/images/btn_remove2.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/btn_remove2.gif rename to app/design/frontend/default/demo_blue/images/btn_remove2.gif diff --git a/app/design/frontend/default/default/skin/default/images/btn_search.gif b/app/design/frontend/default/demo_blue/images/btn_search.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/btn_search.gif rename to app/design/frontend/default/demo_blue/images/btn_search.gif diff --git a/app/design/frontend/default/default/skin/default/images/btn_trash.gif b/app/design/frontend/default/demo_blue/images/btn_trash.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/btn_trash.gif rename to app/design/frontend/default/demo_blue/images/btn_trash.gif diff --git a/app/design/frontend/default/default/skin/default/images/btn_window_close.gif b/app/design/frontend/default/demo_blue/images/btn_window_close.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/btn_window_close.gif rename to app/design/frontend/default/demo_blue/images/btn_window_close.gif diff --git a/app/design/frontend/default/modern/skin/default/images/calendar.gif b/app/design/frontend/default/demo_blue/images/calendar.gif similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/calendar.gif rename to app/design/frontend/default/demo_blue/images/calendar.gif diff --git a/app/design/frontend/default/default/skin/default/images/fam_book_open.png b/app/design/frontend/default/demo_blue/images/fam_book_open.png similarity index 100% rename from app/design/frontend/default/default/skin/default/images/fam_book_open.png rename to app/design/frontend/default/demo_blue/images/fam_book_open.png diff --git a/app/design/frontend/default/default/skin/default/images/grid-cal.gif b/app/design/frontend/default/demo_blue/images/grid-cal.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/grid-cal.gif rename to app/design/frontend/default/demo_blue/images/grid-cal.gif diff --git a/app/design/frontend/default/default/skin/default/images/i_arrow-top.gif b/app/design/frontend/default/demo_blue/images/i_arrow-top.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/i_arrow-top.gif rename to app/design/frontend/default/demo_blue/images/i_arrow-top.gif diff --git a/app/design/frontend/default/default/skin/default/images/i_asc_arrow.gif b/app/design/frontend/default/demo_blue/images/i_asc_arrow.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/i_asc_arrow.gif rename to app/design/frontend/default/demo_blue/images/i_asc_arrow.gif diff --git a/app/design/frontend/default/default/skin/default/images/i_availability_only.gif b/app/design/frontend/default/demo_blue/images/i_availability_only.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/i_availability_only.gif rename to app/design/frontend/default/demo_blue/images/i_availability_only.gif diff --git a/app/design/frontend/default/default/skin/default/images/i_availability_only_arrow.gif b/app/design/frontend/default/demo_blue/images/i_availability_only_arrow.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/i_availability_only_arrow.gif rename to app/design/frontend/default/demo_blue/images/i_availability_only_arrow.gif diff --git a/app/design/frontend/default/default/skin/default/images/i_block-cart.gif b/app/design/frontend/default/demo_blue/images/i_block-cart.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/i_block-cart.gif rename to app/design/frontend/default/demo_blue/images/i_block-cart.gif diff --git a/app/design/frontend/default/default/skin/default/images/i_block-currency.gif b/app/design/frontend/default/demo_blue/images/i_block-currency.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/i_block-currency.gif rename to app/design/frontend/default/demo_blue/images/i_block-currency.gif diff --git a/app/design/frontend/default/default/skin/default/images/i_block-list.gif b/app/design/frontend/default/demo_blue/images/i_block-list.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/i_block-list.gif rename to app/design/frontend/default/demo_blue/images/i_block-list.gif diff --git a/app/design/frontend/default/default/skin/default/images/i_block-poll.gif b/app/design/frontend/default/demo_blue/images/i_block-poll.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/i_block-poll.gif rename to app/design/frontend/default/demo_blue/images/i_block-poll.gif diff --git a/app/design/frontend/default/default/skin/default/images/i_block-related.gif b/app/design/frontend/default/demo_blue/images/i_block-related.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/i_block-related.gif rename to app/design/frontend/default/demo_blue/images/i_block-related.gif diff --git a/app/design/frontend/default/default/skin/default/images/i_block-subscribe.gif b/app/design/frontend/default/demo_blue/images/i_block-subscribe.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/i_block-subscribe.gif rename to app/design/frontend/default/demo_blue/images/i_block-subscribe.gif diff --git a/app/design/frontend/default/default/skin/default/images/i_block-tags.gif b/app/design/frontend/default/demo_blue/images/i_block-tags.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/i_block-tags.gif rename to app/design/frontend/default/demo_blue/images/i_block-tags.gif diff --git a/app/design/frontend/default/default/skin/default/images/i_block-viewed.gif b/app/design/frontend/default/demo_blue/images/i_block-viewed.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/i_block-viewed.gif rename to app/design/frontend/default/demo_blue/images/i_block-viewed.gif diff --git a/app/design/frontend/default/default/skin/default/images/i_block-wishlist.gif b/app/design/frontend/default/demo_blue/images/i_block-wishlist.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/i_block-wishlist.gif rename to app/design/frontend/default/demo_blue/images/i_block-wishlist.gif diff --git a/app/design/frontend/default/default/skin/default/images/i_desc_arrow.gif b/app/design/frontend/default/demo_blue/images/i_desc_arrow.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/i_desc_arrow.gif rename to app/design/frontend/default/demo_blue/images/i_desc_arrow.gif diff --git a/app/design/frontend/default/default/skin/default/images/i_discount.gif b/app/design/frontend/default/demo_blue/images/i_discount.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/i_discount.gif rename to app/design/frontend/default/demo_blue/images/i_discount.gif diff --git a/app/design/frontend/default/default/skin/default/images/i_folder-table.gif b/app/design/frontend/default/demo_blue/images/i_folder-table.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/i_folder-table.gif rename to app/design/frontend/default/demo_blue/images/i_folder-table.gif diff --git a/app/design/frontend/default/default/skin/default/images/i_ma-info.gif b/app/design/frontend/default/demo_blue/images/i_ma-info.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/i_ma-info.gif rename to app/design/frontend/default/demo_blue/images/i_ma-info.gif diff --git a/app/design/frontend/default/default/skin/default/images/i_ma-reviews.gif b/app/design/frontend/default/demo_blue/images/i_ma-reviews.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/i_ma-reviews.gif rename to app/design/frontend/default/demo_blue/images/i_ma-reviews.gif diff --git a/app/design/frontend/default/default/skin/default/images/i_ma-tags.gif b/app/design/frontend/default/demo_blue/images/i_ma-tags.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/i_ma-tags.gif rename to app/design/frontend/default/demo_blue/images/i_ma-tags.gif diff --git a/app/design/frontend/default/default/skin/default/images/i_msg-error.gif b/app/design/frontend/default/demo_blue/images/i_msg-error.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/i_msg-error.gif rename to app/design/frontend/default/demo_blue/images/i_msg-error.gif diff --git a/app/design/frontend/default/default/skin/default/images/i_msg-note.gif b/app/design/frontend/default/demo_blue/images/i_msg-note.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/i_msg-note.gif rename to app/design/frontend/default/demo_blue/images/i_msg-note.gif diff --git a/app/design/frontend/default/default/skin/default/images/i_msg-success.gif b/app/design/frontend/default/demo_blue/images/i_msg-success.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/i_msg-success.gif rename to app/design/frontend/default/demo_blue/images/i_msg-success.gif diff --git a/app/design/frontend/default/default/skin/default/images/i_notice.gif b/app/design/frontend/default/demo_blue/images/i_notice.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/i_notice.gif rename to app/design/frontend/default/demo_blue/images/i_notice.gif diff --git a/app/design/frontend/default/default/skin/default/images/i_page1.gif b/app/design/frontend/default/demo_blue/images/i_page1.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/i_page1.gif rename to app/design/frontend/default/demo_blue/images/i_page1.gif diff --git a/app/design/frontend/default/default/skin/default/images/i_page2.gif b/app/design/frontend/default/demo_blue/images/i_page2.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/i_page2.gif rename to app/design/frontend/default/demo_blue/images/i_page2.gif diff --git a/app/design/frontend/default/default/skin/default/images/i_pager-next.gif b/app/design/frontend/default/demo_blue/images/i_pager-next.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/i_pager-next.gif rename to app/design/frontend/default/demo_blue/images/i_pager-next.gif diff --git a/app/design/frontend/default/default/skin/default/images/i_pager-prev.gif b/app/design/frontend/default/demo_blue/images/i_pager-prev.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/i_pager-prev.gif rename to app/design/frontend/default/demo_blue/images/i_pager-prev.gif diff --git a/app/design/frontend/default/default/skin/default/images/i_print.gif b/app/design/frontend/default/demo_blue/images/i_print.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/i_print.gif rename to app/design/frontend/default/demo_blue/images/i_print.gif diff --git a/app/design/frontend/default/default/skin/default/images/i_rss-big.png b/app/design/frontend/default/demo_blue/images/i_rss-big.png similarity index 100% rename from app/design/frontend/default/default/skin/default/images/i_rss-big.png rename to app/design/frontend/default/demo_blue/images/i_rss-big.png diff --git a/app/design/frontend/default/default/skin/default/images/i_rss.gif b/app/design/frontend/default/demo_blue/images/i_rss.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/i_rss.gif rename to app/design/frontend/default/demo_blue/images/i_rss.gif diff --git a/app/design/frontend/default/default/skin/default/images/i_search_criteria.gif b/app/design/frontend/default/demo_blue/images/i_search_criteria.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/i_search_criteria.gif rename to app/design/frontend/default/demo_blue/images/i_search_criteria.gif diff --git a/app/design/frontend/default/default/skin/default/images/i_shipping.gif b/app/design/frontend/default/demo_blue/images/i_shipping.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/i_shipping.gif rename to app/design/frontend/default/demo_blue/images/i_shipping.gif diff --git a/app/design/frontend/default/default/skin/default/images/i_tag_add.gif b/app/design/frontend/default/demo_blue/images/i_tag_add.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/i_tag_add.gif rename to app/design/frontend/default/demo_blue/images/i_tag_add.gif diff --git a/app/design/frontend/default/default/skin/default/images/i_tier.gif b/app/design/frontend/default/demo_blue/images/i_tier.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/i_tier.gif rename to app/design/frontend/default/demo_blue/images/i_tier.gif diff --git a/app/design/frontend/default/default/skin/default/images/logo.gif b/app/design/frontend/default/demo_blue/images/logo.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/logo.gif rename to app/design/frontend/default/demo_blue/images/logo.gif diff --git a/app/design/frontend/default/default/skin/default/images/logo_print.gif b/app/design/frontend/default/demo_blue/images/logo_print.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/logo_print.gif rename to app/design/frontend/default/demo_blue/images/logo_print.gif diff --git a/app/design/frontend/default/default/skin/default/images/magnifier_handle.gif b/app/design/frontend/default/demo_blue/images/magnifier_handle.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/magnifier_handle.gif rename to app/design/frontend/default/demo_blue/images/magnifier_handle.gif diff --git a/app/design/frontend/default/default/skin/blue/images/map_popup_arrow.gif b/app/design/frontend/default/demo_blue/images/map_popup_arrow.gif similarity index 100% rename from app/design/frontend/default/default/skin/blue/images/map_popup_arrow.gif rename to app/design/frontend/default/demo_blue/images/map_popup_arrow.gif diff --git a/app/design/frontend/default/default/skin/default/images/opc-ajax-loader.gif b/app/design/frontend/default/demo_blue/images/opc-ajax-loader.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/opc-ajax-loader.gif rename to app/design/frontend/default/demo_blue/images/opc-ajax-loader.gif diff --git a/app/design/frontend/default/default/skin/default/images/pager_arrow_left.gif b/app/design/frontend/default/demo_blue/images/pager_arrow_left.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/pager_arrow_left.gif rename to app/design/frontend/default/demo_blue/images/pager_arrow_left.gif diff --git a/app/design/frontend/default/default/skin/default/images/pager_arrow_right.gif b/app/design/frontend/default/demo_blue/images/pager_arrow_right.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/pager_arrow_right.gif rename to app/design/frontend/default/demo_blue/images/pager_arrow_right.gif diff --git a/app/design/frontend/default/default/skin/default/images/product_zoom_overlay_magnif.gif b/app/design/frontend/default/demo_blue/images/product_zoom_overlay_magnif.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/product_zoom_overlay_magnif.gif rename to app/design/frontend/default/demo_blue/images/product_zoom_overlay_magnif.gif diff --git a/app/design/frontend/default/default/skin/default/images/slider_bg.gif b/app/design/frontend/default/demo_blue/images/slider_bg.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/slider_bg.gif rename to app/design/frontend/default/demo_blue/images/slider_bg.gif diff --git a/app/design/frontend/default/default/skin/default/images/slider_btn_zoom_in.gif b/app/design/frontend/default/demo_blue/images/slider_btn_zoom_in.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/slider_btn_zoom_in.gif rename to app/design/frontend/default/demo_blue/images/slider_btn_zoom_in.gif diff --git a/app/design/frontend/default/default/skin/default/images/slider_btn_zoom_out.gif b/app/design/frontend/default/demo_blue/images/slider_btn_zoom_out.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/slider_btn_zoom_out.gif rename to app/design/frontend/default/demo_blue/images/slider_btn_zoom_out.gif diff --git a/app/design/frontend/default/default/skin/default/images/spacer.gif b/app/design/frontend/default/demo_blue/images/spacer.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/spacer.gif rename to app/design/frontend/default/demo_blue/images/spacer.gif diff --git a/app/design/frontend/default/default/skin/default/images/validation_advice_bg.gif b/app/design/frontend/default/demo_blue/images/validation_advice_bg.gif similarity index 100% rename from app/design/frontend/default/default/skin/default/images/validation_advice_bg.gif rename to app/design/frontend/default/demo_blue/images/validation_advice_bg.gif diff --git a/app/design/frontend/default/demo_blue/local.xml b/app/design/frontend/default/demo_blue/local.xml new file mode 100644 index 0000000000000000000000000000000000000000..d18da1122073134e517503b128ab9cf4782506bf --- /dev/null +++ b/app/design/frontend/default/demo_blue/local.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +/** + * 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 design + * @package default_default + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<layout version="0.1.0"> + <default> + <reference name="head"> + <action method="addCss"><file>css/styles.css</file></action> + <action method="addCss"><file>css/styles-ie.css</file><params/><if>lt IE 8</if></action> + <action method="addCss"><file>css/print.css</file><params>media="print"</params></action> + </reference> + </default> + + <print> + <reference name="head"> + <action method="addCss"><file>css/styles.css</file></action> + <action method="addCss"><file>css/styles-ie.css</file><params/><if>lt IE 8</if></action> + <action method="addCss"><file>css/print.css</file><params>media="print"</params></action> + </reference> + </print> +</layout> diff --git a/app/design/frontend/default/demo_blue/media/preview_image.jpg b/app/design/frontend/default/demo_blue/media/preview_image.jpg new file mode 100644 index 0000000000000000000000000000000000000000..3c9b11dae2719b47bf95d41e69136f1e56ce2904 Binary files /dev/null and b/app/design/frontend/default/demo_blue/media/preview_image.jpg differ diff --git a/app/design/frontend/default/demo_blue/theme.xml b/app/design/frontend/default/demo_blue/theme.xml new file mode 100644 index 0000000000000000000000000000000000000000..475df0cc3932c2ad97f227650217c70be0983277 --- /dev/null +++ b/app/design/frontend/default/demo_blue/theme.xml @@ -0,0 +1,40 @@ +<!-- +/** + * 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 Magento + * @package Design + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<design> + <package code="default"> + <title>Default</title> + <theme version="2.0.0.0" code="demo_blue" parent="demo" featured="1"> + <title>Magento Demo Blue</title> + <requirements> + <magento_version from="2.0.0.0-dev1" to="*"/> + </requirements> + <media> + <preview_image>media/preview_image.jpg</preview_image> + </media> + </theme> + </package> +</design> diff --git a/app/design/frontend/default/iphone/Mage_Checkout/onepage/review/info.phtml b/app/design/frontend/default/iphone/Mage_Checkout/onepage/review/info.phtml index d44a49d5afe0bbfb850d9bffcb1e4f3a314df3a4..4fb139f1f10038ad5c01a84b1c8676ffb3264dd2 100644 --- a/app/design/frontend/default/iphone/Mage_Checkout/onepage/review/info.phtml +++ b/app/design/frontend/default/iphone/Mage_Checkout/onepage/review/info.phtml @@ -51,7 +51,7 @@ <p class="f-left"><?php echo $this->__('Forgot an Item?') ?> <a href="<?php echo $this->getUrl('checkout/cart') ?>"><?php echo $this->__('Edit Your Cart') ?></a></p> <?php echo $this->getChildHtml('button') ?> <span class="please-wait" id="review-please-wait" style="display:none;"> - <img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo $this->__('Submitting order information...') ?>" title="<?php echo $this->__('Submitting order information...') ?>" class="v-middle" /> <?php echo $this->__('Submitting order information...') ?> + <img src="<?php echo $this->getViewFileUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo $this->__('Submitting order information...') ?>" title="<?php echo $this->__('Submitting order information...') ?>" class="v-middle" /> <?php echo $this->__('Submitting order information...') ?> </span> </div> <script type="text/javascript"> diff --git a/app/design/frontend/default/iphone/skin/default/Mage_DesignEditor/css/iphone_styles.css b/app/design/frontend/default/iphone/Mage_DesignEditor/css/iphone_styles.css similarity index 100% rename from app/design/frontend/default/iphone/skin/default/Mage_DesignEditor/css/iphone_styles.css rename to app/design/frontend/default/iphone/Mage_DesignEditor/css/iphone_styles.css diff --git a/app/design/frontend/default/iphone/Mage_Page/html/footer.phtml b/app/design/frontend/default/iphone/Mage_Page/html/footer.phtml index 57b4d65b31f07dcadf95e1c90c838fd028e8a304..8f96ac6b3511abbf64e037b9e5e681c84fe76432 100644 --- a/app/design/frontend/default/iphone/Mage_Page/html/footer.phtml +++ b/app/design/frontend/default/iphone/Mage_Page/html/footer.phtml @@ -27,4 +27,4 @@ <footer> <?php echo $this->getChildHtml() ?> </footer> -<address class="copyright"><span class="logo"><img src="<?php echo $this->getSkinUrl(Mage::getStoreConfig('design/header/logo_src'))?>" width="21" alt=""/></span><?php echo $this->getCopyright() ?></address> +<address class="copyright"><span class="logo"><img src="<?php echo $this->getViewFileUrl(Mage::getStoreConfig('design/header/logo_src'))?>" width="21" alt=""/></span><?php echo $this->getCopyright() ?></address> diff --git a/app/design/frontend/default/iphone/Mage_Paypal/express/review/review.phtml b/app/design/frontend/default/iphone/Mage_Paypal/express/review/review.phtml index f82cec0f310f68d0fa7d4de3735f39f3e6f255e2..07638357bc862ef16af4abf0b9d17a613d00504b 100644 --- a/app/design/frontend/default/iphone/Mage_Paypal/express/review/review.phtml +++ b/app/design/frontend/default/iphone/Mage_Paypal/express/review/review.phtml @@ -99,7 +99,7 @@ $shippingAddress = $this->getShippingAddress(); <button type="button" id="review_submit" value="<?php echo $this->__('Place Order') ?>" class="button btn-checkout"><span><span><?php echo $this->__('Place Order') ?></span></span></button> <button type="button" id="update_order" class="button btn-checkout"><span><span><?php echo $this->__('Update Order Data') ?></span></span></button> <span class="please-wait" id="review-please-wait" style="display:none;"> - <img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo $this->__('Submitting order information...') ?>" title="<?php echo $this->__('Submitting order information...') ?>" class="v-middle" /> <?php echo $this->__('Submitting order information...') ?> + <img src="<?php echo $this->getViewFileUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo $this->__('Submitting order information...') ?>" title="<?php echo $this->__('Submitting order information...') ?>" class="v-middle" /> <?php echo $this->__('Submitting order information...') ?> </span> </div> </form> diff --git a/app/design/frontend/default/iphone/skin/default/css/custom.css b/app/design/frontend/default/iphone/css/custom.css similarity index 100% rename from app/design/frontend/default/iphone/skin/default/css/custom.css rename to app/design/frontend/default/iphone/css/custom.css diff --git a/app/design/frontend/default/iphone/skin/default/css/iphone.css b/app/design/frontend/default/iphone/css/iphone.css similarity index 100% rename from app/design/frontend/default/iphone/skin/default/css/iphone.css rename to app/design/frontend/default/iphone/css/iphone.css diff --git a/app/design/frontend/default/iphone/skin/default/images/arrow_left.png b/app/design/frontend/default/iphone/images/arrow_left.png similarity index 100% rename from app/design/frontend/default/iphone/skin/default/images/arrow_left.png rename to app/design/frontend/default/iphone/images/arrow_left.png diff --git a/app/design/frontend/default/iphone/skin/default/images/arrow_left_retina.png b/app/design/frontend/default/iphone/images/arrow_left_retina.png similarity index 100% rename from app/design/frontend/default/iphone/skin/default/images/arrow_left_retina.png rename to app/design/frontend/default/iphone/images/arrow_left_retina.png diff --git a/app/design/frontend/default/iphone/skin/default/images/arrow_right.png b/app/design/frontend/default/iphone/images/arrow_right.png similarity index 100% rename from app/design/frontend/default/iphone/skin/default/images/arrow_right.png rename to app/design/frontend/default/iphone/images/arrow_right.png diff --git a/app/design/frontend/default/iphone/skin/default/images/arrow_right_retina.png b/app/design/frontend/default/iphone/images/arrow_right_retina.png similarity index 100% rename from app/design/frontend/default/iphone/skin/default/images/arrow_right_retina.png rename to app/design/frontend/default/iphone/images/arrow_right_retina.png diff --git a/app/design/frontend/default/iphone/skin/default/images/bg_back_btn.png b/app/design/frontend/default/iphone/images/bg_back_btn.png similarity index 100% rename from app/design/frontend/default/iphone/skin/default/images/bg_back_btn.png rename to app/design/frontend/default/iphone/images/bg_back_btn.png diff --git a/app/design/frontend/default/iphone/skin/default/images/bg_back_btn_retina.png b/app/design/frontend/default/iphone/images/bg_back_btn_retina.png similarity index 100% rename from app/design/frontend/default/iphone/skin/default/images/bg_back_btn_retina.png rename to app/design/frontend/default/iphone/images/bg_back_btn_retina.png diff --git a/app/design/frontend/default/iphone/skin/default/images/bg_checkbox.png b/app/design/frontend/default/iphone/images/bg_checkbox.png similarity index 100% rename from app/design/frontend/default/iphone/skin/default/images/bg_checkbox.png rename to app/design/frontend/default/iphone/images/bg_checkbox.png diff --git a/app/design/frontend/default/iphone/skin/default/images/bg_checkout_step_passed.png b/app/design/frontend/default/iphone/images/bg_checkout_step_passed.png similarity index 100% rename from app/design/frontend/default/iphone/skin/default/images/bg_checkout_step_passed.png rename to app/design/frontend/default/iphone/images/bg_checkout_step_passed.png diff --git a/app/design/frontend/default/iphone/skin/default/images/bg_divider.png b/app/design/frontend/default/iphone/images/bg_divider.png similarity index 100% rename from app/design/frontend/default/iphone/skin/default/images/bg_divider.png rename to app/design/frontend/default/iphone/images/bg_divider.png diff --git a/app/design/frontend/default/iphone/skin/default/images/bg_divider_dark.png b/app/design/frontend/default/iphone/images/bg_divider_dark.png similarity index 100% rename from app/design/frontend/default/iphone/skin/default/images/bg_divider_dark.png rename to app/design/frontend/default/iphone/images/bg_divider_dark.png diff --git a/app/design/frontend/default/iphone/skin/default/images/bg_divider_dark_retina.png b/app/design/frontend/default/iphone/images/bg_divider_dark_retina.png similarity index 100% rename from app/design/frontend/default/iphone/skin/default/images/bg_divider_dark_retina.png rename to app/design/frontend/default/iphone/images/bg_divider_dark_retina.png diff --git a/app/design/frontend/default/iphone/skin/default/images/bg_divider_retina.png b/app/design/frontend/default/iphone/images/bg_divider_retina.png similarity index 100% rename from app/design/frontend/default/iphone/skin/default/images/bg_divider_retina.png rename to app/design/frontend/default/iphone/images/bg_divider_retina.png diff --git a/app/design/frontend/default/iphone/skin/default/images/bg_gradient.png b/app/design/frontend/default/iphone/images/bg_gradient.png similarity index 100% rename from app/design/frontend/default/iphone/skin/default/images/bg_gradient.png rename to app/design/frontend/default/iphone/images/bg_gradient.png diff --git a/app/design/frontend/default/iphone/skin/default/images/bg_gradient_retina.png b/app/design/frontend/default/iphone/images/bg_gradient_retina.png similarity index 100% rename from app/design/frontend/default/iphone/skin/default/images/bg_gradient_retina.png rename to app/design/frontend/default/iphone/images/bg_gradient_retina.png diff --git a/app/design/frontend/default/iphone/skin/default/images/bg_qty.png b/app/design/frontend/default/iphone/images/bg_qty.png similarity index 100% rename from app/design/frontend/default/iphone/skin/default/images/bg_qty.png rename to app/design/frontend/default/iphone/images/bg_qty.png diff --git a/app/design/frontend/default/iphone/skin/default/images/bg_shadow.png b/app/design/frontend/default/iphone/images/bg_shadow.png similarity index 100% rename from app/design/frontend/default/iphone/skin/default/images/bg_shadow.png rename to app/design/frontend/default/iphone/images/bg_shadow.png diff --git a/app/design/frontend/default/iphone/skin/default/images/bg_shadow_retina.png b/app/design/frontend/default/iphone/images/bg_shadow_retina.png similarity index 100% rename from app/design/frontend/default/iphone/skin/default/images/bg_shadow_retina.png rename to app/design/frontend/default/iphone/images/bg_shadow_retina.png diff --git a/app/design/frontend/default/iphone/skin/default/images/bkg_bulletsm.gif b/app/design/frontend/default/iphone/images/bkg_bulletsm.gif similarity index 100% rename from app/design/frontend/default/iphone/skin/default/images/bkg_bulletsm.gif rename to app/design/frontend/default/iphone/images/bkg_bulletsm.gif diff --git a/app/design/frontend/default/iphone/skin/default/images/btn_edit.png b/app/design/frontend/default/iphone/images/btn_edit.png similarity index 100% rename from app/design/frontend/default/iphone/skin/default/images/btn_edit.png rename to app/design/frontend/default/iphone/images/btn_edit.png diff --git a/app/design/frontend/default/iphone/skin/default/images/btn_edit_retina.png b/app/design/frontend/default/iphone/images/btn_edit_retina.png similarity index 100% rename from app/design/frontend/default/iphone/skin/default/images/btn_edit_retina.png rename to app/design/frontend/default/iphone/images/btn_edit_retina.png diff --git a/app/design/frontend/default/iphone/skin/default/images/btn_remove.png b/app/design/frontend/default/iphone/images/btn_remove.png similarity index 100% rename from app/design/frontend/default/iphone/skin/default/images/btn_remove.png rename to app/design/frontend/default/iphone/images/btn_remove.png diff --git a/app/design/frontend/default/iphone/skin/default/images/btn_remove_retina.png b/app/design/frontend/default/iphone/images/btn_remove_retina.png similarity index 100% rename from app/design/frontend/default/iphone/skin/default/images/btn_remove_retina.png rename to app/design/frontend/default/iphone/images/btn_remove_retina.png diff --git a/app/design/frontend/default/iphone/skin/default/images/custom/arrow.png b/app/design/frontend/default/iphone/images/custom/arrow.png similarity index 100% rename from app/design/frontend/default/iphone/skin/default/images/custom/arrow.png rename to app/design/frontend/default/iphone/images/custom/arrow.png diff --git a/app/design/frontend/default/iphone/skin/default/images/custom/arrow_retina.png b/app/design/frontend/default/iphone/images/custom/arrow_retina.png similarity index 100% rename from app/design/frontend/default/iphone/skin/default/images/custom/arrow_retina.png rename to app/design/frontend/default/iphone/images/custom/arrow_retina.png diff --git a/app/design/frontend/default/iphone/skin/default/images/custom/bg_header.png b/app/design/frontend/default/iphone/images/custom/bg_header.png similarity index 100% rename from app/design/frontend/default/iphone/skin/default/images/custom/bg_header.png rename to app/design/frontend/default/iphone/images/custom/bg_header.png diff --git a/app/design/frontend/default/iphone/skin/default/images/custom/bg_header_retina.png b/app/design/frontend/default/iphone/images/custom/bg_header_retina.png similarity index 100% rename from app/design/frontend/default/iphone/skin/default/images/custom/bg_header_retina.png rename to app/design/frontend/default/iphone/images/custom/bg_header_retina.png diff --git a/app/design/frontend/default/iphone/skin/default/images/custom/bg_logo.png b/app/design/frontend/default/iphone/images/custom/bg_logo.png similarity index 100% rename from app/design/frontend/default/iphone/skin/default/images/custom/bg_logo.png rename to app/design/frontend/default/iphone/images/custom/bg_logo.png diff --git a/app/design/frontend/default/iphone/skin/default/images/custom/bg_logo_retina.png b/app/design/frontend/default/iphone/images/custom/bg_logo_retina.png similarity index 100% rename from app/design/frontend/default/iphone/skin/default/images/custom/bg_logo_retina.png rename to app/design/frontend/default/iphone/images/custom/bg_logo_retina.png diff --git a/app/design/frontend/default/iphone/skin/default/images/i_cart.png b/app/design/frontend/default/iphone/images/i_cart.png similarity index 100% rename from app/design/frontend/default/iphone/skin/default/images/i_cart.png rename to app/design/frontend/default/iphone/images/i_cart.png diff --git a/app/design/frontend/default/iphone/skin/default/images/i_cart_retina.png b/app/design/frontend/default/iphone/images/i_cart_retina.png similarity index 100% rename from app/design/frontend/default/iphone/skin/default/images/i_cart_retina.png rename to app/design/frontend/default/iphone/images/i_cart_retina.png diff --git a/app/design/frontend/default/iphone/skin/default/images/i_dropdown.png b/app/design/frontend/default/iphone/images/i_dropdown.png similarity index 100% rename from app/design/frontend/default/iphone/skin/default/images/i_dropdown.png rename to app/design/frontend/default/iphone/images/i_dropdown.png diff --git a/app/design/frontend/default/iphone/skin/default/images/i_dropdown_retina.png b/app/design/frontend/default/iphone/images/i_dropdown_retina.png similarity index 100% rename from app/design/frontend/default/iphone/skin/default/images/i_dropdown_retina.png rename to app/design/frontend/default/iphone/images/i_dropdown_retina.png diff --git a/app/design/frontend/default/iphone/skin/default/images/i_menu.png b/app/design/frontend/default/iphone/images/i_menu.png similarity index 100% rename from app/design/frontend/default/iphone/skin/default/images/i_menu.png rename to app/design/frontend/default/iphone/images/i_menu.png diff --git a/app/design/frontend/default/iphone/skin/default/images/i_menu_retina.png b/app/design/frontend/default/iphone/images/i_menu_retina.png similarity index 100% rename from app/design/frontend/default/iphone/skin/default/images/i_menu_retina.png rename to app/design/frontend/default/iphone/images/i_menu_retina.png diff --git a/app/design/frontend/default/iphone/skin/default/images/i_search.png b/app/design/frontend/default/iphone/images/i_search.png similarity index 100% rename from app/design/frontend/default/iphone/skin/default/images/i_search.png rename to app/design/frontend/default/iphone/images/i_search.png diff --git a/app/design/frontend/default/iphone/skin/default/images/i_search_retina.png b/app/design/frontend/default/iphone/images/i_search_retina.png similarity index 100% rename from app/design/frontend/default/iphone/skin/default/images/i_search_retina.png rename to app/design/frontend/default/iphone/images/i_search_retina.png diff --git a/app/design/frontend/default/iphone/skin/default/images/i_star.png b/app/design/frontend/default/iphone/images/i_star.png similarity index 100% rename from app/design/frontend/default/iphone/skin/default/images/i_star.png rename to app/design/frontend/default/iphone/images/i_star.png diff --git a/app/design/frontend/default/iphone/skin/default/images/i_star_blank.png b/app/design/frontend/default/iphone/images/i_star_blank.png similarity index 100% rename from app/design/frontend/default/iphone/skin/default/images/i_star_blank.png rename to app/design/frontend/default/iphone/images/i_star_blank.png diff --git a/app/design/frontend/default/iphone/skin/default/images/i_star_blank_retina.png b/app/design/frontend/default/iphone/images/i_star_blank_retina.png similarity index 100% rename from app/design/frontend/default/iphone/skin/default/images/i_star_blank_retina.png rename to app/design/frontend/default/iphone/images/i_star_blank_retina.png diff --git a/app/design/frontend/default/iphone/skin/default/images/i_star_retina.png b/app/design/frontend/default/iphone/images/i_star_retina.png similarity index 100% rename from app/design/frontend/default/iphone/skin/default/images/i_star_retina.png rename to app/design/frontend/default/iphone/images/i_star_retina.png diff --git a/app/design/frontend/default/iphone/skin/default/images/i_zoom.png b/app/design/frontend/default/iphone/images/i_zoom.png similarity index 100% rename from app/design/frontend/default/iphone/skin/default/images/i_zoom.png rename to app/design/frontend/default/iphone/images/i_zoom.png diff --git a/app/design/frontend/default/iphone/skin/default/images/i_zoom_retina.png b/app/design/frontend/default/iphone/images/i_zoom_retina.png similarity index 100% rename from app/design/frontend/default/iphone/skin/default/images/i_zoom_retina.png rename to app/design/frontend/default/iphone/images/i_zoom_retina.png diff --git a/app/design/frontend/default/iphone/skin/default/images/loader.gif b/app/design/frontend/default/iphone/images/loader.gif similarity index 100% rename from app/design/frontend/default/iphone/skin/default/images/loader.gif rename to app/design/frontend/default/iphone/images/loader.gif diff --git a/app/design/frontend/default/iphone/skin/default/images/logo.gif b/app/design/frontend/default/iphone/images/logo.gif similarity index 100% rename from app/design/frontend/default/iphone/skin/default/images/logo.gif rename to app/design/frontend/default/iphone/images/logo.gif diff --git a/app/design/frontend/default/iphone/skin/default/images/media/cell_phone_landing_banner1.jpg b/app/design/frontend/default/iphone/images/media/cell_phone_landing_banner1.jpg similarity index 100% rename from app/design/frontend/default/iphone/skin/default/images/media/cell_phone_landing_banner1.jpg rename to app/design/frontend/default/iphone/images/media/cell_phone_landing_banner1.jpg diff --git a/app/design/frontend/default/iphone/skin/default/images/opc-ajax-loader.gif b/app/design/frontend/default/iphone/images/opc-ajax-loader.gif similarity index 100% rename from app/design/frontend/default/iphone/skin/default/images/opc-ajax-loader.gif rename to app/design/frontend/default/iphone/images/opc-ajax-loader.gif diff --git a/app/design/frontend/default/iphone/skin/default/js/dnd.js b/app/design/frontend/default/iphone/js/dnd.js similarity index 100% rename from app/design/frontend/default/iphone/skin/default/js/dnd.js rename to app/design/frontend/default/iphone/js/dnd.js diff --git a/app/design/frontend/default/iphone/skin/default/js/iphone.js b/app/design/frontend/default/iphone/js/iphone.js similarity index 100% rename from app/design/frontend/default/iphone/skin/default/js/iphone.js rename to app/design/frontend/default/iphone/js/iphone.js diff --git a/app/design/frontend/default/iphone/skin/default/js/modernizr.js b/app/design/frontend/default/iphone/js/modernizr.js similarity index 100% rename from app/design/frontend/default/iphone/skin/default/js/modernizr.js rename to app/design/frontend/default/iphone/js/modernizr.js diff --git a/app/design/frontend/default/iphone/theme.xml b/app/design/frontend/default/iphone/theme.xml index cef19a80b8ae04ec124ba389823cba87ab6f341d..6d5b2a7d71b9b3aab541e78c4a750d7434c9b8f4 100644 --- a/app/design/frontend/default/iphone/theme.xml +++ b/app/design/frontend/default/iphone/theme.xml @@ -27,8 +27,8 @@ <design> <package code="default"> <title>Default</title> - <theme version="2.0.0.0" code="iphone" parent="default" featured="1"> - <title>Iphone</title> + <theme version="2.0.0.0" code="iphone" parent="demo" featured="1"> + <title>Magento Iphone</title> <requirements> <magento_version from="2.0.0.0-dev1" to="*"/> </requirements> diff --git a/app/design/frontend/default/modern/Mage_Catalog/product/list.phtml b/app/design/frontend/default/modern/Mage_Catalog/product/list.phtml index 66e29656959bfd7fe811bfa60d233f83309ddc73..6992e5d86be187d49236de6ef72adefcb261a319 100644 --- a/app/design/frontend/default/modern/Mage_Catalog/product/list.phtml +++ b/app/design/frontend/default/modern/Mage_Catalog/product/list.phtml @@ -101,8 +101,8 @@ $_imageSize = $this->getVar('product_list_image_size', 'Mage_Catalog'); $.mage.event.observe('mage.grid.initialize', function (event, initData) { initData.listId = '#products-list'; }); - $.mage.load.js("<?php echo $this->getSkinUrl('Mage_Catalog::js/grid.js') ?>"); - $.mage.load.js("<?php echo $this->getSkinUrl('Mage_Catalog::js/mage-attributes-processing.js') ?>"); + $.mage.load.js("<?php echo $this->getViewFileUrl('Mage_Catalog::js/grid.js') ?>"); + $.mage.load.js("<?php echo $this->getViewFileUrl('Mage_Catalog::js/mage-attributes-processing.js') ?>"); })(jQuery); //]]> </script> @@ -164,8 +164,8 @@ $_imageSize = $this->getVar('product_list_image_size', 'Mage_Catalog'); initData.genericSelector = 'ul.products-grid > li'; initData.decoratorParam = ['odd', 'even', 'first', 'last']; }); - $.mage.load.js("<?php echo $this->getSkinUrl('Mage_Catalog::js/grid.js') ?>"); - $.mage.load.js("<?php echo $this->getSkinUrl('Mage_Catalog::js/mage-attributes-processing.js') ?>"); + $.mage.load.js("<?php echo $this->getViewFileUrl('Mage_Catalog::js/grid.js') ?>"); + $.mage.load.js("<?php echo $this->getViewFileUrl('Mage_Catalog::js/mage-attributes-processing.js') ?>"); })(jQuery); //]]> </script> diff --git a/app/design/frontend/default/modern/Mage_Catalog/product/view/media.phtml b/app/design/frontend/default/modern/Mage_Catalog/product/view/media.phtml index 05108f38ce7604c45b53ea1a4560d74881017403..c2dafe08c7a6fffd02d56363a255cd272a718691 100644 --- a/app/design/frontend/default/modern/Mage_Catalog/product/view/media.phtml +++ b/app/design/frontend/default/modern/Mage_Catalog/product/view/media.phtml @@ -43,11 +43,11 @@ </p> <p class="zoom-notice" id="track_hint"><?php echo $this->__('Double click on above image to view full picture') ?></p> <div class="zoom"> - <img id="zoom_out" src="<?php echo $this->getSkinUrl('images/slider_btn_zoom_out.gif') ?>" alt="<?php echo $this->__('Zoom Out') ?>" title="<?php echo $this->__('Zoom Out') ?>" class="btn-zoom-out" /> + <img id="zoom_out" src="<?php echo $this->getViewFileUrl('images/slider_btn_zoom_out.gif') ?>" alt="<?php echo $this->__('Zoom Out') ?>" title="<?php echo $this->__('Zoom Out') ?>" class="btn-zoom-out" /> <div id="track"> <div id="handle"></div> </div> - <img id="zoom_in" src="<?php echo $this->getSkinUrl('images/slider_btn_zoom_in.gif') ?>" alt="<?php echo $this->__('Zoom In') ?>" title="<?php echo $this->__('Zoom In') ?>" class="btn-zoom-in" /> + <img id="zoom_in" src="<?php echo $this->getViewFileUrl('images/slider_btn_zoom_in.gif') ?>" alt="<?php echo $this->__('Zoom In') ?>" title="<?php echo $this->__('Zoom In') ?>" class="btn-zoom-in" /> </div> <script type="text/javascript"> //<![CDATA[ diff --git a/app/design/frontend/default/modern/skin/default/Mage_Catalog/widgets.css b/app/design/frontend/default/modern/Mage_Catalog/widgets.css similarity index 100% rename from app/design/frontend/default/modern/skin/default/Mage_Catalog/widgets.css rename to app/design/frontend/default/modern/Mage_Catalog/widgets.css diff --git a/app/design/frontend/default/modern/Mage_CatalogSearch/form.mini.phtml b/app/design/frontend/default/modern/Mage_CatalogSearch/form.mini.phtml index 32e8b78ac290295399536b8183063d96b38bf815..0853a597111770309354d25c39acc6a47f2426a2 100644 --- a/app/design/frontend/default/modern/Mage_CatalogSearch/form.mini.phtml +++ b/app/design/frontend/default/modern/Mage_CatalogSearch/form.mini.phtml @@ -27,12 +27,12 @@ <form id="search_mini_form" action="<?php echo $this->helper('Mage_CatalogSearch_Helper_Data')->getResultUrl() ?>" method="get"> <div class="form-search"> - <label for="search"><?php echo $this->__('Search site:') ?></label><input id="search" type="text" name="<?php echo $this->helper('Mage_CatalogSearch_Helper_Data')->getQueryParamName() ?>" value="<?php echo $this->helper('Mage_CatalogSearch_Helper_Data')->getEscapedQueryText() ?>" class="input-text" autocomplete="off"/> <button type="submit"title="<?php echo $this->__('Go') ?>" class="button"><span><span><?php echo $this->__('Go') ?></span></span></button><a href="<?php echo Mage::helper('Mage_CatalogSearch_Helper_Data')->getAdvancedSearchUrl(); ?>"><?php echo $this->__('Advanced Search'); ?></a> + <label for="search"><?php echo $this->__('Search site:') ?></label><input id="search" type="text" name="<?php echo $this->helper('Mage_CatalogSearch_Helper_Data')->getQueryParamName() ?>" value="<?php echo $this->helper('Mage_CatalogSearch_Helper_Data')->getEscapedQueryText() ?>" class="input-text" autocomplete="off"/> <button type="submit" title="<?php echo $this->__('Go') ?>" class="button"><span><span><?php echo $this->__('Go') ?></span></span></button><a href="<?php echo Mage::helper('Mage_CatalogSearch_Helper_Data')->getAdvancedSearchUrl(); ?>"><?php echo $this->__('Advanced Search'); ?></a> <div id="search_autocomplete" class="search-autocomplete"></div> <script type="text/javascript"> //<![CDATA[ (function($) { - head.js("<?php echo $this->getSkinUrl('Mage_CatalogSearch::form-mini.js')?>", function() { + head.js("<?php echo $this->getViewFileUrl('Mage_CatalogSearch::form-mini.js')?>", function() { $('#search').catalogSearch({ formSelector: '#search_mini_form', placeholder: '<?php echo $this->__('Search entire store here...') ?>', diff --git a/app/design/frontend/default/modern/Mage_Checkout/cart.phtml b/app/design/frontend/default/modern/Mage_Checkout/cart.phtml index a2dc91e5a748093da0b2e4e6869af602c40e8370..19f6aefa4a00b871813ce1d9ad7086b0409e8aaa 100644 --- a/app/design/frontend/default/modern/Mage_Checkout/cart.phtml +++ b/app/design/frontend/default/modern/Mage_Checkout/cart.phtml @@ -107,7 +107,7 @@ <script type="text/javascript"> //<![CDATA[ (function($) { - head.js("<?php echo $this->getSkinUrl('Mage_Checkout::js/shopping-cart.js')?>", + head.js("<?php echo $this->getViewFileUrl('Mage_Checkout::js/shopping-cart.js')?>", function() { // Internet Explorer (lt 8) does not support value attribute in button elements $('#shopping-cart-table').shoppingCart({ @@ -139,8 +139,8 @@ <?php echo $_crosssell; ?> <?php else: ?> <div class="no-crosssell"> - <img src="<?php echo $this->getSkinUrl('images/media/callout1.jpg') ?>" alt="" /> - <img src="<?php echo $this->getSkinUrl('images/media/fpo_no_crosssell.gif') ?>" alt="" /> + <img src="<?php echo $this->getViewFileUrl('images/media/callout1.jpg') ?>" alt="" /> + <img src="<?php echo $this->getViewFileUrl('images/media/fpo_no_crosssell.gif') ?>" alt="" /> </div> <?php endif; ?> </div> diff --git a/app/design/frontend/default/modern/skin/default/Mage_Cms/widgets.css b/app/design/frontend/default/modern/Mage_Cms/widgets.css similarity index 100% rename from app/design/frontend/default/modern/skin/default/Mage_Cms/widgets.css rename to app/design/frontend/default/modern/Mage_Cms/widgets.css diff --git a/app/design/frontend/default/modern/skin/default/Mage_Core/logo_email.gif b/app/design/frontend/default/modern/Mage_Core/logo_email.gif similarity index 100% rename from app/design/frontend/default/modern/skin/default/Mage_Core/logo_email.gif rename to app/design/frontend/default/modern/Mage_Core/logo_email.gif diff --git a/app/design/frontend/default/modern/Mage_Newsletter/subscribe.phtml b/app/design/frontend/default/modern/Mage_Newsletter/subscribe.phtml index 601975c2779baa4b44da5ef474bcb122b388fa21..214a2efdc236269282ffab81ee1a3521a6266cce 100644 --- a/app/design/frontend/default/modern/Mage_Newsletter/subscribe.phtml +++ b/app/design/frontend/default/modern/Mage_Newsletter/subscribe.phtml @@ -42,12 +42,12 @@ <script type="text/javascript"> //<![CDATA[ (function($) { - head.js("<?php echo $this->getSkinUrl('jquery/jquery.validate.js')?>", - "<?php echo $this->getSkinUrl('jquery/additional-methods.js')?>", - "<?php echo $this->getSkinUrl('jquery/jquery.metadata.js')?>", - "<?php echo $this->getSkinUrl('jquery/jquery.hook.js')?>", - "<?php echo $this->getSkinUrl('mage/validation/validate.js')?>", - "<?php echo $this->getSkinUrl('Mage_Newsletter::newsletter.js')?>", function() { + head.js("<?php echo $this->getViewFileUrl('jquery/jquery.validate.js')?>", + "<?php echo $this->getViewFileUrl('jquery/additional-methods.js')?>", + "<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js')?>", + "<?php echo $this->getViewFileUrl('jquery/jquery.hook.js')?>", + "<?php echo $this->getViewFileUrl('mage/validation/validate.js')?>", + "<?php echo $this->getViewFileUrl('Mage_Newsletter::newsletter.js')?>", function() { $('#newsletter').newsletter({ formSelector: '#newsletter-validate-detail', placeholder: '<?php echo $this->__('Enter your email address') ?>' diff --git a/app/design/frontend/default/modern/skin/default/Mage_Page/css/validate.css b/app/design/frontend/default/modern/Mage_Page/css/validate.css similarity index 100% rename from app/design/frontend/default/modern/skin/default/Mage_Page/css/validate.css rename to app/design/frontend/default/modern/Mage_Page/css/validate.css diff --git a/app/design/frontend/default/modern/Mage_Page/html/footer.phtml b/app/design/frontend/default/modern/Mage_Page/html/footer.phtml index 5cac82e7792be684cfbe6961e7dbe77f7e636898..50965cfd25fd052eb993345fb84b1c62c7ce0943 100644 --- a/app/design/frontend/default/modern/Mage_Page/html/footer.phtml +++ b/app/design/frontend/default/modern/Mage_Page/html/footer.phtml @@ -28,7 +28,7 @@ <div class="footer"> <?php echo $this->getChildHtml('bottomContainer') ?> <div class="f-right"> - <img src="<?php echo $this->getSkinUrl('images/media/footer_callout.png');?>" class="footer-callout" + <img src="<?php echo $this->getViewFileUrl('images/media/footer_callout.png');?>" class="footer-callout" alt=""/> <?php echo $this->getChildHtml('store_switcher') ?> </div> diff --git a/app/design/frontend/default/modern/skin/default/Mage_Reports/widgets.css b/app/design/frontend/default/modern/Mage_Reports/widgets.css similarity index 100% rename from app/design/frontend/default/modern/skin/default/Mage_Reports/widgets.css rename to app/design/frontend/default/modern/Mage_Reports/widgets.css diff --git a/app/design/frontend/default/modern/skin/default/css/print.css b/app/design/frontend/default/modern/css/print.css similarity index 100% rename from app/design/frontend/default/modern/skin/default/css/print.css rename to app/design/frontend/default/modern/css/print.css diff --git a/app/design/frontend/default/modern/skin/default/css/styles-ie.css b/app/design/frontend/default/modern/css/styles-ie.css similarity index 100% rename from app/design/frontend/default/modern/skin/default/css/styles-ie.css rename to app/design/frontend/default/modern/css/styles-ie.css diff --git a/app/design/frontend/default/modern/skin/default/css/styles.css b/app/design/frontend/default/modern/css/styles.css similarity index 100% rename from app/design/frontend/default/modern/skin/default/css/styles.css rename to app/design/frontend/default/modern/css/styles.css diff --git a/app/design/frontend/default/modern/skin/default/images/bkg_add-to.gif b/app/design/frontend/default/modern/images/bkg_add-to.gif similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/bkg_add-to.gif rename to app/design/frontend/default/modern/images/bkg_add-to.gif diff --git a/app/design/frontend/default/modern/skin/default/images/bkg_block-layered-title.gif b/app/design/frontend/default/modern/images/bkg_block-layered-title.gif similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/bkg_block-layered-title.gif rename to app/design/frontend/default/modern/images/bkg_block-layered-title.gif diff --git a/app/design/frontend/default/modern/skin/default/images/bkg_body.gif b/app/design/frontend/default/modern/images/bkg_body.gif similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/bkg_body.gif rename to app/design/frontend/default/modern/images/bkg_body.gif diff --git a/app/design/frontend/default/modern/skin/default/images/bkg_btn-green.gif b/app/design/frontend/default/modern/images/bkg_btn-green.gif similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/bkg_btn-green.gif rename to app/design/frontend/default/modern/images/bkg_btn-green.gif diff --git a/app/design/frontend/default/modern/skin/default/images/bkg_btn-small.gif b/app/design/frontend/default/modern/images/bkg_btn-small.gif similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/bkg_btn-small.gif rename to app/design/frontend/default/modern/images/bkg_btn-small.gif diff --git a/app/design/frontend/default/modern/skin/default/images/bkg_btn-small.png b/app/design/frontend/default/modern/images/bkg_btn-small.png similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/bkg_btn-small.png rename to app/design/frontend/default/modern/images/bkg_btn-small.png diff --git a/app/design/frontend/default/modern/skin/default/images/bkg_btn.gif b/app/design/frontend/default/modern/images/bkg_btn.gif similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/bkg_btn.gif rename to app/design/frontend/default/modern/images/bkg_btn.gif diff --git a/app/design/frontend/default/modern/skin/default/images/bkg_btn.png b/app/design/frontend/default/modern/images/bkg_btn.png similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/bkg_btn.png rename to app/design/frontend/default/modern/images/bkg_btn.png diff --git a/app/design/frontend/default/modern/skin/default/images/bkg_cart-totals.gif b/app/design/frontend/default/modern/images/bkg_cart-totals.gif similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/bkg_cart-totals.gif rename to app/design/frontend/default/modern/images/bkg_cart-totals.gif diff --git a/app/design/frontend/default/modern/skin/default/images/bkg_collapse-gm.gif b/app/design/frontend/default/modern/images/bkg_collapse-gm.gif similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/bkg_collapse-gm.gif rename to app/design/frontend/default/modern/images/bkg_collapse-gm.gif diff --git a/app/design/frontend/default/modern/skin/default/images/bkg_collapse.gif b/app/design/frontend/default/modern/images/bkg_collapse.gif similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/bkg_collapse.gif rename to app/design/frontend/default/modern/images/bkg_collapse.gif diff --git a/app/design/frontend/default/modern/skin/default/images/bkg_grid.gif b/app/design/frontend/default/modern/images/bkg_grid.gif similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/bkg_grid.gif rename to app/design/frontend/default/modern/images/bkg_grid.gif diff --git a/app/design/frontend/default/modern/skin/default/images/bkg_nav_parent.gif b/app/design/frontend/default/modern/images/bkg_nav_parent.gif similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/bkg_nav_parent.gif rename to app/design/frontend/default/modern/images/bkg_nav_parent.gif diff --git a/app/design/frontend/default/modern/skin/default/images/bkg_nav_top.gif b/app/design/frontend/default/modern/images/bkg_nav_top.gif similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/bkg_nav_top.gif rename to app/design/frontend/default/modern/images/bkg_nav_top.gif diff --git a/app/design/frontend/default/modern/skin/default/images/bkg_pipe1.gif b/app/design/frontend/default/modern/images/bkg_pipe1.gif similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/bkg_pipe1.gif rename to app/design/frontend/default/modern/images/bkg_pipe1.gif diff --git a/app/design/frontend/default/modern/skin/default/images/bkg_pipe2.gif b/app/design/frontend/default/modern/images/bkg_pipe2.gif similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/bkg_pipe2.gif rename to app/design/frontend/default/modern/images/bkg_pipe2.gif diff --git a/app/design/frontend/default/modern/skin/default/images/bkg_pipe3.gif b/app/design/frontend/default/modern/images/bkg_pipe3.gif similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/bkg_pipe3.gif rename to app/design/frontend/default/modern/images/bkg_pipe3.gif diff --git a/app/design/frontend/default/modern/skin/default/images/bkg_rating.gif b/app/design/frontend/default/modern/images/bkg_rating.gif similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/bkg_rating.gif rename to app/design/frontend/default/modern/images/bkg_rating.gif diff --git a/app/design/frontend/default/modern/skin/default/images/bkg_subtotal.gif b/app/design/frontend/default/modern/images/bkg_subtotal.gif similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/bkg_subtotal.gif rename to app/design/frontend/default/modern/images/bkg_subtotal.gif diff --git a/app/design/frontend/default/modern/skin/default/images/bkg_tabs.gif b/app/design/frontend/default/modern/images/bkg_tabs.gif similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/bkg_tabs.gif rename to app/design/frontend/default/modern/images/bkg_tabs.gif diff --git a/app/design/frontend/default/modern/skin/default/images/bkg_toolbar.gif b/app/design/frontend/default/modern/images/bkg_toolbar.gif similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/bkg_toolbar.gif rename to app/design/frontend/default/modern/images/bkg_toolbar.gif diff --git a/app/design/frontend/default/modern/skin/default/images/bkg_top-promo.gif b/app/design/frontend/default/modern/images/bkg_top-promo.gif similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/bkg_top-promo.gif rename to app/design/frontend/default/modern/images/bkg_top-promo.gif diff --git a/app/design/frontend/default/modern/skin/default/images/btn_checkout.gif b/app/design/frontend/default/modern/images/btn_checkout.gif similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/btn_checkout.gif rename to app/design/frontend/default/modern/images/btn_checkout.gif diff --git a/app/design/frontend/default/modern/skin/default/images/btn_edit.gif b/app/design/frontend/default/modern/images/btn_edit.gif similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/btn_edit.gif rename to app/design/frontend/default/modern/images/btn_edit.gif diff --git a/app/design/frontend/default/modern/skin/default/images/btn_remove.gif b/app/design/frontend/default/modern/images/btn_remove.gif similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/btn_remove.gif rename to app/design/frontend/default/modern/images/btn_remove.gif diff --git a/app/design/frontend/default/modern/skin/default/images/btn_trash.gif b/app/design/frontend/default/modern/images/btn_trash.gif similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/btn_trash.gif rename to app/design/frontend/default/modern/images/btn_trash.gif diff --git a/app/design/frontend/default/modern/skin/default/images/btn_window_close.gif b/app/design/frontend/default/modern/images/btn_window_close.gif similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/btn_window_close.gif rename to app/design/frontend/default/modern/images/btn_window_close.gif diff --git a/app/design/frontend/default/modern/skin/default/images/grid-cal.gif b/app/design/frontend/default/modern/images/calendar.gif similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/grid-cal.gif rename to app/design/frontend/default/modern/images/calendar.gif diff --git a/app/design/frontend/default/modern/skin/default/images/fam_book_open.png b/app/design/frontend/default/modern/images/fam_book_open.png similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/fam_book_open.png rename to app/design/frontend/default/modern/images/fam_book_open.png diff --git a/dev/tests/integration/testsuite/Mage/Backend/Block/_files/design/adminhtml/test/default/skin/default/images/grid-cal.gif b/app/design/frontend/default/modern/images/grid-cal.gif similarity index 100% rename from dev/tests/integration/testsuite/Mage/Backend/Block/_files/design/adminhtml/test/default/skin/default/images/grid-cal.gif rename to app/design/frontend/default/modern/images/grid-cal.gif diff --git a/app/design/frontend/default/modern/skin/default/images/i_asc_arrow.gif b/app/design/frontend/default/modern/images/i_asc_arrow.gif similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/i_asc_arrow.gif rename to app/design/frontend/default/modern/images/i_asc_arrow.gif diff --git a/app/design/frontend/default/modern/skin/default/images/i_availability_only.gif b/app/design/frontend/default/modern/images/i_availability_only.gif similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/i_availability_only.gif rename to app/design/frontend/default/modern/images/i_availability_only.gif diff --git a/app/design/frontend/default/modern/skin/default/images/i_availability_only_arrow.gif b/app/design/frontend/default/modern/images/i_availability_only_arrow.gif similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/i_availability_only_arrow.gif rename to app/design/frontend/default/modern/images/i_availability_only_arrow.gif diff --git a/app/design/frontend/default/modern/skin/default/images/i_desc_arrow.gif b/app/design/frontend/default/modern/images/i_desc_arrow.gif similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/i_desc_arrow.gif rename to app/design/frontend/default/modern/images/i_desc_arrow.gif diff --git a/app/design/frontend/default/modern/skin/default/images/i_msg-error.gif b/app/design/frontend/default/modern/images/i_msg-error.gif similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/i_msg-error.gif rename to app/design/frontend/default/modern/images/i_msg-error.gif diff --git a/app/design/frontend/default/modern/skin/default/images/i_msg-note.gif b/app/design/frontend/default/modern/images/i_msg-note.gif similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/i_msg-note.gif rename to app/design/frontend/default/modern/images/i_msg-note.gif diff --git a/app/design/frontend/default/modern/skin/default/images/i_msg-success.gif b/app/design/frontend/default/modern/images/i_msg-success.gif similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/i_msg-success.gif rename to app/design/frontend/default/modern/images/i_msg-success.gif diff --git a/app/design/frontend/default/modern/skin/default/images/i_notice.gif b/app/design/frontend/default/modern/images/i_notice.gif similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/i_notice.gif rename to app/design/frontend/default/modern/images/i_notice.gif diff --git a/app/design/frontend/default/modern/skin/default/images/i_pager-next.gif b/app/design/frontend/default/modern/images/i_pager-next.gif similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/i_pager-next.gif rename to app/design/frontend/default/modern/images/i_pager-next.gif diff --git a/app/design/frontend/default/modern/skin/default/images/i_pager-prev.gif b/app/design/frontend/default/modern/images/i_pager-prev.gif similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/i_pager-prev.gif rename to app/design/frontend/default/modern/images/i_pager-prev.gif diff --git a/app/design/frontend/default/modern/skin/default/images/i_print.gif b/app/design/frontend/default/modern/images/i_print.gif similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/i_print.gif rename to app/design/frontend/default/modern/images/i_print.gif diff --git a/app/design/frontend/default/modern/skin/default/images/i_rss-big.png b/app/design/frontend/default/modern/images/i_rss-big.png similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/i_rss-big.png rename to app/design/frontend/default/modern/images/i_rss-big.png diff --git a/app/design/frontend/default/modern/skin/default/images/i_rss.gif b/app/design/frontend/default/modern/images/i_rss.gif similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/i_rss.gif rename to app/design/frontend/default/modern/images/i_rss.gif diff --git a/app/design/frontend/default/modern/skin/default/images/logo.gif b/app/design/frontend/default/modern/images/logo.gif similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/logo.gif rename to app/design/frontend/default/modern/images/logo.gif diff --git a/app/design/frontend/default/modern/skin/default/images/logo_print.gif b/app/design/frontend/default/modern/images/logo_print.gif similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/logo_print.gif rename to app/design/frontend/default/modern/images/logo_print.gif diff --git a/app/design/frontend/default/modern/skin/default/images/magnifier_handle.gif b/app/design/frontend/default/modern/images/magnifier_handle.gif similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/magnifier_handle.gif rename to app/design/frontend/default/modern/images/magnifier_handle.gif diff --git a/app/design/frontend/default/modern/skin/default/images/map_popup_arrow.gif b/app/design/frontend/default/modern/images/map_popup_arrow.gif similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/map_popup_arrow.gif rename to app/design/frontend/default/modern/images/map_popup_arrow.gif diff --git a/app/design/frontend/default/modern/skin/default/images/media/callout1.jpg b/app/design/frontend/default/modern/images/media/callout1.jpg similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/media/callout1.jpg rename to app/design/frontend/default/modern/images/media/callout1.jpg diff --git a/app/design/frontend/default/modern/skin/default/images/media/footer_callout.png b/app/design/frontend/default/modern/images/media/footer_callout.png similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/media/footer_callout.png rename to app/design/frontend/default/modern/images/media/footer_callout.png diff --git a/app/design/frontend/default/modern/skin/default/images/media/fpo_no_crosssell.gif b/app/design/frontend/default/modern/images/media/fpo_no_crosssell.gif similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/media/fpo_no_crosssell.gif rename to app/design/frontend/default/modern/images/media/fpo_no_crosssell.gif diff --git a/app/design/frontend/default/modern/skin/default/images/media/home_co_bottom.gif b/app/design/frontend/default/modern/images/media/home_co_bottom.gif similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/media/home_co_bottom.gif rename to app/design/frontend/default/modern/images/media/home_co_bottom.gif diff --git a/app/design/frontend/default/modern/skin/default/images/media/home_co_br.gif b/app/design/frontend/default/modern/images/media/home_co_br.gif similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/media/home_co_br.gif rename to app/design/frontend/default/modern/images/media/home_co_br.gif diff --git a/app/design/frontend/default/modern/skin/default/images/media/home_co_main.jpg b/app/design/frontend/default/modern/images/media/home_co_main.jpg similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/media/home_co_main.jpg rename to app/design/frontend/default/modern/images/media/home_co_main.jpg diff --git a/app/design/frontend/default/modern/skin/default/images/media/home_co_tr.gif b/app/design/frontend/default/modern/images/media/home_co_tr.gif similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/media/home_co_tr.gif rename to app/design/frontend/default/modern/images/media/home_co_tr.gif diff --git a/app/design/frontend/default/modern/skin/default/images/media/left_col_callout.jpg b/app/design/frontend/default/modern/images/media/left_col_callout.jpg similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/media/left_col_callout.jpg rename to app/design/frontend/default/modern/images/media/left_col_callout.jpg diff --git a/app/design/frontend/default/modern/skin/default/images/opc-ajax-loader.gif b/app/design/frontend/default/modern/images/opc-ajax-loader.gif similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/opc-ajax-loader.gif rename to app/design/frontend/default/modern/images/opc-ajax-loader.gif diff --git a/app/design/frontend/default/modern/skin/default/images/pager_arrow_left.gif b/app/design/frontend/default/modern/images/pager_arrow_left.gif similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/pager_arrow_left.gif rename to app/design/frontend/default/modern/images/pager_arrow_left.gif diff --git a/app/design/frontend/default/modern/skin/default/images/pager_arrow_right.gif b/app/design/frontend/default/modern/images/pager_arrow_right.gif similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/pager_arrow_right.gif rename to app/design/frontend/default/modern/images/pager_arrow_right.gif diff --git a/app/design/frontend/default/modern/skin/default/images/slider_bg.gif b/app/design/frontend/default/modern/images/slider_bg.gif similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/slider_bg.gif rename to app/design/frontend/default/modern/images/slider_bg.gif diff --git a/app/design/frontend/default/modern/skin/default/images/slider_btn_zoom_in.gif b/app/design/frontend/default/modern/images/slider_btn_zoom_in.gif similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/slider_btn_zoom_in.gif rename to app/design/frontend/default/modern/images/slider_btn_zoom_in.gif diff --git a/app/design/frontend/default/modern/skin/default/images/slider_btn_zoom_out.gif b/app/design/frontend/default/modern/images/slider_btn_zoom_out.gif similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/slider_btn_zoom_out.gif rename to app/design/frontend/default/modern/images/slider_btn_zoom_out.gif diff --git a/app/design/frontend/default/modern/skin/default/images/spacer.gif b/app/design/frontend/default/modern/images/spacer.gif similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/spacer.gif rename to app/design/frontend/default/modern/images/spacer.gif diff --git a/app/design/frontend/default/modern/skin/default/images/validation_advice_bg.gif b/app/design/frontend/default/modern/images/validation_advice_bg.gif similarity index 100% rename from app/design/frontend/default/modern/skin/default/images/validation_advice_bg.gif rename to app/design/frontend/default/modern/images/validation_advice_bg.gif diff --git a/app/design/frontend/default/modern/theme.xml b/app/design/frontend/default/modern/theme.xml index 02055041f5e838e76759c7a8c89708d7696bcf09..ed0b4a97aec91cd2442a2a00e6862b6dd49cd420 100644 --- a/app/design/frontend/default/modern/theme.xml +++ b/app/design/frontend/default/modern/theme.xml @@ -27,8 +27,8 @@ <design> <package code="default"> <title>Default</title> - <theme version="2.0.0.0" code="modern" parent="default" featured="1"> - <title>Modern</title> + <theme version="2.0.0.0" code="modern" parent="demo" featured="1"> + <title>Magento Modern</title> <requirements> <magento_version from="2.0.0.0-dev1" to="*"/> </requirements> diff --git a/app/design/install/default/default/skin/default/css/boxes.css b/app/design/install/default/basic/css/boxes.css similarity index 100% rename from app/design/install/default/default/skin/default/css/boxes.css rename to app/design/install/default/basic/css/boxes.css diff --git a/app/design/install/default/default/skin/default/css/clears.css b/app/design/install/default/basic/css/clears.css similarity index 100% rename from app/design/install/default/default/skin/default/css/clears.css rename to app/design/install/default/basic/css/clears.css diff --git a/app/design/install/default/default/skin/default/css/ie7minus.css b/app/design/install/default/basic/css/ie7minus.css similarity index 100% rename from app/design/install/default/default/skin/default/css/ie7minus.css rename to app/design/install/default/basic/css/ie7minus.css diff --git a/app/design/install/default/default/skin/default/css/iestyles.css b/app/design/install/default/basic/css/iestyles.css similarity index 100% rename from app/design/install/default/default/skin/default/css/iestyles.css rename to app/design/install/default/basic/css/iestyles.css diff --git a/app/design/install/default/default/skin/default/css/reset.css b/app/design/install/default/basic/css/reset.css similarity index 100% rename from app/design/install/default/default/skin/default/css/reset.css rename to app/design/install/default/basic/css/reset.css diff --git a/app/design/install/default/default/skin/default/images/error_msg_icon.gif b/app/design/install/default/basic/images/error_msg_icon.gif similarity index 100% rename from app/design/install/default/default/skin/default/images/error_msg_icon.gif rename to app/design/install/default/basic/images/error_msg_icon.gif diff --git a/app/design/install/default/default/skin/default/images/footer_bg.gif b/app/design/install/default/basic/images/footer_bg.gif similarity index 100% rename from app/design/install/default/default/skin/default/images/footer_bg.gif rename to app/design/install/default/basic/images/footer_bg.gif diff --git a/app/design/install/default/default/skin/default/images/footer_container_bg.gif b/app/design/install/default/basic/images/footer_container_bg.gif similarity index 100% rename from app/design/install/default/default/skin/default/images/footer_container_bg.gif rename to app/design/install/default/basic/images/footer_container_bg.gif diff --git a/app/design/install/default/default/skin/default/images/footer_info_separator.gif b/app/design/install/default/basic/images/footer_info_separator.gif similarity index 100% rename from app/design/install/default/default/skin/default/images/footer_info_separator.gif rename to app/design/install/default/basic/images/footer_info_separator.gif diff --git a/app/design/install/default/default/skin/default/images/footer_informational_bg.gif b/app/design/install/default/basic/images/footer_informational_bg.gif similarity index 100% rename from app/design/install/default/default/skin/default/images/footer_informational_bg.gif rename to app/design/install/default/basic/images/footer_informational_bg.gif diff --git a/app/design/install/default/default/skin/default/images/footer_left.gif b/app/design/install/default/basic/images/footer_left.gif similarity index 100% rename from app/design/install/default/default/skin/default/images/footer_left.gif rename to app/design/install/default/basic/images/footer_left.gif diff --git a/app/design/install/default/default/skin/default/images/footer_legality_bg.gif b/app/design/install/default/basic/images/footer_legality_bg.gif similarity index 100% rename from app/design/install/default/default/skin/default/images/footer_legality_bg.gif rename to app/design/install/default/basic/images/footer_legality_bg.gif diff --git a/app/design/install/default/default/skin/default/images/footer_right.gif b/app/design/install/default/basic/images/footer_right.gif similarity index 100% rename from app/design/install/default/default/skin/default/images/footer_right.gif rename to app/design/install/default/basic/images/footer_right.gif diff --git a/app/design/install/default/default/skin/default/images/header_bg.gif b/app/design/install/default/basic/images/header_bg.gif similarity index 100% rename from app/design/install/default/default/skin/default/images/header_bg.gif rename to app/design/install/default/basic/images/header_bg.gif diff --git a/app/design/install/default/default/skin/default/images/header_nav_bg.gif b/app/design/install/default/basic/images/header_nav_bg.gif similarity index 100% rename from app/design/install/default/default/skin/default/images/header_nav_bg.gif rename to app/design/install/default/basic/images/header_nav_bg.gif diff --git a/app/design/install/default/default/skin/default/images/header_top_bg.jpg b/app/design/install/default/basic/images/header_top_bg.jpg similarity index 100% rename from app/design/install/default/default/skin/default/images/header_top_bg.jpg rename to app/design/install/default/basic/images/header_top_bg.jpg diff --git a/app/design/install/default/default/skin/default/images/header_top_container_bg.jpg b/app/design/install/default/basic/images/header_top_container_bg.jpg similarity index 100% rename from app/design/install/default/default/skin/default/images/header_top_container_bg.jpg rename to app/design/install/default/basic/images/header_top_container_bg.jpg diff --git a/app/design/install/default/default/skin/default/images/i_notice.gif b/app/design/install/default/basic/images/i_notice.gif similarity index 100% rename from app/design/install/default/default/skin/default/images/i_notice.gif rename to app/design/install/default/basic/images/i_notice.gif diff --git a/app/design/install/default/default/skin/default/images/logo.gif b/app/design/install/default/basic/images/logo.gif similarity index 100% rename from app/design/install/default/default/skin/default/images/logo.gif rename to app/design/install/default/basic/images/logo.gif diff --git a/app/design/install/default/default/skin/default/images/main_bg.gif b/app/design/install/default/basic/images/main_bg.gif similarity index 100% rename from app/design/install/default/default/skin/default/images/main_bg.gif rename to app/design/install/default/basic/images/main_bg.gif diff --git a/app/design/install/default/default/skin/default/images/main_container_bg.gif b/app/design/install/default/basic/images/main_container_bg.gif similarity index 100% rename from app/design/install/default/default/skin/default/images/main_container_bg.gif rename to app/design/install/default/basic/images/main_container_bg.gif diff --git a/app/design/install/default/default/skin/default/images/note_msg_icon.gif b/app/design/install/default/basic/images/note_msg_icon.gif similarity index 100% rename from app/design/install/default/default/skin/default/images/note_msg_icon.gif rename to app/design/install/default/basic/images/note_msg_icon.gif diff --git a/app/design/install/default/default/skin/default/images/success_msg_icon.gif b/app/design/install/default/basic/images/success_msg_icon.gif similarity index 100% rename from app/design/install/default/default/skin/default/images/success_msg_icon.gif rename to app/design/install/default/basic/images/success_msg_icon.gif diff --git a/app/design/install/default/default/skin/default/images/validation_advice_bg.gif b/app/design/install/default/basic/images/validation_advice_bg.gif similarity index 100% rename from app/design/install/default/default/skin/default/images/validation_advice_bg.gif rename to app/design/install/default/basic/images/validation_advice_bg.gif diff --git a/dev/tests/integration/testsuite/Mage/Widget/_files/design/adminhtml/default/default/theme.xml b/app/design/install/default/basic/theme.xml similarity index 93% rename from dev/tests/integration/testsuite/Mage/Widget/_files/design/adminhtml/default/default/theme.xml rename to app/design/install/default/basic/theme.xml index 349c67c5c2eedc7978de950a3ebe5d1af76669af..43e281a30c5211d8e7f76b358148f7cb24e49cff 100644 --- a/dev/tests/integration/testsuite/Mage/Widget/_files/design/adminhtml/default/default/theme.xml +++ b/app/design/install/default/basic/theme.xml @@ -27,8 +27,8 @@ <design> <package code="default"> <title>Default</title> - <theme version="2.0.0.0" code="default"> - <title>Default</title> + <theme version="2.0.0.0" code="basic"> + <title>Magento Basic</title> <requirements> <magento_version from="2.0.0.0-dev1" to="*"/> </requirements> diff --git a/dev/build/bin/ant-jshint.jar b/dev/build/bin/ant-jshint.jar new file mode 100644 index 0000000000000000000000000000000000000000..d74f4481a997ec53d6d6308faaf1973016e79bda Binary files /dev/null and b/dev/build/bin/ant-jshint.jar differ diff --git a/dev/build/bin/create-database.sh b/dev/build/bin/create-database.sh new file mode 100755 index 0000000000000000000000000000000000000000..31d5cc341f4ad66215870b0fe32c02c5a39cfed2 --- /dev/null +++ b/dev/build/bin/create-database.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + +. $DIR/include.sh + +log "Creating clean DB..." +echo "CREATE DATABASE \`$DB_NAME\`;" | mysql -h $DB_HOST -P $DB_PORT -u$DB_USER -p$DB_PASS +check_failure $? diff --git a/dev/build/bin/current.sh b/dev/build/bin/current.sh new file mode 100755 index 0000000000000000000000000000000000000000..f711b2e7e76a2707b9884d026b97eeda81eedfa7 --- /dev/null +++ b/dev/build/bin/current.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + +. $DIR/include.sh + +cd $PWD/../ + +if [ -L "current" ]; then + log "Removing previous 'current' link..." + rm current + check_failure $? +fi + +log "Creating 'current' link..." +ln -sf $BUILD_DIR current +check_failure $? + +ch_baseurl $DB_NAME $URL_UNSECURE $URL_SECURE +clean_cache $BUILD_DIR + +cd $OLDPWD \ No newline at end of file diff --git a/dev/build/bin/delete-old-builds.sh b/dev/build/bin/delete-old-builds.sh new file mode 100755 index 0000000000000000000000000000000000000000..3cdac36669840460f889741deabad09747c1e610 --- /dev/null +++ b/dev/build/bin/delete-old-builds.sh @@ -0,0 +1,53 @@ +#!/bin/sh + +function logprint() { + echo "`date`: $1" +} + +if [ -z $1 ]; then + logprint 'Please specify directory where builds should be placed.' + exit 1 +fi + +BUILD_SCOPE="$1" +BUILDPATH=/home/qa/builds +MINBUILDCOUNT=10 +MYSQLUSER="$2" +MYSQLPASS="$3" + + +MMDBBUILDPACKAGES=`ls -1 $BUILDPATH | grep "^$BUILD_SCOPE"` +DELETECOUNT=`expr $MINBUILDCOUNT + 1` + +logprint "Build cleaning started" +for package in $MMDBBUILDPACKAGES; do + NEWBUILDS=`find $BUILDPATH/$package -maxdepth 1 -mtime -$MINBUILDCOUNT -type d | grep -v "^$BUILDPATH/$package$"` + NEWBUILDSCOUNT=`find $BUILDPATH/$package -maxdepth 1 -mtime -$MINBUILDCOUNT -type d | grep -v "^$BUILDPATH/$package$" | wc -l` + logprint " Processing $package build package" + if [ $NEWBUILDSCOUNT -ge $MINBUILDCOUNT ]; then + BUILDSTODELETE=`find $BUILDPATH/$package -maxdepth 1 -mtime +$MINBUILDCOUNT -type d | grep -v "^$BUILDPATH/$package$" | sort -n` + else + BUILDSCOUNT=`find $BUILDPATH/$package -maxdepth 1 -type d | grep -v "^$BUILDPATH/$package$" | wc -l` + if [ $BUILDSCOUNT -gt $MINBUILDCOUNT ]; then + FILTERCOUNT=`expr $BUILDSCOUNT - $MINBUILDCOUNT` + BUILDSTODELETE=`find $BUILDPATH/$package -maxdepth 1 -type d | grep -v "^$BUILDPATH/$package$" | sort -n | head -n $FILTERCOUNT` + else + BUILDSTODELETE="" + fi + fi + + if [[ ${#BUILDSTODELETE[@]} -eq 0 || $BUILDSTODELETE = '' ]]; then + logprint " Nothing to do" + fi + + for build in $BUILDSTODELETE; do + DATABASE=`grep -R dbname $build/app/etc/ | grep "local.xml:" | grep mysql | head -n1 | cut -d "[" -f 3 | cut -d "]" -f 1` + logprint " Cleaning $build" + if [ $DATABASE ]; then + logprint " Dropping $DATABASE" + `mysql -u$MYSQLUSER -p$MYSQLPASS -e "drop database $DATABASE"` + fi + logprint " Removing files from $build" + `rm -rf $build` + done +done diff --git a/dev/build/bin/include.sh b/dev/build/bin/include.sh new file mode 100755 index 0000000000000000000000000000000000000000..9b73e2698c6094d8cee7c6f9826904041cc4eedb --- /dev/null +++ b/dev/build/bin/include.sh @@ -0,0 +1,50 @@ +#!/bin/sh + +OLDPWD="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +OLDIFS=$IFS +PHP_BIN="/usr/bin/php" + +DB_HOST="$1" +DB_PORT=3306 +DB_NAME="$2" +DB_USER="$3" +DB_PASS="$4" + +BUILD_DIR="$5" +PREVIOUS_BUILD_DIR="$6" +URL_UNSECURE="$7" +URL_SECURE="$8" + +PWD="$BUILD_DIR" + +check_failure() { + if [ "${1}" -ne "0" ]; then + cd $OLDPWD + IFS=$OLDIFS + failed "ERROR # ${1} : ${2}" + fi +} + +failed() { + log "$1" + exit 1 +} + +log() { + echo "$1" +} + +ch_baseurl() { + log "Updating unsecure base url..." + echo "USE $1; UPDATE core_config_data SET value = '$2' WHERE path like 'web/unsecure/base_url';" | mysql -h $DB_HOST -P $DB_PORT -u$DB_USER -p$DB_PASS + check_failure $? + log "Updating secure base url..." + echo "USE $1; UPDATE core_config_data SET value = '$3' WHERE path like 'web/secure/base_url';" | mysql -h $DB_HOST -P $DB_PORT -u$DB_USER -p$DB_PASS + check_failure $? +} + +clean_cache() { + log "Clearing cache..." + rm -rf $1/var/cache/* + check_failure $? +} diff --git a/dev/build/bin/phpunit-with-xdebug.sh b/dev/build/bin/phpunit-with-xdebug.sh new file mode 100755 index 0000000000000000000000000000000000000000..7bbeaf63f03e90a315332292ef01c870b88565f8 --- /dev/null +++ b/dev/build/bin/phpunit-with-xdebug.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +PHP="/usr/bin/env php " +XDEBUG_INSTALED=`$PHP -m|grep xdebug` +if [ -z "$XDEBUG_INSTALED" ]; then + # Test xdebug.so exists in 'extension_dir' + XDEBUG_LIB=`$PHP -r "echo ini_get('extension_dir');"`/xdebug.so + if [ ! -f $XDEBUG_LIB ]; then + # Try locate xdebug.so + XDEBUG_LIB=`locate xdebug.so | head -1` + fi + if [ -z "$XDEBUG_LIB" ]; then + echo XDebug extension is not found [$XDEBUG_LIB] + exit 1 + fi + $PHP -d zend_extension=$XDEBUG_LIB -d xdebug.max_nesting_level=200 `which phpunit` $@ +else + # XDebug is enabled in php.ini + /usr/bin/env phpunit $@ +fi diff --git a/dev/build/bin/prepare-previous.sh b/dev/build/bin/prepare-previous.sh new file mode 100755 index 0000000000000000000000000000000000000000..ad9ac4b5ea70b0422b2d18bf4d8938fa6ac3f1af --- /dev/null +++ b/dev/build/bin/prepare-previous.sh @@ -0,0 +1,31 @@ +#!/bin/sh + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + +. $DIR/include.sh + +cd $PREVIOUS_BUILD_DIR +OLD_BUILD_BASE_DIR="$(basename `pwd -P`)" + +SB_DB=`grep -R dbname app/etc/local.xml | head -n1 | cut -d "[" -f 3 | cut -d "]" -f 1` + +log "Dropping DB if exists..." +echo "DROP DATABASE IF EXISTS \`$DB_NAME\`;" | mysql -h $DB_HOST -P $DB_PORT -u$DB_USER -p$DB_PASS +check_failure $? + +log "Creating clean DB..." +echo "CREATE DATABASE \`$DB_NAME\`;" | mysql -h $DB_HOST -P $DB_PORT -u$DB_USER -p$DB_PASS +check_failure $? + +echo 'SHOW DATABASES;' | mysql -h $DB_HOST -P $DB_PORT -u$DB_USER -p$DB_PASS | grep $SB_DB > /dev/null +if [ "$?" -eq 0 ] ; then + log "Copying DB..." + mysqldump -h $DB_HOST -P $DB_PORT -u$DB_USER -p$DB_PASS $SB_DB | mysql -h $DB_HOST -P $DB_PORT -u$DB_USER -p$DB_PASS $DB_NAME + check_failure $? +fi + +cd $OLDPWD + +CURRENT_BUILD_BASE_DIR="$(basename `pwd -P`)" +ch_baseurl $DB_NAME "$URL_UNSECURE/$CURRENT_BUILD_BASE_DIR/" "$URL_SECURE/$CURRENT_BUILD_BASE_DIR/" +ch_baseurl $SB_DB "$URL_UNSECURE/$OLD_BUILD_BASE_DIR/" "$URL_SECURE/$OLD_BUILD_BASE_DIR/" diff --git a/dev/build/build.properties b/dev/build/build.properties new file mode 100644 index 0000000000000000000000000000000000000000..eb36838fab893c5f91546925b9ccdacb112306d7 --- /dev/null +++ b/dev/build/build.properties @@ -0,0 +1,3 @@ +file.phpunit_xdebug = dev/build/bin/phpunit-with-xdebug.sh +extruder.dir = dev/build +enterprise-enabler.file = app/etc/modules/XEnterprise_Enabler.xml diff --git a/dev/build/build.xml b/dev/build/build.xml new file mode 100644 index 0000000000000000000000000000000000000000..6616bb7b92937c48cee6c8ec9a4ba4edc877db49 --- /dev/null +++ b/dev/build/build.xml @@ -0,0 +1,275 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/** + * 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 dev + * @package build + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<project name="Magento2" basedir="../../" default="init"> + <property file="dev/build/build.properties" /> + <property environment="env"/> + <tstamp> + <format property="timestamp" pattern="yyyyMMdd"/> + </tstamp> + + <!-- copy the build customization files --> + <target name="init" if="env.build_customization_dir"> + <copy todir="${basedir}" failonerror="true" overwrite="true"> + <fileset dir="${basedir}/${env.build_customization_dir}"/> + </copy> + </target> + + <target name="prepare-build-properties"> + <condition property="dir.build_directory" value="${basedir}"> + <not> + <isset property="dir.build_directory"/> + </not> + </condition> + <property name="dir.extruder" location="${dir.build_directory}/${extruder.dir}"/> + </target> + + <!-- setup permissions for the application installation --> + <target name="prepare-installation" depends="prepare-build-properties"> + <chmod perm="a+w"> + <dirset dir="${dir.build_directory}/app/etc"/> + <dirset dir="${dir.build_directory}/pub/media"/> + <fileset dir="${dir.build_directory}/pub/media"/> + <dirset dir="${dir.build_directory}/var"/> + </chmod> + </target> + + <!-- delete files, that don't belong to Community Edition, from working copy --> + <target name="prepare-ce" depends="prepare-build-properties"> + <exec executable="php" failonerror="true"> + <arg line="-f ${dir.extruder}/extruder.php -- + -w ${dir.build_directory} + -l ${dir.extruder}/publication/extruder/common.txt + -l ${dir.extruder}/publication/extruder/ce.txt + -v + "/> + </exec> + </target> + + <target name="jstestdriver-path-substitution"> + <fail unless="env.JsTestDriver" message="Bamboo variable 'JsTestDriver' must be defined on your agent"/> + <copy file="${basedir}/dev/tests/js/jsTestDriver.php.dist" tofile="${basedir}/dev/tests/js/jsTestDriver.php"/> + <replace file="${basedir}/dev/tests/js/jsTestDriver.php"> + <replacefilter token="{{path_to_jstestdriver_jar}}" value="${env.JsTestDriver}"/> + </replace> + </target> + + <target name="js-test-php" depends="jstestdriver-path-substitution"> + <exec dir="${basedir}/dev/tests/js" executable="php" failonerror="true"> + <arg line="run_js_tests.php"/> + </exec> + </target> + + <target name="prepare-ee" depends="prepare-build-properties"> + <copy file="${dir.build_directory}/${enterprise-enabler.file}.dist" tofile="${dir.build_directory}/${enterprise-enabler.file}"/> + + <replace file="${dir.build_directory}/downloader/config.ini" token="community" value="enterprise"/> + <replace file="${dir.build_directory}/app/Mage.php" token="self::EDITION_COMMUNITY" value="self::EDITION_ENTERPRISE"/> + </target> + + <!-- deploy and run functional tests --> + <target name="functional-tests-with-deploy" description="Deploy Magento"> + <fail unless="env.build_customization_dir" message="Bamboo variable 'customization_dir' must be defined" /> + <!-- Functional tests params --> + <fail unless="env.deploy_directory" message="Bamboo variable 'deploy_directory' must be defined on your agent"/> + <fail unless="env.db_host" message="Bamboo variable 'db_host' must be defined on your agent"/> + <fail unless="env.db_name" message="Bamboo variable 'db_name' must be defined on your agent"/> + <fail unless="env.db_user" message="Bamboo variable 'db_user' must be defined on your agent"/> + <fail unless="env.db_password" message="Bamboo variable 'db_password' must be defined on your agent"/> + <fail unless="env.http_host" message="Bamboo variable 'http_host' must be defined on your agent (e.g. http://myhost.com/mypath/)"/> + <fail unless="env.https_host" message="Bamboo variable 'https_host' must be defined on your agent (e.g. https://myhost.com/mypath/)"/> + + <fail unless="env.selenium_host" message="Bamboo variable 'selenium_host' must be defined on your agent"/> + <fail unless="env.selenium_port" message="Bamboo variable 'selenium_port' must be defined on your agent"/> + <fail unless="env.testsuite" message="Bamboo variable 'testsuite' must be defined on your agent (mage, enterprise)"/> + + <property name="dir.build_directory" location="${env.deploy_directory}/${env.build.key}"/> + + <delete dir="${dir.build_directory}" /> + + <copy todir="${dir.build_directory}" failonerror="true"> + <fileset dir="${basedir}" defaultexcludes="no"/> + </copy> + + <copy todir="${dir.build_directory}" failonerror="true" overwrite="true"> + <fileset dir="${basedir}/${env.build_customization_dir}"/> + </copy> + + <antcall target="prepare-installation" inheritAll="true" /> + + <replace file="${dir.build_directory}/dev/tests/functional/config/install.php"> + <replacefilter token="{{db_model}}" value="${env.db_model}"/> + <replacefilter token="{{db_host}}" value="${env.db_host}"/> + <replacefilter token="{{db_name}}" value="${env.db_name}"/> + <replacefilter token="{{db_user}}" value="${env.db_user}"/> + <replacefilter token="{{db_password}}" value="${env.db_password}"/> + <replacefilter token="{{url}}" value="${env.http_host}${env.build.key}"/> + <replacefilter token="{{secure_url}}" value="${env.https_host}${env.build.key}"/> + </replace> + + + <replace file="${dir.build_directory}/dev/tests/functional/config/config.yml"> + <replacefilter token="{{admin_url}}" value="${env.https_host}${env.build.key}/backend/admin"/> + <replacefilter token="{{url}}" value="${env.http_host}${env.build.key}"/> + <replacefilter token="{{selenium_host}}" value="${env.selenium_host}"/> + <replacefilter token="{{selenium_port}}" value="${env.selenium_port}"/> + <replacefilter token="{{selenium_testsuite}}" value="${env.testsuite}"/> + </replace> + </target> + + <target name="functional-tests-with-deploy-ee" depends="functional-tests-with-deploy,prepare-ee"> + <replace file="${dir.build_directory}/dev/tests/functional/config/config.yml"> + <replacefilter token="{{enterprise_admin_url}}" value="${env.https_host}${env.build.key}/backend/admin"/> + <replacefilter token="{{enterprise_url}}" value="${env.http_host}${env.build.key}/"/> + </replace> + </target> + + <target name="init-build-directory" unless="build.directory.initialized"> + <fail unless="env.deploy_directory" message="Bamboo variable 'deploy_directory' must be defined."/> + <fail unless="env.build_number" message="Bamboo variable 'build_number' must be defined."/> + <fail unless="env.build_scope_name" message="Bamboo variable 'env.build_scope_name' must be defined."/> + + <property name="dir.build_directory" location="${env.deploy_directory}/${env.build_scope_name}/${timestamp}-${env.build_number}"/> + <echo message="Build directory: ${dir.build_directory}" level="info"/> + <property name="build.directory.initialized" value="1" /> + </target> + + <target name="deploy" unless="build.deployed" depends="init-build-directory"> + <delete dir="${dir.build_directory}"/> + + <copy todir="${dir.build_directory}" failonerror="true"> + <fileset dir="${basedir}" defaultexcludes="no"/> + </copy> + <property name="build.deployed" value="1" /> + </target> + + <target name="install" depends="init-build-directory"> + <fail unless="env.install_properties_file" message="Bamboo variable 'build_properties_file' must be defined."/> + <fail unless="env.build_number" message="Bamboo variable 'build_number' must be defined."/> + <fail unless="env.db_host" message="Bamboo variable 'db_host' must be defined."/> + <fail unless="env.db_user" message="Bamboo variable 'db_user' must be defined."/> + <fail unless="env.db_password" message="Bamboo variable 'db_password' must be defined."/> + <fail unless="env.http_host" message="Bamboo variable 'http_host' must be defined."/> + <fail unless="env.https_host" message="Bamboo variable 'https_host' must be defined."/> + <fail unless="env.build_scope_name" message="Bamboo variable 'env.build_scope_name' must be defined."/> + + <property name="db.name" value="${env.build_scope_name}_${timestamp}_${env.build_number}"/> + + <property name="file.create_database" location="${dir.build_directory}/dev/build/bin/create-database.sh"/> + <chmod file="${file.create_database}" perm="ugo+rx"/> + + <exec executable="${file.create_database}" failonerror="true"> + <arg value="${env.db_host}"/> + <arg value="${db.name}"/> + <arg value="${env.db_user}"/> + <arg value="${env.db_password}"/> + </exec> + + <antcall target="install-magento" inheritAll="true"/> + + <mkdir dir="${dir.build_directory}/websites"/> + </target> + + <target name="install-magento"> + <replace file="${dir.build_directory}/${env.install_properties_file}" > + <replacefilter token="{{db_host}}" value="${env.db_host}"/> + <replacefilter token="{{db_name}}" value="${db.name}"/> + <replacefilter token="{{db_user}}" value="${env.db_user}"/> + <replacefilter token="{{db_password}}" value="${env.db_password}"/> + <replacefilter token="{{url}}" value="${env.http_host}${env.build_scope_name}/${timestamp}-${env.build_number}"/> + <replacefilter token="{{secure_url}}" value="${env.https_host}${env.build_scope_name}/${timestamp}-${env.build_number}"/> + </replace> + + <exec executable="php" failonerror="true"> + <arg line="-f ${dir.build_directory}/dev/build/publication/install.php -- + --build_properties_file ${dir.build_directory}/${env.install_properties_file} + "/> + </exec> + </target> + + <target name="upgrade" depends="init-build-directory"> + <property name="dir.previous_build_directory" value="${dir.build_directory}/../current"/> + <property name="db.name" value="${env.build_scope_name}_${timestamp}_${env.build_number}"/> + + <copy todir="${dir.build_directory}/websites" failonerror="false"> + <fileset dir="${dir.previous_build_directory}/websites" /> + </copy> + + <copy todir="${dir.build_directory}/pub/media" failonerror="false"> + <fileset dir="${dir.previous_build_directory}/pub/media"/> + </copy> + + <chmod perm="a+w"> + <dirset dir="${dir.build_directory}/pub/media"/> + <fileset dir="${dir.build_directory}/pub/media"/> + </chmod> + + <property name="file.prepare_previous" location="${dir.build_directory}/dev/build/bin/prepare-previous.sh"/> + <chmod file="${file.prepare_previous}" perm="ugo+rx"/> + + <exec executable="${file.prepare_previous}" failonerror="true"> + <arg value="${env.db_host}"/> + <arg value="${db.name}"/> + <arg value="${env.db_user}"/> + <arg value="${env.db_password}"/> + <arg value="${dir.build_directory}"/> + <arg value="${dir.previous_build_directory}"/> + <arg value="${env.http_host}${env.build_scope_name}"/> + <arg value="${env.https_host}${env.build_scope_name}"/> + </exec> + + <antcall target="install-magento" inheritAll="true"/> + </target> + + <target name="update-current" depends="init-build-directory"> + <property name="file.current" location="${dir.build_directory}/dev/build/bin/current.sh"/> + <chmod file="${file.current}" perm="ugo+rx"/> + <chmod file="${dir.build_directory}/dev/build/bin/include.sh" perm="ugo+rx"/> + + <exec executable="${file.current}" failonerror="true"> + <arg value="${env.db_host}"/> + <arg value="${db.name}"/> + <arg value="${env.db_user}"/> + <arg value="${env.db_password}"/> + <arg value="${dir.build_directory}"/> + <arg value=""/> + <arg value="${env.http_host}${env.build_scope_name}/current/"/> + <arg value="${env.https_host}${env.build_scope_name}/current/"/> + </exec> + </target> + + <target name="remove-old-builds" depends="init-build-directory"> + <property name="file.delete_old_builds" location="${dir.build_directory}/dev/build/bin/delete-old-builds.sh"/> + <chmod file="${file.delete_old_builds}" perm="ugo+rx"/> + + <exec executable="${file.delete_old_builds}" failonerror="true"> + <arg value="${env.build_scope_name}"/> + <arg value="${env.db_user}"/> + <arg value="${env.db_password}"/> + </exec> + </target> +</project> diff --git a/dev/build/core_dep/build.xml b/dev/build/core_dep/build.xml new file mode 100644 index 0000000000000000000000000000000000000000..03a602fcfce24f2493a0c90f79e382222ec152d5 --- /dev/null +++ b/dev/build/core_dep/build.xml @@ -0,0 +1,73 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/** + * Apache Ant's build file for core deployment builds + * + * 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 dev + * @package build + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<project name="Core Deployment Builds" basedir="../../../" default="publication_ce"> + <import file="../core_dev/unit/build.xml"/> + <import file="../core_dev/static/build.xml"/> + <import file="../core_dev/integration/build.xml"/> + + <target name="publication_ce" description="Community Edition source code population to the public repository"> + <property name="publication_target_dir" location="${basedir}/dev/build/publication/_tmp_target"/> + <fail message="Bamboo variable 'source_repository' must be defined."> + <condition><equals arg1="${env.bamboo_source_repository}" arg2="" trim="true"/></condition> + </fail> + <fail message="Bamboo variable 'target_repository' must be defined."> + <condition><equals arg1="${env.bamboo_target_repository}" arg2="" trim="true"/></condition> + </fail> + <fail message="Bamboo variable 'source_point' must be defined."> + <condition><equals arg1="${env.bamboo_source_point}" arg2="" trim="true"/></condition> + </fail> + <condition property="env.bamboo_target_branch" value="master"> + <not><isset property="env.bamboo_target_branch"/></not> + </condition> + <delete dir="${publication_target_dir}" failonerror="true"/> + <exec executable="php" failonerror="true"> + <arg line="-f ${basedir}/dev/build/publication/publish.php -- + --source=${env.bamboo_source_repository} --source-point=${env.bamboo_source_point} + --target=${env.bamboo_target_repository} --target-branch=${env.bamboo_target_branch} + --target-dir=${publication_target_dir} + --changelog-file=CHANGELOG.markdown + --no-push + "/> + </exec> + <antcall> + <param name="product_root_dir" value="${publication_target_dir}"/> + <param name="product_edition_code" value="ce"/> + <target name="_unit_tests_all"/> + <target name="_sanity_check"/> + <target name="_static_tests_no_js"/> + <target name="_integration_tests_magento"/> + <target name="_integration_integrity_tests_magento"/> + </antcall> + <exec dir="${publication_target_dir}" executable="git" failonerror="true"> + <arg line="push origin ${env.bamboo_target_branch}"/> + </exec> + </target> + +</project> diff --git a/dev/build/core_dev/integration/build.xml b/dev/build/core_dev/integration/build.xml new file mode 100644 index 0000000000000000000000000000000000000000..09a130673f5ed453e68938e1a474358045897f63 --- /dev/null +++ b/dev/build/core_dev/integration/build.xml @@ -0,0 +1,152 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/** + * Apache Ant's build file for core development integration tests + * + * 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 dev + * @package build + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<project name="Core Development Integration Tests" basedir="../../../../" default="integration_tests_ee_mysql"> + <import file="../util.xml"/> + + <target name="_integration_tests_configuration" depends="_product_location" description="Generation of configuration for integration tests"> + <condition property="db_vendor_name" value="mysql"> + <not><isset property="db_vendor_name"/></not> + </condition> + <condition property="db_table_prefix" value=""> + <not><isset property="db_table_prefix"/></not> + </condition> + <condition property="developer_mode" value="enabled"> + <not><isset property="developer_mode"/></not> + </condition> + <copy file="${basedir}/dev/build/core_dev/integration/local-${db_vendor_name}.xml" todir="${product_root_dir}/dev/tests/integration/etc" overwrite="true"/> + <ant antfile="${basedir}/dev/build/core_dev/util.xml" target="_database_credential_substitution"> + <property name="db_config_file" value="${product_root_dir}/dev/tests/integration/etc/local-${db_vendor_name}.xml"/> + </ant> + <replace file="${product_root_dir}/dev/tests/integration/etc/local-${db_vendor_name}.xml"> + <replacefilter token="{{db_table_prefix}}" value="${db_table_prefix}"/> + </replace> + <copy file="${basedir}/dev/build/core_dev/integration/phpunit.xml" todir="${product_root_dir}/dev/tests/integration" overwrite="true"/> + <replace file="${product_root_dir}/dev/tests/integration/phpunit.xml"> + <replacefilter token="{{local_config_file}}" value="etc/local-${db_vendor_name}.xml"/> + <replacefilter token="{{developer_mode}}" value="${developer_mode}"/> + </replace> + </target> + + + <target name="_integration_tests_magento" depends="_integration_tests_configuration" description="Product integration tests"> + <exec dir="${product_root_dir}/dev/tests/integration" executable="phpunit" failonerror="true"> + <arg line="--log-junit ${basedir}/integration_tests_magento.xml"/> + </exec> + </target> + <target name="_integration_tests_magento_xdebug" depends="_integration_tests_configuration" description="Product integration tests with Xdebug"> + <chmod perm="u+x" file="${basedir}/dev/build/bin/phpunit-with-xdebug.sh"/> + <exec dir="${product_root_dir}/dev/tests/integration" executable="${basedir}/dev/build/bin/phpunit-with-xdebug.sh" failonerror="true"> + <arg line="--stderr --log-junit ${basedir}/integration_tests_magento_xdebug.xml"/> + </exec> + </target> + + <target name="integration_tests_ee_dev_mysql" description="Integration tests in dev mode on MySQL for EE"> + <antcall target="_integration_tests_magento"/> + </target> + <target name="integration_tests_ee_mysql" description="Integration tests on MySQL for EE"> + <antcall target="_integration_tests_magento"> + <param name="developer_mode" value="disabled"/> + </antcall> + </target> + <target name="integration_tests_ee_dev_mysql_tpfx" description="Integration tests in dev mode with table prefix on MySQL for EE"> + <antcall target="_integration_tests_magento"> + <param name="db_table_prefix" value="pfx_"/> + </antcall> + </target> + <target name="integration_tests_ee_dev_xd_mysql" description="Integration tests in dev mode with Xdebug on MySQL for EE"> + <antcall target="_integration_tests_magento_xdebug"/> + </target> + <target name="integration_tests_ee_xd_mysql" description="Integration tests with Xdebug on MySQL for EE"> + <antcall target="_integration_tests_magento_xdebug"> + <param name="developer_mode" value="disabled"/> + </antcall> + </target> + <target name="integration_tests_ee_dev_xd_mysql_tpfx" description="Integration tests in dev mode with Xdebug and table prefix on MySQL for EE"> + <antcall target="_integration_tests_magento_xdebug"> + <param name="db_table_prefix" value="pfx_"/> + </antcall> + </target> + <target name="integration_tests_ee_dev_xd_mssql" description="Integration tests in dev mode with Xdebug on MSSQL for EE"> + <antcall target="_integration_tests_magento_xdebug"> + <param name="db_vendor_name" value="mssql"/> + </antcall> + </target> + <target name="integration_tests_ee_dev_xd_oracle" description="Integration tests in dev mode with Xdebug on Oracle for EE"> + <antcall target="_integration_tests_magento_xdebug"> + <param name="db_vendor_name" value="oracle"/> + </antcall> + </target> + <target name="integration_tests_ce_dev_mysql" depends="_community_edition" description="Integration tests in dev mode on MySQL for CE"> + <antcall target="_integration_tests_magento"/> + </target> + <target name="integration_tests_ce_mysql" depends="_community_edition" description="Integration tests on MySQL for CE"> + <antcall target="_integration_tests_magento"> + <param name="developer_mode" value="disabled"/> + </antcall> + </target> + <target name="integration_tests_ce_dev_mysql_tpfx" depends="_community_edition" description="Integration tests in dev mode with table prefix on MySQL for CE"> + <antcall target="_integration_tests_magento"> + <param name="db_table_prefix" value="pfx_"/> + </antcall> + </target> + <target name="integration_tests_ce_dev_xd_mysql" depends="_community_edition" description="Integration tests in dev mode with Xdebug on MySQL for CE"> + <antcall target="_integration_tests_magento_xdebug"/> + </target> + <target name="integration_tests_ce_xd_mysql" depends="_community_edition" description="Integration tests with Xdebug on MySQL for CE"> + <antcall target="_integration_tests_magento_xdebug"> + <param name="developer_mode" value="disabled"/> + </antcall> + </target> + + + <target name="_integration_integrity_tests_magento" depends="_integration_tests_configuration" description="Product integration integrity tests"> + <exec dir="${product_root_dir}/dev/tests/integration" executable="phpunit" failonerror="true"> + <arg line="--log-junit ${basedir}/integration_integrity_tests_magento.xml testsuite/integrity"/> + </exec> + </target> + + <target name="integration_integrity_tests_ee_dev_mysql" description="Integration integrity tests in dev mode on MySQL for EE"> + <antcall target="_integration_integrity_tests_magento"/> + </target> + <target name="integration_integrity_tests_ee_mysql" description="Integration integrity tests on MySQL for EE"> + <antcall target="_integration_integrity_tests_magento"> + <param name="developer_mode" value="disabled"/> + </antcall> + </target> + <target name="integration_integrity_tests_ce_dev_mysql" depends="_community_edition" description="Integration integrity tests in dev mode on MySQL for CE"> + <antcall target="_integration_integrity_tests_magento"/> + </target> + <target name="integration_integrity_tests_ce_mysql" depends="_community_edition" description="Integration integrity tests on MySQL for CE"> + <antcall target="_integration_integrity_tests_magento"> + <param name="developer_mode" value="disabled"/> + </antcall> + </target> + +</project> diff --git a/dev/build/core_dev/integration/local-mssql.xml b/dev/build/core_dev/integration/local-mssql.xml new file mode 100644 index 0000000000000000000000000000000000000000..69c948373a15889237cc813a2e193a3996409c13 --- /dev/null +++ b/dev/build/core_dev/integration/local-mssql.xml @@ -0,0 +1,76 @@ +<?xml version="1.0"?> +<!-- +/** + * 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 Magento + * @package Magento + * @subpackage integration_tests + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> + <global> + <install> + <date><![CDATA[d-d-d-d-d]]></date> + </install> + <crypt> + <key><![CDATA[k-k-k-k-k]]></key> + </crypt> + <disable_local_modules>false</disable_local_modules> + <resources> + <db> + <table_prefix><![CDATA[{{db_table_prefix}}]]></table_prefix> + </db> + <default_setup> + <connection> + <host><![CDATA[{{db_host}}]]></host> + <username><![CDATA[{{db_user}}]]></username> + <password><![CDATA[{{db_password}}]]></password> + <dbname><![CDATA[{{db_name}}]]></dbname> + <initStatements><![CDATA[]]></initStatements> + <model><![CDATA[mssql]]></model> + <type><![CDATA[pdo_mssql]]></type> + <pdoType><![CDATA[pdo_dblib]]></pdoType> + <active>1</active> + </connection> + </default_setup> + </resources> + <session_save><![CDATA[files]]></session_save> + <resource> + <connection> + <types> + <pdo_mssql> + <adapter><![CDATA[Magento_Test_Db_Adapter_Mssql]]></adapter> + </pdo_mssql> + </types> + </connection> + </resource> + </global> + <admin> + <routers> + <adminhtml> + <args> + <frontName><![CDATA[admin]]></frontName> + </args> + </adminhtml> + </routers> + </admin> +</config> diff --git a/dev/build/core_dev/integration/local-mysql.xml b/dev/build/core_dev/integration/local-mysql.xml new file mode 100644 index 0000000000000000000000000000000000000000..0f9ce82cd2abf0409fb2e14ab60cedfd6043f5b2 --- /dev/null +++ b/dev/build/core_dev/integration/local-mysql.xml @@ -0,0 +1,76 @@ +<?xml version="1.0"?> +<!-- +/** + * 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 Magento + * @package Magento + * @subpackage integration_tests + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> + <global> + <install> + <date><![CDATA[d-d-d-d-d]]></date> + </install> + <crypt> + <key><![CDATA[k-k-k-k-k]]></key> + </crypt> + <disable_local_modules>false</disable_local_modules> + <resources> + <db> + <table_prefix><![CDATA[{{db_table_prefix}}]]></table_prefix> + </db> + <default_setup> + <connection> + <host><![CDATA[{{db_host}}]]></host> + <username><![CDATA[{{db_user}}]]></username> + <password><![CDATA[{{db_password}}]]></password> + <dbname><![CDATA[{{db_name}}]]></dbname> + <initStatements><![CDATA[SET NAMES utf8]]></initStatements> + <model><![CDATA[mysql4]]></model> + <type><![CDATA[pdo_mysql]]></type> + <pdoType><![CDATA[]]></pdoType> + <active>1</active> + </connection> + </default_setup> + </resources> + <session_save><![CDATA[files]]></session_save> + <resource> + <connection> + <types> + <pdo_mysql> + <adapter><![CDATA[Magento_Test_Db_Adapter_Mysql]]></adapter> + </pdo_mysql> + </types> + </connection> + </resource> + </global> + <admin> + <routers> + <adminhtml> + <args> + <frontName><![CDATA[admin]]></frontName> + </args> + </adminhtml> + </routers> + </admin> +</config> diff --git a/dev/build/core_dev/integration/local-oracle.xml b/dev/build/core_dev/integration/local-oracle.xml new file mode 100644 index 0000000000000000000000000000000000000000..c5fde11e95243f3c0e2bc08aed1e87b1df46b10a --- /dev/null +++ b/dev/build/core_dev/integration/local-oracle.xml @@ -0,0 +1,76 @@ +<?xml version="1.0"?> +<!-- +/** + * 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 Magento + * @package Magento + * @subpackage integration_tests + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> + <global> + <install> + <date><![CDATA[d-d-d-d-d]]></date> + </install> + <crypt> + <key><![CDATA[k-k-k-k-k]]></key> + </crypt> + <disable_local_modules>false</disable_local_modules> + <resources> + <db> + <table_prefix><![CDATA[{{db_table_prefix}}]]></table_prefix> + </db> + <default_setup> + <connection> + <host><![CDATA[{{db_host}}]]></host> + <username><![CDATA[{{db_user}}]]></username> + <password><![CDATA[{{db_password}}]]></password> + <dbname><![CDATA[{{db_name}}]]></dbname> + <initStatements><![CDATA[]]></initStatements> + <model><![CDATA[oracle]]></model> + <type><![CDATA[oracle]]></type> + <pdoType><![CDATA[]]></pdoType> + <active>1</active> + </connection> + </default_setup> + </resources> + <session_save><![CDATA[files]]></session_save> + <resource> + <connection> + <types> + <oracle> + <adapter><![CDATA[Magento_Test_Db_Adapter_Oracle]]></adapter> + </oracle> + </types> + </connection> + </resource> + </global> + <admin> + <routers> + <adminhtml> + <args> + <frontName><![CDATA[admin]]></frontName> + </args> + </adminhtml> + </routers> + </admin> +</config> diff --git a/dev/build/core_dev/integration/phpunit.xml b/dev/build/core_dev/integration/phpunit.xml new file mode 100644 index 0000000000000000000000000000000000000000..0fd16365f2445a10a89c95d455a326def1d0bf93 --- /dev/null +++ b/dev/build/core_dev/integration/phpunit.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +/** + * 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 Magento + * @package Magento + * @subpackage integration_tests + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<phpunit bootstrap="./framework/bootstrap.php"> + <testsuites> + <testsuite name="Magento Integration Tests"> + <directory suffix="Test.php">testsuite</directory> + <exclude>testsuite/integrity</exclude> + </testsuite> + </testsuites> + <php> + <includePath>.</includePath> + <ini name="date.timezone" value="America/Los_Angeles"/> + <const name="TESTS_LOCAL_CONFIG_FILE" value="{{local_config_file}}"/> + <const name="TESTS_GLOBAL_CONFIG_FILES" value="../../../app/etc/*.xml"/> + <const name="TESTS_MODULE_CONFIG_FILES" value="../../../app/etc/modules/*.xml;etc/modules/*.xml"/> + <const name="TESTS_CLEANUP" value="enabled"/> + <const name="TESTS_MAGENTO_DEVELOPER_MODE" value="{{developer_mode}}"/> + </php> + <listeners> + <listener class="Magento_Test_Event_PhpUnit"/> + </listeners> +</phpunit> diff --git a/dev/build/core_dev/performance/build.xml b/dev/build/core_dev/performance/build.xml new file mode 100644 index 0000000000000000000000000000000000000000..33b0644f4be091e41b50759cea9230f4f30de36d --- /dev/null +++ b/dev/build/core_dev/performance/build.xml @@ -0,0 +1,65 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/** + * Apache Ant's build file for core development performance tests + * + * 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 dev + * @package build + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<project name="Core Development Performance Tests" basedir="../../../../" default="performance_tests_ce_mysql"> + <import file="../util.xml"/> + + <target name="_performance_tests_configuration" depends="_product_location" description="Generation of configuration for product performance tests"> + <fail unless="env.web_access_host" message="Environment variable 'web_access_host' must be defined"/> + <fail unless="env.web_access_path" message="Environment variable 'web_access_path' must be defined"/> + <condition property="performance_tests_config_file" value="${basedir}/dev/build/core_dev/performance/config.php"> + <not><isset property="performance_tests_config_file"/></not> + </condition> + <copy file="${performance_tests_config_file}" tofile="${product_root_dir}/dev/tests/performance/config.php" overwrite="true"/> + <antcall target="_database_credential_substitution"> + <param name="db_config_file" value="${product_root_dir}/dev/tests/performance/config.php"/> + </antcall> + <replace file="${product_root_dir}/dev/tests/performance/config.php"> + <replacefilter token="{{web_access_host}}" value="${env.web_access_host}"/> + <replacefilter token="{{web_access_path}}" value="${env.web_access_path}"/> + </replace> + </target> + <target name="_performance_tests_magento" depends="_installation_requirements" description="Product performance tests"> + <exec executable="php" failonerror="true"> + <arg value="${product_root_dir}/dev/tests/performance/run_scenarios.php"/> + </exec> + </target> + + <target name="performance_tests_ce_mysql" depends="_community_edition" description="Performance tests on MySQL for CE"> + <antcall target="_performance_tests_configuration"/> + <antcall target="_performance_tests_magento"/> + </target> + + <target name="performance_tests_ce_mysql_volume" depends="_community_edition" description="Performance tests with large DB on MySQL for CE"> + <antcall target="_performance_tests_configuration"> + <param name="performance_tests_config_file" value="${basedir}/dev/build/core_dev/performance/config_large_db.php"/> + </antcall> + <antcall target="_performance_tests_magento"/> + </target> +</project> diff --git a/dev/build/core_dev/performance/config.php b/dev/build/core_dev/performance/config.php new file mode 100644 index 0000000000000000000000000000000000000000..bd8089814c79dafd00b42f55d3493f4ffca6479a --- /dev/null +++ b/dev/build/core_dev/performance/config.php @@ -0,0 +1,117 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Magento + * @package performance_tests + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +return array( + 'application' => array( + 'url_host' => '{{web_access_host}}', + 'url_path' => '{{web_access_path}}', + 'admin' => array( + 'frontname' => 'backend', + 'username' => 'admin', + 'password' => '123123q', + ), + 'installation' => array( + 'options' => array( + 'license_agreement_accepted' => 'yes', + 'locale' => 'en_US', + 'timezone' => 'America/Los_Angeles', + 'default_currency' => 'USD', + 'db_host' => '{{db_host}}', + 'db_name' => '{{db_name}}', + 'db_user' => '{{db_user}}', + 'db_pass' => '{{db_password}}', + 'use_secure' => 'no', + 'use_secure_admin' => 'no', + 'use_rewrites' => 'no', + 'admin_lastname' => 'Admin', + 'admin_firstname' => 'Admin', + 'admin_email' => 'admin@example.com', + 'admin_no_form_key' => 'yes', + 'cleanup_database' => 'yes', + ), + ), + ), + 'scenario' => array( + 'common_config' => array( + 'arguments' => array( + 'users' => 10, + 'loops' => 100, + ), + ), + 'scenarios' => array( + 'Add to Cart' => array( + 'file' => 'testsuite/add_to_cart.jmx', + 'fixtures' => array( + 'testsuite/fixtures/catalog_product.php', + ), + ), + 'Advanced Search' => array( + 'file' => 'testsuite/advanced_search.jmx', + 'fixtures' => array( + 'testsuite/fixtures/catalog_product.php', + ), + ), + 'Category View' => array( + 'file' => 'testsuite/category_view.jmx', + 'fixtures' => array( + 'testsuite/fixtures/catalog_category.php', + ), + ), + 'Checkout' => array( + 'file' => 'testsuite/checkout.jmx', + 'fixtures' => array( + 'testsuite/fixtures/catalog_product.php', + ), + ), + 'Home Page' => array( + 'file' => 'testsuite/home_page.jmx', + ), + 'Product Edit' => array( + 'file' => 'testsuite/product_edit.jmx', + 'fixtures' => array( + 'testsuite/fixtures/catalog_product.php', + ), + ), + 'Product View' => array( + 'file' => 'testsuite/product_view.jmx', + 'arguments' => array( + 'product_url_key' => 'product-1.html', + 'product_name' => 'Product 1', + ), + 'fixtures' => array( + 'testsuite/fixtures/catalog_product.php', + ), + ), + 'Quick Search' => array( + 'file' => 'testsuite/quick_search.jmx', + 'fixtures' => array( + 'testsuite/fixtures/catalog_product.php', + ), + ), + ), + ), + 'report_dir' => 'report', +); diff --git a/dev/build/core_dev/performance/config_large_db.php b/dev/build/core_dev/performance/config_large_db.php new file mode 100644 index 0000000000000000000000000000000000000000..85b54b187a487e19ea3b21374e8cc1dfe4e81ee0 --- /dev/null +++ b/dev/build/core_dev/performance/config_large_db.php @@ -0,0 +1,175 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Magento + * @package performance_tests + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +return array( + 'application' => array( + 'url_host' => '{{web_access_host}}', + 'url_path' => '{{web_access_path}}', + 'admin' => array( + 'frontname' => 'backend', + 'username' => 'admin', + 'password' => '123123q', + ), + 'installation' => array( + 'options' => array( + 'license_agreement_accepted' => 'yes', + 'locale' => 'en_US', + 'timezone' => 'America/Los_Angeles', + 'default_currency' => 'USD', + 'db_host' => '{{db_host}}', + 'db_name' => '{{db_name}}', + 'db_user' => '{{db_user}}', + 'db_pass' => '{{db_password}}', + 'use_secure' => 'no', + 'use_secure_admin' => 'no', + 'use_rewrites' => 'no', + 'admin_lastname' => 'Admin', + 'admin_firstname' => 'Admin', + 'admin_email' => 'admin@example.com', + 'admin_no_form_key' => 'yes', + 'cleanup_database' => 'yes', + ), + ), + ), + 'scenario' => array( + 'common_config' => array( + 'arguments' => array( + 'users' => 1, + 'loops' => 1, + ), + 'settings' => array( + 'skip_warm_up' => true, + ), + ), + 'scenarios' => array( + 'Backend Management with Many Entities' => array( + 'file' => 'testsuite/backend.jmx', + 'arguments' => array( + 'loops' => 100, + 'products_number' => 100000, + 'customers_number' => 100000, + 'orders_number' => 100000, + ), + 'settings' => array( + 'skip_warm_up' => false, + ), + 'fixtures' => array( + 'testsuite/fixtures/catalog_100k_products.php', + 'testsuite/fixtures/customer_100k_customers.php', + 'testsuite/fixtures/sales_100k_orders.php', + ), + ), + 'Product Attributes Indexer' => array( + 'file' => '/../../shell/indexer.php', + 'fixtures' => array( + 'testsuite/fixtures/catalog_200_categories_80k_products_with_tags.php', + ), + 'arguments' => array( + 'loops' => 3, + 'reindex' => 'catalog_product_attribute', + ), + ), + 'Product Prices Indexer' => array( + 'file' => '/../../shell/indexer.php', + 'fixtures' => array( + 'testsuite/fixtures/catalog_200_categories_80k_products_with_tags.php', + ), + 'arguments' => array( + 'loops' => 3, + 'reindex' => 'catalog_product_price', + ), + ), + 'Catalog URL Rewrites Indexer' => array( + 'file' => '/../../shell/indexer.php', + 'fixtures' => array( + 'testsuite/fixtures/catalog_200_categories_80k_products_with_tags.php', + ), + 'arguments' => array( + 'reindex' => 'catalog_url', + ), + ), + 'Product Flat Data Indexer' => array( + 'file' => '/../../shell/indexer.php', + 'fixtures' => array( + 'testsuite/fixtures/catalog_200_categories_80k_products_with_tags.php', + ), + 'arguments' => array( + 'reindex' => 'catalog_product_flat', + ), + ), + 'Category Flat Data Indexer' => array( + 'file' => '/../../shell/indexer.php', + 'fixtures' => array( + 'testsuite/fixtures/catalog_200_categories_80k_products_with_tags.php', + ), + 'arguments' => array( + 'loops' => 10, + 'reindex' => 'catalog_category_flat', + ), + ), + 'Category Products Indexer' => array( + 'file' => '/../../shell/indexer.php', + 'fixtures' => array( + 'testsuite/fixtures/catalog_200_categories_80k_products_with_tags.php', + ), + 'arguments' => array( + 'loops' => 3, + 'reindex' => 'catalog_category_product', + ), + ), + 'Stock Status Indexer' => array( + 'file' => '/../../shell/indexer.php', + 'fixtures' => array( + 'testsuite/fixtures/catalog_200_categories_80k_products_with_tags.php', + ), + 'arguments' => array( + 'loops' => 5, + 'reindex' => 'cataloginventory_stock', + ), + ), + 'Catalog Search Indexer' => array( + 'file' => '/../../shell/indexer.php', + 'fixtures' => array( + 'testsuite/fixtures/catalog_200_categories_80k_products_with_tags.php', + ), + 'arguments' => array( + 'reindex' => 'catalogsearch_fulltext', + ), + ), + 'Tag Aggregation Data Indexer' => array( + 'file' => '/../../shell/indexer.php', + 'fixtures' => array( + 'testsuite/fixtures/catalog_200_categories_80k_products_with_tags.php', + ), + 'arguments' => array( + 'loops' => 5, + 'reindex' => 'tag_summary', + ), + ), + ), + ), + 'report_dir' => 'report', +); diff --git a/dev/build/core_dev/static/build.xml b/dev/build/core_dev/static/build.xml new file mode 100644 index 0000000000000000000000000000000000000000..f3b54747e2e69b66c2e9b55844aa67b383b0b864 --- /dev/null +++ b/dev/build/core_dev/static/build.xml @@ -0,0 +1,104 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/** + * Apache Ant's build file for core development static tests + * + * 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 dev + * @package build + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<project name="Core Development Static Tests" basedir="../../../../" default="_static_tests_all"> + <import file="../util.xml"/> + + <target name="_jshint_path_substitution" description="JsHint Javascript file path substitution from environment variable"> + <fail unless="phpunit_config_file" message="Property 'phpunit_config_file' must be defined"/> + <fail unless="env.JsHintPath" message="Environment variable 'JsHintPath' must be defined"/> + <replace file="${phpunit_config_file}"> + <replacefilter token="{{tests_jshint_path}}" value="${env.JsHintPath}"/> + </replace> + </target> + + <target name="_static_tests_no_js" depends="_product_location" description="All static tests without JS static test"> + <copy file="${basedir}/dev/build/core_dev/static/phpunit.php.xml" + tofile="${product_root_dir}/dev/tests/static/phpunit.xml" overwrite="true"/> + <exec dir="${product_root_dir}/dev/tests/static" executable="phpunit" failonerror="true"> + <arg line="--log-junit ${basedir}/static_tests_no_js.xml"/> + </exec> + </target> + + <target name="_code_legacy_tests" depends="_product_location" description="Code Legacy Tests"> + <copy file="${basedir}/dev/build/core_dev/static/phpunit.legacy.xml" + tofile="${product_root_dir}/dev/tests/static/phpunit.xml" overwrite="true"/> + <exec dir="${product_root_dir}/dev/tests/static" executable="phpunit" failonerror="true"> + <arg line="--log-junit ${basedir}/code_legacy_tests.xml"/> + </exec> + </target> + + <target name="_sanity_check" depends="_product_location" description="Static sanity check"> + <fail unless="product_edition_code" message="Property 'product_edition_code' must be defined"/> + <exec executable="php" failonerror="true"> + <arg line="-f ${basedir}/dev/build/publication/sanity/sanity.php -- + -w ${product_root_dir} + -c ${basedir}/dev/build/publication/sanity/${product_edition_code}.xml + -v + "/> + </exec> + </target> + + <target name="static_tests_ee" description="Static tests for EE"> + <antcall> + <param name="license_replacement_enabled" value="true"/> + <param name="product_edition_code" value="ee"/> + <target name="_product_edition"/> + <target name="_static_tests_no_js"/> + <target name="_sanity_check"/> + </antcall> + </target> + <target name="static_tests_ce" description="Static tests for CE"> + <antcall> + <param name="license_replacement_enabled" value="true"/> + <param name="product_edition_code" value="ce"/> + <target name="_product_edition"/> + <target name="_static_tests_no_js"/> + <target name="_sanity_check"/> + </antcall> + </target> + + <target name="static_tests_js" depends="_product_location" description="JS static tests"> + <copy file="${basedir}/dev/build/core_dev/static/phpunit.js.xml" + tofile="${product_root_dir}/dev/tests/static/phpunit.xml" overwrite="true"/> + <antcall target="_jshint_path_substitution"> + <param name="phpunit_config_file" value="${product_root_dir}/dev/tests/static/phpunit.xml"/> + </antcall> + <exec dir="${product_root_dir}/dev/tests/static" executable="phpunit" failonerror="true"> + <arg line="--log-junit ${basedir}/static_tests_js.xml"/> + </exec> + </target> + + <target name="code_legacy_tests" description="Code Legacy Tests"> + <antcall> + <target name="_code_legacy_tests"/> + </antcall> + </target> + +</project> diff --git a/dev/build/core_dev/static/phpunit.js.xml b/dev/build/core_dev/static/phpunit.js.xml new file mode 100644 index 0000000000000000000000000000000000000000..c6579b511422cc90a6c52228ed6dad116674aa3c --- /dev/null +++ b/dev/build/core_dev/static/phpunit.js.xml @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +/** + * Test suite to run JSHint javascript static code analysis + * + * 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 tests + * @package static + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<phpunit bootstrap="./framework/bootstrap.php"> + <testsuites> + <testsuite name="Javascript Static Code Analysis"> + <file>testsuite/Js/LiveCodeTest.php</file> + </testsuite> + </testsuites> + <php> + <ini name="date.timezone" value="America/Los_Angeles"/> + <!-- TESTS_JSHINT_PATH specify the path to wsh.js on Windows and jshint-rhino.js on Linux --> + <const name="TESTS_JSHINT_PATH" value="{{tests_jshint_path}}"/> + <!-- JSHint global options for code verification. See: http://www.jshint.com/docs/ --> + <const name="TESTS_JSHINT_OPTIONS" value=""/> + </php> +</phpunit> \ No newline at end of file diff --git a/dev/build/core_dev/static/phpunit.legacy.xml b/dev/build/core_dev/static/phpunit.legacy.xml new file mode 100644 index 0000000000000000000000000000000000000000..905590ffa86192693f6248eff451dc236f9acba1 --- /dev/null +++ b/dev/build/core_dev/static/phpunit.legacy.xml @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +/** + * Test suite to run PHP code legacy tests + * + * 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 tests + * @package static + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<phpunit bootstrap="./framework/bootstrap.php"> + <testsuites> + <testsuite name="Code Legacy Tests"> + <directory>testsuite/Legacy</directory> + </testsuite> + </testsuites> + <php> + <ini name="date.timezone" value="America/Los_Angeles"/> + </php> +</phpunit> diff --git a/dev/build/core_dev/static/phpunit.php.xml b/dev/build/core_dev/static/phpunit.php.xml new file mode 100644 index 0000000000000000000000000000000000000000..52e963b9b2b1e06b1dd91324e3f73cfa048a17c3 --- /dev/null +++ b/dev/build/core_dev/static/phpunit.php.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +/** + * Test suite to run PHP static code analysis + * + * 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 tests + * @package static + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<phpunit bootstrap="./framework/bootstrap.php"> + <testsuites> + <testsuite name="PHP Coding Standard Verification"> + <file>testsuite/Php/LiveCodeTest.php</file> + </testsuite> + <testsuite name="Code Integrity Tests"> + <directory>testsuite/Integrity</directory> + </testsuite> + </testsuites> + <php> + <ini name="date.timezone" value="America/Los_Angeles"/> + </php> +</phpunit> diff --git a/dev/build/core_dev/unit/build.xml b/dev/build/core_dev/unit/build.xml new file mode 100644 index 0000000000000000000000000000000000000000..37049afff122a12ed67cc4ac6ca027f155a7feda --- /dev/null +++ b/dev/build/core_dev/unit/build.xml @@ -0,0 +1,95 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/** + * Apache Ant's build file for core development unit tests + * + * 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 dev + * @package build + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<project name="Core Development Unit Tests" basedir="../../../../" default="_unit_tests_all"> + <import file="../util.xml"/> + + <target name="_jstestdriver_path_substitution" description="JsTestDriver JAR file path substitution in configuration file from environment variable"> + <fail unless="jstestdriver_config_file" message="Property 'jstestdriver_config_file' must be defined"/> + <fail unless="env.JsTestDriver" message="Environment variable 'JsTestDriver' must be defined"/> + <replace file="${jstestdriver_config_file}"> + <replacefilter token="{{path_to_jstestdriver_jar}}" value="${env.JsTestDriver}"/> + </replace> + </target> + + <target name="_unit_tests_magento" depends="_product_location" description="Product unit tests"> + <exec dir="${product_root_dir}/dev/tests/unit" executable="phpunit" failonerror="true"> + <arg line="--log-junit ${basedir}/unit_tests_magento.xml"/> + </exec> + </target> + <target name="_unit_tests_integration_framework" depends="_product_location" description="Unit tests for integration testing framework"> + <exec dir="${product_root_dir}/dev/tests/integration/framework/tests/unit" executable="phpunit" failonerror="true"> + <arg line="--log-junit ${basedir}/unit_tests_integration_framework.xml"/> + </exec> + </target> + <target name="_unit_tests_performance_framework" depends="_product_location" description="Unit tests for performance testing framework"> + <exec dir="${product_root_dir}/dev/tests/performance/framework/tests/unit" executable="phpunit" failonerror="true"> + <arg line="--log-junit ${basedir}/unit_tests_performance_framework.xml"/> + </exec> + </target> + <target name="_unit_tests_static_framework" depends="_product_location" description="Unit tests for static code analysis framework"> + <exec dir="${product_root_dir}/dev/tests/static/framework/tests/unit" executable="phpunit" failonerror="true"> + <arg line="--log-junit ${basedir}/unit_tests_static_framework.xml"/> + </exec> + </target> + <target name="_unit_tests_unit_framework" depends="_product_location" description="Unit tests for unit testing framework"> + <exec dir="${product_root_dir}/dev/tests/unit/framework/tests/unit" executable="phpunit" failonerror="true"> + <arg line="--log-junit ${basedir}/unit_tests_unit_framework.xml"/> + </exec> + </target> + + <target name="_unit_tests_all" description="All unit tests"> + <antcall> + <target name="_unit_tests_magento"/> + <target name="_unit_tests_integration_framework"/> + <target name="_unit_tests_performance_framework"/> + <target name="_unit_tests_static_framework"/> + <target name="_unit_tests_unit_framework"/> + </antcall> + </target> + + <target name="unit_tests_ee" description="Unit tests for EE"> + <antcall target="_unit_tests_all"/> + </target> + <target name="unit_tests_ce" depends="_community_edition" description="Unit tests for CE"> + <antcall target="_unit_tests_all"/> + </target> + + <target name="unit_tests_js" depends="_product_location" description="Javascript unit tests"> + <copy file="${product_root_dir}/dev/tests/js/jsTestDriver.php.dist" + tofile="${product_root_dir}/dev/tests/js/jsTestDriver.php" overwrite="true"/> + <antcall target="_jstestdriver_path_substitution"> + <param name="jstestdriver_config_file" value="${product_root_dir}/dev/tests/js/jsTestDriver.php"/> + </antcall> + <exec executable="php" failonerror="true"> + <arg value="${product_root_dir}/dev/tests/js/run_js_tests.php"/> + </exec> + </target> + +</project> diff --git a/dev/build/core_dev/util.xml b/dev/build/core_dev/util.xml new file mode 100644 index 0000000000000000000000000000000000000000..23ba0c021bd4e3dca96349b7363abf62c4ee0d96 --- /dev/null +++ b/dev/build/core_dev/util.xml @@ -0,0 +1,95 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/** + * Apache Ant's build file with general-purpose routines common to various CI builds + * + * 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 dev + * @package build + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<project name="Core Development General-Purpose Routines" basedir="../../../" default="_community_edition"> + <property environment="env"/> + + <target name="_product_location" description="Detection of a product source code root directory"> + <condition property="product_root_dir" value="${basedir}"> + <not><isset property="product_root_dir"/></not> + </condition> + </target> + + <target name="_product_edition_files" depends="_product_location" description="Removal of files, which do not belong to a product edition"> + <fail unless="product_edition_code" message="Property 'product_edition_code' must be defined"/> + <exec executable="php" failonerror="true"> + <arg line="-f ${basedir}/dev/build/extruder.php -- + -w ${product_root_dir} + -l ${basedir}/dev/build/publication/extruder/common.txt + -l ${basedir}/dev/build/publication/extruder/${product_edition_code}.txt + -v + "/> + </exec> + </target> + <target name="_license_replacement" depends="_product_location" description="License notices replacement" if="license_replacement_enabled"> + <fail unless="product_edition_code" message="Property 'product_edition_code' must be defined"/> + <exec executable="php" failonerror="true"> + <arg line="-f ${basedir}/dev/build/publication/license/license-tool.php -- + -w ${product_root_dir} + -e ${product_edition_code} + -v + "/> + </exec> + </target> + <target name="_product_edition" description="Product edition source code preparation"> + <antcall> + <target name="_product_edition_files"/> + <target name="_license_replacement"/> + </antcall> + </target> + <target name="_community_edition" description="Community Edition source code preparation"> + <antcall target="_product_edition"> + <param name="product_edition_code" value="ce"/> + </antcall> + </target> + + <target name="_database_credential_substitution" description="Database credentials substitution in configuration file from environment variables"> + <fail unless="db_config_file" message="Property 'db_config_file' must be defined"/> + <fail unless="env.db_host" message="Environment variable 'db_host' must be defined"/> + <fail unless="env.db_name" message="Environment variable 'db_name' must be defined"/> + <fail unless="env.db_user" message="Environment variable 'db_user' must be defined"/> + <fail unless="env.db_password" message="Environment variable 'db_password' must be defined"/> + <replace file="${db_config_file}"> + <replacefilter token="{{db_host}}" value="${env.db_host}"/> + <replacefilter token="{{db_name}}" value="${env.db_name}"/> + <replacefilter token="{{db_user}}" value="${env.db_user}"/> + <replacefilter token="{{db_password}}" value="${env.db_password}"/> + </replace> + </target> + + <target name="_installation_requirements" depends="_product_location" description="Environment setup for product installation"> + <chmod perm="a+w"> + <dirset dir="${product_root_dir}/app/etc"/> + <dirset dir="${product_root_dir}/pub/media"/> + <fileset dir="${product_root_dir}/pub/media"/> + <dirset dir="${product_root_dir}/var"/> + </chmod> + </target> + +</project> diff --git a/dev/build/customization/functional/dev/tests/functional/config/config.yml b/dev/build/customization/functional/dev/tests/functional/config/config.yml new file mode 100644 index 0000000000000000000000000000000000000000..b2454d0d3a86db4e71bc4b75a1b2b129d5c42bd8 --- /dev/null +++ b/dev/build/customization/functional/dev/tests/functional/config/config.yml @@ -0,0 +1,104 @@ +# +# {license_notice} +# +# @category tests +# @package selenium +# @subpackage configuration +# @copyright {copyright} +# @license {license_link} +--- +################################################################################ +# # +# Browsers for running tests # +# # +################################################################################ +browsers: + firefox: &firefox + name: 'Firefox' + browser: '*firefox' + host: '{{selenium_host}}' + port: {{selenium_port}} + timeout: 1000 + restartBrowser: false + default: *firefox +################################################################################ +# # +# Framework configuration # +# # +################################################################################ +framework: + fixture_base_path: 'fixture' + testsuite_base_path: 'testsuite' + #work only if tests are run for single browser + shareSession: true + coverageScriptUrl: '' + #captureScreenshotOnFailure works only for browsers that support it: Firefox/Chrome, IE with snapsIE tool + captureScreenshotOnFailure: true + saveHtmlPageOnFailure: true + load_all_uimaps: true + load_all_data: true + load_all_fixtures: true + cache: + frontend: + name: 'core' + options: + caching: false + cache_id_prefix: 'selenium_' + automatic_serialization: true + backend: + name: 'file' + options: '' + cache_dir: 'var/cache' +################################################################################ +# # +# Applications for running tests # +# # +################################################################################ +applications: + mage: &mage + fallbackOrderFixture: 'community2, default' + fallbackOrderHelper: 'Community2, Core' + areas: + admin: + url: '{{admin_url}}' + base_page_uimap: 'log_in_to_admin' + uimap_path: 'admin' + login: 'admin' + password: '123123q' + frontend: + url: '{{url}}' + base_page_uimap: 'home_page' + uimap_path: 'frontend' + login: '' + password: '' + paypal_sandbox: &paypalSandbox + url: 'https://www.sandbox.paypal.com/' + base_page_uimap: 'paypal_sandbox' + uimap_path: 'paypal_sandbox' + login: 'paypal_sandbox_login' + password: 'paypal_sandbox_password' + paypal_developer: &paypalDeveloper + url: 'https://developer.paypal.com/' + base_page_uimap: 'paypal_developer_home' + uimap_path: 'paypal_developer' + login: 'ssergunin@ebay.com' + password: 'magentoTAF1' + enterprise: &enterprise + fallbackOrderFixture: 'enterprise2, enterprise, default' + fallbackOrderHelper: 'Enterprise2, Enterprise, Core' + areas: + admin: + url: '{{enterprise_admin_url}}' + base_page_uimap: 'log_in_to_admin' + uimap_path: 'admin' + login: 'admin' + password: '123123q' + frontend: + url: '{{enterprise_url}}' + base_page_uimap: 'home_page' + uimap_path: 'frontend' + login: '' + password: '' + paypal_sandbox: *paypalSandbox + paypal_developer: *paypalDeveloper + default: *{{selenium_testsuite}} diff --git a/dev/build/customization/functional/dev/tests/functional/config/install.php b/dev/build/customization/functional/dev/tests/functional/config/install.php new file mode 100644 index 0000000000000000000000000000000000000000..216b67f770b76d8e258b18585d5da71fb109c147 --- /dev/null +++ b/dev/build/customization/functional/dev/tests/functional/config/install.php @@ -0,0 +1,57 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 tests + * @package selenium + * @subpackage configuration + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +return array( + /** + * Console installer options + * @see Mage_Install_Model_Installer_Console::_installOptions + */ + 'install_options' => array( + 'license_agreement_accepted' => 'yes', + 'locale' => 'en_US', + 'timezone' => 'America/Los_Angeles', + 'default_currency' => 'USD', + 'db_model' => '{{db_model}}', + 'db_host' => '{{db_host}}', + 'db_name' => '{{db_name}}', + 'db_user' => '{{db_user}}', + 'db_pass' => '{{db_password}}', + 'use_secure' => 'yes', + 'use_secure_admin' => 'yes', + 'admin_no_form_key' => 'yes', + 'use_rewrites' => 'no', + 'admin_lastname' => 'Admin', + 'admin_firstname' => 'Admin', + 'admin_email' => 'admin@example.com', + 'admin_username' => 'admin', + 'admin_password' => '123123q', // must be at least of 7 both numeric and alphanumeric characters + 'url' => '{{url}}', + 'secure_base_url' => '{{secure_url}}', + 'session_save' => 'db', + 'cleanup_database' => true, + ) +); diff --git a/dev/build/customization/functional/dev/tests/functional/phpunit.xml b/dev/build/customization/functional/dev/tests/functional/phpunit.xml new file mode 100644 index 0000000000000000000000000000000000000000..e5a2a16a7c00146fb82cbca9f2a44ff926beabf9 --- /dev/null +++ b/dev/build/customization/functional/dev/tests/functional/phpunit.xml @@ -0,0 +1,70 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +/** + * 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 tests + * @package selenium + * @subpackage runner + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<phpunit backupGlobals="true" + backupStaticAttributes="false" + bootstrap="./framework/bootstrap.php" + cacheTokens="true" + colors="false" + convertErrorsToExceptions="true" + convertNoticesToExceptions="true" + convertWarningsToExceptions="true" + forceCoversAnnotation="false" + mapTestClassNameToCoveredClassName="false" + processIsolation="false" + stopOnError="false" + stopOnFailure="false" + stopOnIncomplete="false" + stopOnSkipped="false" + testSuiteLoaderClass="PHPUnit_Runner_StandardTestSuiteLoader" + strict="false" + verbose="true"> + <testsuites> + <testsuite name="All Tests"> + <!--<directory suffix="Test.php">testsuite/Core/Mage/Customer</directory> + <directory suffix="Test.php">testsuite/Core/Mage/Product</directory>--> + <file>testsuite/Core/Mage/Product/ReviewTest.php</file> + <file>testsuite/Core/Mage/Product/DeleteTest.php</file> + <file>testsuite/Core/Mage/Product/Create/BundleTest.php</file> + <file>testsuite/Core/Mage/Product/Linking/SimpleLinkingTest.php</file> + </testsuite> + </testsuites> + <php> + <!-- Whether to install the application before tests execution. Value 'enabled' turns installation on. --> + <const name="SELENIUM_TESTS_INSTALLATION" value="enabled"/> + <!-- Whether to perform a cleanup to guarantee the "clean" installation before the next tests execution. --> + <const name="SELENIUM_TESTS_INSTALLATION_CLEANUP" value="enabled"/> + </php> + <logging> + <log type="json" target="./var/logs/logfile.json"/> + <log type="tap" target="./var/logs/logfile.tap"/> + <log type="junit" target="./var/logs/logfile.xml" logIncompleteSkipped="false"/> + <log type="testdox-html" target="./var/logs/testdox.html"/> + <log type="testdox-text" target="./var/logs/testdox.txt"/> + </logging> +</phpunit> diff --git a/dev/build/customization/mysql/app/etc/config.php b/dev/build/customization/mysql/app/etc/config.php new file mode 100644 index 0000000000000000000000000000000000000000..9ccb6829ee66de2874e089b25bf8596a5665d402 --- /dev/null +++ b/dev/build/customization/mysql/app/etc/config.php @@ -0,0 +1,53 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Magento + * @package Magento + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +return array( + /** + * Console installer options + * @see Mage_Install_Model_Installer_Console::_installOptions + */ + 'install_options' => array( + 'license_agreement_accepted' => 'yes', + 'locale' => 'en_US', + 'timezone' => 'America/Los_Angeles', + 'default_currency' => 'USD', + 'db_host' => '{{db_host}}', + 'db_name' => '{{db_name}}', + 'db_user' => '{{db_user}}', + 'db_pass' => '{{db_password}}', + 'url' => '{{url}}', + 'secure_base_url' => '{{secure_url}}', + 'use_secure' => 'no', + 'use_secure_admin' => 'no', + 'use_rewrites' => 'no', + 'admin_lastname' => 'Admin', + 'admin_firstname' => 'Admin', + 'admin_email' => 'admin@example.com', + 'admin_username' => 'admin', + 'admin_password' => '123123q' // must be at least of 7 both numeric and alphanumeric characters + ), + 'report_dir' => 'report' +); diff --git a/dev/build/customization/mysql/dev/tests/integration/etc/local-mysql.xml b/dev/build/customization/mysql/dev/tests/integration/etc/local-mysql.xml new file mode 100644 index 0000000000000000000000000000000000000000..4975c173abddff4d7966cefaa68632739282594a --- /dev/null +++ b/dev/build/customization/mysql/dev/tests/integration/etc/local-mysql.xml @@ -0,0 +1,73 @@ +<?xml version="1.0"?> +<!-- +/** + * 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 Magento + * @package Magento + * @subpackage integration_tests + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> + <global> + <install> + <!-- Important: validity of installation date indicates whether an application is installed or not --> + <date><![CDATA[d-d-d-d-d]]></date> + </install> + <crypt> + <key><![CDATA[k-k-k-k-k]]></key> + </crypt> + <disable_local_modules>false</disable_local_modules> + <resources> + <db> + <table_prefix><![CDATA[]]></table_prefix> + </db> + <default_setup> + <connection> + <host><![CDATA[localhost]]></host> + <username><![CDATA[root]]></username> + <password><![CDATA[]]></password> + <dbname><![CDATA[bamboo_integration]]></dbname> + <initStatements><![CDATA[SET NAMES utf8]]></initStatements> + <model><![CDATA[mysql4]]></model> + <type><![CDATA[pdo_mysql]]></type> + <pdoType><![CDATA[]]></pdoType> + <active>1</active> + </connection> + </default_setup> + </resources> + <session_save><![CDATA[files]]></session_save> + <resource> + <connection> + <types> + <pdo_mysql> + <adapter><![CDATA[Magento_Test_Db_Adapter_Mysql]]></adapter> + </pdo_mysql> + </types> + </connection> + </resource> + <areas> + <adminhtml> + <frontName><![CDATA[backend]]></frontName> + </adminhtml> + </areas> + </global> +</config> diff --git a/dev/build/customization/mysql/dev/tests/integration/phpunit.xml b/dev/build/customization/mysql/dev/tests/integration/phpunit.xml new file mode 100644 index 0000000000000000000000000000000000000000..94f419089a6810dfe369ab413677f08821cd3575 --- /dev/null +++ b/dev/build/customization/mysql/dev/tests/integration/phpunit.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +/** + * 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 Magento + * @package Magento + * @subpackage integration_tests + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<phpunit bootstrap="./framework/bootstrap.php"> + <testsuites> + <testsuite name="Magento Integration Tests"> + <directory suffix="Test.php">testsuite</directory> + <exclude>testsuite/integrity</exclude> + </testsuite> + </testsuites> + + <php> + <includePath>.</includePath> + <ini name="date.timezone" value="America/Los_Angeles"/> + <const name="TESTS_LOCAL_CONFIG_FILE" value="etc/local-mysql.xml"/> + <const name="TESTS_GLOBAL_CONFIG_FILES" value="../../../app/etc/*.xml"/> + <const name="TESTS_MODULE_CONFIG_FILES" value="../../../app/etc/modules/*.xml;etc/modules/*.xml"/> + <const name="TESTS_CLEANUP_ACTION" value="uninstall"/> + <!--<const name="TESTS_MAGENTO_DEVELOPER_MODE" value="enabled"/>--> + </php> + <listeners> + <listener class="Magento_Test_Event_PhpUnit"/> + </listeners> +</phpunit> diff --git a/dev/build/customization/static/dev/tests/static/phpunit.xml b/dev/build/customization/static/dev/tests/static/phpunit.xml new file mode 100644 index 0000000000000000000000000000000000000000..e818920c9084507ea730ae7a591e7b49b7332f11 --- /dev/null +++ b/dev/build/customization/static/dev/tests/static/phpunit.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +/** + * Test suite to run JSHint javascript static code analysis + * + * 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 tests + * @package static + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<phpunit bootstrap="./framework/bootstrap.php"> + <testsuites> + <testsuite name="Javascript Static Code Analysis"> + <file>testsuite/Js/LiveCodeTest.php</file> + </testsuite> + <testsuite name="PHP Coding Standard Verification"> + <file>testsuite/Php/LiveCodeTest.php</file> + </testsuite> + <testsuite name="Code Integrity Tests"> + <directory>testsuite/Integrity</directory> + </testsuite> + </testsuites> + <php> + <ini name="date.timezone" value="America/Los_Angeles"/> + <!-- TESTS_JSHINT_PATH specify the path to wsh.js on Windows and jshint-rhino.js on Linux --> + <const name="TESTS_JSHINT_PATH" value="{{tests_jshint_path}}"/> + <!-- JSHint global options for code verification. See: http://www.jshint.com/docs/ --> + <const name="TESTS_JSHINT_OPTIONS" value=""/> + </php> +</phpunit> \ No newline at end of file diff --git a/dev/build/extruder.php b/dev/build/extruder.php new file mode 100644 index 0000000000000000000000000000000000000000..d809ed30eed3aa439abdc1e9cf17f5dd993de3e7 --- /dev/null +++ b/dev/build/extruder.php @@ -0,0 +1,109 @@ +#!/usr/bin/php +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 build + * @package extruder + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +require_once __DIR__ . '/../../lib/Magento/Shell.php'; +require_once __DIR__ . '/../../lib/Magento/Exception.php'; // used by Magento_Shell (autoload is not present here) + +define('USAGE', <<<USAGE +$>./extruder.php -w <working_dir> -l /path/to/list.txt [[-l /path/to/extra.txt] parameters] + additional parameters: + -w dir directory with working copy to edit with the extruder + -l one or many files with lists that refer to files and directories to be deleted + -v additional verbosity in output + +USAGE +); + +$options = getopt('w:l:v'); + +try { + // working dir argument + if (empty($options['w'])) { + throw new Exception(USAGE); + } + $workingDir = realpath($options['w']); + if (!$workingDir || !is_writable($workingDir) || !is_dir($workingDir)) { + throw new Exception("'{$options['w']}' must be a writable directory."); + } + + // lists argument + if (empty($options['l'])) { + throw new Exception(USAGE); + } + if (!is_array($options['l'])) { + $options['l'] = array($options['l']); + } + $list = array(); + foreach ($options['l'] as $file) { + if (!is_file($file) || !is_readable($file)) { + throw new Exception("Specified file with patterns does not exist or cannot be read: '{$file}'"); + } + $patterns = file($file, FILE_IGNORE_NEW_LINES); + foreach ($patterns as $pattern) { + if (empty($pattern) || 0 === strpos($pattern, '#')) { // comments start from # + continue; + } + $pattern = $workingDir . DIRECTORY_SEPARATOR . $pattern; + $items = glob($pattern, GLOB_BRACE); + if (empty($items)) { + throw new Exception("glob() pattern '{$pattern}' returned empty result."); + } + $list = array_merge($list, $items); + } + } + if (empty($list)) { + throw new Exception('List of files or directories to delete is empty.'); + } + + // verbosity argument + $verbose = isset($options['v']); + + // perform "extrusion" + $shell = new Magento_Shell($verbose); + foreach ($list as $item) { + if (!file_exists($item)) { + throw new Exception("The file or directory '{$item} is marked for deletion, but it doesn't exist."); + } + $shell->execute( + 'git --git-dir %s --work-tree %s rm -r -f -- %s', + array("{$workingDir}/.git", $workingDir, $item) + ); + if (file_exists($item)) { + throw new Exception("The file or directory '{$item}' was supposed to be deleted, but it still exists."); + } + } + + exit(0); +} catch (Exception $e) { + if ($e->getPrevious()) { + $message = (string)$e->getPrevious(); + } else { + $message = $e->getMessage(); + } + echo $message . PHP_EOL; + exit(1); +} diff --git a/dev/build/profiler_metrics.php b/dev/build/profiler_metrics.php new file mode 100644 index 0000000000000000000000000000000000000000..4f7dc2415604550c02f9b9bf9a507af7e7a0451a --- /dev/null +++ b/dev/build/profiler_metrics.php @@ -0,0 +1,46 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Magento + * @package Magento + * @subpackage integration_tests + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +?> +<?php return array( + 'test execution time (ms)' => array('integration_test'), + /* Application framework metrics */ + 'bootstrap time (ms)' => array('bootstrap'), + 'modules initialization time (ms)' => array('init_modules'), + 'request initialization time (ms)' => array('init_request'), + 'routing time (ms)' => array( + 'routing_init', 'db_url_rewrite', 'config_url_rewrite', 'routing_match_router' + ), + 'pre dispatching time (ms)' => array('predispatch'), + 'layout overhead time (ms)' => array('layout_load', 'layout_generate_xml', 'layout_generate_blocks'), + 'response rendering time (ms)' => array('layout_render'), + 'post dispatching time (ms)' => array('postdispatch', 'response_send'), + /* Mage_Catalog module metrics */ + 'product save time (ms)' => array('catalog_product_save'), + 'product load time (ms)' => array('catalog_product_load'), + 'category save time (ms)' => array('catalog_category_save'), + 'category load time (ms)' => array('catalog_category_load'), +); diff --git a/dev/build/publication/composer.json_ b/dev/build/publication/composer.json_ new file mode 100644 index 0000000000000000000000000000000000000000..ce3ee5f9ac4d4f938cee648a75e59589eb62659c --- /dev/null +++ b/dev/build/publication/composer.json_ @@ -0,0 +1,14 @@ +{ + "name": "magento/community-edition", + "description": "eCommerce Platform for Growth (Community Edition)", + "license": ["OSL-3.0", "AFL-3.0"], + "require": { + "php": ">=5.3.0" + }, + "autoload": { + "psr-0": { + "": ["app/code/local", "app/code/community", "app/code/core", "lib"] + } + }, + "minimum-stability": "dev" +} diff --git a/dev/build/publication/extruder/ce.txt b/dev/build/publication/extruder/ce.txt new file mode 100644 index 0000000000000000000000000000000000000000..d3c75b75ad2c95b5b0e04f06a0eed58ef613632d --- /dev/null +++ b/dev/build/publication/extruder/ce.txt @@ -0,0 +1,58 @@ +# Files or directories that are not published with Magento CE +# See also common.txt and dev_build.txt for items that are not published as well +# +LICENSE_EE.html +LICENSE_EE.txt +LICENSE_PRO.html +LICENSE_PRO.txt +app/code/core/Enterprise +app/code/core/Mage/XmlConnect/Block/Customer/Form/Renderer/Boolean.php +app/code/core/Mage/XmlConnect/Block/Customer/Form/Renderer/Date.php +app/code/core/Mage/XmlConnect/Block/Customer/Form/Renderer/File.php +app/code/core/Mage/XmlConnect/Block/Customer/Form/Renderer/Image.php +app/code/core/Mage/XmlConnect/Block/Customer/Form/Renderer/Multiline.php +app/code/core/Mage/XmlConnect/Block/Customer/Form/Renderer/Multiselect.php +app/code/core/Mage/XmlConnect/Block/Customer/Form/Renderer/Select.php +app/code/core/Mage/XmlConnect/Block/Customer/Form/Renderer/Text.php +app/code/core/Mage/XmlConnect/Block/Customer/Form/Renderer/Textarea.php +app/code/core/Mage/XmlConnect/Block/Customer/Order/Item/Renderer/Giftcard.php +app/code/core/Mage/XmlConnect/Block/Customer/Order/Totals/Customerbalance.php +app/code/core/Mage/XmlConnect/Block/Customer/Order/Totals/Giftcards.php +app/code/core/Mage/XmlConnect/Block/Customer/Order/Totals/Customerbalance/Refunded.php +app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Pbridge/Abstract.php +app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Pbridge/Authorizenet.php +app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Pbridge/Paypal.php +app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Pbridge/Paypaluk.php +app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Pbridge/Verisign.php +app/design/adminhtml/default/enterprise +app/design/adminhtml/default/pro +app/design/frontend/enterprise +app/design/frontend/pro +app/design/install/default/enterprise +app/design/install/default/pro +app/etc/enterprise.xml +app/etc/modules +dev/tests/integration/etc/modules/XEnterprise_Enabler.xml +dev/tests/integration/testsuite/Enterprise +dev/tests/integration/testsuite/integrity/modular/ViewFilesTest.php +dev/tests/integration/testsuite/integrity/theme/RenderersTest.php +dev/tests/integration/testsuite/Theme +dev/tests/static/testsuite/Integrity/Enterprise +dev/tests/static/testsuite/Legacy/ProductTypeModelTest.php +dev/tests/static/testsuite/Legacy/_files/obsolete_classes_ee.php +dev/tests/static/testsuite/Legacy/_files/obsolete_constants_ee.php +dev/tests/static/testsuite/Legacy/_files/obsolete_methods_ee.php +dev/tests/static/testsuite/Legacy/_files/obsolete_properties_ee.php +dev/tests/static/testsuite/Legacy/Enterprise +dev/tests/static/testsuite/Php/_files/{whitelist,blacklist}/ee.txt +dev/tests/unit/testsuite/Enterprise +dev/tools/migration/factory_table_names/replace_ee.php +dev/tools/migration/aliases_map/composite_modules_ee.php +downloader/Maged/Model/Config/Enterprise.php +downloader/Maged/Model/Config/Professional.php +downloader/skin/install/images/enterprise.gif +downloader/template/enterprise +downloader/template/professional +lib/Apache +pub/errors/enterprise +pub/errors/pro diff --git a/dev/build/publication/extruder/common.txt b/dev/build/publication/extruder/common.txt new file mode 100644 index 0000000000000000000000000000000000000000..71918bec4bef33d6f6cfecc482429e1d93aa5d49 --- /dev/null +++ b/dev/build/publication/extruder/common.txt @@ -0,0 +1,27 @@ +# Files or directories that are not published at all (for any reason, can be non-technical) +# +app/code/*/*/*/Model/Resource/Helper/{Oracle,Mssql}.php +app/code/*/*/*/sql/*/{oracle,mssql}-* +app/code/community/Find +app/code/community/Social +app/code/core/Mage/Install/Block/Db/Type/{Oracle,Mssql}.php +app/code/core/Mage/Install/Model/Installer/Db/{Mssql,Oracle}.php +app/code/core/Mage/Install/view/install/db/{mssql,oracle}.phtml +app/code/core/Mage/Install/view/install/layout_{oracle,mssql}.xml +app/etc/config.{oracle,mssql}.xml +dev/api-tests +dev/tests/functional +dev/tests/integration/etc/local-{oracle,mssql}.xml.dist +dev/tests/integration/framework/Magento/Test/Db/cleanup_database.{oracle,mssql}.sql +dev/tests/integration/framework/Magento/Test/Db/{Mssql,Oracle}.php +dev/tests/integration/framework/Magento/Test/Db/Adapter/{Mssql,Oracle}.php +dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/Db/{Oracle,Mssql}Test.php +dev/tests/integration/testsuite/Social/Facebook +dev/tests/unit/testsuite/Varien/Db/Adapter/Pdo/MssqlTest.php +dev/tests/static/testsuite/Php/_files/{whitelist,blacklist}/non_public.txt +dev/tools/translate +lib/Varien/Db/Adapter/Oracle.php +lib/Varien/Db/Adapter/Pdo/Mssql.php +lib/Varien/Db/Statement/Oracle.php +lib/Varien/Db/Statement/Pdo/Mssql.php +lib/Varien/Db/Statement/Sqlsrv.php diff --git a/dev/build/publication/extruder/dev_build.txt b/dev/build/publication/extruder/dev_build.txt new file mode 100644 index 0000000000000000000000000000000000000000..b895485566b5c95258ca97bcf6187b8f7f1b3158 --- /dev/null +++ b/dev/build/publication/extruder/dev_build.txt @@ -0,0 +1,4 @@ +# special case for dev/build: it is not published, but distinguished into a separate list +# because it is used in infrastructure for running tests +dev/build +dev/tools/license_placeholder diff --git a/dev/build/publication/extruder/ee.txt b/dev/build/publication/extruder/ee.txt new file mode 100644 index 0000000000000000000000000000000000000000..9e2f4a1e0f37192967fd0357f03d6ff750089850 --- /dev/null +++ b/dev/build/publication/extruder/ee.txt @@ -0,0 +1 @@ +# Magento Enterprise Edition publishing is not implemented yet diff --git a/dev/build/publication/install.php b/dev/build/publication/install.php new file mode 100644 index 0000000000000000000000000000000000000000..9f9248c1d13ba5dc602a1592e206b17f1a5b9cad --- /dev/null +++ b/dev/build/publication/install.php @@ -0,0 +1,94 @@ +#!/usr/bin/php +<?php +/** + * Magento install script + * + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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. + * + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +define('SYNOPSIS', <<<SYNOPSIS +php -f install.php -- --build_properties_file "<path_to_file>" + +SYNOPSIS +); + +/** + * Parse command line arguments + */ +$currentArgName = false; +$args = array(); +foreach ($_SERVER['argv'] as $argNameOrValue) { + if (substr($argNameOrValue, 0, 2) == '--') { + // argument name + $currentArgName = substr($argNameOrValue, 2); + // in case if argument doesn't need a value + $args[$currentArgName] = true; + } else { + // argument value + if ($currentArgName) { + $args[$currentArgName] = $argNameOrValue; + } + $currentArgName = false; + } +} + +if (!isset($args['build_properties_file'])) { + echo SYNOPSIS; + exit(1); +} +$baseDir = realpath(__DIR__ . '/../../../'); +$configFile = $args['build_properties_file']; +$configFile = file_exists($configFile) ? $configFile : "$configFile.dist"; +$config = require($configFile); +$installOptions = isset($config['install_options']) ? $config['install_options'] : array(); + +$reportDir = __DIR__ . '/' . $config['report_dir']; + +/* Install application */ +if ($installOptions) { + $installCmd = sprintf('php -f %s --', escapeshellarg("$baseDir/dev/shell/install.php")); + foreach ($installOptions as $optionName => $optionValue) { + $installCmd .= sprintf(' --%s %s', $optionName, escapeshellarg($optionValue)); + } + + passthru($installCmd, $exitCode); + if ($exitCode) { + exit($exitCode); + } +} + +/* Initialize Magento application */ +require_once __DIR__ . '/../../../app/bootstrap.php'; +Mage::app(); + +/* Clean reports */ +Varien_Io_File::rmdirRecursive($reportDir); + +/* Run all indexer processes */ +/** @var $indexer Mage_Index_Model_Indexer */ +$indexer = Mage::getModel('Mage_Index_Model_Indexer'); +/** @var $process Mage_Index_Model_Process */ +foreach ($indexer->getProcessesCollection() as $process) { + if ($process->getIndexer()->isVisible()) { + $process->reindexEverything(); + } +} diff --git a/dev/build/publication/license/Afl.php b/dev/build/publication/license/Afl.php new file mode 100644 index 0000000000000000000000000000000000000000..43011b23ca9261c1af996b342967828ea47a0d64 --- /dev/null +++ b/dev/build/publication/license/Afl.php @@ -0,0 +1,55 @@ +<?php +/** + * {license_notice} + * + * @category build + * @package license + * @copyright {copyright} + * @license {license_link} + */ + +/** + * AFL license information class + * + */ +class Afl extends LicenseAbstract +{ + /** + * Prepare short information about license + * + * @return string + */ + public function getNotice() + { + return <<<EOT + * 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. +EOT; + + } + + /** + * Prepare data for phpdoc attribute "license" + * + * @return string + */ + public function getLink() + { + return 'http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)'; + } +} diff --git a/dev/build/publication/license/LicenseAbstract.php b/dev/build/publication/license/LicenseAbstract.php new file mode 100644 index 0000000000000000000000000000000000000000..a6cc8087d99cd6351c44dbc2e4d5b0224a7c8806 --- /dev/null +++ b/dev/build/publication/license/LicenseAbstract.php @@ -0,0 +1,43 @@ +<?php +/** + * {license_notice} + * + * @category build + * @package license + * @copyright {copyright} + * @license {license_link} + */ + +/** + * Interface for license information class + * + */ +abstract class LicenseAbstract +{ + /** + * Prepare short information about license + * + * @abstract + * @return string + */ + abstract public function getNotice(); + + /** + * Prepare data for phpdoc attribute "copyright" + * + * @return string + */ + public function getCopyright() + { + $year = date('Y'); + return "Copyright (c) {$year} Magento Inc. (http://www.magentocommerce.com)"; + } + + /** + * Prepare data for phpdoc attribute "license" + * + * @abstract + * @return string + */ + abstract public function getLink(); +} diff --git a/dev/build/publication/license/Mcl.php b/dev/build/publication/license/Mcl.php new file mode 100644 index 0000000000000000000000000000000000000000..bfb8220c0c1b655d7da2cadef7101970a63e044b --- /dev/null +++ b/dev/build/publication/license/Mcl.php @@ -0,0 +1,53 @@ +<?php +/** + * {license_notice} + * + * @category build + * @package license + * @copyright {copyright} + * @license {license_link} + */ + +/** + * Magento Comercial License information class + * + */ +class Mcl extends LicenseAbstract +{ + /** + * Prepare short information about license + * + * @return string + */ + public function getNotice() + { + return <<<EOT + * Magento Commercial Edition + * + * NOTICE OF LICENSE + * + * This source file is subject to the Magento Commercial Edition License + * that is available at: http://www.magentocommerce.com/license/commercial-edition + * 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. +EOT; + + } + + /** + * Prepare data for phpdoc attribute "license" + * + * @return string + */ + public function getLink() + { + return 'http://www.magentocommerce.com/license/commercial-edition'; + } +} diff --git a/dev/build/publication/license/Mel.php b/dev/build/publication/license/Mel.php new file mode 100644 index 0000000000000000000000000000000000000000..ada30cfe60e745f57c13dd9daa41e1e48f83a736 --- /dev/null +++ b/dev/build/publication/license/Mel.php @@ -0,0 +1,55 @@ +<?php +/** + * {license_notice} + * + * @category build + * @package license + * @copyright {copyright} + * @license {license_link} + */ + +/** + * Magento Enterprise License information class + * + */ +class Mel extends LicenseAbstract +{ + /** + * Prepare short information about license + * + * @return string + */ + public function getNotice() + { + return <<<EOT + * Magento Enterprise Edition + * + * NOTICE OF LICENSE + * + * This source file is subject to the Magento Enterprise Edition License + * that is bundled with this package in the file LICENSE_EE.txt. + * It is also available through the world-wide-web at this URL: + * http://www.magentocommerce.com/license/enterprise-edition + * 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. +EOT; + + } + + /** + * Prepare data for phpdoc attribute "license" + * + * @return string + */ + public function getLink() + { + return 'http://www.magentocommerce.com/license/enterprise-edition'; + } +} diff --git a/dev/build/publication/license/Osl.php b/dev/build/publication/license/Osl.php new file mode 100644 index 0000000000000000000000000000000000000000..6a6006ba272e6bae08a5489175f1875b75ac2385 --- /dev/null +++ b/dev/build/publication/license/Osl.php @@ -0,0 +1,55 @@ +<?php +/** + * {license_notice} + * + * @category build + * @package license + * @copyright {copyright} + * @license {license_link} + */ + +/** + * AFL license information class + * + */ +class Osl extends LicenseAbstract +{ + /** + * Prepare short information about license + * + * @return string + */ + public function getNotice() + { + return <<<EOT + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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. +EOT; + + } + + /** + * Prepare data for phpdoc attribute "license" + * + * @return string + */ + public function getLink() + { + return 'http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)'; + } +} diff --git a/dev/build/publication/license/Phoenix.php b/dev/build/publication/license/Phoenix.php new file mode 100644 index 0000000000000000000000000000000000000000..8bea39a4d5c7c3ce5f5af197294d4741a2f35447 --- /dev/null +++ b/dev/build/publication/license/Phoenix.php @@ -0,0 +1,28 @@ +<?php +/** + * {license_notice} + * + * @category build + * @package license + * @copyright {copyright} + * @license {license_link} + */ + +require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Osl.php'; +/** + * Phoenix OSL license information class + * + */ +class Phoenix extends Osl +{ + /** + * Prepare data for phpdoc attribute "copyright" + * + * @return string + */ + public function getCopyright() + { + $year = date('Y'); + return "Copyright (c) {$year} Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)"; + } +} diff --git a/dev/build/publication/license/Routine.php b/dev/build/publication/license/Routine.php new file mode 100644 index 0000000000000000000000000000000000000000..66cbca076cb1edca363120b2a654f6e225597d41 --- /dev/null +++ b/dev/build/publication/license/Routine.php @@ -0,0 +1,364 @@ +<?php +/** + * {license_notice} + * + * @category build + * @package license + * @copyright {copyright} + * @license {license_link} + */ + +/** + * Service routines for license-tool command line script + * Routine run time functions + * + */ +class Routine +{ + /** + * List skipped directories + * + * @var null|array + */ + public static $skipDirectories = null; + + /** + * List skipped files + * + * @var null|array + */ + public static $skipFiles = null; + + /** + * Verbose output flag + * + * @var bool + */ + public static $isVerbose = false; + + /** + * Dry run flag + * + * @var bool + */ + public static $dryRun = false; + + /** + * File types + * + * @var array + */ + public static $fileTypes = array( + 'xml' => array( + '*.xml', '*.xml.template', '*.xml.additional', '*.xml.dist', '*.xml.sample', + '*.xsd', '*.mxml', '*.jmx', '*.jtl', + ), + 'php' => array('*.php', '*.php.dist', '*.php.sample'), + 'phtml' => array('*.phtml'), + 'html' => array('*.html', '*.htm'), + 'css' => array('*.css'), + 'js' => array('*.js'), + 'flex' => array('*.as'), + 'sql' => array('*.sql'), + ); + + /** + * Length of working directory + * + * @var int + */ + protected static $_workingDirLen = 0; + + /** + * @var int + */ + protected static $_errorsCount = 0; + + /** + * @var int + */ + protected static $_updatedCount = 0; + + /** + * @var int + */ + protected static $_skippedCount = 0; + + + /** + * Walk through all file inside folder and sub folder. Filter found files by pattern. + * + * @static + * @param string|array $paths + * @param string|array $fileMasks + * @param array $result + * @param bool $allowRecursion + * @return null + */ + public static function globSearch($paths, $fileMasks, &$result, $allowRecursion = true) + { + if (empty($paths)) { + return; + } + + if (!is_array($paths)) { + $paths = array($paths); + } + + if (!is_array($fileMasks)) { + $fileMasks = array($fileMasks); + } + + foreach ($paths as $resource) { + if (is_file($resource) && !self::_isFileSkipped($resource)) { + $result[] = $resource; + continue; + } + + if (self::_isDirectorySkipped($resource)) { + continue; + } + + if ($allowRecursion) { + self::globSearch(glob($resource . '/*', GLOB_ONLYDIR), $fileMasks, $result, true); + } + + self::_filterFilesByMask($resource, $fileMasks, $result); + } + } + + /** + * Filter directory by passed file mask. Results will be saved in $result variable. + * + * @static + * @param $directory + * @param $fileMasks + * @param $result + * @return null + */ + protected static function _filterFilesByMask($directory, $fileMasks, &$result) + { + foreach ($fileMasks as $filesMask) { + foreach (glob($directory . '/' . $filesMask) as $filename) { + if (is_file($filename) && !self::_isFileSkipped($filename)) { + $result[] = $filename; + } + } + } + } + + /** + * Filters passed array on skip path items marked by "!" sign + * + * @static + * @param string $workingDir + * @param array $list + */ + protected static function _setSkippedPaths($workingDir, $list) + { + $paths = array(); + foreach ($list as $globPattern) { + $path = $workingDir . DIRECTORY_SEPARATOR . $globPattern; + $subPaths = glob($path, GLOB_BRACE); + if (false === $subPaths) { + throw new Exception("No real paths found by glob pattern: {$path}"); + } + $paths = array_merge($paths, $subPaths); + } + $paths = array_unique($paths); + + foreach ($paths as $path) { + $real = realpath($path); + if (is_dir($real)) { + self::$skipDirectories[] = $real; + } elseif (is_file($real)) { + self::$skipFiles[] = $real; + } + } + } + + /** + * Analyzes passed directory should it be skipped or not. + * + * @static + * @param string $directory + * @return bool + */ + protected static function _isDirectorySkipped($directory) + { + $directory = realpath($directory) . DIRECTORY_SEPARATOR; + foreach (self::$skipDirectories as $skipDir) { + if (false !== strpos($directory, $skipDir . DIRECTORY_SEPARATOR)) { + return true; + } + } + + return false; + } + + /** + * Analyzes passed file should it be skipped or not. + * + * @static + * @param string $filename + * @return bool + */ + protected static function _isFileSkipped($filename) + { + return in_array(realpath($filename), self::$skipFiles); + } + + /** + * Updates files in passed directory using license rules. + * Could be run as validation process for files in dry run case. + * + * @static + * @param string|array $directories + * @param string|array $fileMasks + * @param AbstractLicense $license + * @param bool $recursive + * @return null + */ + public static function updateLicense($directories, $fileMasks, $license, $recursive = true) + { + $foundFiles = array(); + self::globSearch($directories, $fileMasks, $foundFiles, $recursive); + + foreach ($foundFiles as $filename) { + $path = substr($filename, self::$_workingDirLen + 1); + $contents = file_get_contents($filename); + preg_match('#/\*\*(.*)\*/.*#Us', $contents, $matches); + if (empty($contents) || !isset($matches[1])) { + self::printLog("E {$path}\n"); + self::$_errorsCount += 1; + continue; + } + + $placeholders = array( + ' * {license_notice}', + '{copyright}', + '{license_link}' + ); + + $changeset = array( + $license->getNotice(), + $license->getCopyright(), + $license->getLink() + ); + + $docBlock = str_replace($placeholders, $changeset, $matches[1]); + + $newContents = preg_replace('#(/\*\*).*(\*/.*)#Us', '$1'. $docBlock . '$2', $contents, 1); + + if ($contents !== $newContents) { + if (!self::$dryRun) { + file_put_contents($filename, $newContents); + } + self::printLog(". {$path}\n"); + self::$_updatedCount += 1; + } else { + self::printLog("S {$path}\n"); + self::$_skippedCount += 1; + } + } + } + + /** + * Prints logging messaged in case verbose mode enabled during run. + * + * @statict + * @param string $msg + * @return null + */ + public static function printLog($msg) + { + if (self::$isVerbose) { + echo $msg; + } + } + + /** + * Create instance of license class which contains information about license + * + * @static + * @throws Exception + * @param string $license + * @return AbstractLicense + */ + public static function createLicenseInstance($license) + { + $licenseClassName = ucfirst(strtolower($license)); + if (!class_exists($licenseClassName)) { + $licenseClassFile = dirname(__FILE__) . DIRECTORY_SEPARATOR . $licenseClassName . '.php'; + if (!file_exists($licenseClassFile) || !is_readable($licenseClassFile)) { + throw new Exception("Can't access license file: {$licenseClassFile}.\n"); + } + + include_once $licenseClassFile; + + if (!class_exists($licenseClassName)) { + throw new Exception("Can't find license class: {$licenseClassName}.\n"); + } + } + + $licenseObject = new $licenseClassName; + + if (!$licenseObject instanceof LicenseAbstract) { + throw new Exception("License class does not have correct interface: {$licenseClassName}.\n"); + } + + return $licenseObject; + } + + /** + * Entry point of routine work + * + * @static + * @param string $workingDir + * @param array $config + * @param array $blackList + * @return null + */ + public static function run($workingDir, $config, $blackList) + { + // various display parameters + $workingDir = realpath($workingDir); + self::$_workingDirLen = strlen($workingDir); + self::$_errorsCount = 0; + self::$_updatedCount = 0; + self::$_skippedCount = 0; + + // set black list + self::$skipFiles = array(); + self::$skipDirectories = array(); + self::_setSkippedPaths($workingDir, $blackList); + + $licenseInstances = array(); + foreach ($config as $path => $types) { + // whether to scan directory recursively + $recursive = (isset($types['_recursive']) ? $types['_recursive'] : true); + unset($types['_recursive']); + + // update licenses + foreach ($types as $fileType => $licenseType) { + if (!isset($licenseInstances[$licenseType])) { + $licenseInstances[$licenseType] = Routine::createLicenseInstance($licenseType); + } + Routine::updateLicense( + array($workingDir . ($path ? DIRECTORY_SEPARATOR . $path : '')), + Routine::$fileTypes[$fileType], + $licenseInstances[$licenseType], + $recursive + ); + } + } + + Routine::printLog(sprintf("\n" . 'Updated: %d; Skipped: %d; Errors: %d.' . "\n", + self::$_updatedCount, self::$_skippedCount, self::$_errorsCount + )); + if (self::$_errorsCount || self::$_skippedCount) { + throw new Exception('Failed: check skipped files or errors.' . "\n"); + } + Routine::printLog('Success.' . "\n"); + } +} diff --git a/dev/build/publication/license/conf/ce.php b/dev/build/publication/license/conf/ce.php new file mode 100644 index 0000000000000000000000000000000000000000..e6806e63c286258293564ed92c186905c3a9d869 --- /dev/null +++ b/dev/build/publication/license/conf/ce.php @@ -0,0 +1,63 @@ +<?php +/** + * Configuration file used by licence-tool.php script to prepare Magento Community Edition + * + * {license_notice} + * + * @category build + * @package license + * @copyright {copyright} + * @license {license_link} + */ + +$magentoOslAfl = array( + 'xml' => 'AFL', + 'phtml' => 'AFL', + 'php' => 'OSL', + 'css' => 'AFL', + 'js' => 'AFL', +); +$magentoAfl = $magentoOslAfl; +unset($magentoAfl['php']); + +$phoenixOsl = array( + 'xml' => 'Phoenix', + 'phtml' => 'Phoenix', + 'php' => 'Phoenix', + 'css' => 'Phoenix', + 'js' => 'Phoenix' +); + +$config = array( + '' => array('php' => 'OSL', '_recursive' => false), + 'app' => array('php' => 'OSL', '_recursive' => false), + 'app/code/community/Find' => $magentoOslAfl, + 'app/code/community/Phoenix' => $phoenixOsl, + 'app/code/community/Social' => $magentoOslAfl, + 'app/code/core' => $magentoOslAfl, + 'app/code/local' => $magentoOslAfl, + 'app/design' => $magentoAfl, + 'app/etc' => array('xml' => 'AFL'), + 'dev' => array_merge($magentoOslAfl, array('sql' => 'OSL', 'html' => 'AFL')), + 'downloader' => $magentoOslAfl, + 'lib/flex' => array('xml' => 'AFL', 'flex' => 'AFL'), + 'lib/Mage' => $magentoOslAfl, + 'lib/Magento' => $magentoOslAfl, + 'lib/Varien' => $magentoOslAfl, + 'pub' => $magentoOslAfl, +); + +if (defined('EDITION_LICENSE')) { + foreach ($config as $path => $settings) { + foreach ($settings as $type => $license) { + if ('_params' == $type) { + continue; + } + if ('OSL' == $license || 'AFL' == $license) { + $config[$path][$type] = EDITION_LICENSE; + } + } + } +} + +return $config; diff --git a/dev/build/publication/license/conf/ee.php b/dev/build/publication/license/conf/ee.php new file mode 100644 index 0000000000000000000000000000000000000000..7c79bde0bff5595431ece1ca34b4943a7ce1d303 --- /dev/null +++ b/dev/build/publication/license/conf/ee.php @@ -0,0 +1,15 @@ +<?php +/** + * Configuration file used by licence-tool.php script to prepare Magento Enterprise Edition + * + * {license_notice} + * + * @category build + * @package license + * @copyright {copyright} + * @license {license_link} + */ + +define('EDITION_LICENSE', 'MEL'); +$config = require __DIR__ . '/ce.php'; +return $config; diff --git a/dev/build/publication/license/conf/pe.php b/dev/build/publication/license/conf/pe.php new file mode 100644 index 0000000000000000000000000000000000000000..2af536c9fa10f5dee64dd4831fce62fbbc3c057e --- /dev/null +++ b/dev/build/publication/license/conf/pe.php @@ -0,0 +1,15 @@ +<?php +/** + * Configuration file used by licence-tool.php script to prepare Magento Professional Edition + * + * {license_notice} + * + * @category build + * @package license + * @copyright {copyright} + * @license {license_link} + */ + +define('EDITION_LICENSE', 'MCL'); +$config = require __DIR__ . '/ce.php'; +return $config; diff --git a/dev/build/publication/license/license-tool.php b/dev/build/publication/license/license-tool.php new file mode 100644 index 0000000000000000000000000000000000000000..ad7860f59b5c47692957329c8fee15d5bbc4937a --- /dev/null +++ b/dev/build/publication/license/license-tool.php @@ -0,0 +1,63 @@ +#!/usr/bin/php +<?php +/** + * {license_notice} + * + * @category build + * @package license + * @copyright {copyright} + * @license {license_link} + */ + +/** + * Command line tool for processing file docblock of Magento source code files. + */ + +require dirname(__FILE__) . '/Routine.php'; +require dirname(__FILE__) . '/LicenseAbstract.php'; + +define('USAGE', <<<USAGE +php -f license-tool.php -- -e <edition> [-w <dir>] [-v] [-d] [-0] + -e <edition> name of product edition (see "conf" directory relatively to this script) + -w <dir> use specified working dir instead of current + -v verbose output + -d dry run + -0 exit with a zero status even when not all replacements have succeeded + +USAGE +); + +$options = getopt('e:w:vd0'); + +if (!isset($options['e'])) { + print USAGE; + exit(1); +} + +if (isset($options['v'])) { + Routine::$isVerbose = true; +} + +$dryRun = false; +if (isset($options['d'])) { + Routine::$dryRun = true; +} + +$workingDir = '.'; +if (isset($options['w'])) { + $workingDir = rtrim($options['w'], DIRECTORY_SEPARATOR); +} +if (!is_dir($workingDir)) { + Routine::printLog("Directory '{$workingDir}' does not exist.\n"); + exit(1); +} + +$config = require __DIR__ . "/conf/{$options['e']}.php"; +$blackList = require __DIR__ . '/../../../../dev/tools/license_placeholder/blacklist.php'; + +try { + Routine::run($workingDir, $config, $blackList); +} catch(Exception $e) { + Routine::printLog($e->getMessage()); + exit(isset($options['0']) ? 0 : 1); +} diff --git a/dev/build/publication/publish.php b/dev/build/publication/publish.php new file mode 100644 index 0000000000000000000000000000000000000000..7c2df33a6a276df3603882a0bfad1f6bbf642fe7 --- /dev/null +++ b/dev/build/publication/publish.php @@ -0,0 +1,174 @@ +#!/usr/bin/php +<?php +/** + * Magento repository publishing script + * + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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. + * + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +// get CLI options, define variables +define('SYNOPSIS', <<<SYNOPSIS +php -f publish.php -- + --source="<repository>" --source-point="<branch name or commit ID>" + --target="<repository>" [--target-branch="<branch>"] [--target-dir="<directory>"] + --changelog-file="<markdown_file>" + [--no-push] + +SYNOPSIS +); +$options = getopt('', array( + 'source:', 'source-point:', 'target:', 'target-branch::', 'target-dir::', 'changelog-file:', 'no-push' +)); +if (empty($options['source']) || empty($options['source-point']) || empty($options['target']) + || empty($options['changelog-file'])) { + echo SYNOPSIS; + exit(1); +} + +$sourceRepository = $options['source']; +$targetRepository = $options['target']; +$sourcePoint = $options['source-point']; +$targetBranch = isset($options['target-branch']) ? $options['target-branch'] : 'master'; +$targetDir = (isset($options['target-dir']) ? $options['target-dir'] : __DIR__ . '/target'); +$changelogFile = $options['changelog-file']; +$canPush = !isset($options['no-push']); + +$gitCmd = sprintf('git --git-dir %s --work-tree %s', escapeshellarg("$targetDir/.git"), escapeshellarg($targetDir)); + +try { + // clone target repository and attach the source repo as a remote + execVerbose('git clone %s %s', $targetRepository, $targetDir); + execVerbose("$gitCmd remote add source %s", $sourceRepository); + execVerbose("$gitCmd fetch source"); + execVerbose("$gitCmd checkout $targetBranch"); + + // determine whether source-point is a branch name or a commit ID + try { + $sourceBranch = "source/$sourcePoint"; + execVerbose("$gitCmd rev-parse $sourceBranch"); + $sourcePoint = $sourceBranch; + } catch (Exception $e) { + echo "Assuming that 'source-point' is a commit ID." . PHP_EOL; + } + + $logFile = $targetDir . DIRECTORY_SEPARATOR . $changelogFile; + $targetLog = file_exists($logFile) ? file_get_contents($logFile) : ''; + + // copy new & override existing files in the working tree and index from the source repository + execVerbose("$gitCmd checkout $sourcePoint -- ."); + // remove files that don't exist in the source repository anymore + $files = execVerbose("$gitCmd diff --name-only $sourcePoint"); + foreach ($files as $file) { + execVerbose("$gitCmd rm -f %s", $file); + } + + // remove files that must not be published + $listsDir = __DIR__ . '/extruder'; + execVerbose( + 'php -f %s -- -w %s -l %s -l %s -v', + __DIR__ . '/../extruder.php', + $targetDir, + "$listsDir/common.txt", + "$listsDir/ce.txt", + "$listsDir/dev_build.txt" + ); + + // compare if changelog is different from the published one, compose the commit message + if (!file_exists($logFile)) { + throw new Exception("Changelog file '$logFile' does not exist."); + } + $sourceLog = file_get_contents($logFile); + if (!empty($targetLog) && $sourceLog == $targetLog) { + throw new Exception("Aborting attempt to publish with old changelog. '$logFile' is not updated."); + } + $commitMsg = trim(getTopMarkdownSection($sourceLog)); + if (empty($commitMsg)) { + throw new Exception("No commit message found in the changelog file '$logFile'."); + } + + // replace license notices + $licenseToolDir = __DIR__ . '/license'; + execVerbose( + 'php -f %s -- -w %s -e ce -v -0', + "$licenseToolDir/license-tool.php", + $targetDir + ); + + // composer.json + copy(__DIR__ . '/composer.json_', $targetDir . '/composer.json'); + execVerbose("$gitCmd add composer.json"); + + // commit and push + execVerbose("$gitCmd add --update"); + execVerbose("$gitCmd status"); + execVerbose("$gitCmd commit --message=%s", $commitMsg); + if ($canPush) { + execVerbose("$gitCmd push origin $targetBranch"); + } +} catch (Exception $exception) { + echo $exception->getMessage() . PHP_EOL; + exit(1); +} + +/** + * Execute a command with automatic escaping of arguments + * + * @param string $command + * @return array + * @throws Exception + */ +function execVerbose($command) +{ + $args = func_get_args(); + $args = array_map('escapeshellarg', $args); + $args[0] = $command; + $command = call_user_func_array('sprintf', $args); + echo $command . PHP_EOL; + exec($command, $output, $exitCode); + foreach ($output as $line) { + echo $line . PHP_EOL; + } + if (0 !== $exitCode) { + throw new Exception("Command has failed with exit code: $exitCode."); + } + return $output; +} + +/** + * Get the top section of a text in markdown format + * + * @param string $contents + * @return string + * @link http://daringfireball.net/projects/markdown/syntax + */ +function getTopMarkdownSection($contents) +{ + $parts = preg_split('/^[=\-]+\s*$/m', $contents); + if (!isset($parts[1])) { + return ''; + } + list($title, $body) = $parts; + $body = explode("\n", trim($body)); + array_pop($body); + $body = implode("\n", $body); + return $title . $body; +} diff --git a/dev/build/publication/sanity/SanityRoutine.php b/dev/build/publication/sanity/SanityRoutine.php new file mode 100644 index 0000000000000000000000000000000000000000..ada09662771f3aec582694829851026ef2b77c7d --- /dev/null +++ b/dev/build/publication/sanity/SanityRoutine.php @@ -0,0 +1,188 @@ +<?php +/** + * Service routines for sanity check command line script + * + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 build + * @package sanity + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +/** + * Routine with run-time functions + */ +class SanityRoutine +{ + /** + * Whether verbose mode is on + * + * @var bool + */ + static $verbose = false; + + /** + * Loads configuration from file + * + * @param string $fileName + * @return array|null + */ + public static function loadConfig($fileName) + { + if (!file_exists($fileName)) { + return null; + } + + $result = array( + 'words' => array(), + 'whitelist' => array() + ); + + $xml = new SimpleXMLElement(file_get_contents($fileName)); + + // Load words + $words = array(); + $nodes = $xml->xpath('//config/words/word'); + foreach ($nodes as $node) { + $words[] = (string) $node; + } + $result['words'] = array_filter($words); + + // Load whitelisted entries + $nodes = $xml->xpath('//config/whitelist/item'); + foreach ($nodes as $node) { + $entry = array(); + + $path = $node->xpath('path'); + if (!$path) { + return null; // Wrong configuration + } + $entry['path'] = (string) $path[0]; + + + // Words + $wordNodes = $node->xpath('word'); + if ($wordNodes) { + $entry['words'] = array(); + foreach ($wordNodes as $wordNode) { + $word = (string) $wordNode; + $entry['words'][] = $word; + } + } + + $result['whitelist'][] = $entry; + } + + // Result + return $result; + } + + /** + * Searches words in files content within directory tree + * + * @param string $initialDir The root dir of search start, just to output found file names as relative path + * @param string $dir Current dir to look in + * @param array $config + * @return array + */ + public static function findWords($initialDir, $dir, $config) + { + $result = array(); + + $entries = glob($dir . DIRECTORY_SEPARATOR . '*'); + $initialLength = strlen($initialDir); + foreach ($entries as $entry) { + if (is_file($entry)) { + $foundWords = self::_findWords($entry, $config['words']); + if (!$foundWords) { + continue; + } + $relPath = substr($entry, $initialLength + 1); + $foundWords = self::_removeWhitelistedWords($relPath, $foundWords, $config); + if (!$foundWords) { + continue; + } + $result[] = array('words' => $foundWords, 'file' => $relPath); + } else if (is_dir($entry)) { + $more = self::findWords($initialDir, $entry, $config); + $result = array_merge($result, $more); + } + } + + return $result; + } + + /** + * Tries to find specific words in a file + * + * @param string $fileName + * @param array $words + * @return array + */ + protected static function _findWords($fileName, $words) + { + $contents = file_get_contents($fileName); + + $found = array(); + foreach ($words as $word) { + if (stripos($contents, $word) !== false) { + $found[] = $word; + } + } + return $found; + } + + /** + * Removes whitelisted words from array of found words + * + * @param array $foundWords + * @param string $path + * @param array $config + * @return array + */ + protected static function _removeWhitelistedWords($path, $foundWords, $config) + { + $path = str_replace('\\', '/', $path); + foreach ($config['whitelist'] as $item) { + if (strncmp($item['path'], $path, strlen($item['path'])) != 0) { + continue; + } + + if (!isset($item['words'])) { // All words are permitted there + return array(); + } + $foundWords = array_diff($foundWords, $item['words']); + } + return $foundWords; + } + + /** + * Prints to console, if verbose mode is on + * + * @param string $message + * @return null + */ + public static function printVerbose($message) + { + if (self::$verbose) { + print $message . "\n"; + } + } +} diff --git a/dev/build/publication/sanity/ce.xml b/dev/build/publication/sanity/ce.xml new file mode 100644 index 0000000000000000000000000000000000000000..f714ab12e66926aa91cd7043d3cd7dc0a9feba1c --- /dev/null +++ b/dev/build/publication/sanity/ce.xml @@ -0,0 +1,130 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/** + * 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 build + * @package sanity + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> + <words> + <word>{copyright}</word> + <word>{license_link}</word> + <word>{license_notice}</word> + <word>biz@magento.com</word> + <word>enterprise</word> + <word>mssql</word> + <word>oracle</word> + <word>petervarien</word> + <word>sqlsrv</word> + <word>ukpromerchant</word> + </words> + <whitelist> + <item> + <path>app/Mage.php</path> + </item> + <item> + <word>oracle</word> + <path>app/code/core/Mage/Reports/Model/Resource/Report/Abstract.php</path> + </item> + <item> + <word>oracle</word> + <word>mssql</word> + <path>dev/tests/integration/framework/Magento/Test/Bootstrap.php</path> + </item> + <item> + <word>oracle</word> + <word>mssql</word> + <path>dev/tests/integration/framework/Magento/Test/Annotation/AppIsolation.php</path> + </item> + <item> + <word>mssql</word> + <word>sqlsrv</word> + <path>dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/Bootstrap/_files/local-custom.xml</path> + </item> + <item> + <word>mssql</word> + <path>dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/BootstrapTest.php</path> + </item> + <item> + <word>enterprise</word> + <path>app/code/core/Mage/XmlConnect/</path> + </item> + <item> + <word>enterprise</word> + <path>app/locale/de_DE/Mage_XmlConnect.csv</path> + </item> + <item> + <word>enterprise</word> + <path>app/locale/en_US/Mage_XmlConnect.csv</path> + </item> + <item> + <word>enterprise</word> + <path>app/locale/es_ES/Mage_XmlConnect.csv</path> + </item> + <item> + <word>enterprise</word> + <path>app/locale/fr_FR/Mage_XmlConnect.csv</path> + </item> + <item> + <word>enterprise</word> + <path>app/locale/nl_NL/Mage_XmlConnect.csv</path> + </item> + <item> + <word>enterprise</word> + <path>app/locale/pt_BR/Mage_XmlConnect.csv</path> + </item> + <item> + <word>enterprise</word> + <path>app/locale/zh_CN/Mage_XmlConnect.csv</path> + </item> + <item> + <word>enterprise</word> + <path>lib/Varien/Db/Helper.php</path> + </item> + <item> + <path>lib/Zend</path> + </item> + <item> + <path>dev/build</path> + </item> + <item> + <path>dev/tools/license_placeholder</path> + </item> + <item> + <word>enterprise</word> + <path>dev/tools/migration/Acl/log</path> + </item> + <item> + <word>enterprise</word> + <path>dev/tools/translate/config.inc.php</path> + </item> + <item> + <word>enterprise</word> + <path>dev/tools/translate/ModuleTranslations.php</path> + </item> + <item> + <word>enterprise</word> + <path>dev/tools/translate/generate_emailtemplates.php</path> + </item> + </whitelist> +</config> diff --git a/dev/build/publication/sanity/ee.xml b/dev/build/publication/sanity/ee.xml new file mode 100644 index 0000000000000000000000000000000000000000..fe5b3306a7b0b4ada400cf6d490a4a70ed69f949 --- /dev/null +++ b/dev/build/publication/sanity/ee.xml @@ -0,0 +1,54 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/** + * 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 build + * @package sanity + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> + <words> + <word>{copyright}</word> + <word>{license_link}</word> + <word>{license_notice}</word> + <word>biz@magento.com</word> + <word>petervarien</word> + <word>ukpromerchant</word> + </words> + <whitelist> + <item> + <path>dev/build</path> + </item> + <item> + <word>{copyright}</word> + <word>{license_link}</word> + <word>{license_notice}</word> + <path>dev/tests/unit/testsuite/tools/migration/Acl/GeneratorTest.php</path> + </item> + <item> + <word>{copyright}</word> + <word>{license_link}</word> + <word>{license_notice}</word> + <path>dev/tools/migration/Acl/Generator.php</path> + </item> + </whitelist> +</config> diff --git a/dev/build/publication/sanity/sanity.php b/dev/build/publication/sanity/sanity.php new file mode 100644 index 0000000000000000000000000000000000000000..b0778b577d2ba224d22aa8c05647196733f3c76d --- /dev/null +++ b/dev/build/publication/sanity/sanity.php @@ -0,0 +1,85 @@ +#!/usr/bin/php +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 build + * @package sanity + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ +require __DIR__ . '/SanityRoutine.php'; + +define('USAGE', <<<USAGE +php -f sanity.php -c <config_file> [-w <dir>] [-v] + -c <config_file> path to configuration file with rules and white list + [-w <dir>] use specified working dir instead of current + [-v] verbose mode +USAGE +); + +$shortOpts = 'c:w:v'; +$options = getopt($shortOpts); + +if (!isset($options['c'])) { + print USAGE; + exit(1); +} + +$configFile = $options['c']; +if (!file_exists($configFile)) { + print 'File "' . $configFile . '" does not exist (current dir is "' . getcwd() . '").' . "\n"; + exit(1); +} + +$config = SanityRoutine::loadConfig($configFile); +if (!$config) { + print "Problem with config file\n"; + exit(1); +} +if (!$config['words']) { + print "No words to check\n"; + exit(1); +} + +$workingDir = dirname(__FILE__); +if (isset($options['w'])) { + $workingDir = $options['w']; +} +$workingDir = rtrim($workingDir, '/\\'); +if (!is_dir($workingDir)) { + print 'Working dir "' . $workingDir . '" does not exist' . "\n"; + exit(1); +} + +$verbose = isset($options['v']) ? true : false; +SanityRoutine::$verbose = $verbose; + +SanityRoutine::printVerbose(sprintf('Searching for banned words: "%s"...', implode('", "', $config['words']))); + +$found = SanityRoutine::findWords(realpath($workingDir), realpath($workingDir), $config); +if ($found) { + echo "Found banned words in the following files:\n"; + foreach ($found as $info) { + echo $info['file'] . ' - "' . implode('", "', $info['words']) . "\"\n"; + } + exit(1); +} +SanityRoutine::printVerbose('No banned words found in the source code.' . "\n"); +exit(0); diff --git a/dev/build/report/.gitignore b/dev/build/report/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..72e8ffc0db8aad71a934dd11e5968bd5109e54b4 --- /dev/null +++ b/dev/build/report/.gitignore @@ -0,0 +1 @@ +* diff --git a/dev/tests/integration/framework/Magento/Test/Annotation/AppIsolation.php b/dev/tests/integration/framework/Magento/Test/Annotation/AppIsolation.php index a1b6af2b40f056400c1cd5ad3e78cdb93121cab3..0c07c6d97913c9103d3d305c07f67c1fb910b467 100644 --- a/dev/tests/integration/framework/Magento/Test/Annotation/AppIsolation.php +++ b/dev/tests/integration/framework/Magento/Test/Annotation/AppIsolation.php @@ -37,6 +37,99 @@ class Magento_Test_Annotation_AppIsolation */ private $_hasNonIsolatedTests = true; + /** + * Should clearStaticVariables() be invoked in endTestSuite() + * + * @var bool + */ + protected $_runClearStatics = false; + + /** + * Directories to clear static variables + * + * @var array + */ + protected static $_cleanableFolders = array( + '/app/code/', + '/dev/tests/', + '/lib/', + ); + + /** + * Classes to exclude from static variables cleaning + * + * @var array + */ + protected static $_classesToSkip = array( + 'Mage', + 'Magento_Autoload', + 'Magento_Test_Bootstrap', + 'Magento_Test_Event_Magento', + 'Magento_Test_Event_PhpUnit', + 'Magento_Test_Annotation_AppIsolation', + ); + + /** + * Check whether it is allowed to clean given class static variables + * + * @param ReflectionClass $reflectionClass + * @return bool + */ + protected static function _isClassCleanable(ReflectionClass $reflectionClass) + { + // 1. do not process php internal classes + if ($reflectionClass->isInternal()) { + return false; + } + + // 2. do not process blacklisted classes from integration framework + foreach (self::$_classesToSkip as $notCleanableClass) { + if ($reflectionClass->getName() == $notCleanableClass + || is_subclass_of($reflectionClass->getName(), $notCleanableClass) + ) { + return false; + } + } + + // 3. process only files from specific folders + $fileName = $reflectionClass->getFileName(); + + if ($fileName) { + $fileName = str_replace('\\', '/', $fileName); + foreach (self::$_cleanableFolders as $directory) { + if (stripos($fileName, $directory) !== false) { + return true; + } + } + } + return false; + } + + /** + * Clear static variables (after running controller test case) + * @TODO: workaround to reduce memory leak + * @TODO: refactor all code where objects are stored to static variables to use object manager instead + */ + public static function clearStaticVariables() + { + $classes = get_declared_classes(); + + foreach ($classes as $class) { + $reflectionCLass = new ReflectionClass($class); + if (self::_isClassCleanable($reflectionCLass)) { + $staticProperties = $reflectionCLass->getProperties(ReflectionProperty::IS_STATIC); + foreach ($staticProperties as $staticProperty) { + $staticProperty->setAccessible(true); + $value = $staticProperty->getValue(); + if (is_object($value) || (is_array($value) && is_object(current($value)))) { + $staticProperty->setValue(null); + } + unset($value); + } + } + } + } + /** * Isolate global application objects */ @@ -44,7 +137,7 @@ class Magento_Test_Annotation_AppIsolation { if ($this->_hasNonIsolatedTests) { $this->_cleanupCache(); - Magento_Test_Bootstrap::getInstance()->initialize(); + Magento_Test_Bootstrap::getInstance()->reinitialize(); $this->_hasNonIsolatedTests = false; } } @@ -54,21 +147,6 @@ class Magento_Test_Annotation_AppIsolation */ protected function _cleanupCache() { - /* - * Cache cleanup relies on the initialized config object, which could be polluted from within a test. - * For instance, any test could explicitly call Mage::reset() to destroy the config object. - */ - $expectedOptions = Magento_Test_Bootstrap::getInstance()->getAppOptions(); - $actualOptions = Mage::getConfig() ? Mage::getConfig()->getOptions()->getData() : array(); - $isConfigPolluted = array_intersect_assoc($expectedOptions, $actualOptions) !== $expectedOptions; - if ($isConfigPolluted) { - /* - * Clearing of object manager cache required for correct reinitialization of configuration objects - * to refresh outdated information. - */ - $this->_clearObjectManagerCache(); - Magento_Test_Bootstrap::getInstance()->initialize(); - } Mage::app()->getCache()->clean( Zend_Cache::CLEANING_MODE_NOT_MATCHING_TAG, array(Mage_Core_Model_Config::CACHE_TAG, @@ -77,18 +155,6 @@ class Magento_Test_Annotation_AppIsolation 'DB_ORACLE_DDL', // Varien_Db_Adapter_Oracle::DDL_CACHE_TAG ) ); - - $this->_clearObjectManagerCache(); - } - - /** - * Clear Object Manager cache but save old resource model - */ - protected function _clearObjectManagerCache() - { - /** @var $objectManager Magento_Test_ObjectManager */ - $objectManager = Mage::getObjectManager(); - $objectManager->clearCache(); } /** @@ -120,15 +186,31 @@ class Magento_Test_Annotation_AppIsolation } $isIsolationEnabled = $isolation === array('enabled'); } else { - /* Controller tests should be isolated by default */ - $isIsolationEnabled = $test instanceof Magento_Test_TestCase_ControllerAbstract; + if ($test instanceof Magento_Test_TestCase_ControllerAbstract) { + $this->_runClearStatics = true; + /* Controller tests should be isolated by default */ + $isIsolationEnabled = true; + } else { + $isIsolationEnabled = false; + } } if ($isIsolationEnabled) { $this->_isolateApp(); } + } + + /** + * Clear static cache + */ + public function endTestSuite() + { + if ($this->_runClearStatics) { + self::clearStaticVariables(); + // forced garbage collection to avoid process non-zero exit code (exec returned: 139) caused by PHP bug + gc_collect_cycles(); - /* Forced garbage collection to avoid process non-zero exit code (exec returned: 139) caused by PHP bug */ - gc_collect_cycles(); + $this->_runClearStatics = false; + } } } diff --git a/dev/tests/integration/framework/Magento/Test/Bootstrap.php b/dev/tests/integration/framework/Magento/Test/Bootstrap.php index 807298177b9d9fa35058317f033cd82b6a9f9a37..9bca090159f89f55399cb293cb5c99174c01d425 100644 --- a/dev/tests/integration/framework/Magento/Test/Bootstrap.php +++ b/dev/tests/integration/framework/Magento/Test/Bootstrap.php @@ -246,17 +246,20 @@ class Magento_Test_Bootstrap */ public function initialize() { - $resource = Mage::registry('_singleton/Mage_Core_Model_Resource'); - $this->_resetApp(); - if ($resource) { - Mage::register('_singleton/Mage_Core_Model_Resource', $resource); - } - Mage::setIsDeveloperMode($this->_isDeveloperMode); Mage::$headersSentThrowsException = false; Mage::app('', 'store', $this->_options); } + /** + * Initialize an already installed Magento application + */ + public function reinitialize() + { + $this->resetApp(); + $this->initialize(); + } + /** * Re-create empty temporary dir by specified * @@ -285,18 +288,22 @@ class Magento_Test_Bootstrap /** * Reset application global state */ - protected function _resetApp() + public function resetApp() { - /** @var $layout Mage_Core_Model_Layout */ - $layout = Mage::registry('_singleton/Mage_Core_Model_Layout'); - if ($layout) { - /* Force to cleanup circular references */ - $layout->__destruct(); - } + /** @var $objectManager Magento_Test_ObjectManager */ + $objectManager = Mage::getObjectManager(); + $objectManager->clearCache(); + + $resource = Mage::registry('_singleton/Mage_Core_Model_Resource'); + Mage::reset(); Varien_Data_Form::setElementRenderer(null); Varien_Data_Form::setFieldsetRenderer(null); Varien_Data_Form::setFieldsetElementRenderer(null); + + if ($resource) { + Mage::register('_singleton/Mage_Core_Model_Resource', $resource); + } } /** @@ -455,7 +462,7 @@ class Magento_Test_Bootstrap $this->_ensureDirExists($this->_installDir); $this->_ensureDirExists($this->_installEtcDir); $this->_ensureDirExists($this->_installDir . DIRECTORY_SEPARATOR . 'media'); - $this->_ensureDirExists($this->_installDir . DIRECTORY_SEPARATOR . 'skin'); + $this->_ensureDirExists($this->_installDir . DIRECTORY_SEPARATOR . 'theme'); /* Copy *.xml configuration files */ $dirs = array( @@ -544,6 +551,7 @@ class Magento_Test_Bootstrap */ protected function _createAdminUser() { + /** @var $user Mage_User_Model_User */ $user = mage::getModel('Mage_User_Model_User'); $user->setData(array( 'firstname' => 'firstname', @@ -555,9 +563,11 @@ class Magento_Test_Bootstrap )); $user->save(); + /** @var $roleAdmin Mage_User_Model_Role */ $roleAdmin = Mage::getModel('Mage_User_Model_Role'); $roleAdmin->load(self::ADMIN_ROLE_NAME, 'role_name'); + /** @var $roleUser Mage_User_Model_Role */ $roleUser = Mage::getModel('Mage_User_Model_Role'); $roleUser->setData(array( 'parent_id' => $roleAdmin->getId(), diff --git a/dev/tests/integration/framework/Magento/Test/ObjectManager.php b/dev/tests/integration/framework/Magento/Test/ObjectManager.php index e8a88f71b577f4b0662d9b7721b8f35057c8775a..81c5461b60779b263ae25a0d697a6fae0cf21fa9 100644 --- a/dev/tests/integration/framework/Magento/Test/ObjectManager.php +++ b/dev/tests/integration/framework/Magento/Test/ObjectManager.php @@ -27,6 +27,18 @@ class Magento_Test_ObjectManager extends Magento_ObjectManager_Zend { + /** + * Classes with xml properties to explicitly call __destruct() due to https://bugs.php.net/bug.php?id=62468 + * + * @var array + */ + protected $_classesToDestruct = array( + 'Mage_Core_Model_Config', + 'Mage_Core_Model_Layout', + 'Mage_Core_Model_Layout_Merge', + 'Mage_Core_Model_Layout_ScheduledStructure', + ); + /** * @param string $definitionsFile * @param Zend\Di\Di $diInstance @@ -45,6 +57,14 @@ class Magento_Test_ObjectManager extends Magento_ObjectManager_Zend */ public function clearCache() { + foreach ($this->_classesToDestruct as $className) { + $object = $this->get($className); + if ($object) { + // force to cleanup circular references + $object->__destruct(); + } + } + $resource = $this->get('Mage_Core_Model_Resource'); $this->_di->setInstanceManager(new Magento_Test_Di_InstanceManager()); $this->addSharedInstance($this, 'Magento_ObjectManager'); diff --git a/dev/tests/integration/framework/Magento/Test/TestCase/ControllerAbstract.php b/dev/tests/integration/framework/Magento/Test/TestCase/ControllerAbstract.php index c507fb39068b1c7d38d9722f17bd1fc8315dae4b..bccf5c111a33e90d590fdf8e56a6dc904c2de519 100644 --- a/dev/tests/integration/framework/Magento/Test/TestCase/ControllerAbstract.php +++ b/dev/tests/integration/framework/Magento/Test/TestCase/ControllerAbstract.php @@ -84,12 +84,13 @@ abstract class Magento_Test_TestCase_ControllerAbstract extends PHPUnit_Framewor $this->_request = null; $this->_response = null; $this->_objectManager = null; + $this->_runOptions = array(); } /** * Run request * - * @return void + * @param string $uri */ public function dispatch($uri) { diff --git a/dev/tests/integration/framework/Magento/Test/TestCase/IntegrityAbstract.php b/dev/tests/integration/framework/Magento/Test/TestCase/IntegrityAbstract.php index b00d244338485f9d3fca978d079ee262bd7aa393..6a2474ae09b4f2ed7cf8d26ac32557c802c6d436 100644 --- a/dev/tests/integration/framework/Magento/Test/TestCase/IntegrityAbstract.php +++ b/dev/tests/integration/framework/Magento/Test/TestCase/IntegrityAbstract.php @@ -72,40 +72,21 @@ abstract class Magento_Test_TestCase_IntegrityAbstract extends PHPUnit_Framework } /** - * Returns flat array of skins currently located in system + * Returns flat array of themes currently located in system * * @return array */ - protected function _getDesignSkins() + protected function _getDesignThemes() { $result = array(); foreach (array('adminhtml', 'frontend', 'install') as $area) { - $entities = Mage::getDesign()->getDesignEntitiesStructure($area, false); + $entities = Mage::getDesign()->getDesignEntitiesStructure($area); foreach ($entities as $package => $themes) { - foreach ($themes as $theme => $skins) { - foreach (array_keys($skins) as $skin) { - $result[] = "{$area}/{$package}/{$theme}/{$skin}"; - } + foreach ($themes as $theme) { + $result[] = "{$area}/{$package}/{$theme}"; } } } return $result; } - - /** - * Returns design themes, present in system - * - * @return array - */ - protected function _getDesignThemes() - { - $result = array(); - foreach ($this->_getDesignSkins() as $skin) { - list ($area, $package, $theme) = explode('/', $skin); - $view = "{$area}/{$package}/{$theme}"; - $result[$view] = $view; - } - $result = array_values($result); // Return flat array without some special keys - return $result; - } } diff --git a/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/ObjectManagerTest.php b/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/ObjectManagerTest.php index 8a48ea81d449fd72364f3e1c62db9a4c7031fd92..0c023f0050204127b203d0582f3821a53a8f8c81 100644 --- a/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/ObjectManagerTest.php +++ b/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/ObjectManagerTest.php @@ -42,6 +42,13 @@ class Magento_Test_ObjectManagerTest extends PHPUnit_Framework_TestCase */ protected $_model; + /** + * List of classes to call __destruct() on + * + * @var array + */ + protected $_classesToDestruct = array(); + /** * Expected instance manager parametrized cache after clear * @@ -55,12 +62,14 @@ class Magento_Test_ObjectManagerTest extends PHPUnit_Framework_TestCase protected function tearDown() { unset($this->_model); + unset($this->_classesToDestruct); } public function testClearCache() { $this->_prepareObjectManagerForClearCache(); $this->_model->clearCache(); + $this->assertAttributeEquals($this->_classesToDestruct, '_classesToDestruct', $this->_model); } /** @@ -76,10 +85,9 @@ class Magento_Test_ObjectManagerTest extends PHPUnit_Framework_TestCase $diInstance->expects($this->exactly(3)) ->method('instanceManager') ->will($this->returnValue($instanceManager)); - $diInstance->expects($this->once()) + $diInstance->expects($this->exactly(5)) ->method('get') - ->with('Mage_Core_Model_Resource') - ->will($this->returnValue(self::TEST_RESOURCE)); + ->will($this->returnCallback(array($this, 'getCallback'))); $diInstance->expects($this->exactly(2)) ->method('setInstanceManager') ->will($this->returnCallback(array($this, 'verifySetInstanceManager'))); @@ -96,6 +104,23 @@ class Magento_Test_ObjectManagerTest extends PHPUnit_Framework_TestCase ->with(self::TEST_RESOURCE, 'Mage_Core_Model_Resource'); } + /** + * Callback method for Zend\Di\Di::get + * + * @param string $className + * @return PHPUnit_Framework_MockObject_MockObject|string + */ + public function getCallback($className) + { + if ($className != 'Mage_Core_Model_Resource') { + $this->_classesToDestruct[] = $className; + $mock = $this->getMock($className, array('__destruct'), array(), '', false); + return $mock; + } else { + return self::TEST_RESOURCE; + } + } + /** * Callback method for Zend\Di\Di::setInstanceManager * diff --git a/dev/tests/integration/testsuite/Mage/Adminhtml/Block/Sales/Order/Create/Form/AbstractTest.php b/dev/tests/integration/testsuite/Mage/Adminhtml/Block/Sales/Order/Create/Form/AbstractTest.php index 703fa42a0d3cb9f9a43df54fcb9474c9b139b3c2..5f8847dadaab1c2a8f6899ba67441083a0ef8ed2 100644 --- a/dev/tests/integration/testsuite/Mage/Adminhtml/Block/Sales/Order/Create/Form/AbstractTest.php +++ b/dev/tests/integration/testsuite/Mage/Adminhtml/Block/Sales/Order/Create/Form/AbstractTest.php @@ -37,12 +37,14 @@ class Mage_Adminhtml_Block_Sales_Order_Create_Form_AbstractTest Mage::getObjectManager()->get('Mage_Core_Controller_Request_Http'), Mage::getObjectManager()->get('Mage_Core_Model_Layout'), Mage::getObjectManager()->get('Mage_Core_Model_Event_Manager'), + Mage::getObjectManager()->get('Mage_Backend_Model_Url'), Mage::getObjectManager()->get('Mage_Core_Model_Translate'), Mage::getObjectManager()->get('Mage_Core_Model_Cache'), Mage::getObjectManager()->get('Mage_Core_Model_Design_Package'), Mage::getObjectManager()->get('Mage_Core_Model_Session'), Mage::getObjectManager()->get('Mage_Core_Model_Store_Config'), - Mage::getObjectManager()->get('Mage_Core_Controller_Varien_Front') + Mage::getObjectManager()->get('Mage_Core_Controller_Varien_Front'), + Mage::getObjectManager()->get('Mage_Core_Model_Factory_Helper') ); /** @var $block Mage_Adminhtml_Block_Sales_Order_Create_Form_Abstract */ $block = $this->getMockForAbstractClass('Mage_Adminhtml_Block_Sales_Order_Create_Form_Abstract', $arguments); diff --git a/dev/tests/integration/testsuite/Mage/Adminhtml/Block/System/Config/_files/test_section_config.xml b/dev/tests/integration/testsuite/Mage/Adminhtml/Block/System/Config/_files/test_section_config.xml deleted file mode 100644 index 4937420c6fc1f9eea9f7e870c207603288d29e68..0000000000000000000000000000000000000000 --- a/dev/tests/integration/testsuite/Mage/Adminhtml/Block/System/Config/_files/test_section_config.xml +++ /dev/null @@ -1,58 +0,0 @@ -<?xml version="1.0"?> -<!-- -/** - * 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 Mage_Adminhtml - * @subpackage integration_tests - * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) - */ ---> -<test_section translate="label" module="Mage_Core"> - <label>Test Section</label> - <tab>Test</tab> - <frontend_type>text</frontend_type> - <sort_order>0</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <groups> - <test_group translate="label"> - <label>Test Group</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> - <fields> - <test_field translate="label comment"> - <label>Test Field</label> - <frontend_type>text</frontend_type> - <sort_order>20</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - <config_path>test_section/test_group/test_field</config_path> - </test_field> - </fields> - </test_group> - </groups> -</test_section> diff --git a/dev/tests/integration/testsuite/Mage/Adminhtml/Block/Urlrewrite/Edit/FormTest.php b/dev/tests/integration/testsuite/Mage/Adminhtml/Block/Urlrewrite/Edit/FormTest.php index cd3ffb97f266bf89ce493663b62d3e3554c7d9f3..d2724fc254614e6d1ac79fb790dc6f76736dcdc2 100644 --- a/dev/tests/integration/testsuite/Mage/Adminhtml/Block/Urlrewrite/Edit/FormTest.php +++ b/dev/tests/integration/testsuite/Mage/Adminhtml/Block/Urlrewrite/Edit/FormTest.php @@ -132,7 +132,7 @@ class Mage_Adminhtml_Block_Urlrewrite_Edit_FormTest extends PHPUnit_Framework_Te $this->assertInstanceOf('Varien_Data_Form_Element_Select', $storeElement); // Check store selection elements has correct renderer - $this->assertInstanceOf('Mage_Adminhtml_Block_Store_Switcher_Form_Renderer_Fieldset_Element', + $this->assertInstanceOf('Mage_Backend_Block_Store_Switcher_Form_Renderer_Fieldset_Element', $storeElement->getRenderer()); // Check store elements has expected values diff --git a/dev/tests/integration/testsuite/Mage/Adminhtml/Block/Widget/Form/ContainerTest.php b/dev/tests/integration/testsuite/Mage/Adminhtml/Block/Widget/Form/ContainerTest.php index 29d54e9aa067051ba3b9f32b74f416f4dc2aef1f..056e63c9341444f55e8dfde2784ea8e8b2550776 100644 --- a/dev/tests/integration/testsuite/Mage/Adminhtml/Block/Widget/Form/ContainerTest.php +++ b/dev/tests/integration/testsuite/Mage/Adminhtml/Block/Widget/Form/ContainerTest.php @@ -36,12 +36,14 @@ class Mage_Adminhtml_Block_Widget_Form_ContainerTest extends PHPUnit_Framework_T 'Mage_Core_Controller_Request_Http', 'Mage_Core_Model_Layout', 'Mage_Core_Model_Event_Manager', + 'Mage_Backend_Model_Url', 'Mage_Core_Model_Translate', 'Mage_Core_Model_Cache', 'Mage_Core_Model_Design_Package', 'Mage_Core_Model_Session', 'Mage_Core_Model_Store_Config', - 'Mage_Core_Controller_Varien_Front' + 'Mage_Core_Controller_Varien_Front', + 'Mage_Core_Model_Factory_Helper' ); public function testGetFormHtml() diff --git a/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/Catalog/CategoryControllerTest.php b/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/Catalog/CategoryControllerTest.php index d226e28a0c17e171cd3e4db6582dc1340147187e..376b5c0931c9ae15343aaab4a3f065b5175f5a8f 100644 --- a/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/Catalog/CategoryControllerTest.php +++ b/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/Catalog/CategoryControllerTest.php @@ -152,7 +152,7 @@ class Mage_Adminhtml_Catalog_CategoryControllerTest extends Mage_Adminhtml_Utili 'landing_page' => '1', 'is_anchor' => '1', 'custom_apply_to_products' => '0', - 'custom_design' => 'default/default/blank', + 'custom_design' => 'default/blank', 'custom_design_from' => '', 'custom_design_to' => '', 'page_layout' => '', @@ -189,7 +189,7 @@ class Mage_Adminhtml_Catalog_CategoryControllerTest extends Mage_Adminhtml_Utili 'default_sort_by' => NULL, 'display_mode' => 'PRODUCTS', 'meta_title' => 'Custom Title', - 'custom_design' => 'default/default/blank', + 'custom_design' => 'default/blank', 'page_layout' => NULL, 'is_active' => '0', 'include_in_menu' => '0', diff --git a/dev/tests/integration/testsuite/Mage/Adminhtml/Block/System/Config/FormStub.php b/dev/tests/integration/testsuite/Mage/Backend/Block/System/Config/FormStub.php similarity index 87% rename from dev/tests/integration/testsuite/Mage/Adminhtml/Block/System/Config/FormStub.php rename to dev/tests/integration/testsuite/Mage/Backend/Block/System/Config/FormStub.php index 32a6591e198eba339a67b89a4962f26e80b3d43a..29b53d5d39383debc641b65e864e171a0c269702 100644 --- a/dev/tests/integration/testsuite/Mage/Adminhtml/Block/System/Config/FormStub.php +++ b/dev/tests/integration/testsuite/Mage/Backend/Block/System/Config/FormStub.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @subpackage integration_tests * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) @@ -28,7 +28,7 @@ /** * Stub system config form block for integration test */ -class Mage_Adminhtml_Block_System_Config_FormStub extends Mage_Adminhtml_Block_System_Config_Form +class Mage_Backend_Block_System_Config_FormStub extends Mage_Backend_Block_System_Config_Form { /** * @var array @@ -49,14 +49,14 @@ class Mage_Adminhtml_Block_System_Config_FormStub extends Mage_Adminhtml_Block_S /** * Initialize properties of object required for test. * - * @return Mage_Adminhtml_Block_System_Config_Form + * @return Mage_Backend_Block_System_Config_Form */ protected function _initObjects() { parent::_initObjects(); $this->_configData = $this->_configDataStub; $this->_defaultFieldRenderer = Mage::app()->getLayout()->createBlock( - 'Mage_Adminhtml_Block_System_Config_Form_Field' + 'Mage_Backend_Block_System_Config_Form_Field' ); } } diff --git a/dev/tests/integration/testsuite/Mage/Adminhtml/Block/System/Config/FormTest.php b/dev/tests/integration/testsuite/Mage/Backend/Block/System/Config/FormTest.php similarity index 81% rename from dev/tests/integration/testsuite/Mage/Adminhtml/Block/System/Config/FormTest.php rename to dev/tests/integration/testsuite/Mage/Backend/Block/System/Config/FormTest.php index e31ac94577086fccb083b29eb431149ac28e699f..bc463970410108e2598652ccbe371c5b93fa9fde 100644 --- a/dev/tests/integration/testsuite/Mage/Adminhtml/Block/System/Config/FormTest.php +++ b/dev/tests/integration/testsuite/Mage/Backend/Block/System/Config/FormTest.php @@ -19,20 +19,20 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Magento - * @package Magento_Adminhtml + * @package Magento_Backend * @subpackage integration_tests * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Adminhtml_Block_System_Config_FormTest extends PHPUnit_Framework_TestCase +class Mage_Backend_Block_System_Config_FormTest extends PHPUnit_Framework_TestCase { public function testDependenceHtml() { /** @var $layout Mage_Core_Model_Layout */ $layout = Mage::getModel('Mage_Core_Model_Layout'); - /** @var $block Mage_Adminhtml_Block_System_Config_Form */ - $block = $layout->createBlock('Mage_Adminhtml_Block_System_Config_Form', 'block'); + /** @var $block Mage_Backend_Block_System_Config_Form */ + $block = $layout->createBlock('Mage_Backend_Block_System_Config_Form', 'block'); $block->setArea('adminhtml'); /** @var $childBlock Mage_Core_Block_Text */ @@ -46,7 +46,7 @@ class Mage_Adminhtml_Block_System_Config_FormTest extends PHPUnit_Framework_Test } /** - * @covers Mage_Adminhtml_Block_System_Config_Form::initFields + * @covers Mage_Backend_Block_System_Config_Form::initFields * @param $section Mage_Core_Model_Config_Element * @param $group Mage_Core_Model_Config_Element * @param $field Mage_Core_Model_Config_Element @@ -57,19 +57,19 @@ class Mage_Adminhtml_Block_System_Config_FormTest extends PHPUnit_Framework_Test public function testInitFieldsUseDefaultCheckbox($section, $group, $field, array $configData, $expectedUseDefault) { $form = new Varien_Data_Form(); - $fieldset = $form->addFieldset($section->getName() . '_' . $group->getName(), array()); + $fieldset = $form->addFieldset($section['id'] . '_' . $group['id'], array()); - /** @var $block Mage_Adminhtml_Block_System_Config_FormStub */ - $block = Mage::app()->getLayout()->createBlock('Mage_Adminhtml_Block_System_Config_FormStub'); - $block->setScope(Mage_Adminhtml_Block_System_Config_Form::SCOPE_WEBSITES); + /** @var $block Mage_Backend_Block_System_Config_FormStub */ + $block = Mage::app()->getLayout()->createBlock('Mage_Backend_Block_System_Config_FormStub'); + $block->setScope(Mage_Backend_Block_System_Config_Form::SCOPE_WEBSITES); $block->setStubConfigData($configData); $block->initFields($fieldset, $group, $section); $fieldsetSel = 'fieldset'; - $valueSel = sprintf('input#%s_%s_%s', $section->getName(), $group->getName(), $field->getName()); + $valueSel = sprintf('input#%s_%s_%s', $section['id'], $group['id'], $field['id']); $valueDisabledSel = sprintf('%s[disabled="disabled"]', $valueSel); - $useDefaultSel = sprintf('input#%s_%s_%s_inherit.checkbox', $section->getName(), $group->getName(), - $field->getName()); + $useDefaultSel = sprintf('input#%s_%s_%s_inherit.checkbox', $section['id'], $group['id'], + $field['id']); $useDefaultCheckedSel = sprintf('%s[checked="checked"]', $useDefaultSel); $fieldsetHtml = $fieldset->getElementHtml(); @@ -96,16 +96,14 @@ class Mage_Adminhtml_Block_System_Config_FormTest extends PHPUnit_Framework_Test */ public function initFieldsInheritCheckboxDataProvider() { - /** - * @TODO: Need to use ObjectManager instead 'new'. - * On this moment we have next bug MAGETWO-4274 which blocker for this key. - */ - /** @var $section Mage_Core_Model_Config_Element */ - $section = new Mage_Core_Model_Config_Element(__DIR__ . '/_files/test_section_config.xml', 0, true); + $structure = Mage::getSingleton('Mage_Backend_Model_Config_Structure', array( + 'sourceFiles' => array(__DIR__ . '/_files/test_section_config.xml') + )); // @codingStandardsIgnoreStart - $group = $section->groups->test_group; - $field = $group->fields->test_field; - $fieldPath = (string) $field->config_path; + $section = $structure->getSection('test_section'); + $group = $section['groups']['test_group']; + $field = $group['fields']['test_field']; + $fieldPath = isset($field['config_path']) ? (string) $field['config_path'] : null; // @codingStandardsIgnoreEnd return array( @@ -123,8 +121,8 @@ class Mage_Adminhtml_Block_System_Config_FormTest extends PHPUnit_Framework_Test array('request' => Mage::app()->getRequest(), 'response' => Mage::app()->getResponse()) ); Mage::app()->getRequest()->setParam('section', 'general'); - /** @var $block Mage_Adminhtml_Block_System_Config_Form */ - $block = Mage::app()->getLayout()->createBlock('Mage_Adminhtml_Block_System_Config_Form'); + /** @var $block Mage_Backend_Block_System_Config_Form */ + $block = Mage::app()->getLayout()->createBlock('Mage_Backend_Block_System_Config_Form'); $block->initForm(); $expectedIds = array( 'general_country' => array( diff --git a/app/code/core/Mage/Poll/etc/system.xml b/dev/tests/integration/testsuite/Mage/Backend/Block/System/Config/_files/test_section_config.xml similarity index 52% rename from app/code/core/Mage/Poll/etc/system.xml rename to dev/tests/integration/testsuite/Mage/Backend/Block/System/Config/_files/test_section_config.xml index 358736f9edf837f92d831762b3212ec587e32145..24dfaf150e070816c076680745b5928d3a878c58 100644 --- a/app/code/core/Mage/Poll/etc/system.xml +++ b/dev/tests/integration/testsuite/Mage/Backend/Block/System/Config/_files/test_section_config.xml @@ -20,29 +20,28 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Poll + * @package Mage_Backend + * @subpackage integration_tests * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> <config> - <sections> - <web> - <groups> - <polls> - <fields> - <poll_check_by_ip translate="label" module="Mage_Poll"> - <label>Disallow Voting in a Poll Multiple Times from Same IP-address</label> - <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> - <sort_order>1</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - </poll_check_by_ip> - </fields> - </polls> - </groups> - </web> - </sections> + <system> + <tab id="Test"> + <label>Test</label> + </tab> + <section id="test_section" translate="label" module="Mage_Core" showInDefault="1" showInWebsite="1" showInStore="1" type="text" sortOrder="0"> + <label>Test Section</label> + <tab>Test</tab> + + <group id="test_group" translate="label" showInDefault="1" showInWebsite="1" showInStore="1" type="text" sortOrder="10"> + <label>Test Group</label> + <field id="test_field" translate="label comment" showInDefault="1" showInWebsite="1" showInStore="1" type="text" sortOrder="20"> + <label>Test Field</label> + <config_path>test_section/test_group/test_field</config_path> + </field> + </group> + </section> + </system> </config> diff --git a/dev/tests/integration/testsuite/Mage/Backend/Block/Widget/Grid/ExtendedTest.php b/dev/tests/integration/testsuite/Mage/Backend/Block/Widget/Grid/ExtendedTest.php index 5862af063687414231baa4f6e7af9a8a0a51af88..b7f0c12258768122000cef2513f4683fb6c2bc3d 100644 --- a/dev/tests/integration/testsuite/Mage/Backend/Block/Widget/Grid/ExtendedTest.php +++ b/dev/tests/integration/testsuite/Mage/Backend/Block/Widget/Grid/ExtendedTest.php @@ -52,6 +52,12 @@ class Mage_Backend_Block_Widget_Grid_ExtendedTest extends PHPUnit_Framework_Test ); } + protected function tearDown() + { + unset($this->_layoutMock); + unset($this->_block); + } + public function testAddColumnAddsChildToColumnSet() { $this->assertInstanceOf( @@ -77,4 +83,10 @@ class Mage_Backend_Block_Widget_Grid_ExtendedTest extends PHPUnit_Framework_Test $columnNames = $this->_block->getLayout()->getChildNames($this->_block->getColumnSet()->getNameInLayout()); $this->assertEquals($this->_block->getColumn('column2')->getNameInLayout(), $columnNames[0]); } + + public function testGetMainButtonsHtmlReturnsEmptyStringIfFiltersArentVisible() + { + $this->_block->setFilterVisibility(false); + $this->assertEquals('', $this->_block->getMainButtonsHtml()); + } } diff --git a/dev/tests/integration/testsuite/Mage/Backend/Block/Widget/Grid/MassactionTest.php b/dev/tests/integration/testsuite/Mage/Backend/Block/Widget/Grid/MassactionTest.php index e8afcfc8dee0842d56d49b4cd05b9134620ce860..49f760006c6f2abd6995753b94349ac16180fb61 100644 --- a/dev/tests/integration/testsuite/Mage/Backend/Block/Widget/Grid/MassactionTest.php +++ b/dev/tests/integration/testsuite/Mage/Backend/Block/Widget/Grid/MassactionTest.php @@ -43,7 +43,7 @@ class Mage_Backend_Block_Widget_Grid_MassactionTest extends PHPUnit_Framework_Te Mage::getConfig()->setOptions(array( 'design_dir' => realpath( __DIR__ . '/../../_files/design'), )); - Mage::getDesign()->setDesignTheme('test/default/default', 'adminhtml'); + Mage::getDesign()->setDesignTheme('test/default', 'adminhtml'); /* Disable loading and saving layout cache */ Mage::app()->getCacheInstance()->banUse('layout'); diff --git a/dev/tests/integration/testsuite/Mage/Backend/Block/Widget/GridTest.php b/dev/tests/integration/testsuite/Mage/Backend/Block/Widget/GridTest.php index 01aaa7f5dc616d990652dab4dde218371ff8af69..c4ba3fb64ff9ef2a617d207d219f40dda1e077ab 100644 --- a/dev/tests/integration/testsuite/Mage/Backend/Block/Widget/GridTest.php +++ b/dev/tests/integration/testsuite/Mage/Backend/Block/Widget/GridTest.php @@ -51,12 +51,14 @@ class Mage_Backend_Block_Widget_GridTest extends PHPUnit_Framework_TestCase 'Mage_Core_Controller_Request_Http', 'Mage_Core_Model_Layout', 'Mage_Core_Model_Event_Manager', + 'Mage_Backend_Model_Url', 'Mage_Core_Model_Translate', 'Mage_Core_Model_Cache', 'Mage_Core_Model_Design_Package', 'Mage_Core_Model_Session', 'Mage_Core_Model_Store_Config', 'Mage_Core_Controller_Varien_Front', + 'Mage_Core_Model_Factory_Helper', 'Mage_Backend_Helper_Data', 'Mage_Backend_Model_Widget_Grid_Row_UrlGeneratorFactory', ); @@ -111,4 +113,10 @@ class Mage_Backend_Block_Widget_GridTest extends PHPUnit_Framework_TestCase $this->_block->setSortable(false); $this->_block->toHtml(); } + + public function testGetMainButtonsHtmlReturnsEmptyStringIfFiltersArentVisible() + { + $this->_columnSetMock->expects($this->once())->method('isFilterVisible')->will($this->returnValue(false)); + $this->_block->getMainButtonsHtml(); + } } diff --git a/dev/tests/integration/testsuite/Mage/Backend/Block/_files/design/adminhtml/test/default/images/grid-cal.gif b/dev/tests/integration/testsuite/Mage/Backend/Block/_files/design/adminhtml/test/default/images/grid-cal.gif new file mode 100644 index 0000000000000000000000000000000000000000..d0235c7e023cab8100e0916375dabeca2f4b478c Binary files /dev/null and b/dev/tests/integration/testsuite/Mage/Backend/Block/_files/design/adminhtml/test/default/images/grid-cal.gif differ diff --git a/dev/tests/integration/testsuite/Mage/Backend/Block/_files/design/adminhtml/test/default/skin/default/images/grid_sort_asc.gif b/dev/tests/integration/testsuite/Mage/Backend/Block/_files/design/adminhtml/test/default/images/grid_sort_asc.gif similarity index 100% rename from dev/tests/integration/testsuite/Mage/Backend/Block/_files/design/adminhtml/test/default/skin/default/images/grid_sort_asc.gif rename to dev/tests/integration/testsuite/Mage/Backend/Block/_files/design/adminhtml/test/default/images/grid_sort_asc.gif diff --git a/dev/tests/integration/testsuite/Mage/Backend/Block/_files/design/adminhtml/test/default/skin/default/images/grid_sort_desc.gif b/dev/tests/integration/testsuite/Mage/Backend/Block/_files/design/adminhtml/test/default/images/grid_sort_desc.gif similarity index 100% rename from dev/tests/integration/testsuite/Mage/Backend/Block/_files/design/adminhtml/test/default/skin/default/images/grid_sort_desc.gif rename to dev/tests/integration/testsuite/Mage/Backend/Block/_files/design/adminhtml/test/default/images/grid_sort_desc.gif diff --git a/dev/tests/integration/testsuite/Mage/Backend/Block/_files/design/adminhtml/test/default/skin/default/images/grid_th_bg.gif b/dev/tests/integration/testsuite/Mage/Backend/Block/_files/design/adminhtml/test/default/images/grid_th_bg.gif similarity index 100% rename from dev/tests/integration/testsuite/Mage/Backend/Block/_files/design/adminhtml/test/default/skin/default/images/grid_th_bg.gif rename to dev/tests/integration/testsuite/Mage/Backend/Block/_files/design/adminhtml/test/default/images/grid_th_bg.gif diff --git a/dev/tests/integration/testsuite/Mage/Backend/Block/_files/design/adminhtml/test/default/skin/default/images/grid_th_onclick_bg.gif b/dev/tests/integration/testsuite/Mage/Backend/Block/_files/design/adminhtml/test/default/images/grid_th_onclick_bg.gif similarity index 100% rename from dev/tests/integration/testsuite/Mage/Backend/Block/_files/design/adminhtml/test/default/skin/default/images/grid_th_onclick_bg.gif rename to dev/tests/integration/testsuite/Mage/Backend/Block/_files/design/adminhtml/test/default/images/grid_th_onclick_bg.gif diff --git a/dev/tests/integration/testsuite/Mage/Backend/Block/_files/design/adminhtml/test/default/skin/default/images/pager_arrow_left.gif b/dev/tests/integration/testsuite/Mage/Backend/Block/_files/design/adminhtml/test/default/images/pager_arrow_left.gif similarity index 100% rename from dev/tests/integration/testsuite/Mage/Backend/Block/_files/design/adminhtml/test/default/skin/default/images/pager_arrow_left.gif rename to dev/tests/integration/testsuite/Mage/Backend/Block/_files/design/adminhtml/test/default/images/pager_arrow_left.gif diff --git a/dev/tests/integration/testsuite/Mage/Backend/Block/_files/design/adminhtml/test/default/skin/default/images/pager_arrow_left_off.gif b/dev/tests/integration/testsuite/Mage/Backend/Block/_files/design/adminhtml/test/default/images/pager_arrow_left_off.gif similarity index 100% rename from dev/tests/integration/testsuite/Mage/Backend/Block/_files/design/adminhtml/test/default/skin/default/images/pager_arrow_left_off.gif rename to dev/tests/integration/testsuite/Mage/Backend/Block/_files/design/adminhtml/test/default/images/pager_arrow_left_off.gif diff --git a/dev/tests/integration/testsuite/Mage/Backend/Block/_files/design/adminhtml/test/default/skin/default/images/pager_arrow_right.gif b/dev/tests/integration/testsuite/Mage/Backend/Block/_files/design/adminhtml/test/default/images/pager_arrow_right.gif similarity index 100% rename from dev/tests/integration/testsuite/Mage/Backend/Block/_files/design/adminhtml/test/default/skin/default/images/pager_arrow_right.gif rename to dev/tests/integration/testsuite/Mage/Backend/Block/_files/design/adminhtml/test/default/images/pager_arrow_right.gif diff --git a/dev/tests/integration/testsuite/Mage/Backend/Block/_files/design/adminhtml/test/default/skin/default/images/pager_arrow_right_off.gif b/dev/tests/integration/testsuite/Mage/Backend/Block/_files/design/adminhtml/test/default/images/pager_arrow_right_off.gif similarity index 100% rename from dev/tests/integration/testsuite/Mage/Backend/Block/_files/design/adminhtml/test/default/skin/default/images/pager_arrow_right_off.gif rename to dev/tests/integration/testsuite/Mage/Backend/Block/_files/design/adminhtml/test/default/images/pager_arrow_right_off.gif diff --git a/dev/tests/integration/testsuite/Mage/Adminhtml/Model/System/Config/Backend/Admin/RobotsTest.php b/dev/tests/integration/testsuite/Mage/Backend/Model/Config/Backend/Admin/RobotsTest.php similarity index 81% rename from dev/tests/integration/testsuite/Mage/Adminhtml/Model/System/Config/Backend/Admin/RobotsTest.php rename to dev/tests/integration/testsuite/Mage/Backend/Model/Config/Backend/Admin/RobotsTest.php index d3af91731d5034735f70207ea07ff175f534d783..330a80773a4792e5a7d1b75b64d514c6b4fbbe67 100644 --- a/dev/tests/integration/testsuite/Mage/Adminhtml/Model/System/Config/Backend/Admin/RobotsTest.php +++ b/dev/tests/integration/testsuite/Mage/Backend/Model/Config/Backend/Admin/RobotsTest.php @@ -19,16 +19,16 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Magento - * @package Mage_Adminhtml + * @package Mage_Backend * @subpackage integration_tests * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Adminhtml_Model_System_Config_Backend_Admin_RobotsTest extends PHPUnit_Framework_TestCase +class Mage_Backend_Model_Config_Backend_Admin_RobotsTest extends PHPUnit_Framework_TestCase { /** - * @var Mage_Adminhtml_Model_System_Config_Backend_Admin_Robots + * @var Mage_Backend_Model_Config_Backend_Admin_Robots */ protected $_model = null; @@ -37,8 +37,8 @@ class Mage_Adminhtml_Model_System_Config_Backend_Admin_RobotsTest extends PHPUni */ protected function setUp() { - /** @var _model Mage_Adminhtml_Model_System_Config_Backend_Admin_Robots */ - $this->_model = Mage::getModel('Mage_Adminhtml_Model_System_Config_Backend_Admin_Robots'); + /** @var _model Mage_Backend_Model_Config_Backend_Admin_Robots */ + $this->_model = Mage::getModel('Mage_Backend_Model_Config_Backend_Admin_Robots'); $this->_model->setPath('design/search_engine_robots/custom_instructions'); $this->_model->afterLoad(); } @@ -46,7 +46,7 @@ class Mage_Adminhtml_Model_System_Config_Backend_Admin_RobotsTest extends PHPUni /** * Check that default value is empty when robots.txt not exists * - * @magentoDataFixture Mage/Adminhtml/_files/no_robots_txt.php + * @magentoDataFixture Mage/Backend/Model/_files/no_robots_txt.php */ public function testAfterLoadRobotsTxtNotExists() { @@ -56,7 +56,7 @@ class Mage_Adminhtml_Model_System_Config_Backend_Admin_RobotsTest extends PHPUni /** * Check that default value equals to robots.txt content when it is available * - * @magentoDataFixture Mage/Adminhtml/_files/robots_txt.php + * @magentoDataFixture Mage/Backend/Model/_files/robots_txt.php */ public function testAfterLoadRobotsTxtExists() { @@ -79,7 +79,7 @@ class Mage_Adminhtml_Model_System_Config_Backend_Admin_RobotsTest extends PHPUni /** * Check robots.txt file changed when robots.txt exists * - * @magentoDataFixture Mage/Adminhtml/_files/robots_txt.php + * @magentoDataFixture Mage/Backend/Model/_files/robots_txt.php * @magentoDbIsolation enabled */ public function testAfterSaveFileExists() @@ -105,6 +105,6 @@ class Mage_Adminhtml_Model_System_Config_Backend_Admin_RobotsTest extends PHPUni */ protected function tearDown() { - require 'Mage/Adminhtml/_files/no_robots_txt.php'; + require 'Mage/Backend/Model/_files/no_robots_txt.php'; } } diff --git a/dev/tests/integration/testsuite/Mage/Adminhtml/Model/System/Config/Source/Admin/PageTest.php b/dev/tests/integration/testsuite/Mage/Backend/Model/Config/Source/Admin/PageTest.php similarity index 89% rename from dev/tests/integration/testsuite/Mage/Adminhtml/Model/System/Config/Source/Admin/PageTest.php rename to dev/tests/integration/testsuite/Mage/Backend/Model/Config/Source/Admin/PageTest.php index 548722468e289c0dd97aa44c30a2a60cf95c23b7..1018a208ef52f0eeb3907fe9c8e844812b63a279 100644 --- a/dev/tests/integration/testsuite/Mage/Adminhtml/Model/System/Config/Source/Admin/PageTest.php +++ b/dev/tests/integration/testsuite/Mage/Backend/Model/Config/Source/Admin/PageTest.php @@ -19,16 +19,16 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Magento - * @package Mage_Adminhtml + * @package Mage_Backend * @subpackage integration_tests * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ /** - * Test Mage_Adminhtml_Model_System_Config_Source_Admin_Page + * Test Mage_Backend_Model_Config_Source_Admin_Page */ -class Mage_Adminhtml_Model_System_Config_Source_Admin_PageTest extends Mage_Adminhtml_Utility_Controller +class Mage_Backend_Model_Config_Source_Admin_PageTest extends Mage_Adminhtml_Utility_Controller { public function testToOptionArray() { diff --git a/dev/tests/integration/testsuite/Mage/Adminhtml/Model/Config/DataTest.php b/dev/tests/integration/testsuite/Mage/Backend/Model/ConfigTest.php similarity index 75% rename from dev/tests/integration/testsuite/Mage/Adminhtml/Model/Config/DataTest.php rename to dev/tests/integration/testsuite/Mage/Backend/Model/ConfigTest.php index ceca6f1f187fc6ad86cf56ea78540ccb2a2b8c55..8dee554fe83faca759e55261dabaac0c9725907d 100644 --- a/dev/tests/integration/testsuite/Mage/Adminhtml/Model/Config/DataTest.php +++ b/dev/tests/integration/testsuite/Mage/Backend/Model/ConfigTest.php @@ -19,16 +19,16 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Magento - * @package Mage_Adminhtml + * @package Mage_Backend * @subpackage integration_tests * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ /** - * @group module:Mage_Adminhtml + * @group module:Mage_Backend */ -class Mage_Adminhtml_Model_Config_DataTest extends PHPUnit_Framework_TestCase +class Mage_Backend_Model_Config_DataTest extends PHPUnit_Framework_TestCase { /** * @param array $groups @@ -38,15 +38,14 @@ class Mage_Adminhtml_Model_Config_DataTest extends PHPUnit_Framework_TestCase */ public function testSaveWithSingleStoreModeEnabled($groups) { - /** @var $_configDataObject Mage_Adminhtml_Model_Config_Data */ - $_configDataObject = Mage::getModel('Mage_Adminhtml_Model_Config_Data'); + /** @var $_configDataObject Mage_Backend_Model_Config */ + $_configDataObject = Mage::getModel('Mage_Backend_Model_Config'); $_configData = $_configDataObject->setSection('dev') ->setWebsite('base') ->load(); $this->assertEmpty($_configData); - /** @var $_configDataObject Mage_Adminhtml_Model_Config_Data */ - $_configDataObject = Mage::getModel('Mage_Adminhtml_Model_Config_Data'); + $_configDataObject = Mage::getModel('Mage_Backend_Model_Config'); $_configDataObject->setSection('dev') ->setGroups($groups) ->save(); @@ -54,8 +53,8 @@ class Mage_Adminhtml_Model_Config_DataTest extends PHPUnit_Framework_TestCase Mage::getConfig()->reinit(); Mage::app()->reinitStores(); - /** @var $_configDataObject Mage_Adminhtml_Model_Config_Data */ - $_configDataObject = Mage::getModel('Mage_Adminhtml_Model_Config_Data'); + /** @var $_configDataObject Mage_Backend_Model_Config */ + $_configDataObject = Mage::getModel('Mage_Backend_Model_Config'); $_configDataObject->setSection('dev') ->setWebsite('base'); @@ -63,8 +62,7 @@ class Mage_Adminhtml_Model_Config_DataTest extends PHPUnit_Framework_TestCase $this->assertArrayHasKey('dev/debug/template_hints', $_configData); $this->assertArrayHasKey('dev/debug/template_hints_blocks', $_configData); - /** @var $_configDataObject Mage_Adminhtml_Model_Config_Data */ - $_configDataObject = Mage::getModel('Mage_Adminhtml_Model_Config_Data'); + $_configDataObject = Mage::getModel('Mage_Backend_Model_Config'); $_configDataObject->setSection('dev'); $_configData = $_configDataObject->load(); $this->assertArrayNotHasKey('dev/debug/template_hints', $_configData); diff --git a/dev/tests/integration/testsuite/Mage/Adminhtml/Model/Config/_files/config_groups.php b/dev/tests/integration/testsuite/Mage/Backend/Model/_files/config_groups.php similarity index 97% rename from dev/tests/integration/testsuite/Mage/Adminhtml/Model/Config/_files/config_groups.php rename to dev/tests/integration/testsuite/Mage/Backend/Model/_files/config_groups.php index 6c3e40e64a846b3730766e0eaac02602b2ab7799..422ada60830913f9e92cd7b94de024a3edc15134 100644 --- a/dev/tests/integration/testsuite/Mage/Adminhtml/Model/Config/_files/config_groups.php +++ b/dev/tests/integration/testsuite/Mage/Backend/Model/_files/config_groups.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Magento - * @package Mage_Adminhtml + * @package Mage_Backend * @subpackage integration_tests * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) @@ -37,4 +37,4 @@ return array(array('groups' => array( 'template_hints_blocks' => array('value' => '0'), ), ), -))); \ No newline at end of file +))); diff --git a/dev/tests/integration/testsuite/Mage/Adminhtml/_files/no_robots_txt.php b/dev/tests/integration/testsuite/Mage/Backend/Model/_files/no_robots_txt.php similarity index 100% rename from dev/tests/integration/testsuite/Mage/Adminhtml/_files/no_robots_txt.php rename to dev/tests/integration/testsuite/Mage/Backend/Model/_files/no_robots_txt.php diff --git a/dev/tests/integration/testsuite/Mage/Adminhtml/_files/robots.txt b/dev/tests/integration/testsuite/Mage/Backend/Model/_files/robots.txt similarity index 100% rename from dev/tests/integration/testsuite/Mage/Adminhtml/_files/robots.txt rename to dev/tests/integration/testsuite/Mage/Backend/Model/_files/robots.txt diff --git a/dev/tests/integration/testsuite/Mage/Adminhtml/_files/robots_txt.php b/dev/tests/integration/testsuite/Mage/Backend/Model/_files/robots_txt.php similarity index 100% rename from dev/tests/integration/testsuite/Mage/Adminhtml/_files/robots_txt.php rename to dev/tests/integration/testsuite/Mage/Backend/Model/_files/robots_txt.php diff --git a/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/System/ConfigControllerTest.php b/dev/tests/integration/testsuite/Mage/Backend/controllers/Adminhtml/System/ConfigControllerTest.php similarity index 90% rename from dev/tests/integration/testsuite/Mage/Adminhtml/controllers/System/ConfigControllerTest.php rename to dev/tests/integration/testsuite/Mage/Backend/controllers/Adminhtml/System/ConfigControllerTest.php index f3ac3864c9444f100b4a27b0640bba7995f3a02f..9a80c0e81cc138236d1d8807c1d658f524a576c7 100644 --- a/dev/tests/integration/testsuite/Mage/Adminhtml/controllers/System/ConfigControllerTest.php +++ b/dev/tests/integration/testsuite/Mage/Backend/controllers/Adminhtml/System/ConfigControllerTest.php @@ -19,13 +19,13 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Adminhtml + * @package Mage_Backend * @subpackage integration_tests * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Adminhtml_System_ConfigControllerTest extends Mage_Adminhtml_Utility_Controller +class Mage_Backend_Adminhtml_System_ConfigControllerTest extends Mage_Adminhtml_Utility_Controller { public function testEditAction() { diff --git a/dev/tests/integration/testsuite/Mage/Catalog/Model/DesignTest.php b/dev/tests/integration/testsuite/Mage/Catalog/Model/DesignTest.php index 43e36dc7b1a34591a1949c36caff021e0a27c5dd..d3e837065330542d80ea5245d2ba6e27c124e2ec 100644 --- a/dev/tests/integration/testsuite/Mage/Catalog/Model/DesignTest.php +++ b/dev/tests/integration/testsuite/Mage/Catalog/Model/DesignTest.php @@ -47,9 +47,8 @@ class Mage_Catalog_Model_DesignTest extends PHPUnit_Framework_TestCase public function testApplyCustomDesign() { - $this->_model->applyCustomDesign('package/theme/skin'); + $this->_model->applyCustomDesign('package/theme'); $this->assertEquals('package', Mage::getDesign()->getPackageName()); $this->assertEquals('theme', Mage::getDesign()->getTheme()); - $this->assertEquals('skin', Mage::getDesign()->getSkin()); } } diff --git a/dev/tests/integration/testsuite/Mage/Catalog/Model/Product/ImageTest.php b/dev/tests/integration/testsuite/Mage/Catalog/Model/Product/ImageTest.php index e153c54864ab636dd7f77c2d4d31db4b99018c17..8bd811b2450a577c912130f6ef73d316fe524b88 100644 --- a/dev/tests/integration/testsuite/Mage/Catalog/Model/Product/ImageTest.php +++ b/dev/tests/integration/testsuite/Mage/Catalog/Model/Product/ImageTest.php @@ -57,7 +57,7 @@ class Mage_Catalog_Model_Product_ImageTest extends PHPUnit_Framework_TestCase public function testGetUrlPlaceholder($model) { $this->assertStringMatchesFormat( - 'http://localhost/pub/media/skin/frontend/%s/Mage_Catalog/images/product/placeholder/image.jpg', + 'http://localhost/pub/media/theme/frontend/%s/Mage_Catalog/images/product/placeholder/image.jpg', $model->getUrl() ); } diff --git a/dev/tests/integration/testsuite/Mage/Catalog/_files/categories.php b/dev/tests/integration/testsuite/Mage/Catalog/_files/categories.php index 6c921adde2b8b415febde8de28a440de6450bb18..9521865cecd0437a0d3b4178f81c37989d892893 100644 --- a/dev/tests/integration/testsuite/Mage/Catalog/_files/categories.php +++ b/dev/tests/integration/testsuite/Mage/Catalog/_files/categories.php @@ -66,7 +66,7 @@ $category->setId(5) ->setIsActive(true) ->setPosition(2) ->setCustomUseParentSettings(0) - ->setCustomDesign('default/default/blue') + ->setCustomDesign('default/demo_blue') ->save(); $category = Mage::getModel('Mage_Catalog_Model_Category'); diff --git a/dev/tests/integration/testsuite/Mage/Catalog/_files/products.php b/dev/tests/integration/testsuite/Mage/Catalog/_files/products.php index b55992619ce0a2ff271df4f28a9d7c5c77793df2..d027a99b1f267779beae289e11f93b8986826523 100644 --- a/dev/tests/integration/testsuite/Mage/Catalog/_files/products.php +++ b/dev/tests/integration/testsuite/Mage/Catalog/_files/products.php @@ -48,5 +48,5 @@ $product->setTypeId('simple') ->save(); $customDesignProduct = Mage::getModel('Mage_Catalog_Model_Product', array('data' => $product->getData())); -$customDesignProduct->setId(2)->setCustomDesign('default/default/blue') +$customDesignProduct->setId(2)->setCustomDesign('default/demo_blue') ->save(); diff --git a/dev/tests/integration/testsuite/Mage/CatalogSearch/controllers/ResultControllerTest.php b/dev/tests/integration/testsuite/Mage/CatalogSearch/controllers/ResultControllerTest.php index 206a36472713d0557ac3b3f170e6712f63d37c5d..e4dbfee4acc60d1a73076114ae23bdabed670dab 100644 --- a/dev/tests/integration/testsuite/Mage/CatalogSearch/controllers/ResultControllerTest.php +++ b/dev/tests/integration/testsuite/Mage/CatalogSearch/controllers/ResultControllerTest.php @@ -29,7 +29,7 @@ class Mage_CatalogSearch_ResultControllerTest extends Magento_Test_TestCase_Cont { /** * @magentoDataFixture Mage/CatalogSearch/_files/query.php - * @magentoConfigFixture current_store design/theme/full_name default/default/default + * @magentoConfigFixture current_store design/theme/full_name default/demo * @magentoConfigFixture current_store general/locale/code de_DE */ public function testIndexActionTranslation() diff --git a/dev/tests/integration/testsuite/Mage/Cms/Controller/RouterTest.php b/dev/tests/integration/testsuite/Mage/Cms/Controller/RouterTest.php new file mode 100644 index 0000000000000000000000000000000000000000..a2bdf8e415e143b7e52f2466ef63e284851f32b6 --- /dev/null +++ b/dev/tests/integration/testsuite/Mage/Cms/Controller/RouterTest.php @@ -0,0 +1,75 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Magento + * @package Mage_Core + * @subpackage integration_tests + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +class Mage_Cms_Controller_RouterTest extends PHPUnit_Framework_TestCase +{ + /** + * @var Mage_Cms_Controller_Router + */ + protected $_model; + + protected function setUp() + { + $this->_model = new Mage_Cms_Controller_Router(new Mage_Core_Model_Event_ManagerStub()); + } + + /** + * @magentoAppIsolation enabled + */ + public function testMatch() + { + $request = new Zend_Controller_Request_Http(); + //Open Node + $request->setPathInfo('parent_node'); + $controller = $this->_model->match($request); + $this->assertInstanceOf('Mage_Core_Controller_Varien_Action_Redirect', $controller); + } +} + +/** + * Event manager stub + */ +class Mage_Core_Model_Event_ManagerStub extends Mage_Core_Model_Event_Manager +{ + /** + * Stub dispatch event + * + * @param string $eventName + * @param array $params + * @return Mage_Core_Model_App|null + */ + public function dispatch($eventName, $params) + { + switch ($eventName) { + case 'cms_controller_router_match_before' : + $params['condition']->setRedirectUrl('http://www.example.com/'); + break; + } + + return null; + } +} diff --git a/dev/tests/integration/testsuite/Mage/Cms/Helper/PageTest.php b/dev/tests/integration/testsuite/Mage/Cms/Helper/PageTest.php index 3fae663089c093cea23c75a26ee77c1565882551..c727c43d252d648e539cc3fccae43225ee794704 100644 --- a/dev/tests/integration/testsuite/Mage/Cms/Helper/PageTest.php +++ b/dev/tests/integration/testsuite/Mage/Cms/Helper/PageTest.php @@ -44,7 +44,7 @@ class Mage_Cms_Helper_PageTest extends PHPUnit_Framework_TestCase ), $page->getId() ); - $this->assertEquals('default/modern/default', Mage::getDesign()->getDesignTheme()); + $this->assertEquals('default/modern', Mage::getDesign()->getDesignTheme()); $this->assertTrue($result); } } diff --git a/dev/tests/integration/testsuite/Mage/Cms/Model/Wysiwyg/Images/StorageTest.php b/dev/tests/integration/testsuite/Mage/Cms/Model/Wysiwyg/Images/StorageTest.php index 02b5004579d38e2273244ce89645854f48446d5d..bfaf5fdc97c348c3ec3c0c5bed710e1429e1f98f 100644 --- a/dev/tests/integration/testsuite/Mage/Cms/Model/Wysiwyg/Images/StorageTest.php +++ b/dev/tests/integration/testsuite/Mage/Cms/Model/Wysiwyg/Images/StorageTest.php @@ -50,7 +50,7 @@ class Mage_Cms_Model_Wysiwyg_Images_StorageTest extends PHPUnit_Framework_TestCa */ public function testGetFilesCollection() { - Mage::getDesign()->setDesignTheme('default/default/default', 'adminhtml'); + Mage::getDesign()->setDesignTheme('default/basic', 'adminhtml'); /** @var $model Mage_Cms_Model_Wysiwyg_Images_Storage */ $model = Mage::getModel('Mage_Cms_Model_Wysiwyg_Images_Storage'); $collection = $model->getFilesCollection(self::$_baseDir, 'media'); @@ -59,7 +59,7 @@ class Mage_Cms_Model_Wysiwyg_Images_StorageTest extends PHPUnit_Framework_TestCa $this->assertInstanceOf('Varien_Object', $item); $this->assertStringEndsWith('/1.swf', $item->getUrl()); $this->assertStringMatchesFormat( - 'http://%s/media/skin/adminhtml/%s/%s/%s/%s/Mage_Cms/images/placeholder_thumbnail.jpg', + 'http://%s/media/theme/adminhtml/%s/%s/%s/Mage_Cms/images/placeholder_thumbnail.jpg', $item->getThumbUrl() ); return; diff --git a/dev/tests/integration/testsuite/Mage/Cms/_files/pages.php b/dev/tests/integration/testsuite/Mage/Cms/_files/pages.php index 488117a3d80212be9b8d66d20cb3d53de5889891..d3714f8ab0d10224c497d2437d5def7f6ab951eb 100644 --- a/dev/tests/integration/testsuite/Mage/Cms/_files/pages.php +++ b/dev/tests/integration/testsuite/Mage/Cms/_files/pages.php @@ -44,6 +44,6 @@ $page->setTitle('Cms Page Design Modern') ->setIsActive(1) ->setContent('<h1>Cms Page Design Modern Title</h1>') ->setRootTemplate('one_column') - ->setCustomTheme('default/modern/default') + ->setCustomTheme('default/modern') ->save() ; diff --git a/dev/tests/integration/testsuite/Mage/Core/Block/AbstractTest.php b/dev/tests/integration/testsuite/Mage/Core/Block/AbstractTest.php index b986001d09a38c4969b6e22d24cc2aa10cef0b7e..9269c00fe9e380e79991dc46f64fd3ada62f5d02 100644 --- a/dev/tests/integration/testsuite/Mage/Core/Block/AbstractTest.php +++ b/dev/tests/integration/testsuite/Mage/Core/Block/AbstractTest.php @@ -57,12 +57,14 @@ class Mage_Core_Block_AbstractTest extends PHPUnit_Framework_TestCase 'request' => Mage::getObjectManager()->create('Mage_Core_Controller_Request_Http', array(), false), 'layout' => Mage::getObjectManager()->create('Mage_Core_Model_Layout'), 'eventManager' => Mage::getObjectManager()->create('Mage_Core_Model_Event_Manager', array(), false), + 'urlBuilder' => Mage::getObjectManager()->create('Mage_Core_Model_Url', array(), false), 'translator' => Mage::getObjectManager()->create('Mage_Core_Model_Translate', array(), false), 'cache' => Mage::getObjectManager()->create('Mage_Core_Model_Cache', array(), false), 'designPackage' => Mage::getObjectManager()->get('Mage_Core_Model_Design_Package'), 'session' => Mage::getObjectManager()->create('Mage_Core_Model_Session', array(), false), 'storeConfig' => Mage::getObjectManager()->create('Mage_Core_Model_Store_Config', array(), false), 'frontController' => Mage::getObjectManager()->create('Mage_Core_Controller_Varien_Front', array(), false), + 'helperFactory' => Mage::getObjectManager()->create('Mage_Core_Model_Factory_Helper', array(), false), 'data' => array('module_name' => 'Mage_Core') ); } @@ -459,10 +461,10 @@ class Mage_Core_Block_AbstractTest extends PHPUnit_Framework_TestCase * * @magentoAppIsolation enabled */ - public function testGetSkinUrl() + public function testGetViewUrl() { - $this->assertStringStartsWith('http://localhost/pub/media/skin/frontend/', $this->_block->getSkinUrl()); - $this->assertStringEndsWith('css/styles.css', $this->_block->getSkinUrl('css/styles.css')); + $this->assertStringStartsWith('http://localhost/pub/media/theme/frontend/', $this->_block->getViewFileUrl()); + $this->assertStringEndsWith('css/styles.css', $this->_block->getViewFileUrl('css/styles.css')); } public function testGetSetMessagesBlock() @@ -617,7 +619,7 @@ class Mage_Core_Block_AbstractTest extends PHPUnit_Framework_TestCase public function testGetVar() { Mage::getConfig()->getOptions()->setDesignDir(dirname(__DIR__) . '/Model/_files/design'); - Mage::getDesign()->setDesignTheme('test/default/default'); + Mage::getDesign()->setDesignTheme('test/default'); $this->assertEquals('Core Value1', $this->_block->getVar('var1')); $this->assertEquals('value1', $this->_block->getVar('var1', 'Namespace_Module')); $this->_block->setModuleName('Namespace_Module'); diff --git a/dev/tests/integration/testsuite/Mage/Core/Block/TemplateTest.php b/dev/tests/integration/testsuite/Mage/Core/Block/TemplateTest.php index d881244350fdaa708efe53f659b17e301682edc4..19380d9a0879e0711ed01c0a0174514faf0880d3 100644 --- a/dev/tests/integration/testsuite/Mage/Core/Block/TemplateTest.php +++ b/dev/tests/integration/testsuite/Mage/Core/Block/TemplateTest.php @@ -61,6 +61,8 @@ class Mage_Core_Block_TemplateTest extends PHPUnit_Framework_TestCase } /** + * @magentoConfigFixture frontend/design/theme/full_name default/demo + * @magentoConfigFixture adminhtml/design/theme/full_name default/basic * @magentoAppIsolation enabled */ public function testGetTemplateFile() @@ -145,7 +147,7 @@ class Mage_Core_Block_TemplateTest extends PHPUnit_Framework_TestCase { $this->assertEmpty($this->_block->renderView()); Mage::app()->getConfig()->getOptions()->setDesignDir(__DIR__ . DIRECTORY_SEPARATOR . '_files'); - Mage::getDesign()->setDesignTheme('default/default/default'); + Mage::getDesign()->setDesignTheme('default/demo'); $this->_block->setTemplate('dummy.phtml'); $this->assertEquals('1234567890', $this->_block->renderView()); } diff --git a/dev/tests/integration/testsuite/Mage/Core/Block/_files/adminhtml/default/default/Mage_Core/dummy.phtml b/dev/tests/integration/testsuite/Mage/Core/Block/_files/adminhtml/default/basic/Mage_Core/dummy.phtml similarity index 100% rename from dev/tests/integration/testsuite/Mage/Core/Block/_files/adminhtml/default/default/Mage_Core/dummy.phtml rename to dev/tests/integration/testsuite/Mage/Core/Block/_files/adminhtml/default/basic/Mage_Core/dummy.phtml diff --git a/dev/tests/integration/testsuite/Mage/Core/Block/_files/frontend/default/default/theme.xml b/dev/tests/integration/testsuite/Mage/Core/Block/_files/adminhtml/default/basic/theme.xml similarity index 96% rename from dev/tests/integration/testsuite/Mage/Core/Block/_files/frontend/default/default/theme.xml rename to dev/tests/integration/testsuite/Mage/Core/Block/_files/adminhtml/default/basic/theme.xml index 10691d100126152d394251d9518bb1fc7e3669dd..0aeace273a6716b12e19d433340f55665a0359c1 100644 --- a/dev/tests/integration/testsuite/Mage/Core/Block/_files/frontend/default/default/theme.xml +++ b/dev/tests/integration/testsuite/Mage/Core/Block/_files/adminhtml/default/basic/theme.xml @@ -28,7 +28,7 @@ <design> <package code="default"> <title>Default</title> - <theme version="2.0.0.0" code="default"> + <theme version="2.0.0.0" code="basic"> <title>Default</title> <requirements> <magento_version from="2.0.0.0-dev1" to="*"/> diff --git a/dev/tests/integration/testsuite/Mage/Core/Block/_files/frontend/default/default/Mage_Core/dummy.phtml b/dev/tests/integration/testsuite/Mage/Core/Block/_files/frontend/default/demo/Mage_Core/dummy.phtml similarity index 100% rename from dev/tests/integration/testsuite/Mage/Core/Block/_files/frontend/default/default/Mage_Core/dummy.phtml rename to dev/tests/integration/testsuite/Mage/Core/Block/_files/frontend/default/demo/Mage_Core/dummy.phtml diff --git a/dev/tests/integration/testsuite/Mage/Core/Block/_files/adminhtml/default/default/theme.xml b/dev/tests/integration/testsuite/Mage/Core/Block/_files/frontend/default/demo/theme.xml similarity index 96% rename from dev/tests/integration/testsuite/Mage/Core/Block/_files/adminhtml/default/default/theme.xml rename to dev/tests/integration/testsuite/Mage/Core/Block/_files/frontend/default/demo/theme.xml index 10691d100126152d394251d9518bb1fc7e3669dd..6f36f244e42a2b0fad7986778e1ad9687ecb4026 100644 --- a/dev/tests/integration/testsuite/Mage/Core/Block/_files/adminhtml/default/default/theme.xml +++ b/dev/tests/integration/testsuite/Mage/Core/Block/_files/frontend/default/demo/theme.xml @@ -28,7 +28,7 @@ <design> <package code="default"> <title>Default</title> - <theme version="2.0.0.0" code="default"> + <theme version="2.0.0.0" code="demo"> <title>Default</title> <requirements> <magento_version from="2.0.0.0-dev1" to="*"/> diff --git a/dev/tests/integration/testsuite/Mage/Core/Controller/Varien/ActionTest.php b/dev/tests/integration/testsuite/Mage/Core/Controller/Varien/ActionTest.php index 1746d7a43ba2c1a33a00fd100c55f783ec174f2b..0844dc976913dd564dc91337ce5acaf089c4b598 100644 --- a/dev/tests/integration/testsuite/Mage/Core/Controller/Varien/ActionTest.php +++ b/dev/tests/integration/testsuite/Mage/Core/Controller/Varien/ActionTest.php @@ -276,9 +276,9 @@ class Mage_Core_Controller_Varien_ActionTest extends PHPUnit_Framework_TestCase } /** - * @magentoConfigFixture install/design/theme/full_name default/default/default - * @magentoConfigFixture adminhtml/design/theme/full_name default/default/default - * @magentoConfigFixture current_store design/theme/full_name default/iphone/default + * @magentoConfigFixture install/design/theme/full_name default/basic + * @magentoConfigFixture adminhtml/design/theme/full_name default/basic + * @magentoConfigFixture current_store design/theme/full_name default/demo * @magentoAppIsolation enabled * * @dataProvider controllerAreaDesignDataProvider @@ -309,9 +309,9 @@ class Mage_Core_Controller_Varien_ActionTest extends PHPUnit_Framework_TestCase public function controllerAreaDesignDataProvider() { return array( - 'install' => array('Mage_Install_Controller_Action', 'install', 'default', 'default/default/default'), - 'frontend' => array('Mage_Core_Controller_Front_Action', 'frontend', 'default', 'default/iphone/default'), - 'backend' => array('Mage_Adminhtml_Controller_Action', 'adminhtml', 'admin', 'default/default/default'), + 'install' => array('Mage_Install_Controller_Action', 'install', 'default', 'default/basic'), + 'frontend' => array('Mage_Core_Controller_Front_Action', 'frontend', 'default', 'default/demo'), + 'backend' => array('Mage_Adminhtml_Controller_Action', 'adminhtml', 'admin', 'default/basic'), 'api' => array('Mage_Api_Controller_Action', 'adminhtml', 'admin', ''), ); } diff --git a/dev/tests/integration/testsuite/Mage/Core/Helper/File/StorageTest.php b/dev/tests/integration/testsuite/Mage/Core/Helper/File/StorageTest.php new file mode 100644 index 0000000000000000000000000000000000000000..6f41dcfb5d38d87f7ae6ba89f41a81bfe9c2ba16 --- /dev/null +++ b/dev/tests/integration/testsuite/Mage/Core/Helper/File/StorageTest.php @@ -0,0 +1,84 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Magento + * @package Mage_Core + * @subpackage integration_tests + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +class Mage_Core_Helper_File_StorageTest extends PHPUnit_Framework_TestCase +{ + /** + * @var Mage_Core_Helper_File_Storage + */ + protected $_helper; + + public function setUp() + { + $this->_helper = Mage::helper('Mage_Core_Helper_File_Storage'); + } + + protected function tearDown() + { + $this->_helper = null; + } + + /** + * @covers Mage_Core_Helper_File_Storage::getMaxFileSize + * @backupStaticAttributes + */ + public function testGetMaxFileSize() + { + $this->assertGreaterThanOrEqual(0, $this->_helper->getMaxFileSize()); + $this->assertGreaterThanOrEqual(0, $this->_helper->getMaxFileSizeInMb()); + } + + /** + * @covers Mage_Core_Helper_File_Storage::_convertIniToInteger + * @dataProvider getConvertIniToIntegerDataProvider + * @backupStaticAttributes + * @param string $arguments + * @param int $expected + */ + public function testConvertIniToInteger($arguments, $expected) + { + $class = new ReflectionClass('Mage_Core_Helper_File_Storage'); + $method = $class->getMethod('_convertIniToInteger'); + $method->setAccessible(true); + $this->assertEquals($expected, $method->invokeArgs($this->_helper, array($arguments))); + } + + /** + * @return array + */ + public function getConvertIniToIntegerDataProvider() + { + return array( + array('0K', 0), + array('123K', 125952), + array('1K', 1024), + array('1g', 1073741824), + array('asdas', 0), + array('1M', 1048576), + ); + } +} diff --git a/dev/tests/integration/testsuite/Mage/Core/Helper/JsTest.php b/dev/tests/integration/testsuite/Mage/Core/Helper/JsTest.php index 52178c07507727c66cc661300b96f7381a14413d..63312f823446c290e45d12569cb3c3249c2a5ffe 100644 --- a/dev/tests/integration/testsuite/Mage/Core/Helper/JsTest.php +++ b/dev/tests/integration/testsuite/Mage/Core/Helper/JsTest.php @@ -72,7 +72,7 @@ class Mage_Core_Helper_JsTest extends PHPUnit_Framework_TestCase $this->_helper->includeScript(self::FILE) ); $script = '<script type="text/javascript" ' - . 'src="http://localhost/pub/media/skin/frontend/%s/%s/%s/%s/images/spacer.gif"></script>'; + . 'src="http://localhost/pub/media/theme/frontend/%s/%s/%s/images/spacer.gif"></script>'; $this->assertStringMatchesFormat($script, $this->_helper->includeScript('images/spacer.gif')); } } diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/App/AreaTest.php b/dev/tests/integration/testsuite/Mage/Core/Model/App/AreaTest.php index 9da733dc79f91ed54e7a750f9b42353ec9a45397..696cb5b38da2d8c2a278172adb176db1785fb2a5 100644 --- a/dev/tests/integration/testsuite/Mage/Core/Model/App/AreaTest.php +++ b/dev/tests/integration/testsuite/Mage/Core/Model/App/AreaTest.php @@ -50,7 +50,7 @@ class Mage_Core_Model_App_AreaTest extends PHPUnit_Framework_TestCase { $this->_model->load(Mage_Core_Model_App_Area::PART_DESIGN); $design = Mage::getDesign(); - $this->assertEquals('default/default/default', $design->getDesignTheme()); + $this->assertEquals('default/demo', $design->getDesignTheme()); $this->assertEquals('frontend', $design->getArea()); // try second time and make sure it won't load second time @@ -59,29 +59,29 @@ class Mage_Core_Model_App_AreaTest extends PHPUnit_Framework_TestCase } /** - * @magentoConfigFixture adminhtml/design/theme/full_name default/default/default + * @magentoConfigFixture adminhtml/design/theme/full_name default/demo * @magentoAppIsolation enabled */ public function testDetectDesignGlobalConfig() { $model = Mage::getModel('Mage_Core_Model_App_Area', array('areaCode' => 'adminhtml')); $model->detectDesign(); - $this->assertEquals('default/default/default', Mage::getDesign()->getDesignTheme()); + $this->assertEquals('default/demo', Mage::getDesign()->getDesignTheme()); } /** - * @magentoConfigFixture current_store design/theme/full_name default/default/blank + * @magentoConfigFixture current_store design/theme/full_name default/blank * @magentoAppIsolation enabled */ public function testDetectDesignStoreConfig() { $this->_model->detectDesign(); - $this->assertEquals('default/default/blank', Mage::getDesign()->getDesignTheme()); + $this->assertEquals('default/blank', Mage::getDesign()->getDesignTheme()); } // @codingStandardsIgnoreStart /** - * @magentoConfigFixture current_store design/theme/ua_regexp a:1:{s:1:"_";a:2:{s:6:"regexp";s:10:"/firefox/i";s:5:"value";s:22:"default/modern/default";}} + * @magentoConfigFixture current_store design/theme/ua_regexp a:1:{s:1:"_";a:2:{s:6:"regexp";s:10:"/firefox/i";s:5:"value";s:14:"default/modern";}} * @magentoAppIsolation enabled */ // @codingStandardsIgnoreEnd @@ -89,7 +89,7 @@ class Mage_Core_Model_App_AreaTest extends PHPUnit_Framework_TestCase { $_SERVER['HTTP_USER_AGENT'] = 'Mozilla Firefox'; $this->_model->detectDesign(new Zend_Controller_Request_Http); - $this->assertEquals('default/modern/default', Mage::getDesign()->getDesignTheme()); + $this->assertEquals('default/modern', Mage::getDesign()->getDesignTheme()); } /** @@ -99,14 +99,14 @@ class Mage_Core_Model_App_AreaTest extends PHPUnit_Framework_TestCase public function testDetectDesignDesignChange() { $this->_model->detectDesign(); - $this->assertEquals('default/modern/default', Mage::getDesign()->getDesignTheme()); + $this->assertEquals('default/modern', Mage::getDesign()->getDesignTheme()); } // @codingStandardsIgnoreStart /** * Test that non-frontend areas are not affected neither by user-agent reg expressions, nor by the "design change" * - * @magentoConfigFixture current_store design/theme/ua_regexp a:1:{s:1:"_";a:2:{s:6:"regexp";s:10:"/firefox/i";s:5:"value";s:22:"default/modern/default";}} + * @magentoConfigFixture current_store design/theme/ua_regexp a:1:{s:1:"_";a:2:{s:6:"regexp";s:10:"/firefox/i";s:5:"value";s:22:"default/modern";}} * magentoDataFixture Mage/Core/_files/design_change.php * @magentoAppIsolation enabled */ @@ -116,7 +116,7 @@ class Mage_Core_Model_App_AreaTest extends PHPUnit_Framework_TestCase $_SERVER['HTTP_USER_AGENT'] = 'Mozilla Firefox'; $model = Mage::getModel('Mage_Core_Model_App_Area', array('areaCode' => 'install')); $model->detectDesign(new Zend_Controller_Request_Http); - $this->assertNotEquals('default/modern/default', Mage::getDesign()->getDesignTheme()); - $this->assertNotEquals('default/default/blue', Mage::getDesign()->getDesignTheme()); + $this->assertNotEquals('default/modern', Mage::getDesign()->getDesignTheme()); + $this->assertNotEquals('default/demo_blue', Mage::getDesign()->getDesignTheme()); } } diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/Config/DataTest.php b/dev/tests/integration/testsuite/Mage/Core/Model/Config/DataTest.php index 9851669c428b484bd587bf312046789cdd2ec3bd..9c6147bbbc0c94a66276fdb7c8101200b063038a 100644 --- a/dev/tests/integration/testsuite/Mage/Core/Model/Config/DataTest.php +++ b/dev/tests/integration/testsuite/Mage/Core/Model/Config/DataTest.php @@ -58,7 +58,7 @@ class Mage_Core_Model_Config_DataTest extends PHPUnit_Framework_TestCase protected static function _refreshConfiguration() { Mage::app()->cleanCache(array(Mage_Core_Model_Config::CACHE_TAG)); - Magento_Test_Bootstrap::getInstance()->initialize(); + Magento_Test_Bootstrap::getInstance()->reinitialize(); } protected function setUp() diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/Config/OptionsTest.php b/dev/tests/integration/testsuite/Mage/Core/Model/Config/OptionsTest.php index 7b402f696c5f54003dd57f6f5d5dc1c367c10645..f08153a8a93345aaa0cdcbeafe90759ac2d172ac 100644 --- a/dev/tests/integration/testsuite/Mage/Core/Model/Config/OptionsTest.php +++ b/dev/tests/integration/testsuite/Mage/Core/Model/Config/OptionsTest.php @@ -103,7 +103,6 @@ class Mage_Core_Model_Config_OptionsTest extends PHPUnit_Framework_TestCase * @covers Mage_Core_Model_Config_Options::getSessionDir * @covers Mage_Core_Model_Config_Options::getUploadDir * @covers Mage_Core_Model_Config_Options::getExportDir - * @covers Mage_Core_Model_Config_Options::getSkinDir * @dataProvider getGettersDataProvider * @param string $method * @param string $message diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/Design/Backend/ExceptionsTest.php b/dev/tests/integration/testsuite/Mage/Core/Model/Design/Backend/ExceptionsTest.php index 3e33061e700338fc3e4a0bee640a81d772f5b738..ffe6eb94448e7c3e386cbed6a9315ebca4e3cbb5 100644 --- a/dev/tests/integration/testsuite/Mage/Core/Model/Design/Backend/ExceptionsTest.php +++ b/dev/tests/integration/testsuite/Mage/Core/Model/Design/Backend/ExceptionsTest.php @@ -52,8 +52,8 @@ class Mage_Core_Model_Design_Backend_ExceptionsTest extends PHPUnit_Framework_Te public function testSaveValueIsFormedNicely() { $value = array( - '1' => array('search' => '/Opera/', 'value' => 'default/default/blank'), - '2' => array('search' => '/Firefox/', 'value' => 'default/default/blank') + '1' => array('search' => '/Opera/', 'value' => 'default/blank'), + '2' => array('search' => '/Firefox/', 'value' => 'default/blank') ); $this->_model->setValue($value); @@ -74,9 +74,9 @@ class Mage_Core_Model_Design_Backend_ExceptionsTest extends PHPUnit_Framework_Te public function testSaveEmptyValueIsSkipped() { $value = array( - '1' => array('search' => '/Opera/', 'value' => 'default/default/blank'), - '2' => array('search' => '', 'value' => 'default/default/blank'), - '3' => array('search' => '/Firefox/', 'value' => 'default/default/blank') + '1' => array('search' => '/Opera/', 'value' => 'default/blank'), + '2' => array('search' => '', 'value' => 'default/blank'), + '3' => array('search' => '/Firefox/', 'value' => 'default/blank') ); $this->_model->setValue($value); @@ -109,19 +109,19 @@ class Mage_Core_Model_Design_Backend_ExceptionsTest extends PHPUnit_Framework_Te { $result = array( array( - array('search' => 'Opera', 'value' => 'default/default/blank'), + array('search' => 'Opera', 'value' => 'default/blank'), '/Opera/i' ), array( - array('search' => '/Opera/', 'value' => 'default/default/blank'), + array('search' => '/Opera/', 'value' => 'default/blank'), '/Opera/' ), array( - array('search' => '#iPad|iPhone#i', 'value' => 'default/default/blank'), + array('search' => '#iPad|iPhone#i', 'value' => 'default/blank'), '#iPad|iPhone#i' ), array( - array('search' => 'Mozilla (3.6+)/Firefox', 'value' => 'default/default/blank'), + array('search' => 'Mozilla (3.6+)/Firefox', 'value' => 'default/blank'), '/Mozilla \\(3\\.6\\+\\)\\/Firefox/i' ) ); @@ -148,32 +148,32 @@ class Mage_Core_Model_Design_Backend_ExceptionsTest extends PHPUnit_Framework_Te { $result = array( array(array( - '1' => array('search' => '/Opera/', 'value' => 'default/default/blank'), - '2' => array('search' => '/invalid_regexp(/', 'value' => 'default/default/blank'), + '1' => array('search' => '/Opera/', 'value' => 'default/blank'), + '2' => array('search' => '/invalid_regexp(/', 'value' => 'default/blank'), )), array(array( - '1' => array('search' => '/invalid_regexp', 'value' => 'default/default/blank'), - '2' => array('search' => '/Opera/', 'value' => 'default/default/blank'), + '1' => array('search' => '/invalid_regexp', 'value' => 'default/blank'), + '2' => array('search' => '/Opera/', 'value' => 'default/blank'), )), array(array( - '1' => array('search' => 'invalid_regexp/iU', 'value' => 'default/default/blank'), - '2' => array('search' => '/Opera/', 'value' => 'default/default/blank'), + '1' => array('search' => 'invalid_regexp/iU', 'value' => 'default/blank'), + '2' => array('search' => '/Opera/', 'value' => 'default/blank'), )), array(array( - '1' => array('search' => 'invalid_regexp#', 'value' => 'default/default/blank'), - '2' => array('search' => '/Opera/', 'value' => 'default/default/blank'), + '1' => array('search' => 'invalid_regexp#', 'value' => 'default/blank'), + '2' => array('search' => '/Opera/', 'value' => 'default/blank'), )), array(array( - '1' => array('search' => '/Firefox/', 'value' => 'default/default/blank'), + '1' => array('search' => '/Firefox/', 'value' => 'default/blank'), '2' => array('search' => '/Opera/', 'value' => 'invalid_design'), )), array(array( '1' => array('search' => '/Firefox/'), - '2' => array('search' => '/Opera/', 'value' => 'default/default/blank'), + '2' => array('search' => '/Opera/', 'value' => 'default/blank'), )), array(array( '1' => array('value' => 'default/default/blank'), - '2' => array('search' => '/Opera/', 'value' => 'default/default/blank'), + '2' => array('search' => '/Opera/', 'value' => 'default/blank'), )) ); diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/Design/PackageFallbackTest.php b/dev/tests/integration/testsuite/Mage/Core/Model/Design/PackageFallbackTest.php index 7a8da79f0578451389dea5c145b3e6b4e745cc98..7dc9ebb32211c7b2ebcbc25b4b8f18db8a41ebbe 100644 --- a/dev/tests/integration/testsuite/Mage/Core/Model/Design/PackageFallbackTest.php +++ b/dev/tests/integration/testsuite/Mage/Core/Model/Design/PackageFallbackTest.php @@ -45,7 +45,7 @@ class Mage_Core_Model_Design_PackageFallbackTest extends PHPUnit_Framework_TestC protected function setUp() { $this->_model = Mage::getModel('Mage_Core_Model_Design_Package'); - $this->_model->setDesignTheme('test/default/default', 'frontend'); + $this->_model->setDesignTheme('test/default', 'frontend'); } protected function tearDown() @@ -67,15 +67,14 @@ class Mage_Core_Model_Design_PackageFallbackTest extends PHPUnit_Framework_TestC $this->_testExpectedVersusActualFilename($expected, $actual); } - public function testGetSkinFile() + public function testGetViewFile() { - $expected = '%s/frontend/package/custom_theme/skin/theme_nested_skin/Fixture_Module/fixture_script.js'; + $expected = '%s/frontend/package/custom_theme/Fixture_Module/fixture_script.js'; $params = array( 'package' => 'package', - 'theme' => 'custom_theme', - 'skin' => 'theme_nested_skin' + 'theme' => 'custom_theme' ); - $actual = $this->_model->getSkinFile('Fixture_Module::fixture_script.js', $params); + $actual = $this->_model->getViewFile('Fixture_Module::fixture_script.js', $params); $this->_testExpectedVersusActualFilename($expected, $actual); } diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/Design/PackageMergingTest.php b/dev/tests/integration/testsuite/Mage/Core/Model/Design/PackageMergingTest.php index 4c79e51e221521ce9962068951626c1c02e9482c..64a7216fcd8fd7e7588da2fb86d4376fb62bcc51 100644 --- a/dev/tests/integration/testsuite/Mage/Core/Model/Design/PackageMergingTest.php +++ b/dev/tests/integration/testsuite/Mage/Core/Model/Design/PackageMergingTest.php @@ -28,18 +28,18 @@ class Mage_Core_Model_Design_PackageMergingTest extends PHPUnit_Framework_TestCase { /** - * Path to the public directory for skin files + * Path to the public directory for view files * * @var string */ - protected static $_skinPublicDir; + protected static $_themePublicDir; /** - * Path to the public directory for merged skin files + * Path to the public directory for merged view files * * @var string */ - protected static $_skinPublicMergedDir; + protected static $_viewPublicMergedDir; /** * @var Mage_Core_Model_Design_Package @@ -48,8 +48,8 @@ class Mage_Core_Model_Design_PackageMergingTest extends PHPUnit_Framework_TestCa public static function setUpBeforeClass() { - self::$_skinPublicDir = Mage::app()->getConfig()->getOptions()->getMediaDir() . '/skin'; - self::$_skinPublicMergedDir = self::$_skinPublicDir . '/_merged'; + self::$_themePublicDir = Mage::app()->getConfig()->getOptions()->getMediaDir() . '/theme'; + self::$_viewPublicMergedDir = self::$_themePublicDir . '/_merged'; } protected function setUp() @@ -59,12 +59,12 @@ class Mage_Core_Model_Design_PackageMergingTest extends PHPUnit_Framework_TestCa ); $this->_model = Mage::getModel('Mage_Core_Model_Design_Package'); - $this->_model->setDesignTheme('package/default/theme', 'frontend'); + $this->_model->setDesignTheme('package/default', 'frontend'); } protected function tearDown() { - Varien_Io_File::rmdirRecursive(self::$_skinPublicDir); + Varien_Io_File::rmdirRecursive(self::$_themePublicDir); $this->_model = null; } @@ -103,7 +103,7 @@ class Mage_Core_Model_Design_PackageMergingTest extends PHPUnit_Framework_TestCa $this->assertEquals($expectedFilename, basename($result[0])); foreach ($related as $file) { $this->assertFileExists( - self::$_skinPublicDir . '/frontend/package/default/theme/en_US/' . $file + self::$_themePublicDir . '/frontend/package/default/en_US/' . $file ); } } @@ -139,7 +139,7 @@ class Mage_Core_Model_Design_PackageMergingTest extends PHPUnit_Framework_TestCa $this->assertGreaterThan(1970, date('Y', $lastModified[1])); foreach ($related as $file) { $this->assertFileExists( - self::$_skinPublicDir . '/frontend/package/default/theme/en_US/' . $file + self::$_themePublicDir . '/frontend/package/default/en_US/' . $file ); } } @@ -156,7 +156,7 @@ class Mage_Core_Model_Design_PackageMergingTest extends PHPUnit_Framework_TestCa 'mage/calendar.css', 'css/file.css', ), - '16f3dae4a78f603c9afa37606b0f51e7.css', + '62f590d4535f5dca8e3d7923161eb5f4.css', array( 'css/file.css', 'recursive.css', @@ -177,7 +177,7 @@ class Mage_Core_Model_Design_PackageMergingTest extends PHPUnit_Framework_TestCa 'mage/calendar.js', 'scripts.js', ), - 'e97b02be13928ce72066d99a4b967d41.js', + '8fa0d695232b6117977c2b29c34e5901.js', ), ); } @@ -193,7 +193,7 @@ class Mage_Core_Model_Design_PackageMergingTest extends PHPUnit_Framework_TestCa 'scripts.js', ); - $resultingFile = self::$_skinPublicMergedDir . '/e97b02be13928ce72066d99a4b967d41.js'; + $resultingFile = self::$_viewPublicMergedDir . '/8fa0d695232b6117977c2b29c34e5901.js'; $this->assertFileNotExists($resultingFile); // merge first time @@ -208,15 +208,15 @@ class Mage_Core_Model_Design_PackageMergingTest extends PHPUnit_Framework_TestCa */ public function testCleanMergedJsCss() { - $this->assertFileNotExists(self::$_skinPublicMergedDir); + $this->assertFileNotExists(self::$_viewPublicMergedDir); $this->_model->getOptimalJsUrls(array( 'mage/calendar.js', 'scripts.js', )); - $this->assertFileExists(self::$_skinPublicMergedDir); + $this->assertFileExists(self::$_viewPublicMergedDir); $filesFound = false; - foreach (new RecursiveDirectoryIterator(self::$_skinPublicMergedDir) as $fileInfo) { + foreach (new RecursiveDirectoryIterator(self::$_viewPublicMergedDir) as $fileInfo) { if ($fileInfo->isFile()) { $filesFound = true; break; @@ -225,6 +225,6 @@ class Mage_Core_Model_Design_PackageMergingTest extends PHPUnit_Framework_TestCa $this->assertTrue($filesFound, 'No files found in the merged directory.'); $this->_model->cleanMergedJsCss(); - $this->assertFileNotExists(self::$_skinPublicMergedDir); + $this->assertFileNotExists(self::$_viewPublicMergedDir); } } diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/Design/PackagePublicationTest.php b/dev/tests/integration/testsuite/Mage/Core/Model/Design/PackagePublicationTest.php index cce55904d99a632b78257997e00f2d81bd9bbdf3..fc42c6548f44932531ff6458e4026bc00ceaa13a 100644 --- a/dev/tests/integration/testsuite/Mage/Core/Model/Design/PackagePublicationTest.php +++ b/dev/tests/integration/testsuite/Mage/Core/Model/Design/PackagePublicationTest.php @@ -28,11 +28,11 @@ class Mage_Core_Model_Design_PackagePublicationTest extends PHPUnit_Framework_TestCase { /** - * Path to the public directory for skin files + * Path to the public directory for view files * * @var string */ - protected static $_skinPublicDir; + protected static $_themePublicDir; /** * Path for temporary fixture files. Used to test publishing changed files. @@ -48,7 +48,7 @@ class Mage_Core_Model_Design_PackagePublicationTest extends PHPUnit_Framework_Te public static function setUpBeforeClass() { - self::$_skinPublicDir = Mage::app()->getConfig()->getOptions()->getMediaDir() . '/skin'; + self::$_themePublicDir = Mage::app()->getConfig()->getOptions()->getMediaDir() . '/theme'; self::$_fixtureTmpDir = Magento_Test_Bootstrap::getInstance()->getTmpDir() . '/publication'; } @@ -59,12 +59,12 @@ class Mage_Core_Model_Design_PackagePublicationTest extends PHPUnit_Framework_Te ); $this->_model = Mage::getModel('Mage_Core_Model_Design_Package'); - $this->_model->setDesignTheme('test/default/default', 'frontend'); + $this->_model->setDesignTheme('test/default', 'frontend'); } protected function tearDown() { - Varien_Io_File::rmdirRecursive(self::$_skinPublicDir); + Varien_Io_File::rmdirRecursive(self::$_themePublicDir); Varien_Io_File::rmdirRecursive(self::$_fixtureTmpDir); $this->_model = null; } @@ -72,55 +72,55 @@ class Mage_Core_Model_Design_PackagePublicationTest extends PHPUnit_Framework_Te /** * @magentoAppIsolation enabled */ - public function testGetPublicSkinDir() + public function testGetPublicThemeDir() { Mage::app()->getConfig()->getOptions()->setMediaDir(__DIR__); - $this->assertEquals(__DIR__ . DIRECTORY_SEPARATOR . 'skin', $this->_model->getPublicSkinDir()); + $this->assertEquals(__DIR__ . DIRECTORY_SEPARATOR . 'theme', $this->_model->getPublicDir()); } /** - * Test that URL for a skin file meets expectations + * Test that URL for a view file meets expectations * * @param string $file * @param string $expectedUrl * @param string|null $locale */ - protected function _testGetSkinUrl($file, $expectedUrl, $locale = null) + protected function _testGetViewUrl($file, $expectedUrl, $locale = null) { Mage::app()->getLocale()->setLocale($locale); - $url = $this->_model->getSkinUrl($file); + $url = $this->_model->getViewFileUrl($file); $this->assertStringEndsWith($expectedUrl, $url); - $skinFile = $this->_model->getSkinFile($file); - $this->assertFileExists($skinFile); + $viewFile = $this->_model->getViewFile($file); + $this->assertFileExists($viewFile); } /** - * @magentoConfigFixture default/design/theme/allow_skin_files_duplication 1 - * @dataProvider getSkinUrlFilesDuplicationDataProvider + * @magentoConfigFixture default/design/theme/allow_view_files_duplication 1 + * @dataProvider getViewUrlFilesDuplicationDataProvider */ - public function testGetSkinUrlFilesDuplication($file, $expectedUrl, $locale = null) + public function testGetViewUrlFilesDuplication($file, $expectedUrl, $locale = null) { - $this->_testGetSkinUrl($file, $expectedUrl, $locale); + $this->_testGetViewUrl($file, $expectedUrl, $locale); } /** * @return array */ - public function getSkinUrlFilesDuplicationDataProvider() + public function getViewUrlFilesDuplicationDataProvider() { return array( 'theme file' => array( 'css/styles.css', - 'skin/frontend/test/default/default/en_US/css/styles.css', + 'theme/frontend/test/default/en_US/css/styles.css', ), 'theme localized file' => array( 'logo.gif', - 'skin/frontend/test/default/default/fr_FR/logo.gif', + 'theme/frontend/test/default/fr_FR/logo.gif', 'fr_FR', ), 'modular file' => array( 'Module::favicon.ico', - 'skin/frontend/test/default/default/en_US/Module/favicon.ico', + 'theme/frontend/test/default/en_US/Module/favicon.ico', ), 'lib file' => array( 'varien/product.js', @@ -134,54 +134,54 @@ class Mage_Core_Model_Design_PackagePublicationTest extends PHPUnit_Framework_Te } /** - * @magentoConfigFixture default/design/theme/allow_skin_files_duplication 0 - * @dataProvider testGetSkinUrlNoFilesDuplicationDataProvider + * @magentoConfigFixture default/design/theme/allow_view_files_duplication 0 + * @dataProvider testGetViewUrlNoFilesDuplicationDataProvider */ - public function testGetSkinUrlNoFilesDuplication($file, $expectedUrl, $locale = null) + public function testGetViewUrlNoFilesDuplication($file, $expectedUrl, $locale = null) { - $this->_testGetSkinUrl($file, $expectedUrl, $locale); + $this->_testGetViewUrl($file, $expectedUrl, $locale); } /** * @return array */ - public function testGetSkinUrlNoFilesDuplicationDataProvider() + public function testGetViewUrlNoFilesDuplicationDataProvider() { return array( 'theme css file' => array( 'css/styles.css', - 'skin/frontend/test/default/default/en_US/css/styles.css', + 'theme/frontend/test/default/en_US/css/styles.css', ), 'theme file' => array( 'images/logo.gif', - 'skin/frontend/test/default/skin/default/images/logo.gif', + 'theme/frontend/test/default/images/logo.gif', ), 'theme localized file' => array( 'logo.gif', - 'skin/frontend/test/default/skin/default/locale/fr_FR/logo.gif', + 'theme/frontend/test/default/locale/fr_FR/logo.gif', 'fr_FR', ) ); } /** - * @magentoConfigFixture default/design/theme/allow_skin_files_duplication 0 + * @magentoConfigFixture default/design/theme/allow_view_files_duplication 0 */ - public function testGetSkinUrlNoFilesDuplicationWithCaching() + public function testGetViewUrlNoFilesDuplicationWithCaching() { Mage::app()->getLocale()->setLocale('en_US'); - $skinParams = array('package' => 'test', 'theme' => 'default', 'skin' => 'default'); - $cacheKey = 'frontend/test/default/default/en_US'; + $themeDesignParams = array('package' => 'test', 'theme' => 'default'); + $cacheKey = 'frontend/test/default/en_US'; Mage::app()->cleanCache(); - $skinFile = 'images/logo.gif'; - $this->_model->getSkinUrl($skinFile, $skinParams); + $viewFile = 'images/logo.gif'; + $this->_model->getViewFileUrl($viewFile, $themeDesignParams); $map = unserialize(Mage::app()->loadCache($cacheKey)); $this->assertTrue(count($map) == 1); $this->assertStringEndsWith('logo.gif', (string)array_pop($map)); - $skinFile = 'images/logo_email.gif'; - $this->_model->getSkinUrl($skinFile, $skinParams); + $viewFile = 'images/logo_email.gif'; + $this->_model->getViewFileUrl($viewFile, $themeDesignParams); $map = unserialize(Mage::app()->loadCache($cacheKey)); $this->assertTrue(count($map) == 2); $this->assertStringEndsWith('logo_email.gif', (string)array_pop($map)); @@ -190,17 +190,17 @@ class Mage_Core_Model_Design_PackagePublicationTest extends PHPUnit_Framework_Te /** * @param string $file * @expectedException Magento_Exception - * @dataProvider getSkinUrlDataExceptionProvider + * @dataProvider getViewUrlDataExceptionProvider */ - public function testGetSkinUrlException($file) + public function testGetViewUrlException($file) { - $this->_model->getSkinUrl($file); + $this->_model->getViewFileUrl($file); } /** * @return array */ - public function getSkinUrlDataExceptionProvider() + public function getViewUrlDataExceptionProvider() { return array( 'non-existing theme file' => array('path/to/non-existing-file.ext'), @@ -209,27 +209,65 @@ class Mage_Core_Model_Design_PackagePublicationTest extends PHPUnit_Framework_Te } /** - * Publication of skin files in development mode + * Test on vulnerability for protected files + * + * @expectedException Magento_Exception + * @dataProvider getProtectedFiles + * @param array $designParams + * @param string $filePath + */ + public function testTemplatePublicationVulnerability($designParams, $filePath) + { + $this->_model->getViewFileUrl($filePath, $designParams); + } + + /** + * Return files, which are not published + * + * @return array + */ + public function getProtectedFiles() + { + return array( + array( + array('area' => 'frontend', 'package' => 'package', 'theme' => 'default'), + 'access_violation.php' + ), + array( + array('area' => 'frontend', 'package' => 'package', 'theme' => 'default'), + 'theme.xml' + ), + array( + array('area' => 'frontend', 'package' => 'test', 'theme' => 'default', 'module' => 'Mage_Catalog'), + 'layout.xml' + ), + array( + array('area' => 'frontend', 'package' => 'test', 'theme' => 'default', 'module' => 'Mage_Core'), + 'test.phtml' + ), + ); + } + + + /** + * Publication of view files in development mode * - * @param string $application - * @param string $package - * @param string $theme - * @param string $skin * @param string $file + * @param $designParams * @param string $expectedFile - * @dataProvider publishSkinFileDataProvider + * @dataProvider publishViewFileDataProvider */ - public function testPublishSkinFile($file, $designParams, $expectedFile) + public function testPublishViewFile($file, $designParams, $expectedFile) { - $expectedFile = self::$_skinPublicDir . '/' . $expectedFile; + $expectedFile = self::$_themePublicDir . '/' . $expectedFile; // test doesn't make sense if the original file doesn't exist or the target file already exists - $originalFile = $this->_model->getSkinFile($file, $designParams); + $originalFile = $this->_model->getViewFile($file, $designParams); $this->assertFileExists($originalFile); - // getSkinUrl() will trigger publication in development mode + // getViewUrl() will trigger publication in development mode $this->assertFileNotExists($expectedFile, 'Please verify isolation from previous test(s).'); - $this->_model->getSkinUrl($file, $designParams); + $this->_model->getViewFileUrl($file, $designParams); $this->assertFileExists($expectedFile); // as soon as the files are published, they must have the same mtime as originals @@ -241,24 +279,23 @@ class Mage_Core_Model_Design_PackagePublicationTest extends PHPUnit_Framework_Te /** * @return array */ - public function publishSkinFileDataProvider() + public function publishViewFileDataProvider() { $designParams = array( 'area' => 'frontend', 'package' => 'test', 'theme' => 'default', - 'skin' => 'default', ); return array( - 'skin file' => array( + 'view file' => array( 'images/logo_email.gif', $designParams, - 'frontend/test/default/default/en_US/images/logo_email.gif', + 'frontend/test/default/en_US/images/logo_email.gif', ), - 'skin modular file' => array( + 'view modular file' => array( 'Mage_Page::favicon.ico', $designParams, - 'frontend/test/default/default/en_US/Mage_Page/favicon.ico', + 'frontend/test/default/en_US/Mage_Page/favicon.ico', ), ); } @@ -281,9 +318,9 @@ class Mage_Core_Model_Design_PackagePublicationTest extends PHPUnit_Framework_Te 'Namespace_Module/absolute_valid_module.gif', 'Mage_Page/favicon.ico', // non-fixture file from real module ); - $publishedDir = self::$_skinPublicDir . '/frontend/package/default/theme/en_US'; + $publishedDir = self::$_themePublicDir . '/frontend/package/default/en_US'; $this->assertFileNotExists($publishedDir, 'Please verify isolation from previous test(s).'); - $this->_model->getSkinUrl('css/file.css', array('package' => 'package', 'skin' => 'theme')); + $this->_model->getViewFileUrl('css/file.css', array('package' => 'package')); foreach ($expectedFiles as $file) { $this->assertFileExists("{$publishedDir}/{$file}"); } @@ -295,11 +332,11 @@ class Mage_Core_Model_Design_PackagePublicationTest extends PHPUnit_Framework_Te * @dataProvider publishCssFileFromModuleDataProvider */ public function testPublishCssFileFromModule( - $cssSkinFile, $designParams, $expectedCssFile, $expectedCssContent, $expectedRelatedFiles + $cssViewFile, $designParams, $expectedCssFile, $expectedCssContent, $expectedRelatedFiles ) { - $this->_model->getSkinUrl($cssSkinFile, $designParams); + $this->_model->getViewFileUrl($cssViewFile, $designParams); - $expectedCssFile = self::$_skinPublicDir . '/' . $expectedCssFile; + $expectedCssFile = self::$_themePublicDir . '/' . $expectedCssFile; $this->assertFileExists($expectedCssFile); $actualCssContent = file_get_contents($expectedCssFile); @@ -314,7 +351,7 @@ class Mage_Core_Model_Design_PackagePublicationTest extends PHPUnit_Framework_Te } foreach ($expectedRelatedFiles as $expectedFile) { - $expectedFile = self::$_skinPublicDir . '/' . $expectedFile; + $expectedFile = self::$_themePublicDir . '/' . $expectedFile; $this->assertFileExists($expectedFile); } } @@ -327,15 +364,15 @@ class Mage_Core_Model_Design_PackagePublicationTest extends PHPUnit_Framework_Te array( 'area' => 'frontend', 'package' => 'default', - 'skin' => 'default', + 'theme' => 'default', 'module' => 'Mage_Reports', ), - 'frontend/default/default/default/en_US/Mage_Reports/widgets.css', + 'frontend/default/default/en_US/Mage_Reports/widgets.css', array( 'url(../Mage_Catalog/images/i_block-list.gif)', ), array( - 'frontend/default/default/default/en_US/Mage_Catalog/images/i_block-list.gif', + 'frontend/default/default/en_US/Mage_Catalog/images/i_block-list.gif', ), ), 'adminhtml' => array( @@ -344,17 +381,16 @@ class Mage_Core_Model_Design_PackagePublicationTest extends PHPUnit_Framework_Te 'area' => 'adminhtml', 'package' => 'package', 'theme' => 'test', - 'skin' => 'default', 'module' => false, ), - 'adminhtml/package/test/default/en_US/Mage_Paypal/boxes.css', + 'adminhtml/package/test/en_US/Mage_Paypal/boxes.css', array( 'url(logo.gif)', 'url(section.png)', ), array( - 'adminhtml/package/test/default/en_US/Mage_Paypal/logo.gif', - 'adminhtml/package/test/default/en_US/Mage_Paypal/section.png', + 'adminhtml/package/test/en_US/Mage_Paypal/logo.gif', + 'adminhtml/package/test/en_US/Mage_Paypal/section.png', ), ), ); @@ -390,32 +426,32 @@ class Mage_Core_Model_Design_PackagePublicationTest extends PHPUnit_Framework_Te */ protected function _testPublishResourcesAndCssWhenChangedCss($expectedPublished) { - $fixtureSkinPath = self::$_fixtureTmpDir . '/frontend/test/default/skin/default/'; - $publishedPath = self::$_skinPublicDir . '/frontend/test/default/default/en_US/'; + $fixtureViewPath = self::$_fixtureTmpDir . '/frontend/test/default/'; + $publishedPath = self::$_themePublicDir . '/frontend/test/default/en_US/'; // Prepare temporary fixture directory and publish files from it - $this->_copyFixtureSkinToTmpDir($fixtureSkinPath); - $this->_model->getSkinUrl('style.css'); + $this->_copyFixtureViewToTmpDir($fixtureViewPath); + $this->_model->getViewFileUrl('style.css'); // Change main file and referenced files - everything changed and referenced must appear file_put_contents( - $fixtureSkinPath . 'style.css', + $fixtureViewPath . 'style.css', 'div {background: url(images/rectangle.gif);}', FILE_APPEND ); file_put_contents( - $fixtureSkinPath . 'sub.css', + $fixtureViewPath . 'sub.css', '.sub2 {border: 1px solid magenta}', FILE_APPEND ); - $this->_model->getSkinUrl('style.css'); + $this->_model->getViewFileUrl('style.css'); $assertFileComparison = $expectedPublished ? 'assertFileEquals' : 'assertFileNotEquals'; - $this->$assertFileComparison($fixtureSkinPath . 'style.css', $publishedPath . 'style.css'); - $this->$assertFileComparison($fixtureSkinPath . 'sub.css', $publishedPath . 'sub.css'); + $this->$assertFileComparison($fixtureViewPath . 'style.css', $publishedPath . 'style.css'); + $this->$assertFileComparison($fixtureViewPath . 'sub.css', $publishedPath . 'sub.css'); if ($expectedPublished) { $this->assertFileEquals( - $fixtureSkinPath . 'images/rectangle.gif', $publishedPath . 'images/rectangle.gif' + $fixtureViewPath . 'images/rectangle.gif', $publishedPath . 'images/rectangle.gif' ); } else { $this->assertFileNotExists($publishedPath . 'images/rectangle.gif'); @@ -456,46 +492,46 @@ class Mage_Core_Model_Design_PackagePublicationTest extends PHPUnit_Framework_Te */ protected function _testPublishChangedResourcesWhenUnchangedCss($expectedPublished) { - $fixtureSkinPath = self::$_fixtureTmpDir . '/frontend/test/default/skin/default/'; - $publishedPath = self::$_skinPublicDir . '/frontend/test/default/default/en_US/'; + $fixtureViewPath = self::$_fixtureTmpDir . '/frontend/test/default/'; + $publishedPath = self::$_themePublicDir . '/frontend/test/default/en_US/'; // Prepare temporary fixture directory and publish files from it - $this->_copyFixtureSkinToTmpDir($fixtureSkinPath); - $this->_model->getSkinUrl('style.css'); + $this->_copyFixtureViewToTmpDir($fixtureViewPath); + $this->_model->getViewFileUrl('style.css'); // Change referenced files - copy($fixtureSkinPath . 'images/rectangle.gif', $fixtureSkinPath . 'images/square.gif'); - touch($fixtureSkinPath . 'images/square.gif'); + copy($fixtureViewPath . 'images/rectangle.gif', $fixtureViewPath . 'images/square.gif'); + touch($fixtureViewPath . 'images/square.gif'); file_put_contents( - $fixtureSkinPath . 'sub.css', + $fixtureViewPath . 'sub.css', '.sub2 {border: 1px solid magenta}', FILE_APPEND ); - $this->_model->getSkinUrl('style.css'); + $this->_model->getViewFileUrl('style.css'); $assertFileComparison = $expectedPublished ? 'assertFileEquals' : 'assertFileNotEquals'; - $this->$assertFileComparison($fixtureSkinPath . 'sub.css', $publishedPath . 'sub.css'); - $this->$assertFileComparison($fixtureSkinPath . 'images/rectangle.gif', $publishedPath . 'images/square.gif'); + $this->$assertFileComparison($fixtureViewPath . 'sub.css', $publishedPath . 'sub.css'); + $this->$assertFileComparison($fixtureViewPath . 'images/rectangle.gif', $publishedPath . 'images/square.gif'); } /** * Prepare design directory with initial css and resources * - * @param string $fixtureSkinPath + * @param string $fixtureViewPath */ - protected function _copyFixtureSkinToTmpDir($fixtureSkinPath) + protected function _copyFixtureViewToTmpDir($fixtureViewPath) { Mage::app()->getConfig()->getOptions()->setDesignDir(self::$_fixtureTmpDir); - mkdir($fixtureSkinPath . '/images', 0777, true); + mkdir($fixtureViewPath . '/images', 0777, true); // Copy all files to fixture location $mTime = time() - 10; // To ensure that all files, changed later in test, will be recognized for publication - $sourcePath = dirname(__DIR__) . '/_files/design/frontend/test/publication/skin/default/'; - $files = array('../../theme.xml', 'style.css', 'sub.css', 'images/square.gif', 'images/rectangle.gif'); + $sourcePath = dirname(__DIR__) . '/_files/design/frontend/test/publication/'; + $files = array('theme.xml', 'style.css', 'sub.css', 'images/square.gif', 'images/rectangle.gif'); foreach ($files as $file) { - copy($sourcePath . $file, $fixtureSkinPath . $file); - touch($fixtureSkinPath . $file, $mTime); + copy($sourcePath . $file, $fixtureViewPath . $file); + touch($fixtureViewPath . $file, $mTime); } } } diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/Design/PackageTest.php b/dev/tests/integration/testsuite/Mage/Core/Model/Design/PackageTest.php index eb3ebe58704a6d157bd304606e8481575d8bc90e..dc4458850a796797743dbd494dd2ca5c8ff84c57 100644 --- a/dev/tests/integration/testsuite/Mage/Core/Model/Design/PackageTest.php +++ b/dev/tests/integration/testsuite/Mage/Core/Model/Design/PackageTest.php @@ -38,7 +38,7 @@ class Mage_Core_Model_Design_PackageTest extends PHPUnit_Framework_TestCase { $fixtureDir = dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files'; Mage::app()->getConfig()->getOptions()->setDesignDir($fixtureDir . DIRECTORY_SEPARATOR . 'design'); - Varien_Io_File::rmdirRecursive(Mage::app()->getConfig()->getOptions()->getMediaDir() . '/skin'); + Varien_Io_File::rmdirRecursive(Mage::app()->getConfig()->getOptions()->getMediaDir() . '/theme'); $ioAdapter = new Varien_Io_File(); $ioAdapter->cp( @@ -58,7 +58,7 @@ class Mage_Core_Model_Design_PackageTest extends PHPUnit_Framework_TestCase protected function setUp() { $this->_model = Mage::getModel('Mage_Core_Model_Design_Package'); - $this->_model->setDesignTheme('test/default/default', 'frontend'); + $this->_model->setDesignTheme('test/default', 'frontend'); } protected function tearDown() @@ -83,18 +83,11 @@ class Mage_Core_Model_Design_PackageTest extends PHPUnit_Framework_TestCase $this->assertEquals('default', $this->_model->getTheme()); } - public function testGetSkin() - { - $this->assertEquals('default', $this->_model->getSkin()); - } - public function testSetDesignTheme() { - $this->_model->setDesignTheme('test/test/test', 'test'); + $this->_model->setDesignTheme('test/test', 'test'); $this->assertEquals('test', $this->_model->getArea()); $this->assertEquals('test', $this->_model->getPackageName()); - $this->assertEquals('test', $this->_model->getSkin()); - $this->assertEquals('test', $this->_model->getSkin()); } /** @@ -102,12 +95,12 @@ class Mage_Core_Model_Design_PackageTest extends PHPUnit_Framework_TestCase */ public function testSetDesignThemeException() { - $this->_model->setDesignTheme('test/test'); + $this->_model->setDesignTheme('test/test/test'); } public function testGetDesignTheme() { - $this->assertEquals('test/default/default', $this->_model->getDesignTheme()); + $this->assertEquals('test/default', $this->_model->getDesignTheme()); } /** @@ -155,7 +148,7 @@ class Mage_Core_Model_Design_PackageTest extends PHPUnit_Framework_TestCase public function testGetOptimalCssUrls() { $expected = array( - 'http://localhost/pub/media/skin/frontend/test/default/default/en_US/css/styles.css', + 'http://localhost/pub/media/theme/frontend/test/default/en_US/css/styles.css', 'http://localhost/pub/lib/mage/translate-inline.css', ); $params = array( @@ -181,11 +174,11 @@ class Mage_Core_Model_Design_PackageTest extends PHPUnit_Framework_TestCase return array( array( array('css/styles.css', 'mage/calendar.css'), - array('http://localhost/pub/media/skin/_merged/808bc0a77c00a5d3c5c0bc388a6e93cf.css') + array('http://localhost/pub/media/theme/_merged/dce6f2a22049cd09bbfbe344fc73b037.css') ), array( array('css/styles.css'), - array('http://localhost/pub/media/skin/frontend/test/default/default/en_US/css/styles.css',) + array('http://localhost/pub/media/theme/frontend/test/default/en_US/css/styles.css',) ), ); } @@ -194,7 +187,7 @@ class Mage_Core_Model_Design_PackageTest extends PHPUnit_Framework_TestCase public function testGetOptimalJsUrls() { $expected = array( - 'http://localhost/pub/media/skin/frontend/test/default/default/en_US/js/tabs.js', + 'http://localhost/pub/media/theme/frontend/test/default/en_US/js/tabs.js', 'http://localhost/pub/lib/jquery/jquery-ui-timepicker-addon.js', 'http://localhost/pub/lib/mage/calendar.js', ); @@ -222,7 +215,7 @@ class Mage_Core_Model_Design_PackageTest extends PHPUnit_Framework_TestCase return array( array( array('js/tabs.js', 'mage/calendar.js', 'jquery/jquery-ui-timepicker-addon.js'), - array('http://localhost/pub/media/skin/_merged/9618f79ac5a7d716fabb220ef0e5c0cb.js',) + array('http://localhost/pub/media/theme/_merged/51cf03344697f37c2511aa0ad3391d56.js',) ), array( array('mage/calendar.js'), @@ -234,12 +227,7 @@ class Mage_Core_Model_Design_PackageTest extends PHPUnit_Framework_TestCase public function testGetDesignEntitiesStructure() { $expectedResult = array( - 'package_one' => array( - 'theme_one' => array( - 'skin_one' => true, - 'skin_two' => true - ) - ) + 'package_one' => array('theme_one') ); $this->assertSame($expectedResult, $this->_model->getDesignEntitiesStructure('design_area')); } @@ -267,27 +255,27 @@ class Mage_Core_Model_Design_PackageTest extends PHPUnit_Framework_TestCase /** * @param string $file * @param string $result - * @covers Mage_Core_Model_Design_Package::getSkinUrl - * @dataProvider getSkinUrlDataProvider + * @covers Mage_Core_Model_Design_Package::getViewUrl + * @dataProvider getViewUrlDataProvider * @magentoConfigFixture current_store dev/static/sign 0 */ - public function testGetSkinUrl($devMode, $file, $result) + public function testGetViewUrl($devMode, $file, $result) { Mage::setIsDeveloperMode($devMode); - $this->assertEquals($this->_model->getSkinUrl($file), $result); + $this->assertEquals($this->_model->getViewFileUrl($file), $result); } /** * @param string $file * @param string $result * @covers Mage_Core_Model_Design_Package::getSkinUrl - * @dataProvider getSkinUrlDataProvider + * @dataProvider getViewUrlDataProvider * @magentoConfigFixture current_store dev/static/sign 1 */ - public function testGetSkinUrlSigned($devMode, $file, $result) + public function testGetViewUrlSigned($devMode, $file, $result) { Mage::setIsDeveloperMode($devMode); - $url = $this->_model->getSkinUrl($file); + $url = $this->_model->getViewFileUrl($file); $this->assertEquals(strpos($url, $result), 0); $lastModified = array(); preg_match('/.*\?(.*)$/i', $url, $lastModified); @@ -300,13 +288,13 @@ class Mage_Core_Model_Design_PackageTest extends PHPUnit_Framework_TestCase /** * @return array */ - public function getSkinUrlDataProvider() + public function getViewUrlDataProvider() { return array( array( false, 'Mage_Page::favicon.ico', - 'http://localhost/pub/media/skin/frontend/test/default/default/en_US/Mage_Page/favicon.ico', + 'http://localhost/pub/media/theme/frontend/test/default/en_US/Mage_Page/favicon.ico', ), array( true, @@ -321,22 +309,22 @@ class Mage_Core_Model_Design_PackageTest extends PHPUnit_Framework_TestCase array( true, 'Mage_Page::menu.js', - 'http://localhost/pub/media/skin/frontend/test/default/default/en_US/Mage_Page/menu.js' + 'http://localhost/pub/media/theme/frontend/test/default/en_US/Mage_Page/menu.js' ), array( false, 'Mage_Page::menu.js', - 'http://localhost/pub/media/skin/frontend/test/default/default/en_US/Mage_Page/menu.js' + 'http://localhost/pub/media/theme/frontend/test/default/en_US/Mage_Page/menu.js' ), array( false, 'Mage_Catalog::widgets.css', - 'http://localhost/pub/media/skin/frontend/test/default/default/en_US/Mage_Catalog/widgets.css' + 'http://localhost/pub/media/theme/frontend/test/default/en_US/Mage_Catalog/widgets.css' ), array( true, 'Mage_Catalog::widgets.css', - 'http://localhost/pub/media/skin/frontend/test/default/default/en_US/Mage_Catalog/widgets.css' + 'http://localhost/pub/media/theme/frontend/test/default/en_US/Mage_Catalog/widgets.css' ), ); } diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/Design/Source/DesignTest.php b/dev/tests/integration/testsuite/Mage/Core/Model/Design/Source/DesignTest.php index b2ab4f756f4cc66bb0d7fc980fe7247c3cdba3bf..5f2b01106f5ca8d9eef25b2db5a11bbbf4141096 100644 --- a/dev/tests/integration/testsuite/Mage/Core/Model/Design/Source/DesignTest.php +++ b/dev/tests/integration/testsuite/Mage/Core/Model/Design/Source/DesignTest.php @@ -51,38 +51,33 @@ class Mage_Core_Model_Design_Source_DesignTest extends PHPUnit_Framework_TestCas { $fixture = array( array( - 'label' => 'Default / Default', + 'label' => 'Default', 'value' => array( array( - 'label' => 'default (incompatible version)', - 'value' => 'default/default/default', + 'label' => 'Default (incompatible version)', + 'value' => 'default/default', ), - ), - ), - array( - 'label' => 'Default / Theme G', - 'value' => array( array( - 'label' => 'default (incompatible version)', - 'value' => 'default/g/default', + 'label' => 'Theme G (incompatible version)', + 'value' => 'default/g', ), ), ), array( - 'label' => 'Package A / Theme D', + 'label' => 'Package A', 'value' => array( array( - 'label' => 'y (incompatible version)', - 'value' => 'a/d/y', + 'label' => 'Theme D (incompatible version)', + 'value' => 'a/d', ), ), ), array( - 'label' => 'Package B / Theme E', + 'label' => 'Package B', 'value' => array( array( - 'label' => 'x (incompatible version)', - 'value' => 'b/e/x', + 'label' => 'Theme E (incompatible version)', + 'value' => 'b/e', ), ), ), diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/Design/Source/_files/design/frontend/a/d/skin/y/file b/dev/tests/integration/testsuite/Mage/Core/Model/Design/Source/_files/design/frontend/a/d/file similarity index 100% rename from dev/tests/integration/testsuite/Mage/Core/Model/Design/Source/_files/design/frontend/a/d/skin/y/file rename to dev/tests/integration/testsuite/Mage/Core/Model/Design/Source/_files/design/frontend/a/d/file diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/Design/Source/_files/design/frontend/b/e/skin/x/file b/dev/tests/integration/testsuite/Mage/Core/Model/Design/Source/_files/design/frontend/b/e/file similarity index 100% rename from dev/tests/integration/testsuite/Mage/Core/Model/Design/Source/_files/design/frontend/b/e/skin/x/file rename to dev/tests/integration/testsuite/Mage/Core/Model/Design/Source/_files/design/frontend/b/e/file diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/Design/Source/_files/design/frontend/default/default/skin/default/file b/dev/tests/integration/testsuite/Mage/Core/Model/Design/Source/_files/design/frontend/default/default/file similarity index 100% rename from dev/tests/integration/testsuite/Mage/Core/Model/Design/Source/_files/design/frontend/default/default/skin/default/file rename to dev/tests/integration/testsuite/Mage/Core/Model/Design/Source/_files/design/frontend/default/default/file diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/DesignTest.php b/dev/tests/integration/testsuite/Mage/Core/Model/DesignTest.php index 6bca43e8e641180634d8caae3d88c3224a07e473..8c0051cb2400f4fefa09ce35efcc30472c324f12 100644 --- a/dev/tests/integration/testsuite/Mage/Core/Model/DesignTest.php +++ b/dev/tests/integration/testsuite/Mage/Core/Model/DesignTest.php @@ -57,7 +57,7 @@ class Mage_Core_Model_DesignTest extends PHPUnit_Framework_TestCase $storeId = Mage::app()->getAnyStoreView()->getId(); // fixture design_change $design = Mage::getModel('Mage_Core_Model_Design'); $design->loadChange($storeId)->changeDesign($designPackage); - $this->assertEquals('default/modern/default', $designPackage->getDesignTheme()); + $this->assertEquals('default/modern', $designPackage->getDesignTheme()); } public function testCRUD() @@ -65,7 +65,7 @@ class Mage_Core_Model_DesignTest extends PHPUnit_Framework_TestCase $this->_model->setData( array( 'store_id' => 1, - 'design' => 'default/default/default', + 'design' => 'default/demo', /* Note: in order to load a design change it should be active within the store's time zone */ 'date_from' => date('Y-m-d', strtotime('-1 day')), 'date_to' => date('Y-m-d', strtotime('+1 day')), @@ -131,7 +131,7 @@ class Mage_Core_Model_DesignTest extends PHPUnit_Framework_TestCase $this->assertArrayHasKey('design', $cachedDesign); $this->assertEquals($cachedDesign['design'], $design->getDesign()); - $design->setDesign('default/default/default')->save(); + $design->setDesign('default/demo')->save(); $design = Mage::getModel('Mage_Core_Model_Design'); $design->loadChange($storeId, $date); diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/Email/Template/FilterTest.php b/dev/tests/integration/testsuite/Mage/Core/Model/Email/Template/FilterTest.php index 8ff5c72b57fa64814de662f0d3d262f8a5c6de54..28c2c7a71b4f39cedbc79cdf3457f6903c830f96 100644 --- a/dev/tests/integration/testsuite/Mage/Core/Model/Email/Template/FilterTest.php +++ b/dev/tests/integration/testsuite/Mage/Core/Model/Email/Template/FilterTest.php @@ -47,11 +47,11 @@ class Mage_Core_Model_Email_Template_FilterTest extends PHPUnit_Framework_TestCa * * @magentoAppIsolation enabled */ - public function testSkinDirective() + public function testViewDirective() { - $url = $this->_model->skinDirective(array( - '{{skin url="Mage_Page::favicon.ico"}}', - 'skin', + $url = $this->_model->viewDirective(array( + '{{view url="Mage_Page::favicon.ico"}}', + 'view', ' url="Mage_Page::favicon.ico"', // note leading space )); $this->assertStringEndsWith('favicon.ico', $url); @@ -103,6 +103,8 @@ class Mage_Core_Model_Email_Template_FilterTest extends PHPUnit_Framework_TestCa /** * @magentoAppIsolation enabled + * @magentoConfigFixture frontend/design/theme/full_name test/default + * @magentoConfigFixture adminhtml/design/theme/full_name test/default * @dataProvider layoutDirectiveDataProvider * * @param string $currentArea @@ -113,7 +115,7 @@ class Mage_Core_Model_Email_Template_FilterTest extends PHPUnit_Framework_TestCa { $this->_emulateCurrentArea($currentArea); Mage::getConfig()->setOptions(array('design_dir' => dirname(__DIR__) . '/_files/design')); - Mage::getDesign()->setDesignTheme('test/default/default'); + Mage::getDesign()->setDesignTheme('test/default'); $actualOutput = $this->_model->layoutDirective(array( '{{layout ' . $directiveParams . '}}', diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/Email/TemplateTest.php b/dev/tests/integration/testsuite/Mage/Core/Model/Email/TemplateTest.php index 89986d49c9e2bb0cc5733c340f674e12d8fb2931..c44d5f549cc9c1fc8a210f7962e06d5bfe6d5da5 100644 --- a/dev/tests/integration/testsuite/Mage/Core/Model/Email/TemplateTest.php +++ b/dev/tests/integration/testsuite/Mage/Core/Model/Email/TemplateTest.php @@ -106,17 +106,17 @@ class Mage_Core_Model_Email_TemplateTest extends PHPUnit_Framework_TestCase /** * @magentoAppIsolation enabled * @magentoDataFixture Mage/Core/_files/store.php - * @magentoConfigFixture fixturestore_store design/theme/full_name default/default/blue + * @magentoConfigFixture fixturestore_store design/theme/full_name default/demo_blue */ public function testGetProcessedTemplate() { - $expectedSkinUrl = 'skin/frontend/default/default/blue/en_US/Mage_Page/favicon.ico'; - $this->_model->setTemplateText('{{skin url="Mage_Page::favicon.ico"}}'); - $this->assertStringEndsNotWith($expectedSkinUrl, $this->_model->getProcessedTemplate()); + $expectedViewUrl = 'theme/frontend/default/demo_blue/en_US/Mage_Page/favicon.ico'; + $this->_model->setTemplateText('{{view url="Mage_Page::favicon.ico"}}'); + $this->assertStringEndsNotWith($expectedViewUrl, $this->_model->getProcessedTemplate()); $this->_model->setDesignConfig(array( 'area' => 'frontend', 'store' => Mage::app()->getStore('fixturestore')->getId() )); - $this->assertStringEndsWith($expectedSkinUrl, $this->_model->getProcessedTemplate()); + $this->assertStringEndsWith($expectedViewUrl, $this->_model->getProcessedTemplate()); } /** @@ -125,9 +125,9 @@ class Mage_Core_Model_Email_TemplateTest extends PHPUnit_Framework_TestCase */ public function testGetProcessedTemplateDesignChange() { - $this->_model->setTemplateText('{{skin url="Mage_Page::favicon.ico"}}'); + $this->_model->setTemplateText('{{view url="Mage_Page::favicon.ico"}}'); $this->assertStringEndsWith( - 'skin/frontend/default/modern/default/en_US/Mage_Page/favicon.ico', + 'theme/frontend/default/modern/en_US/Mage_Page/favicon.ico', $this->_model->getProcessedTemplate() ); } @@ -135,17 +135,17 @@ class Mage_Core_Model_Email_TemplateTest extends PHPUnit_Framework_TestCase /** * @magentoAppIsolation enabled * @magentoDataFixture Mage/Core/_files/store.php - * @magentoConfigFixture fixturestore_store design/theme/full_name default/default/blue + * @magentoConfigFixture fixturestore_store design/theme/full_name default/demo_blue */ public function testGetProcessedTemplateSubject() { - $expectedSkinUrl = 'skin/frontend/default/default/blue/en_US/Mage_Page/favicon.ico'; - $this->_model->setTemplateSubject('{{skin url="Mage_Page::favicon.ico"}}'); - $this->assertStringEndsNotWith($expectedSkinUrl, $this->_model->getProcessedTemplateSubject(array())); + $expectedViewUrl = 'theme/frontend/default/demo_blue/en_US/Mage_Page/favicon.ico'; + $this->_model->setTemplateSubject('{{view url="Mage_Page::favicon.ico"}}'); + $this->assertStringEndsNotWith($expectedViewUrl, $this->_model->getProcessedTemplateSubject(array())); $this->_model->setDesignConfig(array( 'area' => 'frontend', 'store' => Mage::app()->getStore('fixturestore')->getId() )); - $this->assertStringEndsWith($expectedSkinUrl, $this->_model->getProcessedTemplateSubject(array())); + $this->assertStringEndsWith($expectedViewUrl, $this->_model->getProcessedTemplateSubject(array())); } /** diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/File/StorageTest.php b/dev/tests/integration/testsuite/Mage/Core/Model/File/StorageTest.php index adebcad9ad0720d4fce1fbea45d1ec76faaee73f..ea9613c9766d0a1c145adc6f8397f66c04e81f79 100644 --- a/dev/tests/integration/testsuite/Mage/Core/Model/File/StorageTest.php +++ b/dev/tests/integration/testsuite/Mage/Core/Model/File/StorageTest.php @@ -44,7 +44,7 @@ class Mage_Core_Model_File_StorageTest extends PHPUnit_Framework_TestCase $this->assertContains('css', $config['allowed_resources']); $this->assertContains('css_secure', $config['allowed_resources']); $this->assertContains('js', $config['allowed_resources']); - $this->assertContains('skin', $config['allowed_resources']); + $this->assertContains('theme', $config['allowed_resources']); $this->assertEquals(1000, $config['update_time']); } } diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/Layout/MergeTest.php b/dev/tests/integration/testsuite/Mage/Core/Model/Layout/MergeTest.php index b3230942accf47d321489d966719fa040adebd68..ebe9d4e021cf00eaad6eded1c291b1600bb7b02b 100644 --- a/dev/tests/integration/testsuite/Mage/Core/Model/Layout/MergeTest.php +++ b/dev/tests/integration/testsuite/Mage/Core/Model/Layout/MergeTest.php @@ -38,7 +38,7 @@ class Mage_Core_Model_Layout_MergeTest extends PHPUnit_Framework_TestCase Mage::getConfig()->setOptions(array( 'design_dir' => dirname(dirname(__FILE__)) . '/_files/design', )); - Mage::getDesign()->setDesignTheme('test/default/default'); + Mage::getDesign()->setDesignTheme('test/default'); /* Disable loading and saving layout cache */ Mage::app()->getCacheInstance()->banUse('layout'); diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/LayoutTestBase.php b/dev/tests/integration/testsuite/Mage/Core/Model/LayoutTestBase.php index 92098031ede8952690c9e647c83b211780b44f26..446033fba429287713d8917296abbd97f4d8f1e4 100644 --- a/dev/tests/integration/testsuite/Mage/Core/Model/LayoutTestBase.php +++ b/dev/tests/integration/testsuite/Mage/Core/Model/LayoutTestBase.php @@ -41,7 +41,7 @@ class Mage_Core_Model_LayoutTestBase extends PHPUnit_Framework_TestCase Mage::getConfig()->setOptions(array( 'design_dir' => dirname(__FILE__) . '/_files/design', )); - Mage::getDesign()->setDesignTheme('test/default/default'); + Mage::getDesign()->setDesignTheme('test/default'); /* Disable loading and saving layout cache */ Mage::app()->getCacheInstance()->banUse('layout'); diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/ObserverTest.php b/dev/tests/integration/testsuite/Mage/Core/Model/ObserverTest.php index ea6ae0605761befb178767a459d617dc99761a45..f6b328eac6cec9b523ff5cc4c6485c6ca3560d5f 100644 --- a/dev/tests/integration/testsuite/Mage/Core/Model/ObserverTest.php +++ b/dev/tests/integration/testsuite/Mage/Core/Model/ObserverTest.php @@ -42,14 +42,15 @@ class Mage_Core_Model_ObserverTest extends PHPUnit_Framework_TestCase $eventObserver = $this->_createEventObserverForThemeRegistration(); $eventObserver->getEvent()->setPathPattern($pathPattern); - $observer = new Mage_Core_Model_Observer(); + /** @var $observer Mage_Core_Model_Observer */ + $observer = Mage::getModel('Mage_Core_Model_Observer'); $observer->themeRegistration($eventObserver); $defaultModel = $this->_getThemeModel(); $defaultModel->load('default/default', 'theme_path'); $iphoneModel = $this->_getThemeModel(); - $iphoneModel->load('default/iphone', 'theme_path'); + $iphoneModel->load('default/default_iphone', 'theme_path'); $this->assertEquals('Default', $defaultModel->getThemeTitle()); $this->assertEquals(null, $defaultModel->getParentId()); @@ -61,7 +62,7 @@ class Mage_Core_Model_ObserverTest extends PHPUnit_Framework_TestCase /** * Get theme model * - * @return Mage_Core_Model_Abstract + * @return Mage_Core_Model_Theme */ protected function _getThemeModel() { @@ -75,8 +76,8 @@ class Mage_Core_Model_ObserverTest extends PHPUnit_Framework_TestCase */ protected function _createEventObserverForThemeRegistration() { - $response = new Varien_Object(array('additional_options' => array())); - $event = new Varien_Event(array('response_object' => $response)); - return new Varien_Event_Observer(array('event' => $event)); + $response = Mage::getModel('Varien_Object', array('additional_options' => array())); + $event = Mage::getModel('Varien_Event', array('response_object' => $response)); + return Mage::getModel('Varien_Event_Observer', array('event' => $event)); } } diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/Resource/SessionTest.php b/dev/tests/integration/testsuite/Mage/Core/Model/Resource/SessionTest.php index 70e5d9f4cf6ac5239f95de7c754a6cf2ca1f9607..5350fc9a4d9854fe6323905f68f72b482f28534e 100644 --- a/dev/tests/integration/testsuite/Mage/Core/Model/Resource/SessionTest.php +++ b/dev/tests/integration/testsuite/Mage/Core/Model/Resource/SessionTest.php @@ -28,18 +28,78 @@ class Mage_Core_Model_Resource_SessionTest extends PHPUnit_Framework_TestCase { /** + * Test session ID + */ + const SESSION_ID = 'session_id_value'; + + /**#@+ + * Session keys + */ + const SESSION_NEW = 'session_new'; + const SESSION_EXISTS = 'session_exists'; + /**#@-*/ + + /**#@+ + * Table column names + */ + const COLUMN_SESSION_ID = 'session_id'; + const COLUMN_SESSION_DATA = 'session_data'; + const COLUMN_SESSION_EXPIRES = 'session_expires'; + /**#@-*/ + + /** + * Test session data + * + * @var array + */ + protected $_sessionData = array( + self::SESSION_NEW => array('new key' => 'new value'), + self::SESSION_EXISTS => array('existing key' => 'existing value'), + ); + + /** + * @var Magento_Test_ObjectManager + */ + protected $_objectManager; + + /** + * Model under test + * * @var Mage_Core_Model_Resource_Session */ protected $_model; + /** + * Write connection adapter + * + * @var Varien_Db_Adapter_Interface + */ + protected $_connection; + + /** + * Session table name + * + * @var string + */ + protected $_sessionTable; + public function setUp() { - $this->_model = Mage::getResourceModel('Mage_Core_Model_Resource_Session'); + $this->_objectManager = Mage::getObjectManager(); + $this->_model = $this->_objectManager->get('Mage_Core_Model_Resource_Session'); + + /** @var $resource Mage_Core_Model_Resource */ + $resource = $this->_objectManager->get('Mage_Core_Model_Resource'); + $this->_connection = $resource->getConnection('core_write'); + $this->_sessionTable = $resource->getTableName('core_session'); } protected function tearDown() { - $this->_model = null; + unset($this->_objectManager); + unset($this->_model); + unset($this->_connection); + unset($this->_sessionTable); } public function testHasConnection() @@ -55,18 +115,16 @@ class Mage_Core_Model_Resource_SessionTest extends PHPUnit_Framework_TestCase public function testWriteReadDestroy() { - $sessionId = 'my_test_id'; - $data = serialize(array('test key'=>'test value')); + $data = serialize($this->_sessionData[self::SESSION_NEW]); + $this->_model->write(self::SESSION_ID, $data); + $this->assertEquals($data, $this->_model->read(self::SESSION_ID)); - $this->_model->write($sessionId, $data); - $this->assertEquals($data, $this->_model->read($sessionId)); + $data = serialize($this->_sessionData[self::SESSION_EXISTS]); + $this->_model->write(self::SESSION_ID, $data); + $this->assertEquals($data, $this->_model->read(self::SESSION_ID)); - $data = serialize(array('new key'=>'new value')); - $this->_model->write($sessionId, $data); - $this->assertEquals($data, $this->_model->read($sessionId)); - - $this->_model->destroy($sessionId); - $this->assertEmpty($this->_model->read($sessionId)); + $this->_model->destroy(self::SESSION_ID); + $this->assertEmpty($this->_model->read(self::SESSION_ID)); } public function testGc() @@ -76,4 +134,59 @@ class Mage_Core_Model_Resource_SessionTest extends PHPUnit_Framework_TestCase $this->_model->gc(-1); $this->assertEmpty($this->_model->read('test')); } + + /** + * Assert that session data writes to DB in base64 encoding + */ + public function testWriteEncoded() + { + $data = serialize($this->_sessionData[self::SESSION_NEW]); + $this->_model->write(self::SESSION_ID, $data); + + $select = $this->_connection->select() + ->from($this->_sessionTable) + ->where(self::COLUMN_SESSION_ID . ' = :' . self::COLUMN_SESSION_ID); + $bind = array(self::COLUMN_SESSION_ID => self::SESSION_ID); + $session = $this->_connection->fetchRow($select, $bind); + + $this->assertEquals(self::SESSION_ID, $session[self::COLUMN_SESSION_ID]); + $this->assertTrue( + ctype_digit((string)$session[self::COLUMN_SESSION_EXPIRES]), + 'Value of session expire field must have integer type' + ); + $this->assertEquals($data, base64_decode($session[self::COLUMN_SESSION_DATA])); + } + + /** + * Data provider for testReadEncoded + * + * @return array + */ + public function readEncodedDataProvider() + { + $sessionData = serialize($this->_sessionData[self::SESSION_NEW]); + return array( + 'session_encoded' => array('$sessionData' => base64_encode($sessionData)), + 'session_not_encoded' => array('$sessionData' => $sessionData), + ); + } + + /** + * Assert that session data reads from DB correctly regardless of encoding + * + * @param string $sessionData + * + * @dataProvider readEncodedDataProvider + */ + public function testReadEncoded($sessionData) + { + $sessionRecord = array( + self::COLUMN_SESSION_ID => self::SESSION_ID, + self::COLUMN_SESSION_DATA => $sessionData, + ); + $this->_connection->insertOnDuplicate($this->_sessionTable, $sessionRecord, array(self::COLUMN_SESSION_DATA)); + + $sessionData = $this->_model->read(self::SESSION_ID); + $this->assertEquals($this->_sessionData[self::SESSION_NEW], unserialize($sessionData)); + } } diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/StoreTest.php b/dev/tests/integration/testsuite/Mage/Core/Model/StoreTest.php index f5e70468b0585550dd4907454cbc4570dc08daaa..80ebfc756bee6ce5654636e4b6cfe4a245fd493d 100644 --- a/dev/tests/integration/testsuite/Mage/Core/Model/StoreTest.php +++ b/dev/tests/integration/testsuite/Mage/Core/Model/StoreTest.php @@ -131,10 +131,10 @@ class Mage_Core_Model_StoreTest extends PHPUnit_Framework_TestCase array(Mage_Core_Model_Store::URL_TYPE_MEDIA, false, true, 'http://localhost/pub/media/'), array(Mage_Core_Model_Store::URL_TYPE_MEDIA, true, false, 'http://localhost/pub/media/'), array(Mage_Core_Model_Store::URL_TYPE_MEDIA, true, true, 'http://localhost/pub/media/'), - array(Mage_Core_Model_Store::URL_TYPE_SKIN, false, false, 'http://localhost/pub/media/skin/'), - array(Mage_Core_Model_Store::URL_TYPE_SKIN, false, true, 'http://localhost/pub/media/skin/'), - array(Mage_Core_Model_Store::URL_TYPE_SKIN, true, false, 'http://localhost/pub/media/skin/'), - array(Mage_Core_Model_Store::URL_TYPE_SKIN, true, true, 'http://localhost/pub/media/skin/') + array(Mage_Core_Model_Store::URL_TYPE_THEME, false, false, 'http://localhost/pub/media/theme/'), + array(Mage_Core_Model_Store::URL_TYPE_THEME, false, true, 'http://localhost/pub/media/theme/'), + array(Mage_Core_Model_Store::URL_TYPE_THEME, true, false, 'http://localhost/pub/media/theme/'), + array(Mage_Core_Model_Store::URL_TYPE_THEME, true, true, 'http://localhost/pub/media/theme/') ); } diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/Theme/CollectionTest.php b/dev/tests/integration/testsuite/Mage/Core/Model/Theme/CollectionTest.php index ff62a0b9bfe4cd8e654e8e57b722da738c29e2e8..36d85cc131e594eb50d62cf1358b0a18fd6b0f0c 100644 --- a/dev/tests/integration/testsuite/Mage/Core/Model/Theme/CollectionTest.php +++ b/dev/tests/integration/testsuite/Mage/Core/Model/Theme/CollectionTest.php @@ -63,21 +63,23 @@ class Mage_Core_Model_Theme_CollectionTest extends PHPUnit_Framework_TestCase 'theme_path' => 'default/default', 'preview_image' => '', 'theme_directory' => implode( - DIRECTORY_SEPARATOR, array(__DIR__, '..', '_files', 'design', 'frontend', 'default', 'default') + DIRECTORY_SEPARATOR, + array(__DIR__, '..', '_files', 'design', 'frontend', 'default', 'default') ) ), - 'iphone' => array( - 'theme_code' => 'iphone', + 'default_iphone' => array( + 'theme_code' => 'default_iphone', 'theme_title' => 'Iphone', 'theme_version' => '2.0.0.0', 'parent_theme' => array('default', 'default'), 'is_featured' => false, 'magento_version_from' => '2.0.0.0-dev1', 'magento_version_to' => '*', - 'theme_path' => 'default/iphone', + 'theme_path' => 'default/default_iphone', 'preview_image' => 'images/preview.png', 'theme_directory' => implode( - DIRECTORY_SEPARATOR, array(__DIR__, '..', '_files', 'design', 'frontend', 'default', 'iphone') + DIRECTORY_SEPARATOR, + array(__DIR__, '..', '_files', 'design', 'frontend', 'default', 'default_iphone') ) ), ); diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/ThemeTest.php b/dev/tests/integration/testsuite/Mage/Core/Model/ThemeTest.php index 73a8c6987b29ad5d5dd894019793c0e286d4fab2..8cc2874099dd3d8c1ea0aa8246767aa65c721c7a 100644 --- a/dev/tests/integration/testsuite/Mage/Core/Model/ThemeTest.php +++ b/dev/tests/integration/testsuite/Mage/Core/Model/ThemeTest.php @@ -122,4 +122,46 @@ class Mage_Core_Model_ThemeTest extends PHPUnit_Framework_TestCase $this->assertEquals($defPreviewImageUrl, $themeModel->getPreviewImageUrl()); } + + /** + * Test is virtual + */ + public function testIsVirtual() + { + $themeCollection = new Mage_Core_Model_Theme_Collection(); + Mage::unregister('_singleton/Mage_Core_Model_Theme_Collection'); + Mage::register('_singleton/Mage_Core_Model_Theme_Collection', $themeCollection); + + /** @var $themeModel Mage_Core_Model_Theme */ + $themeModel = Mage::getModel('Mage_Core_Model_Theme'); + $themeModel->setData($this->_getThemeValidData()); + + $this->assertTrue($themeModel->isVirtual()); + + $themeCollection->addItem($themeModel); + $this->assertFalse($themeModel->isVirtual()); + } + + + /** + * Test id deletable + * + * @dataProvider isDeletableDataProvider + */ + public function testIsDeletable($isVirtual) + { + $themeModel = $this->getMock('Mage_Core_Model_Theme', array('isVirtual'), array(), '', false); + $themeModel->expects($this->once()) + ->method('isVirtual') + ->will($this->returnValue($isVirtual)); + $this->assertEquals($isVirtual, $themeModel->isDeletable()); + } + + /** + * @return array + */ + public function isDeletableDataProvider() + { + return array(array(true), array(false)); + } } diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/Translate/InlineTest.php b/dev/tests/integration/testsuite/Mage/Core/Model/Translate/InlineTest.php index d3ab6fc2fcf835982bb7e296c4b6c2e0684a4a8a..fe8fd6b40fc352fc2aa9caa6e61b8946bfce0ec2 100644 --- a/dev/tests/integration/testsuite/Mage/Core/Model/Translate/InlineTest.php +++ b/dev/tests/integration/testsuite/Mage/Core/Model/Translate/InlineTest.php @@ -36,7 +36,7 @@ class Mage_Core_Model_Translate_InlineTest extends PHPUnit_Framework_TestCase public static function setUpBeforeClass() { - Mage::getDesign()->setDesignTheme('default/default/default'); + Mage::getDesign()->setDesignTheme('default/demo'); } public function setUp() diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/Translate/_files/_inline_page_expected.html b/dev/tests/integration/testsuite/Mage/Core/Model/Translate/_files/_inline_page_expected.html index c479cb42556b9bfce8b6ef459ba5e7d766e5d414..5dcf1df90494be2db939b43c9f014b6e609da2ae 100644 --- a/dev/tests/integration/testsuite/Mage/Core/Model/Translate/_files/_inline_page_expected.html +++ b/dev/tests/integration/testsuite/Mage/Core/Model/Translate/_files/_inline_page_expected.html @@ -37,7 +37,7 @@ </div> <script type="text/javascript" src="http://localhost/pub/lib/prototype/window.js"></script> <link rel="stylesheet" type="text/css" href="http://localhost/pub/lib/prototype/windows/themes/default.css"/> -<link rel="stylesheet" type="text/css" href="http://localhost/pub/media/skin/frontend/{{design_package}}/default/default/en_US/Mage_Core/prototype/magento.css"/> +<link rel="stylesheet" type="text/css" href="http://localhost/pub/media/theme/frontend/{{design_package}}/default/en_US/Mage_Core/prototype/magento.css"/> <script type="text/javascript" src="http://localhost/pub/lib/mage/edit-trigger.js"></script> <script type="text/javascript" src="http://localhost/pub/lib/mage/translate-inline.js"></script> <link rel="stylesheet" type="text/css" href="http://localhost/pub/lib/mage/translate-inline.css"/> @@ -48,7 +48,7 @@ $(this).translateInline({ ajaxUrl: 'http://localhost/index.php/core/ajax/translate/', area: 'frontend', - editTrigger: {img: 'http://localhost/pub/media/skin/frontend/{{design_package}}/default/default/en_US/Mage_Core/fam_book_open.png'} + editTrigger: {img: 'http://localhost/pub/media/theme/frontend/{{design_package}}/default/en_US/Mage_Core/fam_book_open.png'} }); }); })(jQuery); diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/TranslateTest.php b/dev/tests/integration/testsuite/Mage/Core/Model/TranslateTest.php index 0d9f8519d4446d3da92ef7cbc40746fd0bc183e0..9801ecff5b225e9307411ded1b5916cb01556576 100644 --- a/dev/tests/integration/testsuite/Mage/Core/Model/TranslateTest.php +++ b/dev/tests/integration/testsuite/Mage/Core/Model/TranslateTest.php @@ -39,7 +39,7 @@ class Mage_Core_Model_TranslateTest extends PHPUnit_Framework_TestCase 'design_dir' => dirname(__FILE__) . '/_files/design', )); Mage::getDesign()->setArea('frontend') - ->setDesignTheme('test/default/default'); + ->setDesignTheme('test/default'); } public function setUp() diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/UrlTest.php b/dev/tests/integration/testsuite/Mage/Core/Model/UrlTest.php index 3a29bf7a764e083b4646ff4fcee393a1a1543446..9dbb76d91a46118ee59dc6945a39d62ebb0a99e1 100644 --- a/dev/tests/integration/testsuite/Mage/Core/Model/UrlTest.php +++ b/dev/tests/integration/testsuite/Mage/Core/Model/UrlTest.php @@ -325,6 +325,24 @@ class Mage_Core_Model_UrlTest extends PHPUnit_Framework_TestCase $this->assertEquals('http://localhost/index.php/catalog/product/view/id/100/?foo=bar#anchor', $result); } + /** + * Note: isolation flushes the URL memory cache + * @magentoAppIsolation enabled + */ + public function testGetUrlDoesntAddQueryParamsOnConsequentCalls() + { + $result = $this->_model->getUrl('catalog/product/view', array( + '_query' => 'foo=bar', + '_nosid' => 1, + )); + $this->assertEquals('http://localhost/index.php/catalog/product/view/?foo=bar', $result); + $result = $this->_model->getUrl('catalog/product/view', array( + '_nosid' => 1, + )); + $this->assertEquals('http://localhost/index.php/catalog/product/view/', $result); + } + + public function testEscape() { $this->assertEquals('%22%27%3E%3C', $this->_model->escape('"\'><')); diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/_files/design/area_two/package_one/theme_one/skin/file b/dev/tests/integration/testsuite/Mage/Core/Model/_files/design/area_two/package_one/theme_one/file similarity index 100% rename from dev/tests/integration/testsuite/Mage/Core/Model/_files/design/area_two/package_one/theme_one/skin/file rename to dev/tests/integration/testsuite/Mage/Core/Model/_files/design/area_two/package_one/theme_one/file diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/_files/design/design_area/package_one/theme_one/skin/skin_one/file b/dev/tests/integration/testsuite/Mage/Core/Model/_files/design/design_area/package_one/theme_one/file similarity index 100% rename from dev/tests/integration/testsuite/Mage/Core/Model/_files/design/design_area/package_one/theme_one/skin/skin_one/file rename to dev/tests/integration/testsuite/Mage/Core/Model/_files/design/design_area/package_one/theme_one/file diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/_files/design/design_area/package_one/theme_one/skin/skin_two/file b/dev/tests/integration/testsuite/Mage/Core/Model/_files/design/design_area/package_one/theme_one/skin/skin_two/file deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/default/iphone/theme.xml b/dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/default/default_iphone/theme.xml similarity index 94% rename from dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/default/iphone/theme.xml rename to dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/default/default_iphone/theme.xml index 3ca6ed097c5a6637460d191c7cb1742e162c6f25..78388aaa32d6d57b6efda8c8a21516a2d9f3abb4 100644 --- a/dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/default/iphone/theme.xml +++ b/dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/default/default_iphone/theme.xml @@ -28,7 +28,7 @@ <design> <package code="default"> <title>Default</title> - <theme version="2.0.0.0" code="iphone" parent="default"> + <theme version="2.0.0.0" code="default_iphone" parent="default"> <title>Iphone</title> <requirements> <magento_version from="2.0.0.0-dev1" to="*"/> diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/package/default/skin/access_violation.php b/dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/package/access_violation.php similarity index 100% rename from dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/package/default/skin/access_violation.php rename to dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/package/access_violation.php diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/package/custom_theme/skin/theme_nested_skin/Fixture_Module/fixture_script.js b/dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/package/custom_theme/Fixture_Module/fixture_script.js similarity index 94% rename from dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/package/custom_theme/skin/theme_nested_skin/Fixture_Module/fixture_script.js rename to dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/package/custom_theme/Fixture_Module/fixture_script.js index 3c2694c98c7e8a0a3f537d1ed3d3af9eef249166..27f723b57068a643a60006c5ad5e0ad047342b3c 100644 --- a/dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/package/custom_theme/skin/theme_nested_skin/Fixture_Module/fixture_script.js +++ b/dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/package/custom_theme/Fixture_Module/fixture_script.js @@ -23,4 +23,4 @@ * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ -/* modular fixture skin file located inside the nested skin of the custom theme */ +/* modular fixture view file located inside the nested view of the custom theme */ diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/package/default/skin/theme/Namespace_Module/absolute_valid_module.gif b/dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/package/default/Namespace_Module/absolute_valid_module.gif similarity index 100% rename from dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/package/default/skin/theme/Namespace_Module/absolute_valid_module.gif rename to dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/package/default/Namespace_Module/absolute_valid_module.gif diff --git a/app/code/core/Mage/Adminhtml/Model/Url.php b/dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/package/default/access_violation.php similarity index 84% rename from app/code/core/Mage/Adminhtml/Model/Url.php rename to dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/package/default/access_violation.php index 5b81bfe4de00fe6ed74864d97190cf33cde63339..ba4afa09300497991ddea942bdc2b2d0af989741 100644 --- a/app/code/core/Mage/Adminhtml/Model/Url.php +++ b/dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/package/default/access_violation.php @@ -18,15 +18,9 @@ * 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_Adminhtml + * @category Magento + * @package Mage_Core + * @subpackage integration_tests * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** - * @deprecated Moved to module Mage_Backend - */ -class Mage_Adminhtml_Model_Url extends Mage_Backend_Model_Url -{ - -} diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/package/default/skin/theme/css/1.gif b/dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/package/default/css/1.gif similarity index 100% rename from dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/package/default/skin/theme/css/1.gif rename to dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/package/default/css/1.gif diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/package/default/skin/theme/css/body.gif b/dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/package/default/css/body.gif similarity index 100% rename from dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/package/default/skin/theme/css/body.gif rename to dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/package/default/css/body.gif diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/package/default/skin/theme/css/deep/recursive.css b/dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/package/default/css/deep/recursive.css similarity index 100% rename from dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/package/default/skin/theme/css/deep/recursive.css rename to dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/package/default/css/deep/recursive.css diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/package/default/skin/theme/css/exception.css b/dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/package/default/css/exception.css similarity index 100% rename from dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/package/default/skin/theme/css/exception.css rename to dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/package/default/css/exception.css diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/package/default/skin/theme/css/file.css b/dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/package/default/css/file.css similarity index 100% rename from dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/package/default/skin/theme/css/file.css rename to dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/package/default/css/file.css diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/package/default/skin/theme/h1.gif b/dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/package/default/h1.gif similarity index 100% rename from dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/package/default/skin/theme/h1.gif rename to dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/package/default/h1.gif diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/package/default/skin/default/images/h2.gif b/dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/package/default/images/h2.gif similarity index 100% rename from dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/package/default/skin/default/images/h2.gif rename to dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/package/default/images/h2.gif diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/package/default/skin/theme/recursive.css b/dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/package/default/recursive.css similarity index 100% rename from dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/package/default/skin/theme/recursive.css rename to dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/package/default/recursive.css diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/package/default/skin/default/recursive.gif b/dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/package/default/recursive.gif similarity index 100% rename from dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/package/default/skin/default/recursive.gif rename to dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/package/default/recursive.gif diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/package/default/skin/default/recursive2.gif b/dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/package/default/recursive2.gif similarity index 100% rename from dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/package/default/skin/default/recursive2.gif rename to dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/package/default/recursive2.gif diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/package/default/skin/default/scripts.js b/dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/package/default/scripts.js similarity index 100% rename from dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/package/default/skin/default/scripts.js rename to dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/package/default/scripts.js diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/test/default/skin/default/Module/favicon.ico b/dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/test/default/Module/favicon.ico similarity index 100% rename from dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/test/default/skin/default/Module/favicon.ico rename to dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/test/default/Module/favicon.ico diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/test/default/skin/default/css/styles.css b/dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/test/default/css/styles.css similarity index 100% rename from dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/test/default/skin/default/css/styles.css rename to dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/test/default/css/styles.css diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/test/default/skin/default/images/logo.gif b/dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/test/default/images/logo.gif similarity index 100% rename from dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/test/default/skin/default/images/logo.gif rename to dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/test/default/images/logo.gif diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/test/default/skin/default/images/logo_email.gif b/dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/test/default/images/logo_email.gif similarity index 100% rename from dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/test/default/skin/default/images/logo_email.gif rename to dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/test/default/images/logo_email.gif diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/test/default/skin/default/js/tabs.js b/dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/test/default/js/tabs.js similarity index 100% rename from dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/test/default/skin/default/js/tabs.js rename to dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/test/default/js/tabs.js diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/test/default/skin/default/locale/fr_FR/logo.gif b/dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/test/default/locale/fr_FR/logo.gif similarity index 100% rename from dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/test/default/skin/default/locale/fr_FR/logo.gif rename to dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/test/default/locale/fr_FR/logo.gif diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/test/publication/skin/default/images/rectangle.gif b/dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/test/publication/images/rectangle.gif similarity index 100% rename from dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/test/publication/skin/default/images/rectangle.gif rename to dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/test/publication/images/rectangle.gif diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/test/publication/skin/default/images/square.gif b/dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/test/publication/images/square.gif similarity index 100% rename from dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/test/publication/skin/default/images/square.gif rename to dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/test/publication/images/square.gif diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/test/publication/skin/default/style.css b/dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/test/publication/style.css similarity index 100% rename from dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/test/publication/skin/default/style.css rename to dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/test/publication/style.css diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/test/publication/skin/default/sub.css b/dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/test/publication/sub.css similarity index 100% rename from dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/test/publication/skin/default/sub.css rename to dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/test/publication/sub.css diff --git a/dev/tests/integration/testsuite/Mage/Core/_files/design_change.php b/dev/tests/integration/testsuite/Mage/Core/_files/design_change.php index eb9d90406ea260d55b6ef4b966997ae85069dca4..3e71e4ad4c78ec66e5e903a3f0c59931b18d3b3c 100644 --- a/dev/tests/integration/testsuite/Mage/Core/_files/design_change.php +++ b/dev/tests/integration/testsuite/Mage/Core/_files/design_change.php @@ -28,7 +28,7 @@ $storeId = Mage::app()->getAnyStoreView()->getId(); $change = Mage::getModel('Mage_Core_Model_Design'); $change->setStoreId($storeId) - ->setDesign('default/modern/default') + ->setDesign('default/modern') ->setDateFrom('2001-01-01 01:01:01') ->save() // creating with predefined ID doesn't work for some reason ; diff --git a/dev/tests/integration/testsuite/Mage/DesignEditor/Block/Toolbar/SkinTest.php b/dev/tests/integration/testsuite/Mage/DesignEditor/Block/Toolbar/ThemeTest.php similarity index 77% rename from dev/tests/integration/testsuite/Mage/DesignEditor/Block/Toolbar/SkinTest.php rename to dev/tests/integration/testsuite/Mage/DesignEditor/Block/Toolbar/ThemeTest.php index bccf3e3680000024e32e6d541db515eeff6b1b08..65be564b30f74eebe045553931d555f8df03f878 100644 --- a/dev/tests/integration/testsuite/Mage/DesignEditor/Block/Toolbar/SkinTest.php +++ b/dev/tests/integration/testsuite/Mage/DesignEditor/Block/Toolbar/ThemeTest.php @@ -26,18 +26,18 @@ */ /** - * Test for skin block functioning + * Test for theme block functioning */ -class Mage_DesignEditor_Block_Toolbar_SkinTest extends PHPUnit_Framework_TestCase +class Mage_DesignEditor_Block_Toolbar_ThemeTest extends PHPUnit_Framework_TestCase { /** - * @var Mage_DesignEditor_Block_Toolbar_Skin + * @var Mage_DesignEditor_Block_Toolbar_Theme */ protected $_block; protected function setUp() { - $this->_block = Mage::app()->getLayout()->createBlock('Mage_DesignEditor_Block_Toolbar_Skin'); + $this->_block = Mage::app()->getLayout()->createBlock('Mage_DesignEditor_Block_Toolbar_Theme'); } protected function tearDown() @@ -45,16 +45,16 @@ class Mage_DesignEditor_Block_Toolbar_SkinTest extends PHPUnit_Framework_TestCas $this->_block = null; } - public function testIsSkinSelected() + public function testIsThemeSelected() { $oldTheme = Mage::getDesign()->getDesignTheme(); - Mage::getDesign()->setDesignTheme('a/b/c'); - $isSelected = $this->_block->isSkinSelected('a/b/c'); + Mage::getDesign()->setDesignTheme('a/b'); + $isSelected = $this->_block->isThemeSelected('a/b'); Mage::getDesign()->setDesignTheme($oldTheme); $this->assertTrue($isSelected); - Mage::getDesign()->setDesignTheme('a/b/c'); - $isSelected = $this->_block->isSkinSelected('c/b/a'); + Mage::getDesign()->setDesignTheme('a/b'); + $isSelected = $this->_block->isThemeSelected('c/b'); Mage::getDesign()->setDesignTheme($oldTheme); $this->assertFalse($isSelected); } diff --git a/dev/tests/integration/testsuite/Mage/DesignEditor/Model/ObserverTest.php b/dev/tests/integration/testsuite/Mage/DesignEditor/Model/ObserverTest.php index 07be0d9b6693d0f4effba91a431b97840ebf2b98..0289259de2c56023d0a02a70e2a64f4f08423218 100644 --- a/dev/tests/integration/testsuite/Mage/DesignEditor/Model/ObserverTest.php +++ b/dev/tests/integration/testsuite/Mage/DesignEditor/Model/ObserverTest.php @@ -26,7 +26,7 @@ */ /** - * Test for skin changing observer + * Test for theme changing observer */ class Mage_DesignEditor_Model_ObserverTest extends PHPUnit_Framework_TestCase { @@ -78,11 +78,10 @@ class Mage_DesignEditor_Model_ObserverTest extends PHPUnit_Framework_TestCase */ public function testPreDispatchApplyDesign() { - $newSkin = 'default/default/blank'; - $this->assertNotEquals($newSkin, Mage::getDesign()->getDesignTheme()); - Mage::getSingleton('Mage_DesignEditor_Model_Session')->setSkin($newSkin); + $newTheme = 'default/blank'; + $this->assertNotEquals($newTheme, Mage::getDesign()->getDesignTheme()); $this->_observer->preDispatch($this->_eventObserver); - $this->assertEquals($newSkin, Mage::getDesign()->getDesignTheme()); + $this->assertEquals($newTheme, Mage::getDesign()->getDesignTheme()); } /** @@ -103,12 +102,11 @@ class Mage_DesignEditor_Model_ObserverTest extends PHPUnit_Framework_TestCase */ public function testPreDispatchApplyDesignInactive() { - $newSkin = 'default/default/blank'; - $oldSkin = Mage::getDesign()->getDesignTheme(); - $this->assertNotEquals($newSkin, $oldSkin); - Mage::getSingleton('Mage_DesignEditor_Model_Session')->setSkin($newSkin); + $newTheme = 'default/blank'; + $oldTheme = Mage::getDesign()->getDesignTheme(); + $this->assertNotEquals($newTheme, $oldTheme); $this->_observer->preDispatch($this->_eventObserver); - $this->assertEquals($oldSkin, Mage::getDesign()->getDesignTheme()); + $this->assertEquals($oldTheme, Mage::getDesign()->getDesignTheme()); } /** @@ -187,7 +185,7 @@ class Mage_DesignEditor_Model_ObserverTest extends PHPUnit_Framework_TestCase public function wrapPageElementDataProvider() { $removeLink = sprintf('<a href="#remove"><img src="%s" alt="Remove" /></a>', - Mage::getDesign()->getSkinUrl('images/btn_remove.gif') + Mage::getDesign()->getViewFileUrl('images/btn_remove.gif') ); return array( 'non-draggable block' => array( @@ -263,7 +261,8 @@ class Mage_DesignEditor_Model_ObserverTest extends PHPUnit_Framework_TestCase . '<div class="vde_element_title">draggable_block</div>%w' . '<div class="vde_element_title vde_element_remove" id="vde_element_ZHJhZ2dhYmxlX2Jsb2Nr_remove">%w' . '<a href="#remove">%w' - . '<img src="' . Mage::getDesign()->getSkinUrl('images/btn_remove.gif') . '" alt="Remove" />%w' + . '<img src="' . Mage::getDesign()->getViewFileUrl('images/btn_remove.gif') + . '" alt="Remove" />%w' . '</a>%w' . '</div>%w' . '</div>%w' diff --git a/dev/tests/integration/testsuite/Mage/DesignEditor/Model/SessionTest.php b/dev/tests/integration/testsuite/Mage/DesignEditor/Model/SessionTest.php index 98c3f635c5a29865bb63127b6e11c528e2019c3b..d5c76801144172840a69e360dee3881ee683681a 100644 --- a/dev/tests/integration/testsuite/Mage/DesignEditor/Model/SessionTest.php +++ b/dev/tests/integration/testsuite/Mage/DesignEditor/Model/SessionTest.php @@ -129,17 +129,9 @@ class Mage_DesignEditor_Model_SessionTest extends PHPUnit_Framework_TestCase $this->assertFalse($this->_model->isHighlightingDisabled()); } - public function testSetSkin() + public function testSetThemeId() { - $this->_model->setSkin('default/default/blank'); - $this->assertEquals('default/default/blank', $this->_model->getSkin()); - } - - /** - * @expectedException Mage_Core_Exception - */ - public function testSetSkinWrongValue() - { - $this->_model->setSkin('wrong/skin/applied'); + $this->_model->setThemeId(0); + $this->assertEquals(0, $this->_model->getThemeId()); } } diff --git a/dev/tests/integration/testsuite/Mage/DesignEditor/_files/design_editor_active.php b/dev/tests/integration/testsuite/Mage/DesignEditor/_files/design_editor_active.php index 723b76d539a3fc675d8d8dd5236f6020af5e3fdd..5433d6bf615880d0a5a4b3aafac3776547c6e167 100644 --- a/dev/tests/integration/testsuite/Mage/DesignEditor/_files/design_editor_active.php +++ b/dev/tests/integration/testsuite/Mage/DesignEditor/_files/design_editor_active.php @@ -37,7 +37,7 @@ $session->activateDesignEditor(); $theme = Mage::getModel('Mage_Core_Model_Theme'); $theme->setData(array( 'parent_id' => null, - 'theme_path' => 'default/default', + 'theme_path' => 'default/blank', 'theme_version' => '2.0.0.0', 'theme_title' => 'Default', 'preview_image' => 'media/preview_image.jpg', @@ -47,8 +47,3 @@ $theme->setData(array( )); $theme->save(); $session->setThemeId($theme->getThemeId()); -$skin = implode('/', array( - $theme->getThemePath(), - Mage_Core_Model_Design_Package::DEFAULT_SKIN_NAME -)); -$session->setSkin($skin); diff --git a/dev/tests/integration/testsuite/Mage/DesignEditor/_files/design_editor_active_rollback.php b/dev/tests/integration/testsuite/Mage/DesignEditor/_files/design_editor_active_rollback.php index 2d45d010cb6a1081db7945e83f6f3e018a5cbbd7..b08b182bffaa18fdbec53379e21cf0e0b8fb68e6 100644 --- a/dev/tests/integration/testsuite/Mage/DesignEditor/_files/design_editor_active_rollback.php +++ b/dev/tests/integration/testsuite/Mage/DesignEditor/_files/design_editor_active_rollback.php @@ -32,7 +32,6 @@ $auth->setAuthStorage($session); $session->deactivateDesignEditor(); $auth->logout(); $session->unsThemeId(); -$session->unsSkin(); /** @var $theme Mage_Core_Model_Theme */ $theme = Mage::getModel('Mage_Core_Model_Theme'); $theme->load($session->getThemeId())->delete(); diff --git a/dev/tests/integration/testsuite/Mage/DesignEditor/controllers/Adminhtml/System/Design/EditorControllerTest.php b/dev/tests/integration/testsuite/Mage/DesignEditor/controllers/Adminhtml/System/Design/EditorControllerTest.php index 4e92218ba83097972031ea977652d17cb06a1026..9ecd8e5416d3de69d88def4851b530f8464d9113 100644 --- a/dev/tests/integration/testsuite/Mage/DesignEditor/controllers/Adminhtml/System/Design/EditorControllerTest.php +++ b/dev/tests/integration/testsuite/Mage/DesignEditor/controllers/Adminhtml/System/Design/EditorControllerTest.php @@ -43,7 +43,7 @@ class Mage_DesignEditor_Adminhtml_System_Design_EditorControllerTest extends Mag $theme->setData(array( 'package_title' => 'Default', 'parent_id' => null, - 'theme_path' => 'default/default', + 'theme_path' => 'default/demo', 'theme_version' => '2.0.0.0', 'theme_title' => 'Default', 'magento_version_from' => '2.0.0.0-dev1', @@ -114,7 +114,6 @@ class Mage_DesignEditor_Adminhtml_System_Design_EditorControllerTest extends Mag { $session = Mage::getModel('Mage_DesignEditor_Model_Session'); $this->assertFalse($session->isDesignEditorActive()); - $this->getRequest()->setParam('theme_skin', 'default/default/default'); $this->getRequest()->setParam('theme_id', self::$_themeId); $this->dispatch('backend/admin/system_design_editor/launch'); $this->assertTrue($session->isDesignEditorActive()); diff --git a/dev/tests/integration/testsuite/Mage/DesignEditor/controllers/EditorControllerTest.php b/dev/tests/integration/testsuite/Mage/DesignEditor/controllers/EditorControllerTest.php index 9550f51ccf0cf53bef14445c45d7cb2a65c0a53f..ea11475cabdc3f0ef8efc226251994f86d390580 100644 --- a/dev/tests/integration/testsuite/Mage/DesignEditor/controllers/EditorControllerTest.php +++ b/dev/tests/integration/testsuite/Mage/DesignEditor/controllers/EditorControllerTest.php @@ -99,55 +99,61 @@ class Mage_DesignEditor_EditorControllerTest extends Magento_Test_TestCase_Contr /** * @magentoDataFixture Mage/DesignEditor/_files/design_editor_active.php */ - public function testSkinAction() + public function testThemeAction() { $session = Mage::getSingleton('Mage_DesignEditor_Model_Session'); - $this->getRequest()->setParam('skin', 'default/default/blank'); $this->getRequest()->setParam('theme_id', $session->getThemeId()); - $this->dispatch('design/editor/skin'); + $this->dispatch('design/editor/theme'); $this->assertRedirect(); + $theme = Mage::getModel('Mage_Core_Model_Theme'); + $theme->load($session->getThemeId()); - $this->assertEquals('default/default/blank', $session->getSkin()); + $this->assertEquals('default/blank', $theme->getThemePath()); } /** * @magentoDataFixture Mage/DesignEditor/_files/design_editor_active.php */ - public function testSkinActionWrongValue() + public function testThemeActionWrongValue() { $session = Mage::getSingleton('Mage_DesignEditor_Model_Session'); - $this->getRequest()->setParam('skin', 'wrong/skin/applied'); $this->getRequest()->setParam('theme_id', $session->getThemeId()); - $this->dispatch('design/editor/skin'); + $this->dispatch('design/editor/theme'); $this->assertRedirect(); - $this->assertNotEquals('wrong/skin/applied', $session->getSkin()); + $theme = Mage::getModel('Mage_Core_Model_Theme'); + $theme->load($session->getThemeId()); + + $this->assertNotEquals('wrong/theme/applied', $theme->getThemePath()); } - public function testSkinActionNonActivatedEditor() + public function testThemeActionNonActivatedEditor() { - $this->getRequest()->setParam('skin', 'default/default/blank'); - $this->dispatch('design/editor/skin'); + $this->getRequest()->setParam('theme_id', 0); + $this->dispatch('design/editor/theme'); $this->assert404NotFound(); $session = Mage::getSingleton('Mage_DesignEditor_Model_Session'); - $this->assertNotEquals('default/default/blank', $session->getSkin()); + + $theme = Mage::getModel('Mage_Core_Model_Theme'); + $theme->load($session->getThemeId()); + + $this->assertNotEquals('default/blank', $theme->getThemePath()); } /** * @magentoDataFixture Mage/DesignEditor/_files/design_editor_active.php */ - public function testSkinActionRedirectUrl() + public function testThemeActionRedirectUrl() { $expectedRedirectUrl = 'http://localhost/index.php/path/to/redirect/?value=1#anchor'; - $this->getRequest()->setParam('skin', 'default/default/blank'); $this->getRequest()->setParam( Mage_Core_Controller_Front_Action::PARAM_NAME_URL_ENCODED, Mage::helper('Mage_Core_Helper_Data')->urlEncode($expectedRedirectUrl) ); - $this->dispatch('design/editor/skin'); + $this->dispatch('design/editor/theme'); $this->assertRedirect($this->equalTo($expectedRedirectUrl)); } } diff --git a/dev/tests/integration/testsuite/Mage/Eav/Block/Adminhtml/Attribute/Edit/Main/AbstractTest.php b/dev/tests/integration/testsuite/Mage/Eav/Block/Adminhtml/Attribute/Edit/Main/AbstractTest.php index 05a6d1d96818f70a7250407b5f2954637dbce300..1b36bee9217a3f579d6872588e8c4ce1c473fc5b 100644 --- a/dev/tests/integration/testsuite/Mage/Eav/Block/Adminhtml/Attribute/Edit/Main/AbstractTest.php +++ b/dev/tests/integration/testsuite/Mage/Eav/Block/Adminhtml/Attribute/Edit/Main/AbstractTest.php @@ -45,12 +45,14 @@ class Mage_Eav_Block_Adminhtml_Attribute_Edit_Main_AbstractTest Mage::getObjectManager()->get('Mage_Core_Controller_Request_Http'), Mage::getObjectManager()->get('Mage_Core_Model_Layout'), Mage::getObjectManager()->get('Mage_Core_Model_Event_Manager'), + Mage::getObjectManager()->get('Mage_Backend_Model_Url'), Mage::getObjectManager()->get('Mage_Core_Model_Translate'), Mage::getObjectManager()->get('Mage_Core_Model_Cache'), Mage::getObjectManager()->get('Mage_Core_Model_Design_Package'), Mage::getObjectManager()->get('Mage_Core_Model_Session'), Mage::getObjectManager()->get('Mage_Core_Model_Store_Config'), - Mage::getObjectManager()->get('Mage_Core_Controller_Varien_Front') + Mage::getObjectManager()->get('Mage_Core_Controller_Varien_Front'), + Mage::getObjectManager()->get('Mage_Core_Model_Factory_Helper') ); $block = $this->getMockForAbstractClass('Mage_Eav_Block_Adminhtml_Attribute_Edit_Main_Abstract', $arguments) ->setLayout(Mage::getObjectManager()->create('Mage_Core_Model_Layout')); diff --git a/dev/tests/integration/testsuite/Mage/Adminhtml/Model/UrlTest.php b/dev/tests/integration/testsuite/Mage/ImportExport/controllers/Adminhtml/ImportControllerTest.php similarity index 71% rename from dev/tests/integration/testsuite/Mage/Adminhtml/Model/UrlTest.php rename to dev/tests/integration/testsuite/Mage/ImportExport/controllers/Adminhtml/ImportControllerTest.php index f19b986a0d1491330358fd01b44599ab90bb7d14..de4b997d8db082955a1cffacaaa9ce5842e156c0 100644 --- a/dev/tests/integration/testsuite/Mage/Adminhtml/Model/UrlTest.php +++ b/dev/tests/integration/testsuite/Mage/ImportExport/controllers/Adminhtml/ImportControllerTest.php @@ -19,19 +19,18 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Magento - * @package Mage_Adminhtml + * @package Mage_ImportExport * @subpackage integration_tests * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** - * @group module:Mage_Adminhtml - */ -class Mage_Adminhtml_Model_UrlTest extends PHPUnit_Framework_TestCase +class Mage_ImportExport_Adminhtml_ImportControllerTest extends Mage_Adminhtml_Utility_Controller { - public function testConstructor() + public function testGetFilterAction() { - $this->assertInstanceOf('Mage_Backend_Model_Url', Mage::getModel('Mage_Adminhtml_Model_Url')); + $this->dispatch('backend/admin/import/index'); + $body = $this->getResponse()->getBody(); + $this->assertContains(Mage::helper('Mage_ImportExport_Helper_Data')->getMaxUploadSizeMessage(), $body); } } diff --git a/dev/tests/integration/testsuite/Mage/Install/controllers/WizardControllerTest.php b/dev/tests/integration/testsuite/Mage/Install/controllers/WizardControllerTest.php index 22f33371ea16c5c8930febd5f50eef04b9141909..383568bd13d6cbda7b3ba423964fe7b608d020cf 100644 --- a/dev/tests/integration/testsuite/Mage/Install/controllers/WizardControllerTest.php +++ b/dev/tests/integration/testsuite/Mage/Install/controllers/WizardControllerTest.php @@ -35,14 +35,14 @@ class Mage_Install_WizardControllerTest extends Magento_Test_TestCase_Controller /** * @var string */ - protected static $_tmpSkinDir; + protected static $_tmpThemeDir; public static function setUpBeforeClass() { parent::setUpBeforeClass(); self::$_tmpMediaDir = realpath(Magento_Test_Bootstrap::getInstance()->getTmpDir()) . DIRECTORY_SEPARATOR . 'media'; - self::$_tmpSkinDir = self::$_tmpMediaDir . DIRECTORY_SEPARATOR . 'skin'; + self::$_tmpThemeDir = self::$_tmpMediaDir . DIRECTORY_SEPARATOR . 'theme'; } public function setUp() @@ -74,18 +74,18 @@ class Mage_Install_WizardControllerTest extends Magento_Test_TestCase_Controller $this->_testInstallProhibitedWhenNonWritable(self::$_tmpMediaDir); } - public function testPreDispatchNonWritableSkin() + public function testPreDispatchNonWritableTheme() { mkdir(self::$_tmpMediaDir, 0777); $this->_runOptions['media_dir'] = self::$_tmpMediaDir; - mkdir(self::$_tmpSkinDir, 0444); - $this->_testInstallProhibitedWhenNonWritable(self::$_tmpSkinDir); + mkdir(self::$_tmpThemeDir, 0444); + $this->_testInstallProhibitedWhenNonWritable(self::$_tmpThemeDir); } /** * Tests that when $nonWritableDir folder is read-only, the installation controller prohibits continuing - * installation and points to fix issue with skin directory. + * installation and points to fix issue with theme directory. * * @param string $nonWritableDir */ @@ -98,6 +98,6 @@ class Mage_Install_WizardControllerTest extends Magento_Test_TestCase_Controller $this->dispatch('install/index'); $this->assertEquals(503, $this->getResponse()->getHttpResponseCode()); - $this->assertContains(self::$_tmpSkinDir, $this->getResponse()->getBody()); + $this->assertContains(self::$_tmpThemeDir, $this->getResponse()->getBody()); } } diff --git a/dev/tests/integration/testsuite/Mage/Newsletter/Model/QueueTest.php b/dev/tests/integration/testsuite/Mage/Newsletter/Model/QueueTest.php index aa9b54890a41145a17825efa3ce1a2544d43be24..10bb469cec79f5d61a4fafc2505dbf1cd941a3c2 100644 --- a/dev/tests/integration/testsuite/Mage/Newsletter/Model/QueueTest.php +++ b/dev/tests/integration/testsuite/Mage/Newsletter/Model/QueueTest.php @@ -29,8 +29,8 @@ class Mage_Newsletter_Model_QueueTest extends PHPUnit_Framework_TestCase { /** * @magentoDataFixture Mage/Newsletter/_files/queue.php - * @magentoConfigFixture current_store design/theme/full_name default/default/blue - * @magentoConfigFixture fixturestore_store design/theme/full_name default/default/default + * @magentoConfigFixture current_store design/theme/full_name default/demo_blue + * @magentoConfigFixture fixturestore_store design/theme/full_name default/demo * @magentoConfigFixture fixturestore_store general/locale/code de_DE * @magentoAppIsolation enabled */ @@ -40,10 +40,10 @@ class Mage_Newsletter_Model_QueueTest extends PHPUnit_Framework_TestCase $subscriberOne->expects($this->any())->method('send'); $subscriberTwo = clone $subscriberOne; $subscriberOne->expects($this->once())->method('setBodyHTML')->with( - $this->stringEndsWith('/skin/frontend/default/default/blue/en_US/images/logo.gif') + $this->stringEndsWith('/theme/frontend/default/demo_blue/en_US/images/logo.gif') ); $subscriberTwo->expects($this->once())->method('setBodyHTML')->with( - $this->stringEndsWith('/skin/frontend/default/default/default/de_DE/images/logo.gif') + $this->stringEndsWith('/theme/frontend/default/demo/de_DE/images/logo.gif') ); $emailTemplate = $this->getMock('Mage_Core_Model_Email_Template', array('_getMail'), array(), '', false); diff --git a/dev/tests/integration/testsuite/Mage/Newsletter/Model/TemplateTest.php b/dev/tests/integration/testsuite/Mage/Newsletter/Model/TemplateTest.php index 83bfa4e3165afbe5a5bde277291ca0d510ee11d5..7dbf9e98e9337caa6a6edcce1545ece11bfc8898 100644 --- a/dev/tests/integration/testsuite/Mage/Newsletter/Model/TemplateTest.php +++ b/dev/tests/integration/testsuite/Mage/Newsletter/Model/TemplateTest.php @@ -46,22 +46,22 @@ class Mage_Newsletter_Model_TemplateTest extends PHPUnit_Framework_TestCase } /** - * @magentoConfigFixture install/design/theme/full_name default/default/default - * @magentoConfigFixture adminhtml/design/theme/full_name default/default/default - * @magentoConfigFixture current_store design/theme/full_name default/iphone/default - * @magentoConfigFixture fixturestore_store design/theme/full_name default/default/blue + * @magentoConfigFixture install/design/theme/full_name default/basic + * @magentoConfigFixture adminhtml/design/theme/full_name default/basic + * @magentoConfigFixture current_store design/theme/full_name default/iphone + * @magentoConfigFixture fixturestore_store design/theme/full_name default/demo_blue * @magentoAppIsolation enabled * @dataProvider getProcessedTemplateDataProvider */ public function testGetProcessedTemplate($area, $store, $design) { $this->markTestIncomplete('Test partially fails bc of MAGETWO-557.'); - $this->_model->setTemplateText('{{skin url="Mage_Page::favicon.ico"}}'); - $this->assertStringEndsWith('skin/frontend/default/default/default/en_US/Mage_Page/favicon.ico', + $this->_model->setTemplateText('{{view url="Mage_Page::favicon.ico"}}'); + $this->assertStringEndsWith('theme/frontend/default/demo/en_US/Mage_Page/favicon.ico', $this->_model->getProcessedTemplate() ); $this->_model->emulateDesign($store, $area); - $expectedTemplateText = "skin/{$area}/{$design}/en_US/Mage_Page/favicon.ico"; + $expectedTemplateText = "theme/{$area}/{$design}/en_US/Mage_Page/favicon.ico"; $this->assertStringEndsWith($expectedTemplateText, $this->_model->getProcessedTemplate()); $this->_model->revertDesign(); } @@ -72,10 +72,10 @@ class Mage_Newsletter_Model_TemplateTest extends PHPUnit_Framework_TestCase public function getProcessedTemplateDataProvider() { return array( - 'install' => array('install', 'default', 'default/default/default'), - 'backend' => array('adminhtml', 'admin', 'default/default/default'), - 'frontend' => array('frontend', 'default', 'default/iphone/default'), - 'frontend store' => array('frontend', 'fixturestore', 'default/default/blue'), + 'install' => array('install', 'default', 'default/demo'), + 'backend' => array('adminhtml', 'admin', 'default/basic'), + 'frontend' => array('frontend', 'default', 'default/iphone'), + 'frontend store' => array('frontend', 'fixturestore', 'default/demo_blue'), ); } diff --git a/dev/tests/integration/testsuite/Mage/Newsletter/_files/queue.php b/dev/tests/integration/testsuite/Mage/Newsletter/_files/queue.php index 2be6bc80b981206cc728daf77efe92f0b0c7daff..f87cb099744b7d012efdc851e4a1256005692917 100644 --- a/dev/tests/integration/testsuite/Mage/Newsletter/_files/queue.php +++ b/dev/tests/integration/testsuite/Mage/Newsletter/_files/queue.php @@ -37,7 +37,7 @@ $otherStore = Mage::app()->getStore('fixturestore')->getId(); $queue = Mage::getModel('Mage_Newsletter_Model_Queue'); $queue->setTemplateId($templateId) - ->setNewsletterText('{{skin url="images/logo.gif"}}') + ->setNewsletterText('{{view url="images/logo.gif"}}') ->setNewsletterSubject('Subject') ->setNewsletterSenderName('CustomerSupport') ->setNewsletterSenderEmail('support@example.com') diff --git a/dev/tests/integration/testsuite/Mage/Page/Block/Html/BreadcrumbsTest.php b/dev/tests/integration/testsuite/Mage/Page/Block/Html/BreadcrumbsTest.php index aab2f2b752fffc1c1494e1dea3ca83bd0c83cd6e..a81dcf6e1d30c9f745ae5b20324316b40433185a 100644 --- a/dev/tests/integration/testsuite/Mage/Page/Block/Html/BreadcrumbsTest.php +++ b/dev/tests/integration/testsuite/Mage/Page/Block/Html/BreadcrumbsTest.php @@ -56,4 +56,27 @@ class Mage_Page_Block_Html_BreadcrumbsTest extends PHPUnit_Framework_TestCase $this->assertContains('test title', $html); $this->assertContains('test link', $html); } + + public function testGetCacheKeyInfo() + { + $crumbs = array( + 'test' => array( + 'label' => 'test label', + 'title' => 'test title', + 'link' => 'test link', + ) + ); + foreach ($crumbs as $crumbName => &$crumb) { + $this->_block->addCrumb($crumbName, $crumb); + $crumb += array( + 'first' => null, + 'last' => null, + 'readonly' => null, + ); + } + + $cacheKeyInfo = $this->_block->getCacheKeyInfo(); + $crumbsFromCacheKey = unserialize(base64_decode($cacheKeyInfo['crumbs'])); + $this->assertEquals($crumbs, $crumbsFromCacheKey); + } } diff --git a/dev/tests/integration/testsuite/Mage/Page/Block/Html/FooterTest.php b/dev/tests/integration/testsuite/Mage/Page/Block/Html/FooterTest.php index 5ea9854a5dfb9955e6d6f63073d39f3ee8db869d..b46602af76cbcd11b450ec9ac65f8a87461727e9 100644 --- a/dev/tests/integration/testsuite/Mage/Page/Block/Html/FooterTest.php +++ b/dev/tests/integration/testsuite/Mage/Page/Block/Html/FooterTest.php @@ -31,6 +31,6 @@ class Mage_Page_Block_Html_FooterTest extends PHPUnit_Framework_TestCase { $block = Mage::app()->getLayout()->createBlock('Mage_Page_Block_Html_Footer'); $storeId = Mage::app()->getStore()->getId(); - $this->assertEquals(array('PAGE_FOOTER', $storeId, 0, 'default', 'default', null), $block->getCacheKeyInfo()); + $this->assertEquals(array('PAGE_FOOTER', $storeId, 0, 'default', 'demo', null), $block->getCacheKeyInfo()); } } diff --git a/dev/tests/integration/testsuite/Mage/Page/Block/Html/HeadTest.php b/dev/tests/integration/testsuite/Mage/Page/Block/Html/HeadTest.php index 0064aa2912e43608282775306cd418ab4c0936eb..27ce1759987396811509fa041328df8f4d41912d 100644 --- a/dev/tests/integration/testsuite/Mage/Page/Block/Html/HeadTest.php +++ b/dev/tests/integration/testsuite/Mage/Page/Block/Html/HeadTest.php @@ -34,7 +34,7 @@ class Mage_Page_Block_Html_HeadTest extends PHPUnit_Framework_TestCase public static function setUpBeforeClass() { - Mage::getDesign()->setDesignTheme('default/default/default', 'frontend'); + Mage::getDesign()->setDesignTheme('default/demo', 'frontend'); } protected function setUp() @@ -83,12 +83,12 @@ class Mage_Page_Block_Html_HeadTest extends PHPUnit_Framework_TestCase $this->assertEquals( '<script type="text/javascript" src="http://localhost/pub/lib/varien/js.js"></script>' . "\n" . '<script type="text/javascript" ' - . 'src="http://localhost/pub/media/skin/frontend/default/default/default/en_US/Mage_Bundle/bundle.js">' + . 'src="http://localhost/pub/media/theme/frontend/default/demo/en_US/Mage_Bundle/bundle.js">' . '</script>' . "\n" . '<link rel="stylesheet" type="text/css" media="all"' . ' href="http://localhost/pub/lib/tiny_mce/themes/advanced/skins/default/ui.css" />' . "\n" . '<link rel="stylesheet" type="text/css" media="print" ' - . 'href="http://localhost/pub/media/skin/frontend/default/default/default/en_US/css/styles.css" />' + . 'href="http://localhost/pub/media/theme/frontend/default/demo/en_US/css/styles.css" />' . "\n" . '<link rel="alternate" type="application/rss+xml" title="RSS Feed" href="http://example.com/feed.xml" />' . "\n" diff --git a/dev/tests/integration/testsuite/Mage/Review/controllers/ProductControllerTest.php b/dev/tests/integration/testsuite/Mage/Review/controllers/ProductControllerTest.php index 467a9b465a20357b8af461209144c0517099d33d..7ccd251e51fc2db18f2ebfddc597581d610f5a0c 100644 --- a/dev/tests/integration/testsuite/Mage/Review/controllers/ProductControllerTest.php +++ b/dev/tests/integration/testsuite/Mage/Review/controllers/ProductControllerTest.php @@ -36,7 +36,7 @@ class Mage_Review_ProductControllerTest extends Magento_Test_TestCase_Controller $this->getRequest()->setParam('id', $productId); $this->dispatch('review/product/list'); $result = $this->getResponse()->getBody(); - $this->assertContains("media/skin/frontend/{$expectedDesign}/en_US/Mage_Page/favicon.ico", $result); + $this->assertContains("media/theme/frontend/{$expectedDesign}/en_US/Mage_Page/favicon.ico", $result); } /** @@ -45,7 +45,7 @@ class Mage_Review_ProductControllerTest extends Magento_Test_TestCase_Controller public function listActionDesignDataProvider() { return array( - 'custom product design' => array(2, 'default/default/blue'), + 'custom product design' => array(2, 'default/demo_blue'), ); } } diff --git a/dev/tests/integration/testsuite/Mage/Rss/Block/Order/StatusTest.php b/dev/tests/integration/testsuite/Mage/Rss/Block/Order/StatusTest.php index bab02b64fa2c87a6daba780b515efda90e14fc31..623bf652c197e614f443758e76e5b24b3e9280c9 100644 --- a/dev/tests/integration/testsuite/Mage/Rss/Block/Order/StatusTest.php +++ b/dev/tests/integration/testsuite/Mage/Rss/Block/Order/StatusTest.php @@ -29,6 +29,9 @@ class Mage_Rss_Block_Order_StatusTest extends PHPUnit_Framework_TestCase { public function testToHtml() { + if (Magento_Test_Bootstrap::getInstance()->getDbVendorName() != 'mysql') { + $this->markTestIncomplete('bug: MAGETWO-4227'); + } $block = Mage::app()->getLayout()->createBlock('Mage_Rss_Block_Order_Status'); $this->assertEmpty($block->toHtml()); diff --git a/dev/tests/integration/testsuite/Mage/Rss/controllers/CatalogControllerTest.php b/dev/tests/integration/testsuite/Mage/Rss/controllers/CatalogControllerTest.php index 7a1d2e7074d5c6169b0444310e5e878a12f302ee..d9c74db806e20e2b8b07c74076c33e26f7deb57e 100644 --- a/dev/tests/integration/testsuite/Mage/Rss/controllers/CatalogControllerTest.php +++ b/dev/tests/integration/testsuite/Mage/Rss/controllers/CatalogControllerTest.php @@ -163,6 +163,7 @@ class Mage_Rss_CatalogControllerTest extends Magento_Test_TestCase_ControllerAbs */ protected function _loginAdmin() { + Mage::getDesign()->setArea('adminhtml'); $this->getRequest()->setServer(array( 'PHP_AUTH_USER' => Magento_Test_Bootstrap::ADMIN_NAME, 'PHP_AUTH_PW' => Magento_Test_Bootstrap::ADMIN_PASSWORD diff --git a/dev/tests/integration/testsuite/Mage/Sales/Block/Order/TotalsTest.php b/dev/tests/integration/testsuite/Mage/Sales/Block/Order/TotalsTest.php index 1fdf3f6c9452490045a0bc56b731911eee38d3e4..62708de3a7c2651de4bf9391c6b9b3c7f246243b 100644 --- a/dev/tests/integration/testsuite/Mage/Sales/Block/Order/TotalsTest.php +++ b/dev/tests/integration/testsuite/Mage/Sales/Block/Order/TotalsTest.php @@ -36,12 +36,14 @@ class Mage_Sales_Block_Order_TotalsTest extends PHPUnit_Framework_TestCase 'Mage_Core_Controller_Request_Http', 'Mage_Core_Model_Layout', 'Mage_Core_Model_Event_Manager', + 'Mage_Core_Model_Url', 'Mage_Core_Model_Translate', 'Mage_Core_Model_Cache', 'Mage_Core_Model_Design_Package', 'Mage_Core_Model_Session', 'Mage_Core_Model_Store_Config', - 'Mage_Core_Controller_Varien_Front' + 'Mage_Core_Controller_Varien_Front', + 'Mage_Core_Model_Factory_Helper' ); public function testToHtmlChildrenInitialized() diff --git a/dev/tests/integration/testsuite/Mage/Sales/Model/Order/CreditmemoTest.php b/dev/tests/integration/testsuite/Mage/Sales/Model/Order/CreditmemoTest.php index 66d91847576463c2426db3a80e207d2c4f97a593..1e98c9e95b350e9f65393641278e6ab0b15d349b 100644 --- a/dev/tests/integration/testsuite/Mage/Sales/Model/Order/CreditmemoTest.php +++ b/dev/tests/integration/testsuite/Mage/Sales/Model/Order/CreditmemoTest.php @@ -28,7 +28,7 @@ class Mage_Sales_Model_Order_CreditmemoTest extends PHPUnit_Framework_TestCase { /** - * @magentoConfigFixture current_store design/theme/full_name default/default/default + * @magentoConfigFixture current_store design/theme/full_name default/demo * @magentoDataFixture Mage/Sales/_files/order.php */ public function testSendEmail() diff --git a/dev/tests/integration/testsuite/Mage/Sales/Model/Order/InvoiceTest.php b/dev/tests/integration/testsuite/Mage/Sales/Model/Order/InvoiceTest.php index ce71e4915424ded6f25fb032e994692a918fa71b..c205ba0d2cfeb4d679bd6d7d025ff37cf93a0410 100644 --- a/dev/tests/integration/testsuite/Mage/Sales/Model/Order/InvoiceTest.php +++ b/dev/tests/integration/testsuite/Mage/Sales/Model/Order/InvoiceTest.php @@ -28,7 +28,7 @@ class Mage_Sales_Model_Order_InvoiceTest extends PHPUnit_Framework_TestCase { /** - * @magentoConfigFixture current_store design/theme/full_name default/default/default + * @magentoConfigFixture current_store design/theme/full_name default/demo * @magentoDataFixture Mage/Sales/_files/order.php */ public function testSendEmail() diff --git a/dev/tests/integration/testsuite/Mage/Sales/Model/Order/OrderTest.php b/dev/tests/integration/testsuite/Mage/Sales/Model/Order/OrderTest.php index e536ce9d5bb47fe6d627af335ccc51782c8a7798..93374d4de8c406d476411ea52fc9e3d5ae015a52 100644 --- a/dev/tests/integration/testsuite/Mage/Sales/Model/Order/OrderTest.php +++ b/dev/tests/integration/testsuite/Mage/Sales/Model/Order/OrderTest.php @@ -28,7 +28,7 @@ class Mage_Sales_Model_OrderTest extends PHPUnit_Framework_TestCase { /** - * @magentoConfigFixture current_store design/theme/full_name default/default/default + * @magentoConfigFixture current_store design/theme/full_name default/demo * @magentoDataFixture Mage/Sales/_files/order.php */ public function testSendNewOrderEmail() diff --git a/dev/tests/integration/testsuite/Mage/Sales/Model/Order/ShipmentTest.php b/dev/tests/integration/testsuite/Mage/Sales/Model/Order/ShipmentTest.php index 1cce6ef03703c4e892d7fc6b5558cab4d98b67f4..d4cd12e5042ad822cb0390326e9bf00d14509a27 100644 --- a/dev/tests/integration/testsuite/Mage/Sales/Model/Order/ShipmentTest.php +++ b/dev/tests/integration/testsuite/Mage/Sales/Model/Order/ShipmentTest.php @@ -28,7 +28,7 @@ class Mage_Sales_Model_Order_ShipmentTest extends PHPUnit_Framework_TestCase { /** - * @magentoConfigFixture current_store design/theme/full_name default/default/default + * @magentoConfigFixture current_store design/theme/full_name default/demo * @magentoDataFixture Mage/Sales/_files/order.php */ public function testSendEmail() diff --git a/dev/tests/integration/testsuite/Mage/Tax/Model/Calculation/RuleTest.php b/dev/tests/integration/testsuite/Mage/Tax/Model/Calculation/RuleTest.php index 4942a374eaab4aa80ba2d600283c1c14bd7b6bed..4fed16b1b49400a6a55de11a5fd053352ad25214 100644 --- a/dev/tests/integration/testsuite/Mage/Tax/Model/Calculation/RuleTest.php +++ b/dev/tests/integration/testsuite/Mage/Tax/Model/Calculation/RuleTest.php @@ -31,34 +31,6 @@ */ class Mage_Tax_Model_Calculation_RuleTest extends PHPUnit_Framework_TestCase { - /** - * Customer Tax Model Class Mock - * - * @var Mage_Tax_Model_Class - */ - protected $_customerTaxClass; - - /** - * Product Tax Model Class Mock - * - * @var Mage_Tax_Model_Class - */ - protected $_productTaxClass; - - - protected function setUp() - { - $this->_customerTaxClass = $this->_getTaxClassMock( - 'getCustomerClasses', - Mage_Tax_Model_Class::TAX_CLASS_TYPE_CUSTOMER - ); - - $this->_productTaxClass = $this->_getTaxClassMock( - 'getProductClasses', - Mage_Tax_Model_Class::TAX_CLASS_TYPE_PRODUCT - ); - } - /** * Test that first value in multiselect applied as default if there is no default value in config * @@ -184,7 +156,7 @@ class Mage_Tax_Model_Calculation_RuleTest extends PHPUnit_Framework_TestCase ), array( Mage_Tax_Model_Class::TAX_CLASS_TYPE_PRODUCT, - array('Taxable Goods', 'Shipping', 'ProductTaxClass1', 'ProductTaxClass2') + array('Taxable Goods', 'ProductTaxClass1', 'ProductTaxClass2') ), ); } diff --git a/dev/tests/integration/testsuite/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/LayoutTest.php b/dev/tests/integration/testsuite/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/LayoutTest.php index cb56aca9759d60d386df99a5bd032da3a4999b08..69eb94d0fcca87c570838355462c3e6da4d43118 100644 --- a/dev/tests/integration/testsuite/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/LayoutTest.php +++ b/dev/tests/integration/testsuite/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/LayoutTest.php @@ -36,12 +36,14 @@ class Mage_Widget_Block_Adminhtml_Widget_Instance_Edit_Chooser_LayoutTest extend 'Mage_Core_Controller_Request_Http', 'Mage_Core_Model_Layout', 'Mage_Core_Model_Event_Manager', + 'Mage_Backend_Model_Url', 'Mage_Core_Model_Translate', 'Mage_Core_Model_Cache', 'Mage_Core_Model_Design_Package', 'Mage_Core_Model_Session', 'Mage_Core_Model_Store_Config', 'Mage_Core_Controller_Varien_Front', + 'Mage_Core_Model_Factory_Helper' ); protected function setUp() @@ -90,4 +92,4 @@ class Mage_Widget_Block_Adminhtml_Widget_Instance_Edit_Chooser_LayoutTest extend } return $arguments; } -} \ No newline at end of file +} diff --git a/dev/tests/integration/testsuite/Mage/Widget/Model/Widget/ConfigTest.php b/dev/tests/integration/testsuite/Mage/Widget/Model/Widget/ConfigTest.php index 09f593520ecc3bd7d7ccef15bc9221bffe2ea87c..aec7a013f981b7797c4e79ff7974aaeac110989b 100644 --- a/dev/tests/integration/testsuite/Mage/Widget/Model/Widget/ConfigTest.php +++ b/dev/tests/integration/testsuite/Mage/Widget/Model/Widget/ConfigTest.php @@ -49,7 +49,7 @@ class Mage_Widget_Model_Widget_ConfigTest extends PHPUnit_Framework_TestCase */ public function testGetPluginSettings() { - Mage::getDesign()->setDesignTheme('default/default/default', 'adminhtml'); + Mage::getDesign()->setDesignTheme('default/basic', 'adminhtml'); $config = new Varien_Object(); $settings = $this->_model->getPluginSettings($config); diff --git a/dev/tests/integration/testsuite/Mage/Widget/Model/Widget/InstanceTest.php b/dev/tests/integration/testsuite/Mage/Widget/Model/Widget/InstanceTest.php index bd6d0fbf0ec3dec848f62784140820ef83183507..42a2b9965502868e562a1cef93ec4a35a9a51abe 100644 --- a/dev/tests/integration/testsuite/Mage/Widget/Model/Widget/InstanceTest.php +++ b/dev/tests/integration/testsuite/Mage/Widget/Model/Widget/InstanceTest.php @@ -112,7 +112,7 @@ class Mage_Widget_Model_Widget_InstanceTest extends PHPUnit_Framework_TestCase public function testGenerateLayoutUpdateXml(Mage_Widget_Model_Widget_Instance $model) { $this->assertEquals('', $model->generateLayoutUpdateXml('content')); - $model->setId('test_id')->setPackageTheme('default/default'); + $model->setId('test_id')->setPackageTheme('default/demo'); $result = $model->generateLayoutUpdateXml('content'); $this->assertContains('<reference name="content">', $result); $this->assertContains('<block type="' . $model->getType() . '"', $result); diff --git a/dev/tests/integration/testsuite/Mage/Widget/Model/WidgetTest.php b/dev/tests/integration/testsuite/Mage/Widget/Model/WidgetTest.php index cd3d000f384a6a6355701b0aa224bd89ef00b825..e050426c6f61f14f0c84849f5e0666ed8e0141f5 100644 --- a/dev/tests/integration/testsuite/Mage/Widget/Model/WidgetTest.php +++ b/dev/tests/integration/testsuite/Mage/Widget/Model/WidgetTest.php @@ -65,8 +65,8 @@ class Mage_Widget_Model_WidgetTest extends PHPUnit_Framework_TestCase */ public function testGetPlaceholderImageUrl($type, $expectedFile) { - Mage::getDesign()->setDesignTheme('default/default/default', 'adminhtml'); - $expectedPubFile = Mage::getBaseDir('media') . "/skin/adminhtml/default/default/default/en_US/{$expectedFile}"; + Mage::getDesign()->setDesignTheme('default/basic', 'adminhtml'); + $expectedPubFile = Mage::getBaseDir('media') . "/theme/adminhtml/default/basic/en_US/{$expectedFile}"; if (file_exists($expectedPubFile)) { unlink($expectedPubFile); } @@ -95,11 +95,11 @@ class Mage_Widget_Model_WidgetTest extends PHPUnit_Framework_TestCase } /** - * Tests, that skin file is found anywhere in skin folders, not only in module directory. + * Tests, that theme file is found anywhere in theme folders, not only in module directory. * * @magentoAppIsolation enabled */ - public function testGetPlaceholderImageUrlAtSkin() + public function testGetPlaceholderImageUrlAtTheme() { Mage::getConfig()->getOptions()->setDesignDir(dirname(__DIR__) . '/_files/design'); $actualFile = $this->testGetPlaceholderImageUrl( @@ -108,7 +108,7 @@ class Mage_Widget_Model_WidgetTest extends PHPUnit_Framework_TestCase ); $expectedFile = dirname(__DIR__) - . '/_files/design/adminhtml/default/default/skin/default/Mage_Catalog/images/product_widget_new.gif'; + . '/_files/design/adminhtml/default/basic/Mage_Catalog/images/product_widget_new.gif'; $this->assertFileEquals($expectedFile, $actualFile); } } diff --git a/dev/tests/integration/testsuite/Mage/Widget/_files/design/adminhtml/default/default/skin/default/Mage_Catalog/images/product_widget_new.gif b/dev/tests/integration/testsuite/Mage/Widget/_files/design/adminhtml/default/basic/Mage_Catalog/images/product_widget_new.gif similarity index 100% rename from dev/tests/integration/testsuite/Mage/Widget/_files/design/adminhtml/default/default/skin/default/Mage_Catalog/images/product_widget_new.gif rename to dev/tests/integration/testsuite/Mage/Widget/_files/design/adminhtml/default/basic/Mage_Catalog/images/product_widget_new.gif diff --git a/app/design/install/default/default/theme.xml b/dev/tests/integration/testsuite/Mage/Widget/_files/design/adminhtml/default/basic/theme.xml similarity index 93% rename from app/design/install/default/default/theme.xml rename to dev/tests/integration/testsuite/Mage/Widget/_files/design/adminhtml/default/basic/theme.xml index 349c67c5c2eedc7978de950a3ebe5d1af76669af..d52cd3b02b9a67e52e356086c577dc95fb1ab0f9 100644 --- a/app/design/install/default/default/theme.xml +++ b/dev/tests/integration/testsuite/Mage/Widget/_files/design/adminhtml/default/basic/theme.xml @@ -27,8 +27,8 @@ <design> <package code="default"> <title>Default</title> - <theme version="2.0.0.0" code="default"> - <title>Default</title> + <theme version="2.0.0.0" code="basic"> + <title>Basic</title> <requirements> <magento_version from="2.0.0.0-dev1" to="*"/> </requirements> diff --git a/dev/tests/integration/testsuite/Mage/Widget/controllers/Adminhtml/Widget/InstanceControllerTest.php b/dev/tests/integration/testsuite/Mage/Widget/controllers/Adminhtml/Widget/InstanceControllerTest.php index ad2e2752a31e545cece85729027cda26de3e58cc..190ecb2b6ed1da1c37937a050d3b462ac084d4bd 100644 --- a/dev/tests/integration/testsuite/Mage/Widget/controllers/Adminhtml/Widget/InstanceControllerTest.php +++ b/dev/tests/integration/testsuite/Mage/Widget/controllers/Adminhtml/Widget/InstanceControllerTest.php @@ -32,7 +32,7 @@ class Mage_Widget_Adminhtml_Widget_InstanceControllerTest extends Mage_Adminhtml parent::setUp(); $this->getRequest()->setParam('type', 'Mage_Cms_Block_Widget_Page_Link'); - $this->getRequest()->setParam('package_theme', 'default-default'); + $this->getRequest()->setParam('package_theme', 'default-demo'); } public function testEditAction() diff --git a/dev/tests/integration/testsuite/Mage/Wishlist/Block/AbstractTest.php b/dev/tests/integration/testsuite/Mage/Wishlist/Block/AbstractTest.php index e7f6df4c1faed48a8380291a98f612a51da3c3b9..3ed84be6a03fb4fb6aa044d2d81346fbf7db5edc 100644 --- a/dev/tests/integration/testsuite/Mage/Wishlist/Block/AbstractTest.php +++ b/dev/tests/integration/testsuite/Mage/Wishlist/Block/AbstractTest.php @@ -36,12 +36,14 @@ class Mage_Wishlist_Block_AbstractTest extends PHPUnit_Framework_TestCase 'Mage_Core_Controller_Request_Http', 'Mage_Core_Model_Layout', 'Mage_Core_Model_Event_Manager', + 'Mage_Core_Model_Url', 'Mage_Core_Model_Translate', 'Mage_Core_Model_Cache', 'Mage_Core_Model_Design_Package', 'Mage_Core_Model_Session', 'Mage_Core_Model_Store_Config', 'Mage_Core_Controller_Varien_Front', + 'Mage_Core_Model_Factory_Helper', ); protected function setUp() diff --git a/dev/tests/integration/testsuite/Mage/Wishlist/Block/Customer/Wishlist/ItemsTest.php b/dev/tests/integration/testsuite/Mage/Wishlist/Block/Customer/Wishlist/ItemsTest.php index 4fcf4f427d7d0e616301556b9efd0afc32b47bbd..a22ac3bf2a5ed2ce74ca7b0229cf4fcc541d6d9e 100644 --- a/dev/tests/integration/testsuite/Mage/Wishlist/Block/Customer/Wishlist/ItemsTest.php +++ b/dev/tests/integration/testsuite/Mage/Wishlist/Block/Customer/Wishlist/ItemsTest.php @@ -34,12 +34,14 @@ class Mage_Wishlist_Block_Customer_Wishlist_ItemsTest extends PHPUnit_Framework_ 'Mage_Core_Controller_Request_Http', 'Mage_Core_Model_Layout', 'Mage_Core_Model_Event_Manager', + 'Mage_Core_Model_Url', 'Mage_Core_Model_Translate', 'Mage_Core_Model_Cache', 'Mage_Core_Model_Design_Package', 'Mage_Core_Model_Session', 'Mage_Core_Model_Store_Config', 'Mage_Core_Controller_Varien_Front', + 'Mage_Core_Model_Factory_Helper' ); public function testGetColumns() diff --git a/dev/tests/integration/testsuite/Mage/XmlConnect/Helper/Catalog/ImageTest.php b/dev/tests/integration/testsuite/Mage/XmlConnect/Helper/Catalog/ImageTest.php index bb5ced172bdfa9f8494e4407c23479886141400e..508615972d4f7f3c679ec5439eeb39e41ac53166 100644 --- a/dev/tests/integration/testsuite/Mage/XmlConnect/Helper/Catalog/ImageTest.php +++ b/dev/tests/integration/testsuite/Mage/XmlConnect/Helper/Catalog/ImageTest.php @@ -36,7 +36,7 @@ class Mage_XmlConnect_Helper_Catalog_ImageTest extends PHPUnit_Framework_TestCas $helper = Mage::helper('Mage_XmlConnect_Helper_Catalog_Category_Image'); $helper->initialize(Mage::getModel('Mage_Catalog_Model_Product'), $name); $this->assertFileExists( - Mage::getDesign()->getSkinFile($helper->getPlaceholder()) + Mage::getDesign()->getViewFile($helper->getPlaceholder()) ); } diff --git a/dev/tests/integration/testsuite/Mage/XmlConnect/Helper/DataTest.php b/dev/tests/integration/testsuite/Mage/XmlConnect/Helper/DataTest.php index 61a3a555a76308b14f1b3ba34846fa447f5a75a7..7bd88e04773e7126b8bf6fd23acb85976278ff10 100644 --- a/dev/tests/integration/testsuite/Mage/XmlConnect/Helper/DataTest.php +++ b/dev/tests/integration/testsuite/Mage/XmlConnect/Helper/DataTest.php @@ -35,7 +35,7 @@ class Mage_XmlConnect_Helper_DataTest extends PHPUnit_Framework_TestCase protected function setUp() { $this->_helper = Mage::helper('Mage_XmlConnect_Helper_Data'); - Mage::getDesign()->setDesignTheme('default/default/default', 'adminhtml'); + Mage::getDesign()->setDesignTheme('default/basic', 'adminhtml'); } protected function tearDown() diff --git a/dev/tests/integration/testsuite/Mage/XmlConnect/Helper/ImageTest.php b/dev/tests/integration/testsuite/Mage/XmlConnect/Helper/ImageTest.php index 39ff55afd4c93232e8d5d2049d92153057d3dd0e..94bb189d5acf8b45dd5580a5c807f4cc99670826 100644 --- a/dev/tests/integration/testsuite/Mage/XmlConnect/Helper/ImageTest.php +++ b/dev/tests/integration/testsuite/Mage/XmlConnect/Helper/ImageTest.php @@ -28,26 +28,26 @@ class Mage_XmlConnect_Helper_ImageTest extends PHPUnit_Framework_TestCase { /** - * @param string $application + * @param string $area * @param string $file - * @dataProvider getSkinImagesUrlDataProvider + * @dataProvider getViewImagesUrlDataProvider */ - public function testGetSkinImagesUrl($application, $file) + public function testGetViewImagesUrl($area, $file) { $helper = Mage::helper('Mage_XmlConnect_Helper_Image'); - Mage::getDesign()->setDesignTheme('default/default/default', $application); + Mage::getDesign()->setArea($area); $this->assertStringMatchesFormat( - "http://%s/media/skin/{$application}/%s/%s/%s/%s/Mage_XmlConnect/images/{$file}", + "http://%s/media/theme/{$area}/%s/%s/%s/Mage_XmlConnect/images/{$file}", $helper->getSkinImagesUrl($file) ); - $this->assertFileExists(Mage::getDesign()->getSkinFile("Mage_XmlConnect::/images/{$file}")); + $this->assertFileExists(Mage::getDesign()->getViewFile("Mage_XmlConnect::/images/{$file}")); } /** * @return array */ - public function getSkinImagesUrlDataProvider() + public function getViewImagesUrlDataProvider() { return array( array('adminhtml', 'dropdown-arrow.gif'), diff --git a/dev/tests/integration/testsuite/Mage/XmlConnect/Model/Catalog/Category/ImageTest.php b/dev/tests/integration/testsuite/Mage/XmlConnect/Model/Catalog/Category/ImageTest.php index 762e75e213e86c077fdc9bc01ee6d9a393a624df..616840e1baf76ca69d68de805d6b5638bba7db0f 100644 --- a/dev/tests/integration/testsuite/Mage/XmlConnect/Model/Catalog/Category/ImageTest.php +++ b/dev/tests/integration/testsuite/Mage/XmlConnect/Model/Catalog/Category/ImageTest.php @@ -45,7 +45,8 @@ class Mage_XmlConnect_Model_Catalog_Category_ImageTest extends PHPUnit_Framework public function testGetUrlPlaceholder($model) { $this->assertStringMatchesFormat( - 'http://localhost/pub/media/skin/frontend/%s/Mage_XmlConnect/images/catalog/category/placeholder/image.jpg', + 'http://localhost/pub/media/theme/' + . 'frontend/%s/Mage_XmlConnect/images/catalog/category/placeholder/image.jpg', $model->getUrl() ); } diff --git a/dev/tests/integration/testsuite/Mage/XmlConnect/Model/TabsTest.php b/dev/tests/integration/testsuite/Mage/XmlConnect/Model/TabsTest.php index ef46c2d1f46142129a857a34e5535ccd5ad942e2..e94a46cebbf1bd8ef4b0fd5b7abd0ccc939240cd 100644 --- a/dev/tests/integration/testsuite/Mage/XmlConnect/Model/TabsTest.php +++ b/dev/tests/integration/testsuite/Mage/XmlConnect/Model/TabsTest.php @@ -50,7 +50,7 @@ class Mage_XmlConnect_Model_TabsTest extends PHPUnit_Framework_TestCase $this->assertNotEmpty($tab['label']); $this->assertNotEmpty($tab['image']); $this->assertStringMatchesFormat( - 'http://%s/media/skin/%s/%s/%s/%s/%s/Mage_XmlConnect/images/%s.png', $tab['image'] + 'http://%s/pub/media/theme/%s/%s/%s/%s/Mage_XmlConnect/images/%s.png', $tab['image'] ); $this->assertNotEmpty($tab['action']); } diff --git a/dev/tests/integration/testsuite/integrity/LayoutTest.php b/dev/tests/integration/testsuite/integrity/LayoutTest.php index 5bc149bd6ecb8030aecbd74d18917cc34ecc794f..58c39ec0ccc5bda7482794387ba896f6a70f7a03 100644 --- a/dev/tests/integration/testsuite/integrity/LayoutTest.php +++ b/dev/tests/integration/testsuite/integrity/LayoutTest.php @@ -127,8 +127,8 @@ class Integrity_LayoutTest extends PHPUnit_Framework_TestCase $result = array(); foreach (array('adminhtml', 'frontend', 'install') as $area) { $result[] = array($area, false, false); - foreach (Mage::getDesign()->getDesignEntitiesStructure($area, false) as $package => $themes) { - foreach (array_keys($themes) as $theme) { + foreach (Mage::getDesign()->getDesignEntitiesStructure($area) as $package => $themes) { + foreach ($themes as $theme) { $result[] = array($area, $package, $theme); } } diff --git a/dev/tests/integration/testsuite/integrity/Mage/Widget/SkinFilesTest.php b/dev/tests/integration/testsuite/integrity/Mage/Widget/SkinFilesTest.php index 5e40dd255d964851dfb4440b203457845c563259..2fc9fc5d049cca38bd8c5d3cb4aa7c2d37093622 100644 --- a/dev/tests/integration/testsuite/integrity/Mage/Widget/SkinFilesTest.php +++ b/dev/tests/integration/testsuite/integrity/Mage/Widget/SkinFilesTest.php @@ -35,7 +35,7 @@ class Integrity_Mage_Widget_SkinFilesTest extends PHPUnit_Framework_TestCase */ public function testWidgetPlaceholderImages($skinImage) { - $this->assertFileExists(Mage::getDesign()->getSkinFile($skinImage, array('area' => 'adminhtml'))); + $this->assertFileExists(Mage::getDesign()->getViewFile($skinImage, array('area' => 'adminhtml'))); } /** diff --git a/dev/tests/integration/testsuite/integrity/Mage/XmlConnect/SkinFilesTest.php b/dev/tests/integration/testsuite/integrity/Mage/XmlConnect/ViewFilesTest.php similarity index 72% rename from dev/tests/integration/testsuite/integrity/Mage/XmlConnect/SkinFilesTest.php rename to dev/tests/integration/testsuite/integrity/Mage/XmlConnect/ViewFilesTest.php index 425291ce3cc3c4f1c6ac2a36fb8f4942cb316021..e15238b47884ecccc856961532d374f63932ab41 100644 --- a/dev/tests/integration/testsuite/integrity/Mage/XmlConnect/SkinFilesTest.php +++ b/dev/tests/integration/testsuite/integrity/Mage/XmlConnect/ViewFilesTest.php @@ -28,30 +28,26 @@ /** * @group integrity */ -class Integrity_Mage_XmlConnect_SkinFilesTest extends PHPUnit_Framework_TestCase +class Integrity_Mage_XmlConnect_ViewFilesTest extends PHPUnit_Framework_TestCase { /** - * Test that skin files are available at both backend and frontend + * Test that view files are available at both backend and frontend * * @param string $file - * @dataProvider sharedSkinFilesDataProvider + * @dataProvider sharedViewFilesDataProvider */ - public function testSharedSkinFiles($file) + public function testSharedViewFiles($file) { - $params = array( - 'area' => 'adminhtml', - 'package' => 'default', - 'theme' => 'default', - ); - $this->assertFileExists(Mage::getDesign()->getSkinFile($file, $params)); - $params['area'] = 'frontend'; - $this->assertFileExists(Mage::getDesign()->getSkinFile($file, $params)); + Mage::getDesign()->setDesignTheme('default/basic', 'adminhtml'); + $this->assertFileExists(Mage::getDesign()->getViewFile($file)); + Mage::getDesign()->setDesignTheme('default/demo', 'frontend'); + $this->assertFileExists(Mage::getDesign()->getViewFile($file)); } /** * @return array */ - public function sharedSkinFilesDataProvider() + public function sharedViewFilesDataProvider() { return array( array('Mage_XmlConnect::images/tab_home.png'), diff --git a/dev/tests/integration/testsuite/integrity/modular/SystemConfigFilesTest.php b/dev/tests/integration/testsuite/integrity/modular/SystemConfigFilesTest.php new file mode 100644 index 0000000000000000000000000000000000000000..15926400402c13e0b32c8dfe22aaad0b466e87f3 --- /dev/null +++ b/dev/tests/integration/testsuite/integrity/modular/SystemConfigFilesTest.php @@ -0,0 +1,42 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Magento + * @package Mage_Backend + * @subpackage integration_tests + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +/** + * @group integrity + */ +class Integrity_Modular_SystemConfigFilesTest extends PHPUnit_Framework_TestCase +{ + public function testConfiguration() + { + $fileList = glob(Mage::getBaseDir('app') . '/*/*/*/*/etc/adminhtml/system.xml'); + try { + new Mage_Backend_Model_Config_Structure(array('sourceFiles' => $fileList)); + } catch (Magento_Exception $exp) { + $this->fail($exp->getMessage()); + } + } +} diff --git a/dev/tests/integration/testsuite/integrity/theme/SkinFilesTest.php b/dev/tests/integration/testsuite/integrity/theme/ViewFilesTest.php similarity index 77% rename from dev/tests/integration/testsuite/integrity/theme/SkinFilesTest.php rename to dev/tests/integration/testsuite/integrity/theme/ViewFilesTest.php index 039985069524191f1c4a64ccb53140283e2c0fef..f35bcbe30993719df207f35688736b9082b90d17 100644 --- a/dev/tests/integration/testsuite/integrity/theme/SkinFilesTest.php +++ b/dev/tests/integration/testsuite/integrity/theme/ViewFilesTest.php @@ -28,26 +28,24 @@ /** * @group integrity */ -class Integrity_Theme_SkinFilesTest extends Magento_Test_TestCase_IntegrityAbstract +class Integrity_Theme_ViewFilesTest extends Magento_Test_TestCase_IntegrityAbstract { /** * @param string $application * @param string $package * @param string $theme - * @param string $skin * @param string $file - * @dataProvider skinFilesFromThemesDataProvider + * @dataProvider viewFilesFromThemesDataProvider */ - public function testSkinFilesFromThemes($application, $package, $theme, $skin, $file) + public function testViewFilesFromThemes($application, $package, $theme, $file) { $params = array( 'area' => $application, 'package' => $package, - 'theme' => $theme, - 'skin' => $skin + 'theme' => $theme ); - $skinFile = Mage::getDesign()->getSkinFile($file, $params); - $this->assertFileExists($skinFile); + $viewFile = Mage::getDesign()->getViewFile($file, $params); + $this->assertFileExists($viewFile); $fileParts = explode(Mage_Core_Model_Design_Package::SCOPE_SEPARATOR, $file); if (count($fileParts) > 1) { @@ -55,11 +53,11 @@ class Integrity_Theme_SkinFilesTest extends Magento_Test_TestCase_IntegrityAbstr } if (pathinfo($file, PATHINFO_EXTENSION) == 'css') { $errors = array(); - $content = file_get_contents($skinFile); + $content = file_get_contents($viewFile); preg_match_all(Mage_Core_Model_Design_Package::REGEX_CSS_RELATIVE_URLS, $content, $matches); foreach ($matches[1] as $relativePath) { $path = $this->_addCssDirectory($relativePath, $file); - $pathFile = Mage::getDesign()->getSkinFile($path, $params); + $pathFile = Mage::getDesign()->getViewFile($path, $params); if (!is_file($pathFile)) { $errors[] = $relativePath; } @@ -100,31 +98,31 @@ class Integrity_Theme_SkinFilesTest extends Magento_Test_TestCase_IntegrityAbstr } /** - * Collect getSkinUrl() and similar calls from themes + * Collect getViewUrl() and similar calls from themes * * @return array */ - public function skinFilesFromThemesDataProvider() + public function viewFilesFromThemesDataProvider() { - $skins = $this->_getDesignSkins(); + $themes = $this->_getDesignThemes(); - // Find files, declared in skins + // Find files, declared in views $files = array(); - foreach ($skins as $view) { - list($area, $package, $theme) = explode('/', $view); - $this->_collectGetSkinUrlInvokes($area, $package, $theme, $files); + foreach ($themes as $themeDesign) { + list($area, $package, $theme) = explode('/', $themeDesign); + $this->_collectGetViewUrlInvokes($area, $package, $theme, $files); } - // Populate data provider in correspondence of skins to views + // Populate data provider in correspondence of themes to view files $result = array(); - foreach ($skins as $view) { - list($area, $package, $theme, $skin) = explode('/', $view); + foreach ($themes as $themeDesign) { + list($area, $package, $theme) = explode('/', $themeDesign); if (!isset($files[$area][$package][$theme])) { continue; } foreach (array_unique($files[$area][$package][$theme]) as $file) { - $result["{$area}/{$package}/{$theme}/{$skin}/{$file}"] = - array($area, $package, $theme, $skin, $file); + $result["{$area}/{$package}/{$theme}/{$file}"] = + array($area, $package, $theme, $file); } } @@ -132,14 +130,14 @@ class Integrity_Theme_SkinFilesTest extends Magento_Test_TestCase_IntegrityAbstr } /** - * Collect getSkinUrl() from theme templates + * Collect getViewUrl() from theme templates * * @param string $area * @param string $package * @param string $theme * @param array &$files */ - protected function _collectGetSkinUrlInvokes($area, $package, $theme, &$files) + protected function _collectGetViewUrlInvokes($area, $package, $theme, &$files) { $searchDir = Mage::getBaseDir('design') . DIRECTORY_SEPARATOR . $area . DIRECTORY_SEPARATOR . $package . DIRECTORY_SEPARATOR . $theme; @@ -152,7 +150,7 @@ class Integrity_Theme_SkinFilesTest extends Magento_Test_TestCase_IntegrityAbstr } // Scan file for references to other files - foreach ($this->_findReferencesToSkinFile($fileInfo) as $file) { + foreach ($this->_findReferencesToViewFile($fileInfo) as $file) { $files[$area][$package][$theme][] = $file; } } @@ -165,11 +163,11 @@ class Integrity_Theme_SkinFilesTest extends Magento_Test_TestCase_IntegrityAbstr $elements = $fileLayoutUpdates->xpath('//action[@method="addCss" or @method="addJs"]/*[1]'); if ($elements) { foreach ($elements as $filenameNode) { - $skinFile = (string)$filenameNode; - if ($this->_isFileForDisabledModule($skinFile)) { + $viewFile = (string)$filenameNode; + if ($this->_isFileForDisabledModule($viewFile)) { continue; } - $files[$area][$package][$theme][] = $skinFile; + $files[$area][$package][$theme][] = $viewFile; } } } @@ -200,22 +198,22 @@ class Integrity_Theme_SkinFilesTest extends Magento_Test_TestCase_IntegrityAbstr } /** - * Scan specified file for getSkinUrl() pattern + * Scan specified file for getViewUrl() pattern * * @param SplFileInfo $fileInfo * @return array */ - protected function _findReferencesToSkinFile(SplFileInfo $fileInfo) + protected function _findReferencesToViewFile(SplFileInfo $fileInfo) { $result = array(); if (preg_match_all( - '/\$this->getSkinUrl\(\'([^\']+?)\'\)/', file_get_contents($fileInfo->getRealPath()), $matches) + '/\$this->getViewUrl\(\'([^\']+?)\'\)/', file_get_contents($fileInfo->getRealPath()), $matches) ) { - foreach ($matches[1] as $skinFile) { - if ($this->_isFileForDisabledModule($skinFile)) { + foreach ($matches[1] as $viewFile) { + if ($this->_isFileForDisabledModule($viewFile)) { continue; } - $result[] = $skinFile; + $result[] = $viewFile; } } return $result; diff --git a/dev/tests/performance/testsuite/checkout.jmx b/dev/tests/performance/testsuite/checkout.jmx index 5d88169503c1cd10321b1d40d565ac1cf7eee13d..7991f160caafe7121fd22ed94e99d008301ee830 100644 --- a/dev/tests/performance/testsuite/checkout.jmx +++ b/dev/tests/performance/testsuite/checkout.jmx @@ -219,7 +219,7 @@ <stringProp name="TestPlan.comments">Also assumes that the product can be added to cart</stringProp> <stringProp name="RegexExtractor.useHeaders">false</stringProp> <stringProp name="RegexExtractor.refname">product_id</stringProp> - <stringProp name="RegexExtractor.regex"><form action="http.+/product/(\d+)/" method="post" id="product_addtocart_form"></stringProp> + <stringProp name="RegexExtractor.regex"><form action="http.+?/product/(\d+)/" method="post"\s+id="product_addtocart_form"></stringProp> <stringProp name="RegexExtractor.template">$1$</stringProp> <stringProp name="RegexExtractor.default"></stringProp> <stringProp name="RegexExtractor.match_number">1</stringProp> diff --git a/dev/tests/performance/testsuite/fixtures/catalog_200_categories_80k_products_with_tags.php b/dev/tests/performance/testsuite/fixtures/catalog_200_categories_80k_products_with_tags.php index f1036510c93cd5f7882e08a1b4b7572261368cf6..4fe89eb542d00defc47759e3f0db9dbe69626625 100644 --- a/dev/tests/performance/testsuite/fixtures/catalog_200_categories_80k_products_with_tags.php +++ b/dev/tests/performance/testsuite/fixtures/catalog_200_categories_80k_products_with_tags.php @@ -37,7 +37,7 @@ $categoryIndex = 1; $categories = array(); -$category = new Mage_Catalog_Model_Category(); +$category = Mage::getModel('Mage_Catalog_Model_Category'); while ($categoryIndex <= $categoriesNumber) { $category->setId(null) ->setName("Category $categoryIndex") diff --git a/dev/tests/performance/testsuite/fixtures/catalog_category.php b/dev/tests/performance/testsuite/fixtures/catalog_category.php index 7514dbd13bcab6a3fd93aabc48e1a504febc9b93..2de19cbffb15318c9cea45025c2061110a9a612c 100644 --- a/dev/tests/performance/testsuite/fixtures/catalog_category.php +++ b/dev/tests/performance/testsuite/fixtures/catalog_category.php @@ -29,7 +29,7 @@ $installer = new Mage_Catalog_Model_Resource_Setup('catalog_setup'); /** * After installation system has two categories: root one with ID:1 and Default category with ID:2 */ -$category = new Mage_Catalog_Model_Category(); +$category = Mage::getModel('Mage_Catalog_Model_Category'); $category->setId(3) ->setName('Category 1') @@ -42,7 +42,7 @@ $category->setId(3) ->setPosition(1) ->save(); -$product = new Mage_Catalog_Model_Product(); +$product = Mage::getModel('Mage_Catalog_Model_Product'); $product->setTypeId(Mage_Catalog_Model_Product_Type::TYPE_SIMPLE) ->setAttributeSetId($installer->getAttributeSetId('catalog_product', 'Default')) ->setStoreId(1) @@ -59,7 +59,7 @@ $product->setTypeId(Mage_Catalog_Model_Product_Type::TYPE_SIMPLE) ->setTaxClassId(0) ->save(); -$stockItem = new Mage_CatalogInventory_Model_Stock_Item(); +$stockItem = Mage::getModel('Mage_CatalogInventory_Model_Stock_Item'); $stockItem->setProductId($product->getId()) ->setTypeId($product->getTypeId()) ->setStockId(Mage_CatalogInventory_Model_Stock::DEFAULT_STOCK_ID) diff --git a/dev/tests/performance/testsuite/fixtures/catalog_product.php b/dev/tests/performance/testsuite/fixtures/catalog_product.php index f57e8d97c6d0b5cbf1c02dd2cfbdc282b380341f..0b74ef4e59b96faf811c1e7e9fefe41eb5291975 100644 --- a/dev/tests/performance/testsuite/fixtures/catalog_product.php +++ b/dev/tests/performance/testsuite/fixtures/catalog_product.php @@ -42,7 +42,7 @@ if (!$setId) { } // Create product -$product = new Mage_Catalog_Model_Product(); +$product = Mage::getModel('Mage_Catalog_Model_Product'); $product->setTypeId('simple') ->setAttributeSetId($setId) ->setWebsiteIds(array(1)) @@ -58,7 +58,7 @@ $product->setTypeId('simple') ->save() ; -$stockItem = new Mage_CatalogInventory_Model_Stock_Item(); +$stockItem = Mage::getModel('Mage_CatalogInventory_Model_Stock_Item'); $stockItem->setProductId($product->getId()) ->setTypeId($product->getTypeId()) ->setStockId(Mage_CatalogInventory_Model_Stock::DEFAULT_STOCK_ID) diff --git a/dev/tests/performance/testsuite/fixtures/sales_100k_orders.php b/dev/tests/performance/testsuite/fixtures/sales_100k_orders.php index 2ac9a8151470ae4ba7f3a1e149046816322b5bcf..e2188ea6bac6d6e203aae0f037ec8b6aed41cf06 100644 --- a/dev/tests/performance/testsuite/fixtures/sales_100k_orders.php +++ b/dev/tests/performance/testsuite/fixtures/sales_100k_orders.php @@ -33,20 +33,20 @@ $addressData = array( 'telephone' => '11111111', 'country_id' => 'US', ); -$billingAddress = new Mage_Sales_Model_Order_Address($addressData); +$billingAddress = Mage::getModel('Mage_Sales_Model_Order_Address', $addressData); $shippingAddress = clone $billingAddress; -$item = new Mage_Sales_Model_Order_Item(); +$item = Mage::getModel('Mage_Sales_Model_Order_Item'); $item->setOriginalPrice(100) ->setPrice(100) ->setQtyOrdered(1) ->setRowTotal(100) ->setSubtotal(100); -$payment = new Mage_Sales_Model_Order_Payment(); +$payment = Mage::getModel('Mage_Sales_Model_Order_Payment'); $payment->setMethod('checkmo'); -$order = new Mage_Sales_Model_Order(); +$order = Mage::getModel('Mage_Sales_Model_Order'); $order->setBaseSubtotal(100) ->setSubtotal(100) ->setBaseGrandTotal(100) diff --git a/dev/tests/static/testsuite/Js/_files/blacklist/core.txt b/dev/tests/static/testsuite/Js/_files/blacklist/core.txt index b6198396a5fa51f8b921d6ea9109e1e1bf6cdb05..78a62987a7464bd7c4137426b184e70e825e31fd 100644 --- a/dev/tests/static/testsuite/Js/_files/blacklist/core.txt +++ b/dev/tests/static/testsuite/Js/_files/blacklist/core.txt @@ -7,4 +7,4 @@ app/code/core/Mage/Page/view/frontend/menu.js app/code/core/Mage/Checkout/view/frontend/multishipping/payment.js app/code/core/Mage/Checkout/view/frontend/onepage/accordion.js app/code/core/Mage/Checkout/view/frontend/opcheckout.js -app/code/core/Mage/Captcha/view/frontend/onepage.js \ No newline at end of file +app/code/core/Mage/Captcha/view/frontend/onepage.js diff --git a/dev/tests/static/testsuite/Legacy/ObsoleteSystemConfigurationTest.php b/dev/tests/static/testsuite/Legacy/ObsoleteSystemConfigurationTest.php new file mode 100644 index 0000000000000000000000000000000000000000..afe63cd82e50c0251667480acf932134dd3b262d --- /dev/null +++ b/dev/tests/static/testsuite/Legacy/ObsoleteSystemConfigurationTest.php @@ -0,0 +1,48 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 tests + * @package static + * @subpackage Legacy + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +/** + * Legacy tests to find obsolete system configuration declaration + */ +class Legacy_ObsoleteSystemConfigurationTest extends PHPUnit_Framework_TestCase +{ + public function testSystemConfigurationDeclaration() + { + $fileList = Utility_Files::init()->getConfigFiles('system.xml', + array('wsdl.xml', 'wsdl2.xml', 'wsi.xml'), + false + ); + foreach ($fileList as $configFile) { + $configXml = simplexml_load_file($configFile); + $xpath = '/config/tabs|/config/sections'; + $this->assertEmpty( + $configXml->xpath($xpath), + 'Obsolete system configuration structure detected in file ' . $configFile . '.' + ); + } + } +} diff --git a/dev/tests/static/testsuite/Legacy/_files/obsolete_classes.php b/dev/tests/static/testsuite/Legacy/_files/obsolete_classes.php index ef2f89ea4a3a7e37aaf086e402a4ee95737e70cb..73f6e7a19891f88d175a3ee1df185bc5e7779e34 100644 --- a/dev/tests/static/testsuite/Legacy/_files/obsolete_classes.php +++ b/dev/tests/static/testsuite/Legacy/_files/obsolete_classes.php @@ -25,6 +25,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ return array( + $this->_getClassRule('Mage_Admin_Helper_Data', 'Mage_Backend_Helper_Data'), $this->_getClassRule('Mage_Admin_Model_Acl', 'Magento_Acl'), $this->_getClassRule('Mage_Admin_Model_Acl_Role'), $this->_getClassRule('Mage_Admin_Model_Acl_Resource', 'Magento_Acl_Resource'), @@ -38,6 +39,7 @@ return array( $this->_getClassRule('Mage_Admin_Model_Resource_Acl_Role'), $this->_getClassRule('Mage_Admin_Model_Resource_Acl_Role_Collection'), $this->_getClassRule('Mage_Admin_Model_User', 'Mage_User_Model_User'), + $this->_getClassRule('Mage_Admin_Model_Config'), $this->_getClassRule('Mage_Admin_Model_Resource_User', 'Mage_User_Model_Resource_User'), $this->_getClassRule('Mage_Admin_Model_Resource_User_Collection', 'Mage_User_Model_Resource_User_Collection'), $this->_getClassRule('Mage_Admin_Model_Role', 'Mage_User_Model_Role'), @@ -85,14 +87,439 @@ return array( $this->_getClassRule('Mage_Adminhtml_Block_Report_Product_Ordered_Grid'), $this->_getClassRule('Mage_Adminhtml_Block_Sales'), $this->_getClassRule('Mage_Adminhtml_Block_Sales_Order_Create_Search_Grid_Renderer_Giftmessage'), + $this->_getClassRule('Mage_Adminhtml_Block_System_Config_Edit', 'Mage_Backend_Block_System_Config_Edit'), + $this->_getClassRule('Mage_Adminhtml_Block_System_Config_Form', 'Mage_Backend_Block_System_Config_Form'), + $this->_getClassRule('Mage_Adminhtml_Block_System_Config_Tabs', 'Mage_Backend_Block_System_Config_Tabs'), + $this->_getClassRule('Mage_Adminhtml_Block_System_Config_System_Storage_Media_Synchronize', + 'Mage_Backend_Block_System_Config_System_Storage_Media_Synchronize' + ), + $this->_getClassRule('Mage_Adminhtml_Block_System_Config_Form_Fieldset_Modules_DisableOutput', + 'Mage_Backend_Block_System_Config_Form_Fieldset_Modules_DisableOutput' + ), + $this->_getClassRule('Mage_Adminhtml_Block_System_Config_Form_Field_Regexceptions', + 'Mage_Backend_Block_System_Config_Form_Field_Regexceptions' + ), + $this->_getClassRule('Mage_Adminhtml_Block_System_Config_Form_Field_Notification', + 'Mage_Backend_Block_System_Config_Form_Field_Notification' + ), + $this->_getClassRule('Mage_Adminhtml_Block_System_Config_Form_Field_Heading', + 'Mage_Backend_Block_System_Config_Form_Field_Heading' + ), + $this->_getClassRule('Mage_Adminhtml_Block_System_Config_Form_Field_Datetime', + 'Mage_Backend_Block_System_Config_Form_Field_Datetime' + ), + $this->_getClassRule('Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract', + 'Mage_Backend_Block_System_Config_Form_Field_Array_Abstract' + ), + $this->_getClassRule('Mage_Adminhtml_Block_System_Config_Form_Fieldset', + 'Mage_Backend_Block_System_Config_Form_Fieldset' + ), + $this->_getClassRule('Mage_Adminhtml_Block_System_Config_Form_Field', + 'Mage_Backend_Block_System_Config_Form_Field' + ), + $this->_getClassRule('Mage_Adminhtml_Block_System_Config_Form_Field_Import', + 'Mage_Backend_Block_System_Config_Form_Field_Import' + ), + $this->_getClassRule('Mage_Adminhtml_Block_System_Config_Form_Field_Image', + 'Mage_Backend_Block_System_Config_Form_Field_Image' + ), + $this->_getClassRule('Mage_Adminhtml_Block_System_Config_Form_Field_Export', + 'Mage_Backend_Block_System_Config_Form_Field_Export' + ), + $this->_getClassRule('Mage_Adminhtml_Block_System_Config_Form_Field_Select_Allowspecific', + 'Mage_Backend_Block_System_Config_Form_Field_Select_Allowspecific' + ), + $this->_getClassRule('Mage_Adminhtml_Block_System_Config_Form_Field_File', + 'Mage_Backend_Block_System_Config_Form_Field_File' + ), + $this->_getClassRule('Mage_Adminhtml_Block_System_Config_Form_Field_Select_Flatproduct', + 'Mage_Catalog_Block_Adminhtml_System_Config_Form_Field_Select_Flatproduct' + ), + $this->_getClassRule('Mage_Adminhtml_Block_System_Config_Form_Field_Select_Flatcatalog', + 'Mage_Catalog_Block_Adminhtml_System_Config_Form_Field_Select_Flatcatalog' + ), + $this->_getClassRule('Mage_Adminhtml_Block_System_Config_Form_Fieldset_Order_Statuses', + 'Mage_Sales_Block_Adminhtml_System_Config_Form_Fieldset_Order_Statuses' + ), + $this->_getClassRule('Mage_Adminhtml_Block_System_Config_Dwstree', 'Mage_Backend_Block_System_Config_Dwstree'), + $this->_getClassRule('Mage_Adminhtml_Block_System_Config_Switcher', 'Mage_Backend_Block_System_Config_Switcher'), + $this->_getClassRule('Mage_Adminhtml_Block_Store_Switcher', 'Mage_Backend_Block_Store_Switcher'), + $this->_getClassRule('Mage_Adminhtml_Block_Store_Switcher_Form_Renderer_Fieldset', + 'Mage_Backend_Block_Store_Switcher_Form_Renderer_Fieldset' + ), + $this->_getClassRule('Mage_Adminhtml_Block_Store_Switcher_Form_Renderer_Fieldset_Element', + 'Mage_Backend_Block_Store_Switcher_Form_Renderer_Fieldset_Element' + ), $this->_getClassRule('Mage_Adminhtml_Block_Tag_Tag_Edit'), $this->_getClassRule('Mage_Adminhtml_Block_Tag_Tag_Edit_Form'), $this->_getClassRule('Mage_Adminhtml_Block_Tree'), $this->_getClassRule('Mage_Adminhtml_Helper_Rss'), + $this->_getClassRule('Mage_Adminhtml_Model_Config', 'Mage_Backend_Model_Config_Structure'), + $this->_getClassRule('Mage_Adminhtml_Model_Config_Data', 'Mage_Backend_Model_Config'), $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Shipping_Allowedmethods'), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Backend_Admin_Password_Link_Expirationperiod', + 'Mage_Backend_Model_Config_Backend_Admin_Password_Link_Expirationperiod' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Backend_Admin_Custom', + 'Mage_Backend_Model_Config_Backend_Admin_Custom' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Backend_Admin_Custompath', + 'Mage_Backend_Model_Config_Backend_Admin_Custompath' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Backend_Admin_Observer', + 'Mage_Backend_Model_Config_Backend_Admin_Observer' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Backend_Admin_Robots', + 'Mage_Backend_Model_Config_Backend_Admin_Robots' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Backend_Admin_Usecustom', + 'Mage_Backend_Model_Config_Backend_Admin_Usecustom' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Backend_Admin_Usecustompath', + 'Mage_Backend_Model_Config_Backend_Admin_Usecustompath' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Backend_Admin_Usesecretkey', + 'Mage_Backend_Model_Config_Backend_Admin_Usesecretkey' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Backend_Catalog_Inventory_Managestock', + 'Mage_CatalogInventory_Model_Config_Backend_Managestock' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Backend_Catalog_Search_Type', + 'Mage_CatalogSearch_Model_Config_Backend_Search_Type' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Backend_Currency_Abstract', + 'Mage_Backend_Model_Config_Backend_Currency_Abstract' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Backend_Currency_Allow', + 'Mage_Backend_Model_Config_Backend_Currency_Allow' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Backend_Currency_Base', + 'Mage_Backend_Model_Config_Backend_Currency_Base' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Backend_Currency_Cron', + 'Mage_Backend_Model_Config_Backend_Currency_Cron' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Backend_Currency_Default', + 'Mage_Backend_Model_Config_Backend_Currency_Default' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Backend_Customer_Address_Street', + 'Mage_Customer_Model_Config_Backend_Address_Street' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Backend_Customer_Password_Link_Expirationperiod', + 'Mage_Customer_Model_Config_Backend_Password_Link_Expirationperiod' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Backend_Customer_Show_Address', + 'Mage_Customer_Model_Config_Backend_Show_Address' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Backend_Customer_Show_Customer', + 'Mage_Customer_Model_Config_Backend_Show_Customer' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Backend_Design_Exception', + 'Mage_Backend_Model_Config_Backend_Design_Exception' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Backend_Email_Address', + 'Mage_Backend_Model_Config_Backend_Email_Address' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Backend_Email_Logo', + 'Mage_Backend_Model_Config_Backend_Email_Logo' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Backend_Email_Sender', + 'Mage_Backend_Model_Config_Backend_Email_Sender' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Backend_Image_Adapter', + 'Mage_Backend_Model_Config_Backend_Image_Adapter' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Backend_Image_Favicon', + 'Mage_Backend_Model_Config_Backend_Image_Favicon' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Backend_Image_Pdf', + 'Mage_Backend_Model_Config_Backend_Image_Pdf' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Backend_Locale_Timezone', + 'Mage_Backend_Model_Config_Backend_Locale_Timezone' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Backend_Log_Cron', + 'Mage_Backend_Model_Config_Backend_Log_Cron' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Backend_Price_Scope'), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Backend_Product_Alert_Cron', + 'Mage_Cron_Model_Config_Backend_Product_Alert' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Backend_Seo_Product', + 'Mage_Catalog_Model_Config_Backend_Seo_Product' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Backend_Serialized_Array', + 'Mage_Backend_Model_Config_Backend_Serialized_Array' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Backend_Shipping_Tablerate', + 'Mage_Shipping_Model_Config_Backend_Tablerate' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Backend_Sitemap_Cron', + 'Mage_Cron_Model_Config_Backend_Sitemap' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Backend_Storage_Media_Database', + 'Mage_Backend_Model_Config_Backend_Storage_Media_Database' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Backend_Baseurl', + 'Mage_Backend_Model_Config_Backend_Baseurl' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Backend_Cache', + 'Mage_Backend_Model_Config_Backend_Cache' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Backend_Category', + 'Mage_Catalog_Model_Config_Backend_Category' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Backend_Cookie', + 'Mage_Backend_Model_Config_Backend_Cookie' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Backend_Datashare', + 'Mage_Backend_Model_Config_Backend_Datashare' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Backend_Encrypted', + 'Mage_Backend_Model_Config_Backend_Encrypted' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Backend_File', + 'Mage_Backend_Model_Config_Backend_File' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Backend_Filename', + 'Mage_Backend_Model_Config_Backend_Filename' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Backend_Image', + 'Mage_Backend_Model_Config_Backend_Image' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Backend_Locale', + 'Mage_Backend_Model_Config_Backend_Locale' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Backend_Secure', + 'Mage_Backend_Model_Config_Backend_Secure' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Backend_Serialized', + 'Mage_Backend_Model_Config_Backend_Serialized' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Backend_Sitemap', + 'Mage_Sitemap_Model_Config_Backend_Priority' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Backend_Store', + 'Mage_Backend_Model_Config_Backend_Store' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Backend_Translate', + 'Mage_Backend_Model_Config_Backend_Translate' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Clone_Media_Image', + 'Mage_Catalog_Model_Config_Clone_Media_Image' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Admin_Page', + 'Mage_Backend_Model_Config_Source_Admin_Page' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Catalog_Search_Type', + 'Mage_CatalogSearch_Model_Config_Source_Search_Type' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Catalog_GridPerPage', + 'Mage_Catalog_Model_Config_Source_GridPerPage' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Catalog_ListMode', + 'Mage_Catalog_Model_Config_Source_ListMode' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Catalog_ListPerPage', + 'Mage_Catalog_Model_Config_Source_ListPerPage' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Catalog_ListSort', + 'Mage_Catalog_Model_Config_Source_ListSort' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Catalog_TimeFormat', + 'Mage_Catalog_Model_Config_Source_TimeFormat' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Cms_Wysiwyg_Enabled', + 'Mage_Cms_Model_Config_Source_Wysiwyg_Enabled' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Cms_Page', + 'Mage_Cms_Model_Config_Source_Page' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Country_Full', + 'Mage_Directory_Model_Config_Source_Country_Full' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Cron_Frequency', + 'Mage_Cron_Model_Config_Source_Frequency' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Currency_Service', + 'Mage_Backend_Model_Config_Source_Currency' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Customer_Address_Type', + 'Mage_Customer_Model_Config_Source_Address_Type' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Customer_Group_Multiselect', + 'Mage_Customer_Model_Config_Source_Group_Multiselect' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Customer_Group', + 'Mage_Customer_Model_Config_Source_Group' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Date_Short', + 'Mage_Backend_Model_Config_Source_Date_Short' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Design_Package'), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Design_Robots', + 'Mage_Backend_Model_Config_Source_Design_Robots' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Dev_Dbautoup', + 'Mage_Backend_Model_Config_Source_Dev_Dbautoup' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Email_Identity', + 'Mage_Backend_Model_Config_Source_Email_Identity' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Email_Method', + 'Mage_Backend_Model_Config_Source_Email_Method' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Email_Smtpauth', + 'Mage_Backend_Model_Config_Source_Email_Smtpauth' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Email_Template', + 'Mage_Backend_Model_Config_Source_Email_Template' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Image_Adapter', + 'Mage_Backend_Model_Config_Source_Image_Adapter' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Locale_Country', + 'Mage_Backend_Model_Config_Source_Locale_Country' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Locale_Currency_All', + 'Mage_Backend_Model_Config_Source_Locale_Currency_All' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Locale_Currency', + 'Mage_Backend_Model_Config_Source_Locale_Currency' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Locale_Timezone', + 'Mage_Backend_Model_Config_Source_Locale_Timezone' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Locale_Weekdays', + 'Mage_Backend_Model_Config_Source_Locale_Weekdays' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Notification_Frequency', + 'Mage_AdminNotification_Model_Config_Source_Frequency' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Order_Status_New', + 'Mage_Sales_Model_Config_Source_Order_Status_New' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Order_Status_Newprocessing', + 'Mage_Sales_Model_Config_Source_Order_Status_Newprocessing' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Order_Status_Processing', + 'Mage_Sales_Model_Config_Source_Order_Status_Processing' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Order_Status', + 'Mage_Sales_Model_Config_Source_Order_Status' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Payment_Allmethods', + 'Mage_Payment_Model_Config_Source_Allmethods' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Payment_Allowedmethods', + 'Mage_Payment_Model_Config_Source_Allowedmethods' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Payment_Allspecificcountries', + 'Mage_Payment_Model_Config_Source_Allspecificcountries' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Payment_Cctype', + 'Mage_Payment_Model_Config_Source_Cctype' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Price_Scope', + 'Mage_Catalog_Model_Config_Source_Price_Scope' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Price_Step', + 'Mage_Catalog_Model_Config_Source_Price_Step' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Product_Options_Price', + 'Mage_Catalog_Model_Config_Source_Product_Options_Price' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Product_Options_Type', + 'Mage_Catalog_Model_Config_Source_Product_Options_Type' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Product_Thumbnail', + 'Mage_Catalog_Model_Config_Source_Product_Thumbnail' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Reports_Scope', + 'Mage_Backend_Model_Config_Source_Reports_Scope' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Shipping_Allmethods', + 'Mage_Shipping_Model_Config_Source_Allmethods' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Shipping_Allspecificcountries', + 'Mage_Shipping_Model_Config_Source_Allspecificcountries' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Shipping_Flatrate', + 'Mage_Shipping_Model_Config_Source_Flatrate' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Shipping_Tablerate', + 'Mage_Shipping_Model_Config_Source_Tablerate' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Shipping_Taxclass', + 'Mage_Tax_Model_Config_Source_Class_Product' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Storage_Media_Database', + 'Mage_Backend_Model_Config_Source_Storage_Media_Database' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Storage_Media_Storage', + 'Mage_Backend_Model_Config_Source_Storage_Media_Storage' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Tax_Apply_On', + 'Mage_Tax_Model_Config_Source_Apply_On' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Tax_Basedon', + 'Mage_Tax_Model_Config_Source_Basedon' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Tax_Catalog', + 'Mage_Tax_Model_Config_Source_Catalog' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Watermark_Position', + 'Mage_Catalog_Model_Config_Source_Watermark_Position' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Web_Protocol', + 'Mage_Backend_Model_Config_Source_Web_Protocol' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Web_Redirect', + 'Mage_Backend_Model_Config_Source_Web_Redirect' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Allregion', + 'Mage_Directory_Model_Config_Source_Allregion' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Category', + 'Mage_Catalog_Model_Config_Source_Category' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Checktype', + 'Mage_Backend_Model_Config_Source_Checktype' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Country', + 'Mage_Directory_Model_Config_Source_Country' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Currency', + 'Mage_Backend_Model_Config_Source_Currency' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Enabledisable', + 'Mage_Backend_Model_Config_Source_Enabledisable' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Frequency', + 'Mage_Sitemap_Model_Config_Source_Frequency' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Locale', + 'Mage_Backend_Model_Config_Source_Locale' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Nooptreq', + 'Mage_Backend_Model_Config_Source_Nooptreq' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Store', + 'Mage_Backend_Model_Config_Source_Store' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Website', + 'Mage_Backend_Model_Config_Source_Website' + ), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Yesno', 'Mage_Backend_Model_Config_Source_Yesno'), + $this->_getClassRule('Mage_Adminhtml_Model_System_Config_Source_Yesnocustom', + 'Mage_Backend_Model_Config_Source_Yesnocustom' + ), $this->_getClassRule('Mage_Adminhtml_Model_System_Store', 'Mage_Core_Model_System_Store'), + $this->_getClassRule('Mage_Adminhtml_Model_Url', 'Mage_Backend_Model_Url'), $this->_getClassRule('Mage_Adminhtml_Rss_CatalogController'), $this->_getClassRule('Mage_Adminhtml_Rss_OrderController'), + $this->_getClassRule('Mage_Adminhtml_SystemController', 'Mage_Backend_Adminhtml_SystemController'), + $this->_getClassRule('Mage_Adminhtml_System_ConfigController', 'Mage_Backend_Adminhtml_System_ConfigController'), $this->_getClassRule('Mage_Bundle_Product_EditController', 'Mage_Bundle_Adminhtml_Bundle_SelectionController'), $this->_getClassRule('Mage_Bundle_SelectionController', 'Mage_Bundle_Adminhtml_Bundle_SelectionController'), $this->_getClassRule('Mage_Catalog_Model_Entity_Product_Attribute_Frontend_Image'), @@ -101,6 +528,7 @@ return array( $this->_getClassRule('Mage_Core_Block_Flush'), $this->_getClassRule('Mage_Core_Block_Template_Facade'), $this->_getClassRule('Mage_Core_Controller_Varien_Router_Admin', 'Mage_Backend_Controller_Router_Default'), + $this->_getClassRule('Mage_Core_Model_Config_System'), $this->_getClassRule('Mage_Core_Model_Design_Source_Apply'), $this->_getClassRule('Mage_Core_Model_Language'), $this->_getClassRule('Mage_Core_Model_Resource_Language'), @@ -247,4 +675,5 @@ return array( $this->_getClassRule('Varien_Convert_Validator_Interface'), $this->_getClassRule('Varien_File_Uploader_Image'), $this->_getClassRule('Varien_Profiler', 'Magento_Profiler'), + $this->_getClassRule('Mage_Adminhtml_Block_System_Convert_Gui_Edit_Tab_Upload'), ); diff --git a/dev/tests/static/testsuite/Legacy/_files/obsolete_constants.php b/dev/tests/static/testsuite/Legacy/_files/obsolete_constants.php index 1de4c4657cfe1a68969f9fc1982d8e0568648ba5..e741179c72be7037794fc35734fed20fbb32de2e 100644 --- a/dev/tests/static/testsuite/Legacy/_files/obsolete_constants.php +++ b/dev/tests/static/testsuite/Legacy/_files/obsolete_constants.php @@ -62,4 +62,5 @@ return array( $this->_getRule('TYPE_LONGVARBINARY', null, 'Varien_Db_Ddl_Table::TYPE_BLOB'), $this->_getRule('HASH_ALGO'), $this->_getRule('SEESION_MAX_COOKIE_LIFETIME'), + $this->_getRule('URL_TYPE_SKIN'), ); diff --git a/dev/tests/static/testsuite/Legacy/_files/obsolete_methods.php b/dev/tests/static/testsuite/Legacy/_files/obsolete_methods.php index d290fc51d47f06152629062e03f63175197a19a7..700a3ca77da9b8b945a12d6fb63345d0b122294f 100644 --- a/dev/tests/static/testsuite/Legacy/_files/obsolete_methods.php +++ b/dev/tests/static/testsuite/Legacy/_files/obsolete_methods.php @@ -383,8 +383,30 @@ return array( $this->_getRule('getFileLayoutUpdatesXml', 'Mage_Core_Model_Layout_Update', 'Mage_Core_Model_Layout_Merge'), $this->_getRule('getContainers', 'Mage_Core_Model_Layout_Update', 'Mage_Core_Model_Layout_Merge'), $this->_getRule('parse', 'Mage_Catalog_Model_Convert_Parser_Product', null, - 'app\code\core\Mage\Catalog\Model\Convert\Parser'), + 'app\code\core\Mage\Catalog\Model\Convert\Parser'), $this->_getRule('parse', 'Mage_Customer_Model_Convert_Parser_Customer', null, 'app\code\core\Mage\Customer\Model\Convert\Parser'), + $this->_getRule('getPostMaxSize', 'Mage_Adminhtml_Block_Media_Uploader', + 'Mage_Core_Helper_File_Storage::getPostMaxSize()'), + $this->_getRule('getUploadMaxSize', 'Mage_Adminhtml_Block_Media_Uploader', + 'Mage_Core_Helper_File_Storage::getUploadMaxSize()'), + $this->_getRule('getDataMaxSize'), + $this->_getRule('getDataMaxSizeInBytes', 'Mage_Adminhtml_Block_Media_Uploader', + 'Mage_Core_Helper_File_Storage::getMaxFileSize()'), + $this->_getRule('_getBytesIniValue', 'Mage_Catalog_Model_Product_Option_Type_File'), + $this->_getRule('_getUploadMaxFilesize', 'Mage_Catalog_Model_Product_Option_Type_File'), + $this->_getRule('_bytesToMbytes', 'Mage_Catalog_Model_Product_Option_Type_File'), + $this->_getRule('getMaxUploadSize', 'Mage_ImportExport_Helper_Data', 'getMaxUploadSizeMessage'), $this->_getRule('prepareRedirect', 'Mage_Core_Controller_Varien_Exception'), + $this->_getRule('getPostMaxSize', 'Mage_Adminhtml_Block_Media_Uploader', + 'Mage_Core_Helper_File_Storage::getPostMaxSize()'), + $this->_getRule('getUploadMaxSize', 'Mage_Adminhtml_Block_Media_Uploader', + 'Mage_Core_Helper_File_Storage::getUploadMaxSize()'), + $this->_getRule('getDataMaxSize'), + $this->_getRule('getDataMaxSizeInBytes', 'Mage_Adminhtml_Block_Media_Uploader', + 'Mage_Core_Helper_File_Storage::getMaxFileSize()'), + $this->_getRule('_getBytesIniValue', 'Mage_Catalog_Model_Product_Option_Type_File'), + $this->_getRule('_getUploadMaxFilesize', 'Mage_Catalog_Model_Product_Option_Type_File'), + $this->_getRule('_bytesToMbytes', 'Mage_Catalog_Model_Product_Option_Type_File'), + $this->_getRule('getMaxUploadSize', 'Mage_ImportExport_Helper_Data', 'getMaxUploadSizeMessage'), ); diff --git a/dev/tests/static/testsuite/Php/LiveCodeTest.php b/dev/tests/static/testsuite/Php/LiveCodeTest.php index 5393d8c2aad446f95ef295077734117eb72ad55e..b263e7d4dcb459cddf1bb0ae021b784a36c77945 100644 --- a/dev/tests/static/testsuite/Php/LiveCodeTest.php +++ b/dev/tests/static/testsuite/Php/LiveCodeTest.php @@ -50,8 +50,8 @@ class Php_LiveCodeTest extends PHPUnit_Framework_TestCase if (!is_dir(self::$_reportDir)) { mkdir(self::$_reportDir, 0777); } - self::$_whiteList = self::_readLists(__DIR__ .'/_files/whitelist/*.txt'); - self::$_blackList = self::_readLists(__DIR__ .'/_files/blacklist/*.txt'); + self::$_whiteList = self::_readLists(__DIR__ . '/_files/whitelist/*.txt'); + self::$_blackList = self::_readLists(__DIR__ . '/_files/blacklist/*.txt'); } public function testCodeStyle() @@ -92,16 +92,29 @@ class Php_LiveCodeTest extends PHPUnit_Framework_TestCase * * @param string $globPattern * @return array + * @throws Exception if any of the patterns don't return any result */ protected static function _readLists($globPattern) { - $result = array(); + $patterns = array(); foreach (glob($globPattern) as $list) { - $result = array_merge($result, file($list)); + $patterns = array_merge($patterns, file($list, FILE_IGNORE_NEW_LINES)); + } + $result = array(); + foreach ($patterns as $pattern) { + if (0 === strpos($pattern, '#')) { + continue; + } + /** + * Note that glob() for directories will be returned as is, + * but passing directory is supported by the tools (phpcpd, phpmd, phpcs) + */ + $files = glob(Utility_Files::init()->getPathToSource() . '/' . $pattern, GLOB_BRACE); + if (empty($files)) { + throw new Exception("The glob() pattern '{$pattern}' didn't return any result."); + } + $result = array_merge($result, $files); } - $map = function ($value) { - return trim($value) ? Utility_Files::init()->getPathToSource() . '/' . trim($value) : ''; - }; - return array_filter(array_map($map, $result), 'file_exists'); + return $result; } } diff --git a/dev/tests/static/testsuite/Php/_files/blacklist/common.txt b/dev/tests/static/testsuite/Php/_files/blacklist/common.txt new file mode 100644 index 0000000000000000000000000000000000000000..fe059cace34e98fe1b1879014f7bf7a283aa3929 --- /dev/null +++ b/dev/tests/static/testsuite/Php/_files/blacklist/common.txt @@ -0,0 +1,23 @@ +# Files or directories that are excluded from static code analysis for any reason +# Glob patterns are supported +# Overrides the white list +# +app/code/core/Mage/DesignEditor/view +app/code/core/Mage/Core/data/core_setup/data-upgrade-1.6.0.4-1.6.0.5.php +app/code/core/Mage/Theme/Helper/Data.php +app/code/core/Mage/Theme/Block/Adminhtml/System/Design/Theme/Edit/Tab/General.php +app/code/core/Mage/User/view +lib/Magento/Acl/Config/ReaderInterface.php +lib/Magento/Acl/Role/Registry.php +lib/Magento/Config/Dom.php +lib/Magento/Config/Theme.php +lib/Magento/Data/Graph.php +lib/Magento/Data/Structure.php +lib/Magento/Shell.php +lib/Magento/Validator.php +dev/tests/integration/testsuite/integrity/modular/TemplateFilesTest.php +dev/tests/integration/testsuite/integrity/theme/TemplateFilesTest.php +dev/tests/integration/testsuite/Mage/Core/Block/_files +dev/tests/integration/tmp +dev/tests/static/testsuite/Php/Exemplar/_files/phpcs/input +dev/tests/static/testsuite/Php/Exemplar/_files/phpmd/input diff --git a/dev/tests/static/testsuite/Php/_files/blacklist/core.txt b/dev/tests/static/testsuite/Php/_files/blacklist/core.txt deleted file mode 100644 index 7cb0b5d0dd4a77ae3fa5ba95bbbb0fd2d64cac98..0000000000000000000000000000000000000000 --- a/dev/tests/static/testsuite/Php/_files/blacklist/core.txt +++ /dev/null @@ -1,11 +0,0 @@ -app/code/core/Mage/DesignEditor/view -app/code/core/Mage/User/view -dev/tests/functional/testsuite -dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/TestSuite/_files -dev/tests/integration/testsuite/integrity/modular/TemplateFilesTest.php -dev/tests/integration/testsuite/integrity/theme/TemplateFilesTest.php -dev/tests/integration/testsuite/Mage/Core/Block/_files -dev/tests/integration/tmp -dev/tests/static/testsuite/Php/Exemplar/_files/phpcs/input -dev/tests/static/testsuite/Php/Exemplar/_files/phpmd/input -dev/tools/translate diff --git a/dev/tests/static/testsuite/Php/_files/whitelist/core.txt b/dev/tests/static/testsuite/Php/_files/whitelist/common.txt similarity index 61% rename from dev/tests/static/testsuite/Php/_files/whitelist/core.txt rename to dev/tests/static/testsuite/Php/_files/whitelist/common.txt index 51e8165d0dbf44f343b10fd73c219fb70aada136..d8a5d726266c8e12add7475cb06641fd85324954 100644 --- a/dev/tests/static/testsuite/Php/_files/whitelist/core.txt +++ b/dev/tests/static/testsuite/Php/_files/whitelist/common.txt @@ -1,35 +1,23 @@ +# Files or directories that are included into static code analysis +# Glob patterns are supported +# app/bootstrap.php -app/code/core/Mage/Adminhtml/controllers/System/ConfigController.php app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Popup/Grid.php app/code/core/Mage/Adminhtml/Block/Catalog/Product/Options/Ajax.php app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Account.php app/code/core/Mage/Adminhtml/Model/Observer.php app/code/core/Mage/Adminhtml/Block/Urlrewrite -app/code/core/Mage/Adminhtml/Block/controllers/UrlrewriteController.php app/code/core/Mage/Adminhtml/Block/Page/System/Config/Robots/Reset.php app/code/core/Mage/Adminhtml/Block/System/Store/Edit app/code/core/Mage/Adminhtml/Block/System/Store/Edit.php -app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field.php -app/code/core/Mage/Backend/Model/Acl/Config.php -app/code/core/Mage/Backend/Block/Widget/Grid/ColumnSet.php -app/code/core/Mage/Backend/Block/Widget/Grid/Export.php -app/code/core/Mage/Backend/Block/Widget/Grid/ExportInterface.php +app/code/core/Mage/Adminhtml/controllers/UrlrewriteController.php app/code/core/Mage/Core/Block/Abstract.php -app/code/core/Mage/Core/Block/Adminhtml/System/Design/Theme/Edit/Form/Element/Image.php -app/code/core/Mage/Core/Block/Adminhtml/System/Design/Theme/Edit/Tab/General.php -app/code/core/Mage/Core/Block/Adminhtml/System/Design/Theme/Edit/Form.php -app/code/core/Mage/Core/Block/Adminhtml/System/Design/Theme/Edit/Tabs.php -app/code/core/Mage/Core/Block/Adminhtml/System/Design/Theme/Edit.php -app/code/core/Mage/Core/Block/Adminhtml/System/Design/Theme/Grid.php -app/code/core/Mage/Core/Block/Adminhtml/System/Design/Theme.php -app/code/core/Mage/Core/controllers/Adminhtml/System/Design/ThemeController.php -app/code/core/Mage/Core/data/core_setup/data-install-1.6.0.0.php +app/code/core/Mage/Core/data app/code/core/Mage/Centinel/Model/State/Jcb.php app/code/core/Mage/Core/Model/Config/Module.php app/code/core/Mage/Core/Model/Design.php app/code/core/Mage/Core/Model/ShellAbstract.php app/code/core/Mage/Core/Model/Layout.php -app/code/core/Mage/Core/Model/Layout/Structure.php app/code/core/Mage/Core/Model/Layout/Update.php app/code/core/Mage/Core/Model/Design/Fallback app/code/core/Mage/Core/Model/Design/Fallback.php @@ -51,9 +39,9 @@ app/code/core/Mage/Index/Model/Shell.php app/code/core/Mage/Log/Model/Resource/Helper app/code/core/Mage/Log/Model/Resource/Shell.php app/code/core/Mage/Log/Model/Shell.php -app/code/core/Mage/Rss/Controller/AdminhtmlAbstract.php app/code/core/Mage/Tag/Block/Adminhtml/Customer/Edit/Tab/Tag.php app/code/core/Mage/Tag/Block/Catalog/Product/Rss/Link.php +app/code/core/Mage/Theme app/code/core/Mage/User app/code/core/Mage/Core/Controller/Varien/Action/Forward.php app/code/core/Mage/Core/Controller/Varien/DispatchableInterface.php @@ -62,24 +50,13 @@ app/code/core/Mage/Core/Controller/Varien/Router/Abstract.php app/code/core/Mage/Cms/Controller/Router.php app/code/core/Mage/Page/Helper/Robots.php dev/shell -dev/tests/functional/testsuite/themes -dev/tests/functional/testsuite/Community2/Mage/ImportExport -dev/tests/functional/testsuite/Community2/Mage/Tags dev/tests/integration dev/tests/js dev/tests/performance dev/tests/static dev/tests/unit dev/tools -lib/Magento/Convert -lib/Magento/Di -lib/Magento/Di.php -lib/Magento/Di/Definition/CompilerDefinition.php -lib/Magento/Di/Definition/CompilerDefinition/Zend.php -lib/Magento/ObjectManager -lib/Magento/ObjectManager.php -lib/Magento/Profiler -lib/Magento/Profiler.php +lib/Magento lib/Varien/Convert lib/Varien/Date.php lib/Varien/Object.php diff --git a/dev/tests/unit/framework/Magento/Test/TestCase/ObjectManagerAbstract.php b/dev/tests/unit/framework/Magento/Test/Helper/ObjectManager.php similarity index 82% rename from dev/tests/unit/framework/Magento/Test/TestCase/ObjectManagerAbstract.php rename to dev/tests/unit/framework/Magento/Test/Helper/ObjectManager.php index e054457aa26843299ba0cd55689564796e2c00c8..1b83b2535575630520aa1d9ee254f166544b45ba 100644 --- a/dev/tests/unit/framework/Magento/Test/TestCase/ObjectManagerAbstract.php +++ b/dev/tests/unit/framework/Magento/Test/Helper/ObjectManager.php @@ -25,11 +25,9 @@ */ /** - * Abstract class for basic object tests, such as blocks, models etc... - * - * @SuppressWarnings(PHPMD.NumberOfChildren) + * Helper class for basic object retrieving, such as blocks, models etc... */ -abstract class Magento_Test_TestCase_ObjectManagerAbstract extends PHPUnit_Framework_TestCase +class Magento_Test_Helper_ObjectManager { /**#@+ * Supported entities keys. @@ -54,12 +52,14 @@ abstract class Magento_Test_TestCase_ObjectManagerAbstract extends PHPUnit_Frame 'request' => 'Mage_Core_Controller_Request_Http', 'layout' => 'Mage_Core_Model_Layout', 'eventManager' => 'Mage_Core_Model_Event_Manager', + 'urlBuilder' => 'Mage_Core_Model_Url', 'translator' => 'Mage_Core_Model_Translate', 'cache' => 'Mage_Core_Model_Cache', 'designPackage' => 'Mage_Core_Model_Design_Package', 'session' => 'Mage_Core_Model_Session', 'storeConfig' => 'Mage_Core_Model_Store_Config', - 'frontController' => 'Mage_Core_Controller_Varien_Front' + 'frontController' => 'Mage_Core_Controller_Varien_Front', + 'helperFactory' => 'Mage_Core_Model_Factory_Helper' ), self::MODEL_ENTITY => array( 'eventDispatcher' => 'Mage_Core_Model_Event_Manager', @@ -69,6 +69,23 @@ abstract class Magento_Test_TestCase_ObjectManagerAbstract extends PHPUnit_Frame ) ); + /** + * Test object + * + * @var PHPUnit_Framework_TestCase + */ + protected $_testObject; + + /** + * Class constructor + * + * @param PHPUnit_Framework_TestCase $testObject + */ + public function __construct(PHPUnit_Framework_TestCase $testObject) + { + $this->_testObject = $testObject; + } + /** * Get block instance * @@ -78,7 +95,7 @@ abstract class Magento_Test_TestCase_ObjectManagerAbstract extends PHPUnit_Frame */ public function getBlock($className, array $arguments = array()) { - $arguments = $this->_getConstructArguments(self::BLOCK_ENTITY, $className, $arguments); + $arguments = $this->getConstructArguments(self::BLOCK_ENTITY, $className, $arguments); return $this->_getInstanceViaConstructor($className, $arguments); } @@ -91,7 +108,7 @@ abstract class Magento_Test_TestCase_ObjectManagerAbstract extends PHPUnit_Frame */ public function getModel($className, array $arguments = array()) { - $arguments = $this->_getConstructArguments(self::MODEL_ENTITY, $className, $arguments); + $arguments = $this->getConstructArguments(self::MODEL_ENTITY, $className, $arguments); return $this->_getInstanceViaConstructor($className, $arguments); } @@ -101,13 +118,13 @@ abstract class Magento_Test_TestCase_ObjectManagerAbstract extends PHPUnit_Frame * @param string $entityName * @param string $className * @param array $arguments - * @throws Exception + * @throws InvalidArgumentException * @return array */ - protected function _getConstructArguments($entityName, $className = '', array $arguments = array()) + public function getConstructArguments($entityName, $className = '', array $arguments = array()) { if (!array_key_exists($entityName, $this->_supportedEntities)) { - throw new Exception('Unsupported entity type'); + throw new InvalidArgumentException('Unsupported entity type'); } $constructArguments = array(); @@ -136,13 +153,12 @@ abstract class Magento_Test_TestCase_ObjectManagerAbstract extends PHPUnit_Frame */ protected function _getResourceModelMock() { - /** @var $resourceMock Mage_Core_Model_Resource_Resource */ - $resourceMock = $this->getMock('Mage_Core_Model_Resource_Resource', array('getIdFieldName'), + $resourceMock = $this->_testObject->getMock('Mage_Core_Model_Resource_Resource', array('getIdFieldName'), array(), '', false ); - $resourceMock->expects($this->any()) + $resourceMock->expects($this->_testObject->any()) ->method('getIdFieldName') - ->will($this->returnValue('id')); + ->will($this->_testObject->returnValue('id')); return $resourceMock; } @@ -182,7 +198,7 @@ abstract class Magento_Test_TestCase_ObjectManagerAbstract extends PHPUnit_Frame */ protected function _getMockWithoutConstructorCall($className) { - return $this->getMock($className, array(), array(), '', false); + return $this->_testObject->getMock($className, array(), array(), '', false); } /** diff --git a/dev/tests/unit/framework/tests/unit/testsuite/Magento/Test/TestCase/ObjectManagerAbstractTest.php b/dev/tests/unit/framework/tests/unit/testsuite/Magento/Test/Helper/ObjectManagerTest.php similarity index 93% rename from dev/tests/unit/framework/tests/unit/testsuite/Magento/Test/TestCase/ObjectManagerAbstractTest.php rename to dev/tests/unit/framework/tests/unit/testsuite/Magento/Test/Helper/ObjectManagerTest.php index 1695b80248ec5d80ecea628eb4c4d3d61ea8e160..7362f6dafa8d34685f5d39a9a9b4b4bd9e208b31 100644 --- a/dev/tests/unit/framework/tests/unit/testsuite/Magento/Test/TestCase/ObjectManagerAbstractTest.php +++ b/dev/tests/unit/framework/tests/unit/testsuite/Magento/Test/Helper/ObjectManagerTest.php @@ -25,7 +25,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Magento_Test_TestCase_ObjectManagerAbstractTest extends PHPUnit_Framework_TestCase +class Magento_Test_TestCase_ObjectManagerTest extends PHPUnit_Framework_TestCase { /** * List of block default dependencies @@ -61,7 +61,7 @@ class Magento_Test_TestCase_ObjectManagerAbstractTest extends PHPUnit_Framework_ */ public function testGetBlock() { - $objectManager = $this->getMockForAbstractClass('Magento_Test_TestCase_ObjectManagerAbstract'); + $objectManager = new Magento_Test_Helper_ObjectManager($this); /** @var $template Mage_Core_Block_Template */ $template = $objectManager->getBlock('Mage_Core_Block_Template'); $this->assertInstanceOf('Mage_Core_Block_Template', $template); @@ -87,7 +87,7 @@ class Magento_Test_TestCase_ObjectManagerAbstractTest extends PHPUnit_Framework_ */ public function testGetModel() { - $objectManager = $this->getMockForAbstractClass('Magento_Test_TestCase_ObjectManagerAbstract'); + $objectManager = new Magento_Test_Helper_ObjectManager($this); /** @var $model Mage_Core_Model_Config_Data */ $model = $objectManager->getModel('Mage_Core_Model_Config_Data'); $this->assertInstanceOf('Mage_Core_Model_Config_Data', $model); diff --git a/dev/tests/unit/testsuite/Mage/Adminhtml/Block/Page/System/Config/Robots/ResetTest.php b/dev/tests/unit/testsuite/Mage/Adminhtml/Block/Page/System/Config/Robots/ResetTest.php index 623b2e7ccc67a89b6dd0e3915e916be86fe4e4a8..98ea9046a44a0206554198b62cde3ac7d4ba20b7 100644 --- a/dev/tests/unit/testsuite/Mage/Adminhtml/Block/Page/System/Config/Robots/ResetTest.php +++ b/dev/tests/unit/testsuite/Mage/Adminhtml/Block/Page/System/Config/Robots/ResetTest.php @@ -28,7 +28,7 @@ /** * Test class for Mage_Adminhtml_Block_Page_System_Config_Robots_Reset */ -class Mage_Adminhtml_Block_Page_System_Config_Robots_ResetTest extends Magento_Test_TestCase_ObjectManagerAbstract +class Mage_Adminhtml_Block_Page_System_Config_Robots_ResetTest extends PHPUnit_Framework_TestCase { /** * @var Mage_Adminhtml_Block_Page_System_Config_Robots_Reset @@ -42,7 +42,14 @@ class Mage_Adminhtml_Block_Page_System_Config_Robots_ResetTest extends Magento_T protected function setUp() { - $this->_resetRobotsBlock = $this->getBlock('Mage_Adminhtml_Block_Page_System_Config_Robots_Reset'); + $objectManagerHelper = new Magento_Test_Helper_ObjectManager($this); + $this->_resetRobotsBlock = $objectManagerHelper->getBlock( + 'Mage_Adminhtml_Block_Page_System_Config_Robots_Reset', + array( + 'application' => $this->getMock('Mage_Core_Model_App', array(), array(), '', false), + 'urlBuilder' => $this->getMock('Mage_Backend_Model_Url', array(), array(), '', false) + ) + ); $this->_mockRobotsHelper = $this->getMockBuilder('Mage_Page_Helper_Robots') ->setMethods(array('getRobotsDefaultCustomInstructions')) ->getMock(); diff --git a/dev/tests/unit/testsuite/Mage/Adminhtml/Model/ConfigTest.php b/dev/tests/unit/testsuite/Mage/Adminhtml/Model/ConfigTest.php deleted file mode 100644 index cc9a9842543389aec3f48176df8e4c18dedcae18..0000000000000000000000000000000000000000 --- a/dev/tests/unit/testsuite/Mage/Adminhtml/Model/ConfigTest.php +++ /dev/null @@ -1,82 +0,0 @@ -<?php -/** - * Magento - * - * NOTICE OF LICENSE - * - * This source file is subject to the Open Software License (OSL 3.0) - * that is bundled with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://opensource.org/licenses/osl-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 Magento - * @package Mage_Adminhtml - * @subpackage unit_tests - * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ - -class Mage_Adminhtml_Model_ConfigTest extends PHPUnit_Framework_TestCase -{ - - /** - * @param Varien_Simplexml_Element $xmlData - * @param boolean $isSingleStoreMode - * @param Varien_Simplexml_Element $node - * @param string $website - * @param string $store - * @param mixed $expectedResult - * @param string $message - * @dataProvider addItemFilterDataProvider - */ - public function testHasChildren($xmlData, $isSingleStoreMode, $node, $website, $store, $expectedResult, $message) - { - $app = $this->getMock('Mage_Core_Model_App', array('isSingleStoreMode'), array(), '', false); - $app->expects($this->any()) - ->method('isSingleStoreMode') - ->will($this->returnValue($isSingleStoreMode)); - - $config = new Mage_Adminhtml_Model_Config(array( - 'data' => $xmlData, - 'app' => $app, - )); - $result = $config->hasChildren($node, $website, $store); - $this->assertEquals($expectedResult, $result, $message); - } - - public function addItemFilterDataProvider() - { - $data = file_get_contents(__DIR__ . '/_files/system.xml'); - $xmlData = new Varien_Simplexml_Element($data); - return array( - array($xmlData, false, $xmlData->sections->dev, null, null, true, 'Case 1'), - array($xmlData, false, $xmlData->sections->dev->groups->css, null, null, true, 'Case 2'), - array($xmlData, false, $xmlData->sections->dev->groups->css, 'base', null, true, 'Case 3'), - array($xmlData, false, $xmlData->sections->dev->groups->css, 'base', 'default', true, 'Case 4'), - array($xmlData, false, $xmlData->sections->dev->groups->debug, null, null, false, 'Case 5'), - array($xmlData, false, $xmlData->sections->dev->groups->debug, 'base', null, true, 'Case 6'), - array($xmlData, false, $xmlData->sections->dev->groups->debug, 'base', 'default', true, 'Case 7'), - array($xmlData, false, $xmlData->sections->dev->groups->js, null, null, false, 'Case 8'), - array($xmlData, false, $xmlData->sections->dev->groups->js, 'base', null, false, 'Case 9'), - array($xmlData, false, $xmlData->sections->dev->groups->js, 'base', 'default', true, 'Case 10'), - array($xmlData, true, $xmlData->sections->dev->groups->debug, null, null, true, 'Case 11'), - array($xmlData, true, $xmlData->sections->dev->groups->debug, 'base', null, true, 'Case 12'), - array($xmlData, true, $xmlData->sections->dev->groups->debug, 'base', 'default', true, 'Case 13'), - array($xmlData, true, $xmlData->sections->dev->groups->js, null, null, true, 'Case 14'), - array($xmlData, true, $xmlData->sections->dev->groups->js, 'base', null, true, 'Case 15'), - array($xmlData, true, $xmlData->sections->dev->groups->js, 'base', 'default', true, 'Case 16'), - array($xmlData, true, $xmlData->sections->dev->groups->price, null, null, false, 'Case 17'), - array($xmlData, true, $xmlData->sections->dev->groups->price, 'base', null, false, 'Case 17'), - array($xmlData, true, $xmlData->sections->dev->groups->price, 'base', 'default', false, 'Case 17'), - ); - } -} diff --git a/dev/tests/unit/testsuite/Mage/Backend/Block/Store/SwitcherTest.php b/dev/tests/unit/testsuite/Mage/Backend/Block/Store/SwitcherTest.php new file mode 100644 index 0000000000000000000000000000000000000000..f5f70cd0d0b140095cf3fd182eb5a5b513176fed --- /dev/null +++ b/dev/tests/unit/testsuite/Mage/Backend/Block/Store/SwitcherTest.php @@ -0,0 +1,173 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Magento + * @package Mage_Backend + * @subpackage unit_tests + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +class Mage_Backend_Block_Store_SwitcherTest extends PHPUnit_Framework_TestCase +{ + /** + * @var Mage_Backend_Block_Store_Switcher + */ + protected $_object; + + /** + * @var PHPUnit_Framework_MockObject_MockObject + */ + protected $_applicationModel; + + /** + * @var PHPUnit_Framework_MockObject_MockObject + */ + protected $_websiteFactory; + + /** + * @var PHPUnit_Framework_MockObject_MockObject + */ + protected $_storeGroupFactory; + + protected function setUp() + { + $this->_applicationModel = $this->getMock('Mage_Core_Model_App', array(), array(), '', false); + $this->_websiteFactory = $this->getMock('Mage_Core_Model_Website_Factory', array(), array(), '', false); + $this->_storeGroupFactory = $this->getMock('Mage_Core_Model_Store_Group_Factory', array(), array(), '', false); + + $helper = new Magento_Test_Helper_ObjectManager($this); + $this->_object = $helper->getBlock('Mage_Backend_Block_Store_Switcher', array( + 'urlBuilder' => $this->getMock('Mage_Backend_Model_Url', array(), array(), '', false), + 'application' => $this->_applicationModel, + 'websiteFactory' => $this->_websiteFactory, + 'storeGroupFactory' => $this->_storeGroupFactory + )); + } + + /** + * @covers Mage_Backend_Block_Store_Switcher::getWebsiteCollection + */ + public function testGetWebsiteCollectionWhenWebSiteIdsEmpty() + { + $websiteModel = $this->getMock('Mage_Core_Model_Website', array(), array(), '', false, false); + $collection = $this->getMock('Mage_Core_Model_Resource_Website_Collection', array(), array(), '', false, false); + $websiteModel->expects($this->once())->method('getResourceCollection')->will($this->returnValue($collection)); + + $expected = array('test', 'data', 'some'); + $collection->expects($this->once())->method('load')->will($this->returnValue($expected)); + $collection->expects($this->never())->method('addIdFilter'); + + $this->_websiteFactory->expects($this->once()) + ->method('create') + ->will($this->returnValue($websiteModel)); + + $this->_object->setWebsiteIds(null); + + $actual = $this->_object->getWebsiteCollection(); + $this->assertEquals($expected, $actual); + } + + + /** + * @covers Mage_Backend_Block_Store_Switcher::getWebsiteCollection + */ + public function testGetWebsiteCollectionWhenWebSiteIdsIsSet() + { + $websiteModel = $this->getMock('Mage_Core_Model_Website', array(), array(), '', false, false); + $collection = $this->getMock('Mage_Core_Model_Resource_Website_Collection', array(), array(), '', false, false); + $websiteModel->expects($this->once())->method('getResourceCollection')->will($this->returnValue($collection)); + + $ids = array(1, 2, 3); + $this->_object->setWebsiteIds($ids); + + $expected = array('test', 'data', 'some'); + $collection->expects($this->once())->method('load')->will($this->returnValue($expected)); + $collection->expects($this->once())->method('addIdFilter')->with($ids); + + $this->_websiteFactory->expects($this->once()) + ->method('create') + ->will($this->returnValue($websiteModel)); + + $actual = $this->_object->getWebsiteCollection(); + $this->assertEquals($expected, $actual); + } + + /** + * @covers Mage_Backend_Block_Store_Switcher::getWebsites + */ + public function testGetWebsitesWhenWebSiteIdsIsNotSet() + { + $this->_object->setWebsiteIds(null); + + $expected = array('test', 'data', 'some'); + $this->_applicationModel->expects($this->once())->method('getWebsites')->will($this->returnValue($expected)); + + $this->assertEquals($expected, $this->_object->getWebsites()); + } + + /** + * @covers Mage_Backend_Block_Store_Switcher::getWebsites + */ + public function testGetWebsitesWhenWebSiteIdsIsSetAndMatchWebsites() + { + $ids = array(1, 3, 5); + $webSites = array( + 1 => 'site 1', + 2 => 'site 2', + 3 => 'site 3', + 4 => 'site 4', + 5 => 'site 5', + ); + + $this->_object->setWebsiteIds($ids); + + $expected = array( + 1 => 'site 1', + 3 => 'site 3', + 5 => 'site 5', + ); + $this->_applicationModel->expects($this->once())->method('getWebsites')->will($this->returnValue($webSites)); + + $this->assertEquals($expected, $this->_object->getWebsites()); + } + + /** + * @covers Mage_Backend_Block_Store_Switcher::getWebsites + */ + public function testGetWebsitesWhenWebSiteIdsIsSetAndNotMatchWebsites() + { + $ids = array(8, 10, 12); + $webSites = array( + 1 => 'site 1', + 2 => 'site 2', + 3 => 'site 3', + 4 => 'site 4', + 5 => 'site 5', + ); + + $this->_object->setWebsiteIds($ids); + + $expected = array(); + $this->_applicationModel->expects($this->once())->method('getWebsites')->will($this->returnValue($webSites)); + + $this->assertEquals($expected, $this->_object->getWebsites()); + } +} diff --git a/dev/tests/unit/testsuite/Mage/Backend/Block/System/Config/EditTest.php b/dev/tests/unit/testsuite/Mage/Backend/Block/System/Config/EditTest.php new file mode 100644 index 0000000000000000000000000000000000000000..397c1665523188a9e95859ba449e8d81f58bad75 --- /dev/null +++ b/dev/tests/unit/testsuite/Mage/Backend/Block/System/Config/EditTest.php @@ -0,0 +1,144 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Magento + * @package Mage_Backend + * @subpackage unit_tests + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +class Mage_Backend_Block_System_Config_EditTest extends PHPUnit_Framework_TestCase +{ + /** + * @var Mage_Backend_Block_System_Config_Edit + */ + protected $_object; + + /** + * @var PHPUnit_Framework_MockObject_MockObject + */ + protected $_systemConfigMock; + + /** + * @var PHPUnit_Framework_MockObject_MockObject + */ + protected $_requestMock; + + /** + * @var PHPUnit_Framework_MockObject_MockObject + */ + protected $_layoutMock; + + /** + * @var PHPUnit_Framework_MockObject_MockObject + */ + protected $_urlModelMock; + + protected function setUp() + { + $this->_systemConfigMock = $this->getMock('Mage_Backend_Model_Config_Structure', + array(), array(), '', false, false + ); + + $this->_requestMock = $this->getMock('Mage_Core_Controller_Request_Http', + array(), array(), '', false, false + ); + $this->_requestMock->expects($this->once()) + ->method('getParam') + ->with('section') + ->will($this->returnValue('test_section')); + + $this->_layoutMock = $this->getMock('Mage_Core_Model_Layout', + array(), array(), '', false, false + ); + + $this->_urlModelMock = $this->getMock('Mage_Backend_Model_Url', array(), array(), '', false, false); + + $sections = array( + 'frontend_model' => 'Some_Frontend_Model', + 'label' => 'test_label' + ); + $this->_systemConfigMock->expects($this->once()) + ->method('getSection') + ->with('test_section') + ->will($this->returnValue($sections) + ); + + $data = array( + 'data' => array( + 'systemConfig' => $this->_systemConfigMock, + ), + 'request' => $this->_requestMock, + 'layout' => $this->_layoutMock, + 'urlBuilder' => $this->_urlModelMock + ); + + $helper = new Magento_Test_Helper_ObjectManager($this); + $this->_object = $helper->getBlock('Mage_Backend_Block_System_Config_Edit', $data); + } + + public function testGetSaveButtonHtml() + { + $expected = 'element_html_code'; + + $this->_layoutMock->expects($this->once())->method('getChildName') + ->with(null, 'save_button') + ->will($this->returnValue('test_child_name')); + + $this->_layoutMock->expects($this->once())->method('renderElement') + ->with('test_child_name')->will($this->returnValue('element_html_code')); + + $this->assertEquals($expected, $this->_object->getSaveButtonHtml()); + } + + public function testGetSaveUrl() + { + $expectedUrl = '*/*/save'; + $expectedParams = array('_current' => true); + + $this->_urlModelMock->expects($this->once()) + ->method('getUrl') + ->with($expectedUrl, $expectedParams) + ->will($this->returnArgument(0) + ); + + $this->assertEquals($expectedUrl, $this->_object->getSaveUrl()); + } + + public function testInitFormWhenFrontendModelIsSet() + { + $block = $this->getMock('Mage_Core_Block_Template', + array('initForm', 'getNameInLayout', 'getIsAnonymous'), array(), '', false, false + ); + $block->expects($this->once())->method('initForm'); + $block->expects($this->once())->method('getNameInLayout')->will($this->returnValue('test_block_name')); + $block->expects($this->once())->method('getIsAnonymous')->will($this->returnValue(false)); + + $this->_layoutMock->expects($this->once()) + ->method('createBlock') + ->with('Some_Frontend_Model') + ->will($this->returnValue($block) + ); + + $this->_layoutMock->expects($this->once())->method('setChild')->with(null, 'test_block_name', 'form'); + $this->_object->initForm(); + } +} diff --git a/dev/tests/unit/testsuite/Mage/Adminhtml/Block/System/Config/Form/Field/Array/AbstractTest.php b/dev/tests/unit/testsuite/Mage/Backend/Block/System/Config/Form/Field/Array/AbstractTest.php similarity index 86% rename from dev/tests/unit/testsuite/Mage/Adminhtml/Block/System/Config/Form/Field/Array/AbstractTest.php rename to dev/tests/unit/testsuite/Mage/Backend/Block/System/Config/Form/Field/Array/AbstractTest.php index ceb2c60d8d30725247c321de4975e826e4b11a78..c8b32fd8c624c114326ea16d919517d81cc12855 100644 --- a/dev/tests/unit/testsuite/Mage/Adminhtml/Block/System/Config/Form/Field/Array/AbstractTest.php +++ b/dev/tests/unit/testsuite/Mage/Backend/Block/System/Config/Form/Field/Array/AbstractTest.php @@ -19,19 +19,19 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Magento - * @package Mage_Adminhtml + * @package Mage_Backend * @subpackage unit_tests * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Adminhtml_Block_System_Config_Form_Field_Array_AbstractTest extends PHPUnit_Framework_TestCase +class Mage_Backend_Block_System_Config_Form_Field_Array_AbstractTest extends PHPUnit_Framework_TestCase { public function testGetArrayRows() { - /** @var $block Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract */ + /** @var $block Mage_Backend_Block_System_Config_Form_Field_Array_Abstract */ $block = $this->getMockForAbstractClass( - 'Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract', + 'Mage_Backend_Block_System_Config_Form_Field_Array_Abstract', array(), '', false, diff --git a/dev/tests/unit/testsuite/Mage/Backend/Block/System/Config/Form/Field/ExportTest.php b/dev/tests/unit/testsuite/Mage/Backend/Block/System/Config/Form/Field/ExportTest.php new file mode 100644 index 0000000000000000000000000000000000000000..dcc0cf062bb001c970a469162897cecb5bef2a1f --- /dev/null +++ b/dev/tests/unit/testsuite/Mage/Backend/Block/System/Config/Form/Field/ExportTest.php @@ -0,0 +1,89 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Magento + * @package Mage_Backend + * @subpackage unit_tests + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +class Mage_Backend_Block_System_Config_Form_Field_ExportTest extends PHPUnit_Framework_TestCase +{ + /** + * @var Mage_Backend_Block_System_Config_Form_Field_Export + */ + protected $_object; + + /** + * @var PHPUnit_Framework_MockObject_MockObject + */ + protected $_helperFactoryMock; + + protected function setUp() + { + $this->_helperFactoryMock = $this->getMock('Mage_Core_Model_Factory_Helper', + array(), array(), '', false, false + ); + + $data = array( + 'helperFactory' => $this->_helperFactoryMock + ); + $this->_object = new Mage_Backend_Block_System_Config_Form_Field_Export($data); + } + + public function testGetElementHtml() + { + $expected = 'some test data'; + + $form = $this->getMock('Varien_Data_Form', array('getParent'), array(), '', false, false); + $parentObjectMock = $this->getMock('Mage_Backend_Block_Template', + array('getLayout'), array(), '', false, false + ); + $layoutMock = $this->getMock('Mage_Core_Model_Layout', array(), array(), '', false, false); + + $blockMock = $this->getMock('Mage_Backend_Block_Widget_Button', array(), array(), '', false, false); + + $requestMock = $this->getMock('Mage_Core_Controller_Request_Http', array(), array(), '', false, false); + $requestMock->expects($this->once())->method('getParam')->with('website')->will($this->returnValue(1)); + + $helperMock = $this->getMock('Mage_Backend_Helper_Data', array(), array(), '', false, false); + $helperMock->expects($this->once())->method('getUrl')->with("*/*/exportTablerates", array('website' => 1)); + $helperMock->expects($this->once())->method('__')->with('Export CSV')->will($this->returnArgument(0)); + + + $this->_helperFactoryMock->expects($this->any()) + ->method('get')->with('Mage_Backend_Helper_Data')->will($this->returnValue($helperMock)); + + $mockData = $this->getMock('StdClass', array('toHtml')); + $mockData->expects($this->once())->method('toHtml')->will($this->returnValue($expected)); + + $blockMock->expects($this->once())->method('getRequest')->will($this->returnValue($requestMock)); + $blockMock->expects($this->any())->method('setData')->will($this->returnValue($mockData)); + + + $layoutMock->expects($this->once())->method('createBlock')->will($this->returnValue($blockMock)); + $parentObjectMock->expects($this->once())->method('getLayout')->will($this->returnValue($layoutMock)); + $form->expects($this->once())->method('getParent')->will($this->returnValue($parentObjectMock)); + + $this->_object->setForm($form); + $this->assertEquals($expected, $this->_object->getElementHtml()); + } +} diff --git a/dev/tests/unit/testsuite/Mage/Backend/Block/System/Config/Form/Field/ImportTest.php b/dev/tests/unit/testsuite/Mage/Backend/Block/System/Config/Form/Field/ImportTest.php new file mode 100644 index 0000000000000000000000000000000000000000..46909eae51527c5c81988b23cbaf726b5d27bb9d --- /dev/null +++ b/dev/tests/unit/testsuite/Mage/Backend/Block/System/Config/Form/Field/ImportTest.php @@ -0,0 +1,94 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Mage_Backend + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + + +/** + * Custom import CSV file field for shipping table rates + * + * @category Mage + * @package Mage_Backend + * @author Magento Core Team <core@magentocommerce.com> + */ +class Mage_Backend_Block_System_Config_Form_Field_ImportTest extends PHPUnit_Framework_TestCase +{ + /** + * @var Mage_Backend_Block_System_Config_Form_Field_Import + */ + protected $_object; + + /** + * @var PHPUnit_Framework_MockObject_MockObject + */ + protected $_formMock; + + protected function setUp() + { + $this->_formMock = $this->getMock('Varien_Data_Form', + array('getFieldNameSuffix', 'addSuffixToName'), + array(), '', false, false + ); + $testData = array ('name' => 'test_name', 'html_id' => 'test_html_id'); + $this->_object = new Mage_Backend_Block_System_Config_Form_Field_Import($testData); + $this->_object->setForm($this->_formMock); + } + + public function testGetNameWhenFormFiledNameSuffixIsEmpty() + { + $this->_formMock->expects($this->once()) + ->method('getFieldNameSuffix') + ->will($this->returnValue(false)); + $this->_formMock->expects($this->never()) + ->method('addSuffixToName'); + $actual = $this->_object->getName(); + $this->assertEquals('test_name', $actual); + } + + public function testGetNameWhenFormFiledNameSuffixIsNotEmpty() + { + $this->_formMock->expects($this->once()) + ->method('getFieldNameSuffix') + ->will($this->returnValue(true)); + $this->_formMock->expects($this->once()) + ->method('addSuffixToName') + ->will($this->returnValue('test_suffix')); + $actual = $this->_object->getName(); + $this->assertEquals('test_suffix', $actual); + } + + public function testGetElementHtml() + { + $this->_formMock->expects($this->any()) + ->method('getHtmlIdPrefix') + ->will($this->returnValue('test_name_prefix')); + $this->_formMock->expects($this->any()) + ->method('getHtmlIdSuffix') + ->will($this->returnValue('test_name_suffix')); + $testString = $this->_object->getElementHtml(); + $this->assertStringStartsWith('<input id="time_condition" type="hidden" name="test_name" value="', $testString); + $this->assertStringEndsWith('<input id="test_html_id" name="test_name" data-ui-id="form-element-test_name"' . + ' value="" type="file"/>' . "\n", $testString); + } +} diff --git a/dev/tests/unit/testsuite/Mage/Backend/Block/System/Config/Form/Field/Select/AllowspecificTest.php b/dev/tests/unit/testsuite/Mage/Backend/Block/System/Config/Form/Field/Select/AllowspecificTest.php new file mode 100644 index 0000000000000000000000000000000000000000..22a6dd79e122569618ad7a816b3d70d7b5da44c1 --- /dev/null +++ b/dev/tests/unit/testsuite/Mage/Backend/Block/System/Config/Form/Field/Select/AllowspecificTest.php @@ -0,0 +1,100 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Magento + * @package Mage_Backend + * @subpackage unit_tests + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +class Mage_Backend_Block_System_Config_Form_Field_Select_AllowspecificTest extends PHPUnit_Framework_TestCase +{ + /** + * @var Mage_Backend_Block_System_Config_Form_Field_Select_Allowspecific + */ + protected $_object; + + /** + * @var PHPUnit_Framework_MockObject_MockObject + */ + protected $_formMock; + + protected function setUp() + { + $this->_object = new Mage_Backend_Block_System_Config_Form_Field_Select_Allowspecific(); + $this->_object->setData('html_id', 'spec_element'); + $this->_formMock = $this->getMock('Varien_Data_Form', + array('getHtmlIdPrefix', 'getHtmlIdSuffix', 'getElement'), + array(), '', false, false + ); + } + + public function testGetAfterElementHtml() + { + $this->_formMock->expects($this->exactly(2)) + ->method('getHtmlIdPrefix')->will($this->returnValue('test_prefix_')); + $this->_formMock->expects($this->exactly(2)) + ->method('getHtmlIdSuffix')->will($this->returnValue('_test_suffix')); + + $afterHtmlCode = 'after html'; + $this->_object->setData('after_element_html', $afterHtmlCode); + $this->_object->setForm($this->_formMock); + + $actual = $this->_object->getAfterElementHtml(); + + $this->assertStringEndsWith($afterHtmlCode, $actual); + $this->assertStringStartsWith('<script type="text/javascript">', trim($actual)); + $this->assertContains('test_prefix_spec_element_test_suffix', $actual); + } + + /** + * @param $value + * @dataProvider getHtmlWhenValueIsEmptyDataProvider + */ + public function testGetHtmlWhenValueIsEmpty($value) + { + $this->_object->setForm($this->_formMock); + + $elementMock = $this->getMock('Varien_Data_Form_Element_Select', + array('setDisabled'), array(), '', false, false + ); + + $elementMock->expects($this->once())->method('setDisabled')->with('disabled'); + $countryId = 'tetst_county_specificcountry'; + $this->_object->setId('tetst_county_allowspecific'); + $this->_formMock->expects($this->once())->method('getElement')->with($countryId) + ->will($this->returnValue($elementMock)); + + $this->_object->setValue($value); + $this->assertNotEmpty($this->_object->getHtml()); + } + + public function getHtmlWhenValueIsEmptyDataProvider() + { + return array( + 'zero' => array('1' => 0), + 'null' => array('1' => null), + 'false' => array('1' => false), + 'negative' => array('1' => -1), + ); + } + +} diff --git a/dev/tests/unit/testsuite/Mage/Backend/Block/System/Config/Form/FieldTest.php b/dev/tests/unit/testsuite/Mage/Backend/Block/System/Config/Form/FieldTest.php new file mode 100644 index 0000000000000000000000000000000000000000..4e9c11dbfb6dc638d484a0b24ffc642b29611fc8 --- /dev/null +++ b/dev/tests/unit/testsuite/Mage/Backend/Block/System/Config/Form/FieldTest.php @@ -0,0 +1,167 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Magento + * @package Mage_Backend + * @subpackage unit_tests + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +class Mage_Backend_Block_System_Config_Form_FieldTest extends PHPUnit_Framework_TestCase +{ + /** + * @var Mage_Backend_Block_System_Config_Form_Field + */ + protected $_object; + + /** + * @var PHPUnit_Framework_MockObject_MockObject + */ + protected $_elementMock; + + /** + * @var array + */ + protected $_testData; + + /** + * @var PHPUnit_Framework_MockObject_MockObject + */ + protected $_appModelMock; + + /** + * @var PHPUnit_Framework_MockObject_MockObject + */ + protected $_layoutMock; + + protected function setUp() + { + $this->_appModelMock = $this->getMock('Mage_Core_Model_App', array(), array(), '', false, false); + $this->_layoutMock = $this->getMock('Mage_Core_Model_Layout', array(), array(), '', false, false); + + $data = array( + 'layout' => $this->_layoutMock, + 'application' => $this->_appModelMock, + 'urlBuilder' => $this->getMock('Mage_Backend_Model_Url', array(), array(), '', false) + ); + $helper = new Magento_Test_Helper_ObjectManager($this); + $this->_object = $helper->getBlock('Mage_Backend_Block_System_Config_Form_Field', $data); + + $this->_testData = array( + 'htmlId' => 'test_field_id', + 'name' => 'test_name', + 'label' => 'test_label', + 'elementHTML' => 'test_html', + ); + + $this->_elementMock = $this->getMock('Varien_Data_Form_Element_Text', + array('getHtmlId' , 'getName', 'getLabel', 'getElementHtml', 'getComment', 'getHint', 'getScope', + 'getScopeLabel', 'getInherit', 'getCanUseWebsiteValue', 'getCanUseDefaultValue', 'setDisabled' + ), + array(), + '', + false, + false, + true + ); + + $this->_elementMock->expects($this->any())->method('getHtmlId') + ->will($this->returnValue($this->_testData['htmlId'])); + $this->_elementMock->expects($this->any())->method('getName') + ->will($this->returnValue($this->_testData['name'])); + $this->_elementMock->expects($this->any())->method('getLabel') + ->will($this->returnValue($this->_testData['label'])); + $this->_elementMock->expects($this->any())->method('getElementHtml') + ->will($this->returnValue($this->_testData['elementHTML'])); + } + + public function testRenderHtmlIdLabelInputElementName() + { + $expected = '<tr id="row_' . $this->_testData['htmlId'] . '">'; + $expected .= '<td class="label"><label for="' . $this->_testData['htmlId'] . '">' + . $this->_testData['label'] . '</label></td>'; + $expected .= '<td class="value">' . $this->_testData['elementHTML'] . '</td>'; + $expected .= '<td class="scope-label"></td>'; + $expected .= '<td class=""></td></tr>'; + + $actual = $this->_object->render($this->_elementMock); + + $this->assertEquals($expected, $actual); + } + + public function testRenderValueWithCommentBlock() + { + $testComment = 'test_comment'; + $this->_elementMock->expects($this->any())->method('getComment')->will($this->returnValue($testComment)); + $expected = '<td class="value">' . $this->_testData['elementHTML'] + . '<p class="note"><span>' . $testComment . '</span></p></td>'; + $actual = $this->_object->render($this->_elementMock); + $this->assertContains($expected, $actual); + } + + public function testRenderHint() + { + $testHint = 'test_hint'; + $this->_elementMock->expects($this->any())->method('getHint')->will($this->returnValue($testHint)); + $expected = '<td class=""><div class="hint"><div style="display: none;">' . $testHint . '</div></div>'; + $actual = $this->_object->render($this->_elementMock); + $this->assertContains($expected, $actual); + } + + public function testRenderScopeLabel() + { + $this->_appModelMock->expects($this->once())->method('isSingleStoreMode')->will($this->returnValue(false)); + + $testScopeLabel = 'test_scope_label'; + $this->_elementMock->expects($this->any())->method('getScope')->will($this->returnValue(true)); + $this->_elementMock->expects($this->any())->method('getScopeLabel')->will($this->returnValue($testScopeLabel)); + + $expected = '<td class="scope-label">' . $testScopeLabel . '</td>'; + $actual = $this->_object->render($this->_elementMock); + + $this->assertContains($expected, $actual); + } + + public function testRenderInheritCheckbox() + { + $this->_elementMock->expects($this->any())->method('getInherit')->will($this->returnValue(true)); + $this->_elementMock->expects($this->any())->method('getCanUseWebsiteValue')->will($this->returnValue(true)); + $this->_elementMock->expects($this->any())->method('getCanUseDefaultValue')->will($this->returnValue(true)); + $this->_elementMock->expects($this->once())->method('setDisabled')->with(true); + + $helperMock = $this->getMock('Mage_Backend_Helper_Data', array(), array(), '', false, false); + $helperMock->expects($this->any())->method('__')->will($this->returnArgument(0)); + + $this->_layoutMock->expects($this->any())->method('helper') + ->with('Mage_Backend_Helper_Data')->will($this->returnValue($helperMock)); + + $expected = '<td class="use-default">'; + $expected .= '<input id="' . $this->_testData['htmlId'] . '_inherit" name="' + . $this->_testData['name'] . '[inherit]" type="checkbox" value="1"' + . ' class="checkbox config-inherit" checked="checked"' + . ' onclick="toggleValueElements(this, Element.previous(this.parentNode))" /> '; + + $expected .= '<label for="' . $this->_testData['htmlId'] . '_inherit" class="inherit">Use Website</label>'; + $actual = $this->_object->render($this->_elementMock); + + $this->assertContains($expected, $actual); + } +} diff --git a/dev/tests/unit/testsuite/Mage/Backend/Block/System/Config/Form/FieldsetTest.php b/dev/tests/unit/testsuite/Mage/Backend/Block/System/Config/Form/FieldsetTest.php new file mode 100644 index 0000000000000000000000000000000000000000..4cd229d0b3068dd828a08063d9ce1b1dac954e6f --- /dev/null +++ b/dev/tests/unit/testsuite/Mage/Backend/Block/System/Config/Form/FieldsetTest.php @@ -0,0 +1,179 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Magento + * @package Mage_Backend + * @subpackage unit_tests + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +class Mage_Backend_Block_System_Config_Form_FieldsetTest extends PHPUnit_Framework_TestCase +{ + /** + * @var Mage_Backend_Block_System_Config_Form_Fieldset + */ + protected $_object; + + /** + * @var PHPUnit_Framework_MockObject_MockObject + */ + protected $_elementMock; + + /** + * @var PHPUnit_Framework_MockObject_MockObject + */ + protected $_requestMock; + + /** + * @var PHPUnit_Framework_MockObject_MockObject + */ + protected $_urlModelMock; + + /** + * @var array + */ + protected $_testData; + + /** + * @var PHPUnit_Framework_MockObject_MockObject + */ + protected $_layoutMock; + + + protected function setUp() + { + $this->_requestMock = $this->getMock('Mage_Core_Controller_Request_Http', array(), array(), '', false, false); + $this->_urlModelMock = $this->getMock('Mage_Backend_Model_Url', array(), array(), '', false, false); + $this->_layoutMock = $this->getMock('Mage_Core_Model_Layout', array(), array(), '', false, false); + + $data = array( + 'request' => $this->_requestMock, + 'urlBuilder' => $this->_urlModelMock, + 'layout' => $this->_layoutMock, + 'data' => array( + 'group' => array('fieldset_css' => 'test_fieldset_css') + ) + ); + $helper = new Magento_Test_Helper_ObjectManager($this); + $this->_object = $helper->getBlock('Mage_Backend_Block_System_Config_Form_Fieldset', $data); + + $this->_testData = array( + 'htmlId' => 'test_field_id', + 'name' => 'test_name', + 'label' => 'test_label', + 'elementHTML' => 'test_html', + 'legend' => 'test_legend', + 'comment' => 'test_comment', + ); + + $this->_elementMock = $this->getMock('Varien_Data_Form_Element_Text', + array('getHtmlId' , 'getName', 'getExpanded', 'getSortedElements', 'getLegend', 'getComment'), + array(), + '', + false, + false, + true + ); + + $this->_elementMock->expects($this->any())->method('getHtmlId') + ->will($this->returnValue($this->_testData['htmlId'])); + $this->_elementMock->expects($this->any())->method('getName') + ->will($this->returnValue($this->_testData['name'])); + $this->_elementMock->expects($this->any())->method('getExpanded') + ->will($this->returnValue(true)); + $this->_elementMock->expects($this->any())->method('getLegend') + ->will($this->returnValue($this->_testData['legend'])); + $this->_elementMock->expects($this->any())->method('getComment') + ->will($this->returnValue($this->_testData['comment'])); + } + + public function testRenderWithoutStoredElements() + { + $helperMock = $this->getMock('Mage_Core_Helper_Js', array(), array(), '', false, false); + $helperMock->expects($this->any())->method('__')->will($this->returnArgument(0)); + + $this->_layoutMock->expects($this->any())->method('helper') + ->with('Mage_Core_Helper_Js')->will($this->returnValue($helperMock)); + + $this->_elementMock->expects($this->any())->method('getSortedElements')->will($this->returnValue(array())); + + $expected = '<div class="entry-edit-head collapseable" >'; + + $expected .= '<a id="' . $this->_testData['htmlId'] . '-head" href="#"' + . ' onclick="Fieldset.toggleCollapse(\'' . $this->_testData['htmlId'] . '\', \'\'); ' + . 'return false;">' . $this->_testData['legend'] . '</a>'; + + $expected .= '</div><input id="' . $this->_testData['htmlId'] + . '-state" name="config_state[]" type="hidden" value="1" />'; + + $expected .= '<fieldset class="config collapseable test_fieldset_css' + . '" id="' . $this->_testData['htmlId'] + . '"><legend>' . $this->_testData['legend'] . '</legend>'; + + $expected .= '<span class="comment" style="display: block;">' . $this->_testData['comment'] . '</span>'; + + $expected .= '<table cellspacing="0" class="form-list">'; + $expected .= '<colgroup class="label" />'; + $expected .= '<colgroup class="value" />'; + $expected .= '<colgroup class="scope-label" />'; + $expected .= '<colgroup class="" />'; + $expected .= '<tbody></tbody></table></fieldset>'; + + $this->assertEquals($expected, $this->_object->render($this->_elementMock)); + } + + public function testRenderWithStoredElements() + { + $helperMock = $this->getMock('Mage_Core_Helper_Js', array(), array(), '', false, false); + $helperMock->expects($this->any())->method('__')->will($this->returnArgument(0)); + $helperMock->expects($this->any())->method('getScript')->will($this->returnArgument(0)); + + $this->_layoutMock->expects($this->any())->method('helper') + ->with('Mage_Core_Helper_Js')->will($this->returnValue($helperMock)); + + $fieldMock = $this->getMock('Varien_Data_Form_Element_Text', + array('getId', 'getTooltip', 'toHtml'), + array(), + '', + false, + false, + true + ); + + $fieldMock->expects($this->any())->method('getId')->will($this->returnValue('test_field_id')); + $fieldMock->expects($this->any())->method('getTooltip')->will($this->returnValue('test_field_tootip')); + $fieldMock->expects($this->any())->method('toHtml')->will($this->returnValue('test_field_toHTML')); + + $this->_elementMock->expects($this->any())->method('getSortedElements') + ->will($this->returnValue( array($fieldMock)) + ); + + $actual = $this->_object->render($this->_elementMock); + + $this->assertContains('test_field_toHTML', $actual); + + $expected = '<div id="row_test_field_id_comment" class="system-tooltip-box"' + .' style="display:none;">test_field_tootip</div>'; + $this->assertContains($expected, $actual); + + $this->assertContains("$$('#test_field_id table')[0].addClassName('system-tooltip-wrap');", $actual); + } +} diff --git a/dev/tests/unit/testsuite/Mage/Backend/Block/Widget/Grid/Column/MultistoreTest.php b/dev/tests/unit/testsuite/Mage/Backend/Block/Widget/Grid/Column/MultistoreTest.php index b43629b897bc8c00f66a5f490a68b2e704e0957a..78f0ca32a9cd7410eac39278da90ae8ebc50685c 100644 --- a/dev/tests/unit/testsuite/Mage/Backend/Block/Widget/Grid/Column/MultistoreTest.php +++ b/dev/tests/unit/testsuite/Mage/Backend/Block/Widget/Grid/Column/MultistoreTest.php @@ -25,7 +25,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Backend_Block_Widget_Grid_Column_MultistoreTest extends Magento_Test_TestCase_ObjectManagerAbstract +class Mage_Backend_Block_Widget_Grid_Column_MultistoreTest extends PHPUnit_Framework_TestCase { /** * @var Mage_Backend_Block_Widget_Grid_Column_Multistore @@ -42,14 +42,12 @@ class Mage_Backend_Block_Widget_Grid_Column_MultistoreTest extends Magento_Test_ $this->_appMock = $this->getMock('Mage_Core_Model_App', array(), array(), '', false); $arguments = array( - 'app' => $this->_appMock, - ); - $arguments = $this->_getConstructArguments(self::BLOCK_ENTITY, - 'Mage_Backend_Block_Widget_Grid_Column_Multistore', $arguments - ); - $this->_model = $this->_getInstanceViaConstructor('Mage_Backend_Block_Widget_Grid_Column_Multistore', - $arguments + 'application' => $this->_appMock, + 'urlBuilder' => $this->getMock('Mage_Backend_Model_Url', array(), array(), '', false) ); + + $objectManagerHelper = new Magento_Test_Helper_ObjectManager($this); + $this->_model = $objectManagerHelper->getBlock('Mage_Backend_Block_Widget_Grid_Column_Multistore', $arguments); } protected function tearDown() diff --git a/dev/tests/unit/testsuite/Mage/Backend/Block/Widget/Grid/ColumnSetTest.php b/dev/tests/unit/testsuite/Mage/Backend/Block/Widget/Grid/ColumnSetTest.php index cccf2a943243e74fe84dfac7b0e5fd71f106c032..92212b91cc64c6edf61880433950c8a19cb6e397 100644 --- a/dev/tests/unit/testsuite/Mage/Backend/Block/Widget/Grid/ColumnSetTest.php +++ b/dev/tests/unit/testsuite/Mage/Backend/Block/Widget/Grid/ColumnSetTest.php @@ -25,7 +25,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Backend_Block_Widget_Grid_ColumnSetTest extends Magento_Test_TestCase_ObjectManagerAbstract +class Mage_Backend_Block_Widget_Grid_ColumnSetTest extends PHPUnit_Framework_TestCase { /** * @var Mage_Backend_Block_Widget_Grid_ColumnSet @@ -75,10 +75,9 @@ class Mage_Backend_Block_Widget_Grid_ColumnSetTest extends Magento_Test_TestCase 'helper' => $this->_helperMock, 'generatorFactory' => $this->_factoryMock ); - $arguments = $this->_getConstructArguments(self::BLOCK_ENTITY, 'Mage_Backend_Block_Widget_Grid_ColumnSet', - $arguments - ); - $this->_model = $this->_getInstanceViaConstructor('Mage_Backend_Block_Widget_Grid_ColumnSet', $arguments); + + $objectManagerHelper = new Magento_Test_Helper_ObjectManager($this); + $this->_model = $objectManagerHelper->getBlock('Mage_Backend_Block_Widget_Grid_ColumnSet', $arguments); } public function tearDown() @@ -151,10 +150,10 @@ class Mage_Backend_Block_Widget_Grid_ColumnSetTest extends Magento_Test_TestCase 'rowUrl' => array('generatorClass' => $generatorClass) ) ); - $arguments = $this->_getConstructArguments(self::BLOCK_ENTITY, 'Mage_Backend_Block_Widget_Grid_ColumnSet', - $arguments - ); - $model = $this->_getInstanceViaConstructor('Mage_Backend_Block_Widget_Grid_ColumnSet', $arguments); + + $objectManagerHelper = new Magento_Test_Helper_ObjectManager($this); + /** @var $model Mage_Backend_Block_Widget_Grid_ColumnSet */ + $model = $objectManagerHelper->getBlock('Mage_Backend_Block_Widget_Grid_ColumnSet', $arguments); $url = $model->getRowUrl($itemMock); $this->assertEquals('http://localhost/mng/item/edit', $url); diff --git a/dev/tests/unit/testsuite/Mage/Backend/Block/Widget/Grid/ColumnTest.php b/dev/tests/unit/testsuite/Mage/Backend/Block/Widget/Grid/ColumnTest.php index 268216418c5f26547115cc02cb71d88160fc4e9e..1511b4c187bcb3b1b06b32d50011246c9dbaa9e9 100644 --- a/dev/tests/unit/testsuite/Mage/Backend/Block/Widget/Grid/ColumnTest.php +++ b/dev/tests/unit/testsuite/Mage/Backend/Block/Widget/Grid/ColumnTest.php @@ -28,7 +28,7 @@ /** * Test class for Mage_Backend_Block_Widget_Grid_Column */ -class Mage_Backend_Block_Widget_Grid_ColumnTest extends Magento_Test_TestCase_ObjectManagerAbstract +class Mage_Backend_Block_Widget_Grid_ColumnTest extends PHPUnit_Framework_TestCase { /** * @var Mage_Backend_Block_Widget_Grid_Column @@ -54,11 +54,10 @@ class Mage_Backend_Block_Widget_Grid_ColumnTest extends Magento_Test_TestCase_Ob $arguments = array( 'layout' => $this->_layoutMock, + 'urlBuilder' => $this->getMock('Mage_Backend_Model_Url', array(), array(), '', false) ); - $arguments = $this->_getConstructArguments(self::BLOCK_ENTITY, 'Mage_Backend_Block_Widget_Grid_Column', - $arguments - ); - $this->_block = $this->_getInstanceViaConstructor('Mage_Backend_Block_Widget_Grid_Column', $arguments); + $objectManagerHelper = new Magento_Test_Helper_ObjectManager($this); + $this->_block = $objectManagerHelper->getBlock('Mage_Backend_Block_Widget_Grid_Column', $arguments); } protected function tearDown() diff --git a/dev/tests/unit/testsuite/Mage/Backend/Block/Widget/Grid/MassactionTest.php b/dev/tests/unit/testsuite/Mage/Backend/Block/Widget/Grid/MassactionTest.php index 555cce7997cce96c781a41048677ebcde42e8491..ae0858b693fd95ef29bfb1040b5c494f3e5f154a 100644 --- a/dev/tests/unit/testsuite/Mage/Backend/Block/Widget/Grid/MassactionTest.php +++ b/dev/tests/unit/testsuite/Mage/Backend/Block/Widget/Grid/MassactionTest.php @@ -28,7 +28,7 @@ /** * Test class for Mage_Backend_Block_Widget_Grid_Massaction */ -class Mage_Backend_Block_Widget_Grid_MassactionTest extends Magento_Test_TestCase_ObjectManagerAbstract +class Mage_Backend_Block_Widget_Grid_MassactionTest extends PHPUnit_Framework_TestCase { /** * @var Mage_Backend_Block_Widget_Grid_Massaction @@ -72,9 +72,14 @@ class Mage_Backend_Block_Widget_Grid_MassactionTest extends Magento_Test_TestCas ->method('getId') ->will($this->returnValue('test_grid')); - $this->_layoutMock = $this->getMock('Mage_Core_Model_Layout', array('getParentName', 'getBlock'), array(), '', - false, false + $this->_layoutMock = $this->getMock('Mage_Core_Model_Layout', array('getParentName', 'getBlock', 'helper'), + array(), '', false, false ); + + $this->_backendHelperMock = $this->getMock('Mage_Backend_Helper_Data', array(), array(), '', false); + $this->_layoutMock->expects($this->any()) + ->method('helper') + ->will($this->returnValue($this->_backendHelperMock)); $this->_layoutMock->expects($this->any()) ->method('getParentName') ->with('test_grid_massaction') @@ -87,26 +92,19 @@ class Mage_Backend_Block_Widget_Grid_MassactionTest extends Magento_Test_TestCas $this->_requestMock = $this->getMock('Mage_Core_Controller_Request_Http', array('getParam'), array(), '', false ); - $this->_backendHelperMock = $this->getMock('Mage_Backend_Helper_Data', array(), array(), '', - false - ); $arguments = array( 'layout' => $this->_layoutMock, - 'backendHelper' => $this->_backendHelperMock, 'request' => $this->_requestMock, + 'urlBuilder' => $this->getMock('Mage_Backend_Model_Url', array(), array(), '', false), 'data' => array( 'massaction_id_field' => 'test_id', 'massaction_id_filter' => 'test_id' ) ); - $arguments = $this->_getConstructArguments(self::BLOCK_ENTITY, - 'Mage_Backend_Block_Widget_Grid_Massaction', $arguments - ); - $this->_block = $this->_getInstanceViaConstructor('Mage_Backend_Block_Widget_Grid_Massaction', - $arguments - ); + $objectManagerHelper = new Magento_Test_Helper_ObjectManager($this); + $this->_block = $objectManagerHelper->getBlock('Mage_Backend_Block_Widget_Grid_Massaction', $arguments); $this->_block->setNameInLayout('test_grid_massaction'); } diff --git a/dev/tests/unit/testsuite/Mage/Adminhtml/Model/System/Config/Source/Admin/PageTest.php b/dev/tests/unit/testsuite/Mage/Backend/Model/Config/Source/Admin/PageTest.php similarity index 93% rename from dev/tests/unit/testsuite/Mage/Adminhtml/Model/System/Config/Source/Admin/PageTest.php rename to dev/tests/unit/testsuite/Mage/Backend/Model/Config/Source/Admin/PageTest.php index 6e6bd56da36aecb183cc6924a8b1242fcbb538c0..0e5ef6bee7a1c9af2c9e2f7b771e4cf61b12ff26 100644 --- a/dev/tests/unit/testsuite/Mage/Adminhtml/Model/System/Config/Source/Admin/PageTest.php +++ b/dev/tests/unit/testsuite/Mage/Backend/Model/Config/Source/Admin/PageTest.php @@ -26,10 +26,10 @@ */ /** - * Test class for Mage_Adminhtml_Model_System_Config_Source_Admin_Page + * Test class for Mage_Backend_Model_Config_Source_Admin_Page */ -class Mage_Adminhtml_Model_System_Config_Source_Admin_PageTest extends PHPUnit_Framework_TestCase +class Mage_Backend_Model_Config_Source_Admin_PageTest extends PHPUnit_Framework_TestCase { /** * @var Mage_Backend_Model_Menu @@ -47,7 +47,7 @@ class Mage_Adminhtml_Model_System_Config_Source_Admin_PageTest extends PHPUnit_F protected $_factoryMock; /** - * @var Mage_Adminhtml_Model_System_Config_Source_Admin_Page + * @var Mage_Backend_Model_Config_Source_Admin_Page */ protected $_model; @@ -78,7 +78,7 @@ class Mage_Adminhtml_Model_System_Config_Source_Admin_PageTest extends PHPUnit_F $item2->expects($this->any())->method('hasChildren')->will($this->returnValue(false)); $this->_menuSubModel->add($item2); - $this->_model = new Mage_Adminhtml_Model_System_Config_Source_Admin_Page( + $this->_model = new Mage_Backend_Model_Config_Source_Admin_Page( array( 'menu' => $this->_menuModel, 'objectFactory' => $this->_factoryMock, diff --git a/dev/tests/integration/testsuite/Mage/Core/Model/Config/SystemTest.php b/dev/tests/unit/testsuite/Mage/Backend/Model/Config/Structure/ConverterTest.php similarity index 56% rename from dev/tests/integration/testsuite/Mage/Core/Model/Config/SystemTest.php rename to dev/tests/unit/testsuite/Mage/Backend/Model/Config/Structure/ConverterTest.php index 8ede4449156943ae1fbc3bb7f7826b80bd7f8c4e..58b4823ec947529b5e80ca70ca1db08f939a2d0c 100644 --- a/dev/tests/integration/testsuite/Mage/Core/Model/Config/SystemTest.php +++ b/dev/tests/unit/testsuite/Mage/Backend/Model/Config/Structure/ConverterTest.php @@ -19,24 +19,30 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Magento - * @package Mage_Core - * @subpackage integration_tests + * @package Mage_Backend + * @subpackage unit_tests * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Core_Model_Config_SystemTest extends PHPUnit_Framework_TestCase +class Mage_Backend_Model_Config_Structure_ConverterTest extends PHPUnit_Framework_TestCase { - public function testLoad() + /** + * @var Mage_Backend_Model_Config_Structure_Converter + */ + protected $_model; + + public function setUp() { - $model = Mage::getModel('Mage_Core_Model_Config_System'); - $model->load('Mage_Core'); - $this->assertInstanceOf('Mage_Core_Model_Config_Element', $model->getNode()); - $this->assertInstanceOf('Mage_Core_Model_Config_Element', $model->getNode('sections')); - $this->assertInstanceOf('Mage_Core_Model_Config_Element', $model->getNode('sections/web')); + $this->_model = new Mage_Backend_Model_Config_Structure_Converter(); + } - $this->assertFalse($model->getNode('sections/cms')); - $model->load('Mage_Cms'); - $this->assertInstanceOf('Mage_Core_Model_Config_Element', $model->getNode('sections/cms')); + public function testConvertCorrectlyConvertsConfigStructureToArray() + { + $testDom = dirname(dirname(__DIR__)) . '/_files/system_2.xml'; + $dom = new DOMDocument(); + $dom->load($testDom); + $expectedArray = include dirname(dirname(__DIR__)) . '/_files/converted_config.php'; + $this->assertEquals($expectedArray, $this->_model->convert($dom)); } } diff --git a/dev/tests/unit/testsuite/Mage/Backend/Model/Config/Structure/ReaderTest.php b/dev/tests/unit/testsuite/Mage/Backend/Model/Config/Structure/ReaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..77cacea54e94f05d646c090735c44943800006f5 --- /dev/null +++ b/dev/tests/unit/testsuite/Mage/Backend/Model/Config/Structure/ReaderTest.php @@ -0,0 +1,94 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Magento + * @package Mage_Backend + * @subpackage unit_tests + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +class Mage_Backend_Model_Config_Structure_ReaderTest extends PHPUnit_Framework_TestCase +{ + /** + * @var Mage_Backend_Model_Config_Structure_Reader + */ + protected $_model; + + /** + * @var PHPUnit_Framework_MockObject_MockObject + */ + protected $_appConfigMock; + + /** + * @var PHPUnit_Framework_MockObject_MockObject + */ + protected $_cacheMock; + + public function setUp() + { + $this->_appConfigMock = $this->getMock('Mage_Core_Model_Config', array(), array(), '', false); + $this->_cacheMock = $this->getMock('Mage_Core_Model_Cache', array(), array(), '', false); + $this->_cacheMock->expects($this->any())->method('canUse')->will($this->returnValue(true)); + + $this->_model = new Mage_Backend_Model_Config_Structure_Reader(array( + 'config' => $this->_appConfigMock, + 'cache' => $this->_cacheMock + )); + } + + public function testGetConfigurationLoadsConfigFromCacheWhenCacheIsEnabled() + { + $cachedObject = new StdClass(); + $cachedObject->foo = 'bar'; + $cachedData = serialize($cachedObject); + + $this->_cacheMock->expects($this->once())->method('load') + ->with(Mage_Backend_Model_Config_Structure_Reader::CACHE_SYSTEM_CONFIGURATION_STRUCTURE) + ->will($this->returnValue($cachedData)); + + $this->assertEquals($cachedObject, $this->_model->getConfiguration()); + } + + public function testGetConfigurationLoadsConfigFromFilesAndCachesIt() + { + $this->_cacheMock->expects($this->once())->method('load')->will($this->returnValue(false)); + + $testFiles = array('file1', 'file2'); + + $this->_appConfigMock->expects($this->once()) + ->method('getModuleConfigurationFiles') + ->will($this->returnValue($testFiles)); + + $configMock = new StdClass(); + $configMock->foo = "bar"; + + $this->_appConfigMock->expects($this->once()) + ->method('getModelInstance') + ->with('Mage_Backend_Model_Config_Structure', array('sourceFiles' => $testFiles)) + ->will($this->returnValue($configMock)); + + $this->_cacheMock->expects($this->once())->method('save')->with( + $this->isType('string') + ); + + $this->assertEquals($configMock, $this->_model->getConfiguration()); + } +} diff --git a/dev/tests/unit/testsuite/Mage/Backend/Model/Config/StructureTest.php b/dev/tests/unit/testsuite/Mage/Backend/Model/Config/StructureTest.php new file mode 100644 index 0000000000000000000000000000000000000000..a43229571d5e2792ffe72111cda3d7c7c5f50824 --- /dev/null +++ b/dev/tests/unit/testsuite/Mage/Backend/Model/Config/StructureTest.php @@ -0,0 +1,244 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Magento + * @package Mage_Backend + * @subpackage unit_tests + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +class Mage_Backend_Model_Config_StructureTest extends PHPUnit_Framework_TestCase +{ + /** + * @var Mage_Backend_Model_Config_Structure + */ + protected $_model; + + /** + * @var PHPUnit_Framework_MockObject_MockObject + */ + protected $_appMock; + + /** + * @var PHPUnit_Framework_MockObject_MockObject + */ + protected $_converterMock; + + /** + * @var PHPUnit_Framework_MockObject_MockObject + */ + protected $_helperFactoryMock; + + public function setUp() + { + $filePath = dirname(__DIR__) . '/_files'; + + $this->_appMock = $this->getMock('Mage_Core_Model_App', array(), array(), '', false); + $this->_converterMock = $this->getMock('Mage_Backend_Model_Config_Structure_Converter'); + $this->_converterMock->expects($this->once())->method('convert')->will($this->returnValue( + require $filePath . '/converted_config.php' + )); + + $this->_helperFactoryMock = $this->getMock('Mage_Core_Model_Factory_Helper', array(), array(), '', false); + $helperMock = $this->getMock('Mage_Backend_Helper_Data', array(), array(), '', false); + $helperMock->expects($this->any())->method('__')->will($this->returnArgument(0)); + $this->_helperFactoryMock->expects($this->any())->method('get')->will($this->returnValue($helperMock)); + + $this->_model = new Mage_Backend_Model_Config_Structure(array( + 'sourceFiles' => array( + $filePath . '/system_2.xml' + ), + 'app' => $this->_appMock, + 'converter' => $this->_converterMock, + 'helperFactory' => $this->_helperFactoryMock + )); + } + + public function testGetSectionsReturnsAllSections() + { + + $sections = $this->_model->getSections(); + $this->assertCount(2, $sections); + $section = reset($sections); + $this->assertEquals('section_1', $section['id']); + $section = next($sections); + $this->assertEquals('section_2', $section['id']); + } + + public function testGetSectionReturnsSectionByKey() + { + $section = $this->_model->getSection('section_1'); + $this->assertEquals('section_1', $section['id']); + $section = $this->_model->getSection(null, 'section_1'); + $this->assertEquals('section_1', $section['id']); + $section = $this->_model->getSection(null, null, 'section_1'); + $this->assertEquals('section_1', $section['id']); + } + + public function testHasChildrenReturnsFalseIfNodeCannotBeShown() + { + $this->assertFalse($this->_model->hasChildren(array())); + } + + public function testHasChildrenReturnsTrueIfNodeIsField() + { + $this->_appMock->expects($this->any())->method('isSingleStoreMode')->will($this->returnValue(true)); + $this->assertTrue($this->_model->hasChildren(array())); + } + + public function testHasChildrenReturnsFalseForEmptySection() + { + $this->_appMock->expects($this->any())->method('isSingleStoreMode')->will($this->returnValue(true)); + $this->assertFalse($this->_model->hasChildren(array('groups' => array()))); + } + + public function testHasChildrenReturnsFalseForEmptyGroup() + { + $this->_appMock->expects($this->any())->method('isSingleStoreMode')->will($this->returnValue(true)); + $this->assertFalse($this->_model->hasChildren(array('fields' => array()))); + } + + public function testCanShowNodeReturnsFalseByDefault() + { + $this->assertFalse($this->_model->hasChildren(array())); + } + + /** + * @param array $node + * @param string $website + * @param string $store + * @dataProvider testCanShowNodeReturnsTrueForDisplayableNodesDataProvider + */ + public function testCanShowNodeReturnsTrueForDisplayableNodes($node, $website, $store) + { + $this->assertTrue($this->_model->hasChildren($node, $website, $store)); + } + + public static function testCanShowNodeReturnsTrueForDisplayableNodesDataProvider() + { + return array( + array(array('showInStore' => 1), null, 'store'), + array(array('showInWebsite' => 1), 'website', null), + array(array('showInDefault' => 1), null, null) + ); + } + + /** + * @param array $node + * @param string $website + * @param string $store + * @dataProvider testCanShowNodeReturnsFalseForNonDisplayableNodesDataProvider + */ + public function testCanShowNodeReturnsFalseForNonDisplayableNodes($node, $website, $store) + { + $this->assertFalse($this->_model->hasChildren($node, $website, $store)); + } + + public static function testCanShowNodeReturnsFalseForNonDisplayableNodesDataProvider() + { + return array( + array(array('showInStore' => 0), null, 'store'), + array(array('showInWebsite' => 0), 'website', null), + array(array('showInStore' => 1), 'website', null), + array(array('showInWebsite' => 1), null, 'store'), + array(array('showInDefault' => 0), null, null) + ); + } + + public function testCanShowNodeReturnsTrueForNonDisplayableNodesInSingleStoreMode() + { + $this->_appMock->expects($this->any())->method('isSingleStoreMode')->will($this->returnValue(true)); + $this->assertTrue($this->_model->hasChildren(array(), null, null)); + } + + public function testCanShowNodeReturnsFalseForNonDisplayableNodesInSingleStoreModeWithFlag() + { + $this->_appMock->expects($this->any())->method('isSingleStoreMode')->will($this->returnValue(true)); + $this->assertTrue($this->_model->hasChildren(array('hide_in_single_store_mode'), null, null)); + } + + public function testGetAttributeModuleReturnsBackendModuleByDefault() + { + $this->assertEquals('Mage_Backend', $this->_model->getAttributeModule()); + } + + public function testGetAttributeModuleExtractsModuleAttributeFromNodes() + { + $this->assertEquals('Mage_Module1', $this->_model->getAttributeModule( + array('module' => 'Mage_Module1') + )); + $this->assertEquals('Mage_Module2', $this->_model->getAttributeModule( + array('module' => 'Mage_Module1'), array('module' => 'Mage_Module2') + )); + $this->assertEquals('Mage_Module3', $this->_model->getAttributeModule( + array('module' => 'Mage_Module1'), array('module' => 'Mage_Module2'), array('module' => 'Mage_Module3') + )); + } + + /** + * @expectedException InvalidArgumentException + */ + public function testGetSystemConfigNodeLabelThrowsExceptionIfSectionNameIsWrong() + { + $this->_model->getSystemConfigNodeLabel('unexistentSection'); + } + + /** + * @expectedException InvalidArgumentException + */ + public function testGetSystemConfigNodeLabelThrowsExceptionIfGroupNameIsWrong() + { + $this->_model->getSystemConfigNodeLabel('section_1', 'unexistent_group'); + } + + /** + * @expectedException InvalidArgumentException + */ + public function testGetSystemConfigNodeLabelThrowsExceptionIfFieldNameIsWrong() + { + $this->_model->getSystemConfigNodeLabel('section_1', 'group_1', 'unexistent_field'); + } + + public function testGetSystemConfigNodeLabelRetreivesLabel() + { + $this->assertEquals('Section 1 New', $this->_model->getSystemConfigNodeLabel('section_1')); + $this->assertEquals('Group 1 New', $this->_model->getSystemConfigNodeLabel('section_1', 'group_1')); + $this->assertEquals('Field 2', $this->_model->getSystemConfigNodeLabel('section_1', 'group_1', 'field_2')); + } + + public function testGetEncryptedNodeEntriesPathsReturnsListOfEncryptedFieldPaths() + { + $expected = array( + 'section_1/group_1/field_2', + 'section_2/group_3/field_4' + ); + $this->assertEquals($expected, $this->_model->getEncryptedNodeEntriesPaths()); + } + + public function testGetEncryptedNodeEntriesPathsReturnsListOfEncryptedFieldPathsReturnsExplodedPaths() + { + $expected = array( + array('section' => 'section_1', 'group' => 'group_1', 'field' => 'field_2'), + array('section' => 'section_2', 'group' => 'group_3', 'field' => 'field_4') + ); + $this->assertEquals($expected, $this->_model->getEncryptedNodeEntriesPaths(true)); + } +} diff --git a/dev/tests/unit/testsuite/Mage/Backend/Model/ConfigTest.php b/dev/tests/unit/testsuite/Mage/Backend/Model/ConfigTest.php new file mode 100644 index 0000000000000000000000000000000000000000..703588210c80fad84ae422999671f2fc44a2c197 --- /dev/null +++ b/dev/tests/unit/testsuite/Mage/Backend/Model/ConfigTest.php @@ -0,0 +1,109 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Magento + * @package Mage_Backend + * @subpackage unit_tests + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +class Mage_Backend_Model_ConfigTest extends PHPUnit_Framework_TestCase +{ + /** + * @var Mage_Backend_Model_Config + */ + protected $_model; + + /** + * @var PHPUnit_Framework_MockObject_MockObject + */ + protected $_eventManagerMock; + + /** + * @var PHPUnit_Framework_MockObject_MockObject + */ + protected $_structureReaderMock; + + /** + * @var PHPUnit_Framework_MockObject_MockObject + */ + protected $_transFactoryMock; + + /** + * @var PHPUnit_Framework_MockObject_MockObject + */ + protected $_objectFactoryMock; + + /** + * @var PHPUnit_Framework_MockObject_MockObject + */ + protected $_appConfigMock; + + /** + * @var PHPUnit_Framework_MockObject_MockObject + */ + protected $_applicationMock; + + public function setUp() + { + $this->_eventManagerMock = $this->getMock('Mage_Core_Model_Event_Manager', array(), array(), '', false); + $this->_structureReaderMock = $this->getMock( + 'Mage_Backend_Model_Config_Structure_Reader', array(), array(), '', false + ); + $structureMock = $this->getMock('Mage_Backend_Model_Config_Structure', array(), array(), '', false); + $this->_structureReaderMock->expects($this->any())->method('getConfiguration')->will( + $this->returnValue($structureMock) + ); + $this->_transFactoryMock = $this->getMock( + 'Mage_Backend_Model_Resource_Transaction_Factory', array(), array(), '', false + ); + $this->_objectFactoryMock = $this->getMock('Mage_Core_Model_Config', array(), array(), '', false); + $this->_appConfigMock = $this->getMock('Mage_Core_Model_Config', array(), array(), '', false); + $this->_applicationMock = $this->getMock('Mage_Core_Model_Application', array(), array(), '', false); + + $this->_model = new Mage_Backend_Model_Config(array( + 'eventManager' => $this->_eventManagerMock, + 'structureReader' => $this->_structureReaderMock, + 'transactionFactory' => $this->_transFactoryMock, + 'objectFactory' => $this->_objectFactoryMock, + 'applicationConfig' => $this->_appConfigMock, + 'application' => $this->_appConfigMock + )); + } + + public function testSaveDoesNotDoAnythingIfGroupsAreNotPassed() + { + $this->_structureReaderMock->expects($this->never())->method('getConfiguration'); + $this->_model->save(); + } + + public function testSaveEmptiesNonSetArguments() + { + $this->_structureReaderMock->expects($this->never())->method('getConfiguration'); + $this->assertNull($this->_model->getSection()); + $this->assertNull($this->_model->getWebsite()); + $this->assertNull($this->_model->getStore()); + $this->_model->save(); + $this->assertSame('', $this->_model->getSection()); + $this->assertSame('', $this->_model->getWebsite()); + $this->assertSame('', $this->_model->getStore()); + } +} diff --git a/dev/tests/unit/testsuite/Mage/Backend/Model/_files/converted_config.php b/dev/tests/unit/testsuite/Mage/Backend/Model/_files/converted_config.php new file mode 100644 index 0000000000000000000000000000000000000000..70cc1977864a15e45fa0b79fbad16c9282cd3901 --- /dev/null +++ b/dev/tests/unit/testsuite/Mage/Backend/Model/_files/converted_config.php @@ -0,0 +1,142 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Magento + * @package Mage_Backend + * @subpackage unit_tests + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + + +return array( + 'config' => array( + 'system' => array( + 'tabs' => array( + 'tab_1' => array( + 'id' => 'tab_1', + 'label' => 'Tab 1 New' + ) + ), + 'sections' => array( + 'section_1' => array( + 'id' => 'section_1', + 'type' => 'text', + 'label' => 'Section 1 New', + 'tab' => 'tab_1', + 'groups' => array( + 'group_1' => array( + 'id' => 'group_1', + 'type' => 'text', + 'label' => 'Group 1 New', + 'fields' => array( + 'field_2' => array( + 'id' => 'field_2', + 'translate' => 'label', + 'showInWebsite' => '1', + 'type' => 'text', + 'label' => 'Field 2', + 'backend_model' => 'Mage_Backend_Model_Config_Backend_Encrypted' + ) + ), + ), + 'group_2' => array( + 'id' => 'group_2', + 'type' => 'text', + 'label' => 'Group 2', + 'fields' => array( + 'field_3' => array( + 'id' => 'field_3', + 'translate' => 'label', + 'showInWebsite' => '1', + 'type' => 'text', + 'label' => 'Field 3', + ) + ), + ) + ), + ), + 'section_2' => array( + 'id' => 'section_2', + 'type' => 'text', + 'label' => 'Section 2', + 'tab' => 'tab_2', + 'groups' => array( + 'group_3' => array( + 'id' => 'group_3', + 'type' => 'text', + 'label' => 'Group 3', + 'comment' => '<a href="test_url">test_link</a>', + 'fields' => array( + 'field_3' => array( + 'id' => 'field_3', + 'translate' => 'label', + 'showInWebsite' => '1', + 'type' => 'text', + 'label' => 'Field 3', + 'attribute_0' => array( + 'someArr' => array( + 'someVal' => 1 + ) + ), + 'depends' => array( + 'fields' => array( + 'field_4' => array( + 'id' => 'field_4', + 'value' => 'someValue' + ), + 'field_1' => array( + 'id' => 'field_1', + 'value' => 'someValue' + ) + ) + ) + ), + 'field_4' => array( + 'id' => 'field_4', + 'translate' => 'label', + 'showInWebsite' => '1', + 'type' => 'text', + 'label' => 'Field 4', + 'backend_model' => 'Mage_Backend_Model_Config_Backend_Encrypted', + 'attribute_1' => 'test_value_1', + 'attribute_2' => 'test_value_2', + 'attribute_text' => '<test_value>', + 'attribute_text_in_array' => array( + 'var' => '<a href="test_url">test_link</a>', + 'type' => 'someType' + ), + 'depends' => array( + 'fields' => array( + 'field_3' => array( + 'id' => 'field_3', + 'value' => 0 + ) + ) + ) + ) + ), + ) + ) + ) + ) + ) + ) +); diff --git a/dev/tests/unit/testsuite/Mage/Adminhtml/Model/_files/system.xml b/dev/tests/unit/testsuite/Mage/Backend/Model/_files/system.xml similarity index 92% rename from dev/tests/unit/testsuite/Mage/Adminhtml/Model/_files/system.xml rename to dev/tests/unit/testsuite/Mage/Backend/Model/_files/system.xml index dc3b24fe8c6c6318468ff5f25bbe576b8a9f0cb9..5ccb1e422e02aacea558ed8cc2a7d34887b75813 100644 --- a/dev/tests/unit/testsuite/Mage/Adminhtml/Model/_files/system.xml +++ b/dev/tests/unit/testsuite/Mage/Backend/Model/_files/system.xml @@ -62,7 +62,7 @@ <template_hints translate="label"> <label>Template Path Hints</label> <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> <sort_order>20</sort_order> <show_in_default>0</show_in_default> <show_in_website>1</show_in_website> @@ -71,7 +71,7 @@ <template_hints_blocks translate="label"> <label>Add Block Names to Hints</label> <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> <sort_order>21</sort_order> <show_in_default>0</show_in_default> <show_in_website>1</show_in_website> @@ -90,7 +90,7 @@ <merge_css_files translate="label"> <label>Merge CSS Files</label> <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> <sort_order>10</sort_order> <show_in_default>1</show_in_default> <show_in_website>1</show_in_website> @@ -109,7 +109,7 @@ <merge_files translate="label"> <label>Merge JavaScript Files</label> <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> <sort_order>10</sort_order> <show_in_default>0</show_in_default> <show_in_website>0</show_in_website> @@ -128,7 +128,7 @@ <price_files translate="label"> <label>Price Files</label> <frontend_type>select</frontend_type> - <source_model>Mage_Adminhtml_Model_System_Config_Source_Yesno</source_model> + <source_model>Mage_Backend_Model_Config_Source_Yesno</source_model> <sort_order>10</sort_order> <show_in_default>1</show_in_default> <show_in_website>0</show_in_website> diff --git a/dev/tests/unit/testsuite/Mage/Backend/Model/_files/system_1.xml b/dev/tests/unit/testsuite/Mage/Backend/Model/_files/system_1.xml new file mode 100644 index 0000000000000000000000000000000000000000..da244e40dcc771ec86815f7774f072b7636f76d1 --- /dev/null +++ b/dev/tests/unit/testsuite/Mage/Backend/Model/_files/system_1.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/** + * 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 Magento + * @package Mage_Backend + * @subpackage unit_tests + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> + <system> + <tab id="tab_1"> + <label>Tab 1</label> + </tab> + <tab id="tab_2"> + <label>Tab 2</label> + </tab> + <section id="section_1" type="text"> + <label>Section 1</label> + <tab>tab_1</tab> + <group id="group_1" type="text"> + <label>Group 1</label> + <field id="field_1" type="text"> + <label>Field 1</label> + </field> + </group> + </section> + </system> +</config> diff --git a/dev/tests/unit/testsuite/Mage/Backend/Model/_files/system_2.xml b/dev/tests/unit/testsuite/Mage/Backend/Model/_files/system_2.xml new file mode 100644 index 0000000000000000000000000000000000000000..a9df5dc704c3426fb46b51f785971584897c98d5 --- /dev/null +++ b/dev/tests/unit/testsuite/Mage/Backend/Model/_files/system_2.xml @@ -0,0 +1,86 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/** + * 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 Magento + * @package Mage_Backend + * @subpackage unit_tests + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> + <system> + <tab id="tab_1"> + <label>Tab 1 New</label> + </tab> + <section id="section_1" type="text"> + <label>Section 1 New</label> + <tab>tab_1</tab> + <group id="group_1" type="text"> + <label>Group 1 New</label> + <field id="field_2" translate="label" showInWebsite="1" type="text"> + <label>Field 2</label> + <backend_model>Mage_Backend_Model_Config_Backend_Encrypted</backend_model> + </field> + </group> + <group id="group_2" type="text"> + <label>Group 2</label> + <field id="field_3" translate="label" showInWebsite="1" type="text"> + <label>Field 3</label> + </field> + </group> + </section> + <section id="section_2" type="text"> + <label>Section 2</label> + <tab>tab_2</tab> + <group id="group_3" type="text"> + <label>Group 3</label> + <comment><![CDATA[<a href="test_url">test_link</a>]]></comment> + <field id="field_3" translate="label" showInWebsite="1" type="text"> + <label>Field 3</label> + <attribute type="attribute_0"> + <someArr> + <someVal>1</someVal> + </someArr> + </attribute> + <depends> + <field id="field_4">someValue</field> + <field id="field_1">someValue</field> + </depends> + </field> + <field id="field_4" translate="label" showInWebsite="1" type="text"> + <label>Field 4</label> + <backend_model>Mage_Backend_Model_Config_Backend_Encrypted</backend_model> + <attribute type="attribute_1">test_value_1</attribute> + <attribute type="attribute_2">test_value_2</attribute> + <attribute type="attribute_text"><![CDATA[<test_value>]]></attribute> + <attribute type="attribute_text_in_array"> + <var><![CDATA[<a href="test_url">test_link</a>]]></var> + <type>someType</type> + </attribute> + <depends> + <field id="field_3">0</field> + </depends> + </field> + </group> + </section> + </system> +</config> diff --git a/dev/tests/unit/testsuite/Mage/Catalog/Model/Product/Indexer/FlatTest.php b/dev/tests/unit/testsuite/Mage/Catalog/Model/Product/Indexer/FlatTest.php index 79fe0bbb850cca1610584579b66bf29817fbe13a..a6fc4612af8a75ce233e116ece4e8e30e9ce7f4f 100644 --- a/dev/tests/unit/testsuite/Mage/Catalog/Model/Product/Indexer/FlatTest.php +++ b/dev/tests/unit/testsuite/Mage/Catalog/Model/Product/Indexer/FlatTest.php @@ -28,7 +28,7 @@ /** * Test class for Mage_Catalog_Model_Product_Indexer_Flat */ -class Mage_Catalog_Model_Product_Indexer_FlatTest extends Magento_Test_TestCase_ObjectManagerAbstract +class Mage_Catalog_Model_Product_Indexer_FlatTest extends PHPUnit_Framework_TestCase { /** * @var Mage_Catalog_Model_Product_Indexer_Flat @@ -42,7 +42,8 @@ class Mage_Catalog_Model_Product_Indexer_FlatTest extends Magento_Test_TestCase_ public function setUp() { - $this->_model = $this->getModel('Mage_Catalog_Model_Product_Indexer_Flat'); + $objectManagerHelper = new Magento_Test_Helper_ObjectManager($this); + $this->_model = $objectManagerHelper->getModel('Mage_Catalog_Model_Product_Indexer_Flat'); $this->_event = $this->getMock('Mage_Index_Model_Event', array('getFlatHelper', 'getEntity', 'getType', 'getDataObject'), array(), '', false ); diff --git a/dev/tests/unit/testsuite/Mage/Core/Block/AbstractTest.php b/dev/tests/unit/testsuite/Mage/Core/Block/AbstractTest.php index 93e23d79f798cf47a74961103c8ce0ea812b7ecb..df65c89825296a7abeb36a9f28c3a634041e681a 100644 --- a/dev/tests/unit/testsuite/Mage/Core/Block/AbstractTest.php +++ b/dev/tests/unit/testsuite/Mage/Core/Block/AbstractTest.php @@ -25,7 +25,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Core_Block_AbstractTest extends Magento_Test_TestCase_ObjectManagerAbstract +class Mage_Core_Block_AbstractTest extends PHPUnit_Framework_TestCase { /** * @param string $expectedResult diff --git a/dev/tests/unit/testsuite/Mage/Core/Controller/Varien/Action/RedirectTest.php b/dev/tests/unit/testsuite/Mage/Core/Controller/Varien/Action/RedirectTest.php new file mode 100644 index 0000000000000000000000000000000000000000..a6589dbf5249a8277c5aba9488627c302a382679 --- /dev/null +++ b/dev/tests/unit/testsuite/Mage/Core/Controller/Varien/Action/RedirectTest.php @@ -0,0 +1,69 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Mage_Core + * @subpackage unit_tests + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +/** + * Test class Mage_Core_Controller_Varien_Action_Redirect + */ +class Mage_Core_Controller_Varien_Action_RedirectTest extends PHPUnit_Framework_TestCase +{ + /** + * @var Mage_Core_Controller_Varien_Action_Redirect + */ + protected $_object = null; + + /** + * @var Zend_Controller_Request_Http + */ + protected $_request; + + /** + * @var Zend_Controller_Response_Http + */ + protected $_response; + + protected function setUp() + { + $this->_request = new Zend_Controller_Request_Http(); + + $this->_response = new Zend_Controller_Response_Http(); + + $this->_object = new Mage_Core_Controller_Varien_Action_Redirect($this->_request, $this->_response); + } + + public function testDispatch() + { + $this->_request->setDispatched(true); + $this->assertTrue($this->_request->isDispatched()); + $this->_object->dispatch('any action'); + $this->assertTrue($this->_request->isDispatched()); + + $this->_request->setDispatched(false); + $this->assertFalse($this->_request->isDispatched()); + $this->_object->dispatch('any action'); + $this->assertFalse($this->_request->isDispatched()); + } +} diff --git a/dev/tests/unit/testsuite/Mage/Core/Model/Design/Fallback/CachingProxyTest.php b/dev/tests/unit/testsuite/Mage/Core/Model/Design/Fallback/CachingProxyTest.php index eef8856c3836cbf89ae63c8b6a3ac5d75b580477..85241096f4ac33646c6bc91f320d5f659806be87 100644 --- a/dev/tests/unit/testsuite/Mage/Core/Model/Design/Fallback/CachingProxyTest.php +++ b/dev/tests/unit/testsuite/Mage/Core/Model/Design/Fallback/CachingProxyTest.php @@ -68,7 +68,6 @@ class Mage_Core_Model_Design_Fallback_CachingProxyTest extends PHPUnit_Framework 'area' => 'frontend', 'package' => 'package', 'theme' => 'theme', - 'skin' => 'skin', 'locale' => 'en_US', 'appConfig' => false, 'themeConfig' => false, @@ -79,7 +78,7 @@ class Mage_Core_Model_Design_Fallback_CachingProxyTest extends PHPUnit_Framework $this->_fallback = $this->getMock( 'Mage_Core_Model_Design_Fallback', - array('getFile', 'getLocaleFile', 'getSkinFile'), + array('getFile', 'getLocaleFile', 'getViewFile'), array($params) ); @@ -135,18 +134,18 @@ class Mage_Core_Model_Design_Fallback_CachingProxyTest extends PHPUnit_Framework * Calls are repeated twice to verify, that fallback is used only once, and next time a proper value is returned * via cached map. */ - public function testGetSkinFile() + public function testGetViewFile() { $module = 'Some_Module'; - $expected = $this->_baseDir . DIRECTORY_SEPARATOR . 'path' . DIRECTORY_SEPARATOR . 'skin_file.ext'; + $expected = $this->_baseDir . DIRECTORY_SEPARATOR . 'path' . DIRECTORY_SEPARATOR . 'view_file.ext'; $this->_fallback->expects($this->once()) - ->method('getSkinFile') + ->method('getViewFile') ->with('file.ext', $module) ->will($this->returnValue($expected)); - $actual = $this->_model->getSkinFile('file.ext', $module); + $actual = $this->_model->getViewFile('file.ext', $module); $this->assertEquals($expected, $actual); - $actual = $this->_model->getSkinFile('file.ext', $module); + $actual = $this->_model->getViewFile('file.ext', $module); $this->assertEquals($expected, $actual); } @@ -159,20 +158,20 @@ class Mage_Core_Model_Design_Fallback_CachingProxyTest extends PHPUnit_Framework $file = $this->_baseDir . DIRECTORY_SEPARATOR . 'path' . DIRECTORY_SEPARATOR . 'file.ext'; $this->_fallback->expects($this->once()) - ->method('getSkinFile') + ->method('getViewFile') ->with($file, $module) ->will($this->returnValue(null)); // Empty at first - $this->assertNull($this->_model->getSkinFile($file, $module)); + $this->assertNull($this->_model->getViewFile($file, $module)); // Store something $publicFilePath = $this->_baseDir . DIRECTORY_SEPARATOR . 'public' . DIRECTORY_SEPARATOR . 'file.ext'; - $result = $this->_model->notifySkinFilePublished($publicFilePath, $file, $module); + $result = $this->_model->notifyViewFilePublished($publicFilePath, $file, $module); $this->assertSame($this->_model, $result); // Stored successfully - $storedFilePath = $this->_model->getSkinFile($file, $module); + $storedFilePath = $this->_model->getViewFile($file, $module); $this->assertEquals($publicFilePath, $storedFilePath); } @@ -182,8 +181,8 @@ class Mage_Core_Model_Design_Fallback_CachingProxyTest extends PHPUnit_Framework public function testSaving() { $module = 'Some_Module'; - $file = 'internal/path/to/skin_file.ext'; - $expectedPublicFile = 'public/path/to/skin_file.ext'; + $file = 'internal/path/to/view_file.ext'; + $expectedPublicFile = 'public/path/to/view_file.ext'; $params = array( 'area' => 'frontend', @@ -196,7 +195,7 @@ class Mage_Core_Model_Design_Fallback_CachingProxyTest extends PHPUnit_Framework 'baseDir' => '' ); $model = new Mage_Core_Model_Design_Fallback_CachingProxy($params); - $model->notifySkinFilePublished($expectedPublicFile, $file, $module); + $model->notifyViewFilePublished($expectedPublicFile, $file, $module); $globPath = self::$_tmpDir . DIRECTORY_SEPARATOR . '*.*'; $this->assertEmpty(glob($globPath)); @@ -212,7 +211,7 @@ class Mage_Core_Model_Design_Fallback_CachingProxyTest extends PHPUnit_Framework $model->expects($this->never()) ->method('_getFallback'); - $actualPublicFile = $model->getSkinFile($file, $module); + $actualPublicFile = $model->getViewFile($file, $module); $this->assertEquals($expectedPublicFile, $actualPublicFile); } } diff --git a/dev/tests/unit/testsuite/Mage/Core/Model/Design/FallbackTest.php b/dev/tests/unit/testsuite/Mage/Core/Model/Design/FallbackTest.php index b7137da8558961d99e10c82cd51d835976d94ef8..cddb289f2fbfac4bdfb24f04cdd34ae25d3d0469 100644 --- a/dev/tests/unit/testsuite/Mage/Core/Model/Design/FallbackTest.php +++ b/dev/tests/unit/testsuite/Mage/Core/Model/Design/FallbackTest.php @@ -33,11 +33,10 @@ class Mage_Core_Model_Design_FallbackTest extends PHPUnit_Framework_TestCase * @param string $area * @param string $package * @param string $theme - * @param string|null $skin * @param string|null $locale * @return Mage_Core_Model_Design_Fallback */ - protected function _buildModel($area, $package, $theme, $skin, $locale) + protected function _buildModel($area, $package, $theme, $locale) { // Prepare config with directories $fixturePath = __DIR__ . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR; @@ -60,7 +59,6 @@ class Mage_Core_Model_Design_FallbackTest extends PHPUnit_Framework_TestCase 'area' => $area, 'package' => $package, 'theme' => $theme, - 'skin' => $skin, 'locale' => $locale, 'appConfig' => $config, 'themeConfig' => $themeConfig @@ -81,7 +79,7 @@ class Mage_Core_Model_Design_FallbackTest extends PHPUnit_Framework_TestCase */ public function testGetFile($file, $area, $package, $theme, $module, $expectedFilename) { - $model = $this->_buildModel($area, $package, $theme, null, null); + $model = $this->_buildModel($area, $package, $theme, null); $expectedFilename = str_replace('/', DIRECTORY_SEPARATOR, $expectedFilename); $actualFilename = $model->getFile($file, $module); @@ -100,11 +98,11 @@ class Mage_Core_Model_Design_FallbackTest extends PHPUnit_Framework_TestCase 'fixture_template.phtml', 'frontend', 'package', 'standalone_theme', null, null ), 'same package & parent theme' => array( - 'fixture_template_two.phtml', 'frontend', 'package', 'custom_theme_descendant', null, + 'fixture_template_two.phtml', 'frontend', 'package', 'custom_theme3', null, "%s/frontend/package/custom_theme/fixture_template_two.phtml", ), 'same package & grandparent theme' => array( - 'fixture_template.phtml', 'frontend', 'package', 'custom_theme_descendant', null, + 'fixture_template.phtml', 'frontend', 'package', 'custom_theme3', null, "%s/frontend/package/default/fixture_template.phtml", ), 'parent package & parent theme' => array( @@ -134,7 +132,7 @@ class Mage_Core_Model_Design_FallbackTest extends PHPUnit_Framework_TestCase */ public function testLocaleFileFallback($file, $area, $package, $theme, $locale, $expectedFilename) { - $model = $this->_buildModel($area, $package, $theme, null, $locale); + $model = $this->_buildModel($area, $package, $theme, $locale); $expectedFilename = str_replace('/', DIRECTORY_SEPARATOR, $expectedFilename); $actualFilename = $model->getLocaleFile($file); @@ -153,11 +151,11 @@ class Mage_Core_Model_Design_FallbackTest extends PHPUnit_Framework_TestCase 'fixture_translate.csv', 'frontend', 'package', 'standalone_theme', 'en_US', null ), 'parent theme' => array( - 'fixture_translate_two.csv', 'frontend', 'package', 'theme' => 'custom_theme_descendant', 'en_US', + 'fixture_translate_two.csv', 'frontend', 'package', 'theme' => 'custom_theme3', 'en_US', "%s/frontend/package/custom_theme/locale/en_US/fixture_translate_two.csv", ), 'grandparent theme' => array( - 'fixture_translate.csv', 'frontend', 'package', 'custom_theme_descendant', 'en_US', + 'fixture_translate.csv', 'frontend', 'package', 'custom_theme3', 'en_US', "%s/frontend/package/default/locale/en_US/fixture_translate.csv", ), ); @@ -170,17 +168,16 @@ class Mage_Core_Model_Design_FallbackTest extends PHPUnit_Framework_TestCase * @param string $area * @param string $package * @param string $theme - * @param string|null $skin * @param string|null $locale * @param string|null $module * @param string|null $expectedFilename */ - protected function _testGetSkinFile($file, $area, $package, $theme, $skin, $locale, $module, $expectedFilename) + protected function _testGetSkinFile($file, $area, $package, $theme, $locale, $module, $expectedFilename) { - $model = $this->_buildModel($area, $package, $theme, $skin, $locale); + $model = $this->_buildModel($area, $package, $theme, $locale); $expectedFilename = str_replace('/', DIRECTORY_SEPARATOR, $expectedFilename); - $actualFilename = $model->getSkinFile($file, $module); + $actualFilename = $model->getViewFile($file, $module); if ($expectedFilename) { $this->assertStringMatchesFormat($expectedFilename, $actualFilename); $this->assertFileExists($actualFilename); @@ -196,51 +193,50 @@ class Mage_Core_Model_Design_FallbackTest extends PHPUnit_Framework_TestCase * @param string $area * @param string $package * @param string $theme - * @param string $skin * @param string $locale * @param string|null $expectedFilename * * @dataProvider getSkinFileThemeDataProvider */ - public function testGetSkinFileTheme($file, $area, $package, $theme, $skin, $locale, $expectedFilename) + public function testGetSkinFileTheme($file, $area, $package, $theme, $locale, $expectedFilename) { - $this->_testGetSkinFile($file, $area, $package, $theme, $skin, $locale, null, $expectedFilename); + $this->_testGetSkinFile($file, $area, $package, $theme, $locale, null, $expectedFilename); } public function getSkinFileThemeDataProvider() { return array( 'no default theme inheritance' => array( - 'fixture_script_two.js', 'frontend', 'package', 'standalone_theme', 'theme_nested_skin', 'en_US', + 'fixture_script_two.js', 'frontend', 'package', 'standalone_theme', 'en_US', null, ), 'same theme & default skin' => array( - 'fixture_script_two.js', 'frontend', 'package', 'custom_theme', 'theme_nested_skin', 'en_US', - "%s/frontend/package/custom_theme/skin/default/fixture_script_two.js", + 'fixture_script_two.js', 'frontend', 'package', 'custom_theme', 'en_US', + "%s/frontend/package/custom_theme/fixture_script_two.js", ), 'parent theme & same skin' => array( - 'fixture_script.js', 'frontend', 'package', 'custom_theme_descendant', 'theme_nested_skin', 'en_US', - "%s/frontend/package/custom_theme/skin/theme_nested_skin/fixture_script.js", + 'fixture_script.js', 'frontend', 'package', 'custom_theme3', 'en_US', + "%s/frontend/package/custom_theme2/fixture_script.js", ), 'parent theme & default skin' => array( - 'fixture_script_two.js', 'frontend', 'package', 'custom_theme_descendant', 'theme_nested_skin', 'en_US', - "%s/frontend/package/custom_theme/skin/default/fixture_script_two.js", + 'fixture_script_two.js', 'frontend', 'package', 'custom_theme3', 'en_US', + "%s/frontend/package/custom_theme/fixture_script_two.js", ), 'grandparent theme & same skin' => array( - 'fixture_script_three.js', 'frontend', 'package', 'custom_theme_descendant', 'theme_nested_skin', - 'en_US', "%s/frontend/package/default/skin/theme_nested_skin/fixture_script_three.js", + 'fixture_script_three.js', 'frontend', 'package', 'custom_theme3', + 'en_US', null, ), 'grandparent theme & default skin' => array( - 'fixture_script_four.js', 'frontend', 'package', 'custom_theme_descendant', 'theme_nested_skin', - 'en_US', "%s/frontend/package/default/skin/default/fixture_script_four.js", + 'fixture_script_four.js', 'frontend', 'package', 'custom_theme3', + 'en_US', "%s/frontend/package/default/fixture_script_four.js", ), 'parent package & same theme & same skin' => array( - 'fixture_script.js', 'frontend', 'test', 'external_package_descendant', 'theme_nested_skin', 'en_US', - "%s/frontend/package/custom_theme/skin/theme_nested_skin/fixture_script.js", + 'fixture_script.js', 'frontend', 'test', 'external_package_descendant', 'en_US', + null, ), 'parent package & same theme & default skin' => array( - 'fixture_script_two.js', 'frontend', 'test', 'external_package_descendant', 'theme_nested_skin', - 'en_US', "%s/frontend/package/custom_theme/skin/default/fixture_script_two.js", + 'fixture_script_two.js', 'frontend', 'test', 'external_package_descendant', + 'en_US', "%s/frontend/package/custom_theme/fixture_script_two.js", ), ); } @@ -252,38 +248,37 @@ class Mage_Core_Model_Design_FallbackTest extends PHPUnit_Framework_TestCase * @param string $area * @param string $package * @param string $theme - * @param string $skin * @param string $locale * @param string|null $module * @param string|null $expectedFilename * * @dataProvider getSkinFileL10nDataProvider */ - public function testGetSkinFileL10n($file, $area, $package, $theme, $skin, $locale, $module, $expectedFilename) + public function testGetSkinFileL10n($file, $area, $package, $theme, $locale, $module, $expectedFilename) { - $this->_testGetSkinFile($file, $area, $package, $theme, $skin, $locale, $module, $expectedFilename); + $this->_testGetSkinFile($file, $area, $package, $theme, $locale, $module, $expectedFilename); } public function getSkinFileL10nDataProvider() { return array( 'general skin file' => array( - 'fixture_script.js', 'frontend', 'package', 'custom_theme', 'theme_nested_skin', 'en_US', null, - "%s/frontend/package/custom_theme/skin/theme_nested_skin/fixture_script.js" + 'fixture_script.js', 'frontend', 'package', 'custom_theme2', 'en_US', null, + "%s/frontend/package/custom_theme2/fixture_script.js" ), 'localized skin file' => array( - 'fixture_script.js', 'frontend', 'package', 'custom_theme', 'theme_nested_skin', 'ru_RU', null, - "%s/frontend/package/custom_theme/skin/theme_nested_skin/locale/ru_RU/fixture_script.js", + 'fixture_script.js', 'frontend', 'package', 'custom_theme2', 'ru_RU', null, + "%s/frontend/package/custom_theme2/locale/ru_RU/fixture_script.js", ), 'general modular skin file' => array( - 'fixture_script.js', 'frontend', 'package', 'custom_theme', 'theme_nested_skin', 'en_US', + 'fixture_script.js', 'frontend', 'package', 'custom_theme2', 'en_US', 'Fixture_Module', - "%s/frontend/package/custom_theme/skin/theme_nested_skin/Fixture_Module/fixture_script.js", + "%s/frontend/package/custom_theme2/Fixture_Module/fixture_script.js", ), 'localized modular skin file' => array( - 'fixture_script.js', 'frontend', 'package', 'custom_theme', 'theme_nested_skin', 'ru_RU', + 'fixture_script.js', 'frontend', 'package', 'custom_theme2', 'ru_RU', 'Fixture_Module', - "%s/frontend/package/custom_theme/skin/theme_nested_skin/locale/ru_RU/Fixture_Module/fixture_script.js", + "%s/frontend/package/custom_theme2/locale/ru_RU/Fixture_Module/fixture_script.js", ), ); } @@ -295,25 +290,24 @@ class Mage_Core_Model_Design_FallbackTest extends PHPUnit_Framework_TestCase * @param string $area * @param string $package * @param string $theme - * @param string $skin * @param string|null $expectedFilename * * @dataProvider getSkinFileJsLibDataProvider */ - public function testGetSkinFileJsLib($file, $area, $package, $theme, $skin, $expectedFilename) + public function testGetSkinFileJsLib($file, $area, $package, $theme, $expectedFilename) { - $this->_testGetSkinFile($file, $area, $package, $theme, $skin, 'en_US', null, $expectedFilename); + $this->_testGetSkinFile($file, $area, $package, $theme, 'en_US', null, $expectedFilename); } public function getSkinFileJsLibDataProvider() { return array( 'lib file in theme' => array( - 'mage/script.js', 'frontend', 'package', 'custom_theme', 'theme_nested_skin', - "%s/frontend/package/custom_theme/skin/theme_nested_skin/mage/script.js", + 'mage/script.js', 'frontend', 'package', 'custom_theme2', + "%s/frontend/package/custom_theme2/mage/script.js", ), 'lib file in js lib' => array( - 'mage/script.js', 'frontend', 'package', 'custom_theme', 'default', + 'mage/script.js', 'frontend', 'package', 'custom_theme', '%s/pub/js/mage/script.js', ), ); diff --git a/dev/tests/unit/testsuite/Mage/Core/Model/Design/PackageFallbackTest.php b/dev/tests/unit/testsuite/Mage/Core/Model/Design/PackageFallbackTest.php index d2d06574d96287354599ec39cc596f3a1ea742d9..730a469400ecf09b6a06bcdeb4a6f2c3b5fb204a 100644 --- a/dev/tests/unit/testsuite/Mage/Core/Model/Design/PackageFallbackTest.php +++ b/dev/tests/unit/testsuite/Mage/Core/Model/Design/PackageFallbackTest.php @@ -46,7 +46,7 @@ class Mage_Core_Model_Design_PackageFallbackTest extends PHPUnit_Framework_TestC array(), '', false ); $this->_fallback = $this->getMock('Mage_Core_Model_Design_Package_Fallback', - array('getFile', 'getLocaleFile', 'getSkinFile') + array('getFile', 'getLocaleFile', 'getViewFile') ); } @@ -98,13 +98,12 @@ class Mage_Core_Model_Design_PackageFallbackTest extends PHPUnit_Framework_TestC $this->assertEquals($expected, $actual); } - public function testGetSkinFile() + public function testGetViewFile() { $params = array( 'area' => 'some_area', 'package' => 'some_package', 'theme' => 'some_theme', - 'skin' => 'some_skin', 'locale' => 'some_locale' ); $file = 'Some_Module::some_file.ext'; @@ -116,11 +115,11 @@ class Mage_Core_Model_Design_PackageFallbackTest extends PHPUnit_Framework_TestC ->with($expectedParams) ->will($this->returnValue($this->_fallback)); $this->_fallback->expects($this->once()) - ->method('getSkinFile') + ->method('getViewFile') ->with('some_file.ext', 'Some_Module') ->will($this->returnValue($expected)); - $actual = $this->_model->getSkinFile($file, $params); + $actual = $this->_model->getViewFile($file, $params); $this->assertEquals($expected, $actual); } } diff --git a/dev/tests/unit/testsuite/Mage/Core/Model/Design/_files/design/frontend/package/custom_theme/skin/default/fixture_script_two.js b/dev/tests/unit/testsuite/Mage/Core/Model/Design/_files/design/frontend/package/custom_theme/fixture_script_two.js similarity index 100% rename from dev/tests/unit/testsuite/Mage/Core/Model/Design/_files/design/frontend/package/custom_theme/skin/default/fixture_script_two.js rename to dev/tests/unit/testsuite/Mage/Core/Model/Design/_files/design/frontend/package/custom_theme/fixture_script_two.js diff --git a/dev/tests/unit/testsuite/Mage/Core/Model/Design/_files/design/frontend/package/custom_theme/skin/theme_nested_skin/Fixture_Module/fixture_script.js b/dev/tests/unit/testsuite/Mage/Core/Model/Design/_files/design/frontend/package/custom_theme2/Fixture_Module/fixture_script.js similarity index 100% rename from dev/tests/unit/testsuite/Mage/Core/Model/Design/_files/design/frontend/package/custom_theme/skin/theme_nested_skin/Fixture_Module/fixture_script.js rename to dev/tests/unit/testsuite/Mage/Core/Model/Design/_files/design/frontend/package/custom_theme2/Fixture_Module/fixture_script.js diff --git a/dev/tests/unit/testsuite/Mage/Core/Model/Design/_files/design/frontend/package/custom_theme/skin/theme_nested_skin/fixture_script.js b/dev/tests/unit/testsuite/Mage/Core/Model/Design/_files/design/frontend/package/custom_theme2/fixture_script.js similarity index 100% rename from dev/tests/unit/testsuite/Mage/Core/Model/Design/_files/design/frontend/package/custom_theme/skin/theme_nested_skin/fixture_script.js rename to dev/tests/unit/testsuite/Mage/Core/Model/Design/_files/design/frontend/package/custom_theme2/fixture_script.js diff --git a/dev/tests/unit/testsuite/Mage/Core/Model/Design/_files/design/frontend/package/custom_theme/skin/theme_nested_skin/locale/ru_RU/Fixture_Module/fixture_script.js b/dev/tests/unit/testsuite/Mage/Core/Model/Design/_files/design/frontend/package/custom_theme2/locale/ru_RU/Fixture_Module/fixture_script.js similarity index 100% rename from dev/tests/unit/testsuite/Mage/Core/Model/Design/_files/design/frontend/package/custom_theme/skin/theme_nested_skin/locale/ru_RU/Fixture_Module/fixture_script.js rename to dev/tests/unit/testsuite/Mage/Core/Model/Design/_files/design/frontend/package/custom_theme2/locale/ru_RU/Fixture_Module/fixture_script.js diff --git a/dev/tests/unit/testsuite/Mage/Core/Model/Design/_files/design/frontend/package/custom_theme/skin/theme_nested_skin/locale/ru_RU/fixture_script.js b/dev/tests/unit/testsuite/Mage/Core/Model/Design/_files/design/frontend/package/custom_theme2/locale/ru_RU/fixture_script.js similarity index 100% rename from dev/tests/unit/testsuite/Mage/Core/Model/Design/_files/design/frontend/package/custom_theme/skin/theme_nested_skin/locale/ru_RU/fixture_script.js rename to dev/tests/unit/testsuite/Mage/Core/Model/Design/_files/design/frontend/package/custom_theme2/locale/ru_RU/fixture_script.js diff --git a/dev/tests/unit/testsuite/Mage/Core/Model/Design/_files/design/frontend/package/custom_theme/skin/theme_nested_skin/mage/script.js b/dev/tests/unit/testsuite/Mage/Core/Model/Design/_files/design/frontend/package/custom_theme2/mage/script.js similarity index 100% rename from dev/tests/unit/testsuite/Mage/Core/Model/Design/_files/design/frontend/package/custom_theme/skin/theme_nested_skin/mage/script.js rename to dev/tests/unit/testsuite/Mage/Core/Model/Design/_files/design/frontend/package/custom_theme2/mage/script.js diff --git a/dev/tests/unit/testsuite/Mage/Core/Model/Design/_files/design/frontend/package/custom_theme_descendant/theme.xml b/dev/tests/unit/testsuite/Mage/Core/Model/Design/_files/design/frontend/package/custom_theme2/theme.xml similarity index 89% rename from dev/tests/unit/testsuite/Mage/Core/Model/Design/_files/design/frontend/package/custom_theme_descendant/theme.xml rename to dev/tests/unit/testsuite/Mage/Core/Model/Design/_files/design/frontend/package/custom_theme2/theme.xml index 1bc778acbbe61ad9a2b7c56349603117abc12320..0220c537693bb4391e5e4fc4b63d1bc2ac15dbfa 100644 --- a/dev/tests/unit/testsuite/Mage/Core/Model/Design/_files/design/frontend/package/custom_theme_descendant/theme.xml +++ b/dev/tests/unit/testsuite/Mage/Core/Model/Design/_files/design/frontend/package/custom_theme2/theme.xml @@ -28,8 +28,8 @@ <design> <package code="package"> <title>Package</title> - <theme version="2.0.0.0" code="custom_theme_descendant" parent="custom_theme"> - <title>Custom Theme Descendant</title> + <theme version="2.0.0.0" code="custom_theme2" parent="custom_theme"> + <title>Custom Theme 2</title> <requirements> <magento_version from="2.0.0.0-dev1" to="*"/> </requirements> diff --git a/dev/tests/unit/testsuite/Mage/Core/Model/Design/_files/design/frontend/package/custom_theme3/theme.xml b/dev/tests/unit/testsuite/Mage/Core/Model/Design/_files/design/frontend/package/custom_theme3/theme.xml new file mode 100644 index 0000000000000000000000000000000000000000..5873b1ea949715ed952df4b8407226fcdf37a254 --- /dev/null +++ b/dev/tests/unit/testsuite/Mage/Core/Model/Design/_files/design/frontend/package/custom_theme3/theme.xml @@ -0,0 +1,38 @@ +<!-- +/** + * 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 Magento + * @package Mage_Core + * @subpackage unit_tests + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<design> + <package code="package"> + <title>Package</title> + <theme version="2.0.0.0" code="custom_theme3" parent="custom_theme2"> + <title>Custom Theme 3</title> + <requirements> + <magento_version from="2.0.0.0-dev1" to="*"/> + </requirements> + </theme> + </package> +</design> diff --git a/dev/tests/unit/testsuite/Mage/Core/Model/Design/_files/design/frontend/package/default/skin/default/fixture_script_four.js b/dev/tests/unit/testsuite/Mage/Core/Model/Design/_files/design/frontend/package/default/fixture_script_four.js similarity index 100% rename from dev/tests/unit/testsuite/Mage/Core/Model/Design/_files/design/frontend/package/default/skin/default/fixture_script_four.js rename to dev/tests/unit/testsuite/Mage/Core/Model/Design/_files/design/frontend/package/default/fixture_script_four.js diff --git a/dev/tests/unit/testsuite/Mage/Core/Model/Design/_files/design/frontend/package/default/skin/theme_nested_skin/fixture_script_three.js b/dev/tests/unit/testsuite/Mage/Core/Model/Design/_files/design/frontend/package/default2/fixture_script_three.js similarity index 100% rename from dev/tests/unit/testsuite/Mage/Core/Model/Design/_files/design/frontend/package/default/skin/theme_nested_skin/fixture_script_three.js rename to dev/tests/unit/testsuite/Mage/Core/Model/Design/_files/design/frontend/package/default2/fixture_script_three.js diff --git a/dev/tests/unit/testsuite/Mage/Core/Model/Design/_files/design/frontend/package/default2/theme.xml b/dev/tests/unit/testsuite/Mage/Core/Model/Design/_files/design/frontend/package/default2/theme.xml new file mode 100644 index 0000000000000000000000000000000000000000..cea3c5bef97dd8d664f27c76e71bf7b4b641c67b --- /dev/null +++ b/dev/tests/unit/testsuite/Mage/Core/Model/Design/_files/design/frontend/package/default2/theme.xml @@ -0,0 +1,38 @@ +<!-- +/** + * 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 Magento + * @package Mage_Core + * @subpackage unit_tests + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<design> + <package code="package"> + <title>Package</title> + <theme version="2.0.0.0" code="default2" parent="default"> + <title>Default2</title> + <requirements> + <magento_version from="2.0.0.0-dev1" to="*"/> + </requirements> + </theme> + </package> +</design> diff --git a/dev/tests/unit/testsuite/Mage/Core/Model/Layout/TranslatorTest.php b/dev/tests/unit/testsuite/Mage/Core/Model/Layout/TranslatorTest.php index 372bcb32ecbc436c104ff097ae357d054adc83bf..a456dce43d913ccaf4e91040f35fc5e36f5f62bf 100644 --- a/dev/tests/unit/testsuite/Mage/Core/Model/Layout/TranslatorTest.php +++ b/dev/tests/unit/testsuite/Mage/Core/Model/Layout/TranslatorTest.php @@ -35,7 +35,7 @@ class Mage_Core_Model_Layout_TranslatorTest extends PHPUnit_Framework_TestCase /** * @var PHPUnit_Framework_MockObject_MockObject */ - protected $_helperRegistryMock; + protected $_helperFactoryMock; /** * @var PHPUnit_Framework_MockObject_MockObject @@ -49,7 +49,7 @@ class Mage_Core_Model_Layout_TranslatorTest extends PHPUnit_Framework_TestCase protected function setUp() { - $this->_helperRegistryMock = $this->getMock('Mage_Core_Model_Helper_Registry', array(), array(), '', false); + $this->_helperFactoryMock = $this->getMock('Mage_Core_Model_Factory_Helper', array(), array(), '', false); $this->_helperMock = $this->getMock('Mage_Core_Helper_Data', array(), array(), '', false); $this->_helperMock->expects($this->any())->method('__')->with('test')->will($this->returnValue('translated')); @@ -75,7 +75,7 @@ XML; $this->_xmlDocument = simplexml_load_string($string, 'Varien_Simplexml_Element'); $params = array( - 'helperRegistry' => $this->_helperRegistryMock + 'helperRegistry' => $this->_helperFactoryMock ); $this->_object = new Mage_Core_Model_Layout_Translator($params); } @@ -86,7 +86,7 @@ XML; public function testTranslateActionParametersWithNonTranslatedArgument() { $args = array('one' => 'test'); - $this->_helperRegistryMock->expects($this->never())->method('get'); + $this->_helperFactoryMock->expects($this->never())->method('get'); $this->_object->translateActionParameters($this->_xmlDocument->action_one, $args); $this->assertEquals('test', $args['one']); @@ -99,7 +99,7 @@ XML; { $args = array('one' => 'test', 'two' => 'test', 'three' => 'test'); $expected = array('one' => 'translated', 'two' => 'translated', 'three' => 'test'); - $this->_helperRegistryMock->expects($this->exactly(2)) + $this->_helperFactoryMock->expects($this->exactly(2)) ->method('get') ->with('Some_Module') ->will($this->returnValue($this->_helperMock)); @@ -116,7 +116,7 @@ XML; $args = array('one' => array('some', 'data'), 'two' => array('value' => 'test'), 'three' => 'test'); $expected = array('one' => array('some', 'data'), 'two' => array('value' => 'translated'), 'three' => 'test'); - $this->_helperRegistryMock->expects($this->exactly(1)) + $this->_helperFactoryMock->expects($this->exactly(1)) ->method('get') ->with('Some_Module') ->will($this->returnValue($this->_helperMock)); @@ -132,7 +132,7 @@ XML; { $args = array('two' => 'test', 'three' => 'test'); $expected = array('two' => 'translated', 'three' => 'test'); - $this->_helperRegistryMock->expects($this->once()) + $this->_helperFactoryMock->expects($this->once()) ->method('get') ->with('Mage_Core') ->will($this->returnValue($this->_helperMock)); @@ -146,7 +146,7 @@ XML; */ public function testTranslateArgumentWithDefaultModuleAndSelfTranslatedMode() { - $this->_helperRegistryMock->expects($this->once()) + $this->_helperFactoryMock->expects($this->once()) ->method('get') ->with('Some_Module') ->will($this->returnValue($this->_helperMock)); @@ -163,7 +163,7 @@ XML; */ public function testTranslateArgumentWithoutModuleAndSelfTranslatedMode() { - $this->_helperRegistryMock->expects($this->once()) + $this->_helperFactoryMock->expects($this->once()) ->method('get') ->with('Mage_Core') ->will($this->returnValue($this->_helperMock)); @@ -177,7 +177,7 @@ XML; */ public function testTranslateArgumentWithoutModuleAndNoSelfTranslatedMode() { - $this->_helperRegistryMock->expects($this->never())->method('get'); + $this->_helperFactoryMock->expects($this->never())->method('get'); $actual = $this->_object->translateArgument($this->_xmlDocument->arguments->node_no_self_translated); $this->assertEquals('test', $actual); } @@ -187,7 +187,7 @@ XML; */ public function testTranslateArgumentViaParentNodeWithParentModule() { - $this->_helperRegistryMock->expects($this->once()) + $this->_helperFactoryMock->expects($this->once()) ->method('get') ->with('Some_Module') ->will($this->returnValue($this->_helperMock)); @@ -201,7 +201,7 @@ XML; */ public function testTranslateArgumentViaParentNodeWithOwnModule() { - $this->_helperRegistryMock->expects($this->once()) + $this->_helperFactoryMock->expects($this->once()) ->method('get') ->with('Other_Module') ->will($this->returnValue($this->_helperMock)); @@ -215,7 +215,7 @@ XML; */ public function testTranslateArgumentViaParentWithNodeThatIsNotInTranslateList() { - $this->_helperRegistryMock->expects($this->never())->method('get'); + $this->_helperFactoryMock->expects($this->never())->method('get'); $actual = $this->_object->translateArgument($this->_xmlDocument->arguments_parent->node_no_translated); $this->assertEquals('no translated', $actual); } diff --git a/dev/tests/unit/testsuite/Mage/Core/Model/Resource/SessionTest.php b/dev/tests/unit/testsuite/Mage/Core/Model/Resource/SessionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..efbe35c73caf3112ed89706f5cfdac8d367b7f44 --- /dev/null +++ b/dev/tests/unit/testsuite/Mage/Core/Model/Resource/SessionTest.php @@ -0,0 +1,242 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Mage_Core + * @subpackage unit_tests + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +class Mage_Core_Model_Resource_SessionTest extends PHPUnit_Framework_TestCase +{ + /** + * Session table name + */ + const SESSION_TABLE = 'session_table_name'; + + /**#@+ + * Table column names + */ + const COLUMN_SESSION_ID = 'session_id'; + const COLUMN_SESSION_DATA = 'session_data'; + const COLUMN_SESSION_EXPIRES = 'session_expires'; + /**#@-*/ + + /** + * Test select object + */ + const SELECT_OBJECT = 'select_object'; + + /**#@+ + * Test session data + */ + const SESSION_ID = 'custom_session_id'; + const SESSION_DATA = 'custom_session_data'; + /**#@-*/ + + /** + * Model under test + * + * @var Mage_Core_Model_Resource_Session + */ + protected $_model; + + protected function tearDown() + { + unset($this->_model); + } + + /** + * Data provider for testRead + * + * @return array + */ + public function readDataProvider() + { + return array( + 'session_encoded' => array('$dataEncoded' => true), + 'session_not_encoded' => array('$dataEncoded' => false), + ); + } + + /** + * @param bool $isDataEncoded + * + * @dataProvider readDataProvider + */ + public function testRead($isDataEncoded) + { + $this->_prepareMockForRead($isDataEncoded); + $result = $this->_model->read(self::SESSION_ID); + $this->assertEquals(self::SESSION_DATA, $result); + } + + /** + * Prepares mock for test model with specified connections + * + * @param PHPUnit_Framework_MockObject_MockObject $connection + */ + protected function _prepareResourceMock($connection) + { + $resource = $this->getMock('Mage_Core_Model_Resource', array('getTableName', 'getConnection')); + $resource->expects($this->once()) + ->method('getTableName') + ->will($this->returnValue(self::SESSION_TABLE)); + $resource->expects($this->once()) + ->method('getConnection') + ->will($this->returnValue($connection)); + + $this->_model = new Mage_Core_Model_Resource_Session($resource); + } + + /** + * Prepare mocks for testRead + * + * @param bool $isDataEncoded + */ + protected function _prepareMockForRead($isDataEncoded) + { + $connection = $this->getMock('Varien_Db_Adapter_Pdo_Mysql', + array('select', 'from', 'where', 'fetchOne'), array(), '', false + ); + $connection->expects($this->once()) + ->method('select') + ->will($this->returnSelf()); + $connection->expects($this->once()) + ->method('from') + ->with(self::SESSION_TABLE, array(self::COLUMN_SESSION_DATA)) + ->will($this->returnSelf()); + $connection->expects($this->once()) + ->method('where') + ->with(self::COLUMN_SESSION_ID . ' = :' . self::COLUMN_SESSION_ID) + ->will($this->returnValue(self::SELECT_OBJECT)); + + $sessionData = self::SESSION_DATA; + if ($isDataEncoded) { + $sessionData = base64_encode($sessionData); + } + $connection->expects($this->once()) + ->method('fetchOne') + ->with(self::SELECT_OBJECT, array(self::COLUMN_SESSION_ID => self::SESSION_ID)) + ->will($this->returnValue($sessionData)); + + $this->_prepareResourceMock($connection); + } + + /** + * Data provider for testWrite + * + * @return array + */ + public function writeDataProvider() + { + return array( + 'session_exists' => array('$sessionExists' => true), + 'session_not_exists' => array('$sessionExists' => false), + ); + } + + /** + * @param bool $sessionExists + * + * @dataProvider writeDataProvider + */ + public function testWrite($sessionExists) + { + $this->_prepareMockForWrite($sessionExists); + $this->assertTrue($this->_model->write(self::SESSION_ID, self::SESSION_DATA)); + } + + /** + * Prepare mocks for testWrite + * + * @param bool $sessionExists + */ + protected function _prepareMockForWrite($sessionExists) + { + $connection = $this->getMock('Varien_Db_Adapter_Pdo_Mysql', + array('select', 'from', 'where', 'fetchOne', 'update', 'insert'), array(), '', false + ); + $connection->expects($this->once()) + ->method('select') + ->will($this->returnSelf()); + $connection->expects($this->once()) + ->method('from') + ->with(self::SESSION_TABLE) + ->will($this->returnSelf()); + $connection->expects($this->once()) + ->method('where') + ->with(self::COLUMN_SESSION_ID . ' = :' . self::COLUMN_SESSION_ID) + ->will($this->returnValue(self::SELECT_OBJECT)); + $connection->expects($this->once()) + ->method('fetchOne') + ->with(self::SELECT_OBJECT, array(self::COLUMN_SESSION_ID => self::SESSION_ID)) + ->will($this->returnValue($sessionExists)); + + if ($sessionExists) { + $connection->expects($this->never()) + ->method('insert'); + $connection->expects($this->once()) + ->method('update') + ->will($this->returnCallback(array($this, 'verifyUpdate'))); + } else { + $connection->expects($this->once()) + ->method('insert') + ->will($this->returnCallback(array($this, 'verifyInsert'))); + $connection->expects($this->never()) + ->method('update'); + } + + $this->_prepareResourceMock($connection); + } + + /** + * Verify arguments of insert method + * + * @param string $table + * @param array $bind + */ + public function verifyInsert($table, array $bind) + { + $this->assertEquals(self::SESSION_TABLE, $table); + + $this->assertInternalType('int', $bind[self::COLUMN_SESSION_EXPIRES]); + $this->assertEquals(base64_encode(self::SESSION_DATA), $bind[self::COLUMN_SESSION_DATA]); + $this->assertEquals(self::SESSION_ID, $bind[self::COLUMN_SESSION_ID]); + } + + /** + * Verify arguments of update method + * + * @param string $table + * @param array $bind + * @param array $where + */ + public function verifyUpdate($table, array $bind, array $where) + { + $this->assertEquals(self::SESSION_TABLE, $table); + + $this->assertInternalType('int', $bind[self::COLUMN_SESSION_EXPIRES]); + $this->assertEquals(base64_encode(self::SESSION_DATA), $bind[self::COLUMN_SESSION_DATA]); + + $this->assertEquals(array(self::COLUMN_SESSION_ID . '=?' => self::SESSION_ID), $where); + } +} diff --git a/dev/tests/unit/testsuite/Mage/Core/Model/ThemeTest.php b/dev/tests/unit/testsuite/Mage/Core/Model/ThemeTest.php index 718acbe52a58dd033a28cdc92e40cbd781e64f7a..46585bd0ac78701be85dce4a8b9eee44b10a26c8 100644 --- a/dev/tests/unit/testsuite/Mage/Core/Model/ThemeTest.php +++ b/dev/tests/unit/testsuite/Mage/Core/Model/ThemeTest.php @@ -28,7 +28,7 @@ /** * Test theme model */ -class Mage_Core_Model_ThemeTest extends Magento_Test_TestCase_ObjectManagerAbstract +class Mage_Core_Model_ThemeTest extends PHPUnit_Framework_TestCase { /** * Test load from configuration @@ -39,8 +39,9 @@ class Mage_Core_Model_ThemeTest extends Magento_Test_TestCase_ObjectManagerAbstr { $themePath = implode(DIRECTORY_SEPARATOR, array(__DIR__, '_files', 'theme', 'theme.xml')); + $objectManagerHelper = new Magento_Test_Helper_ObjectManager($this); /** @var $themeMock Mage_Core_Model_Theme */ - $arguments = $this->_getConstructArguments(self::MODEL_ENTITY); + $arguments = $objectManagerHelper->getConstructArguments(Magento_Test_Helper_ObjectManager::MODEL_ENTITY); $themeMock = $this->getMock('Mage_Core_Model_Theme', array('_init'), $arguments, '', true); $themeMock->loadFromConfiguration($themePath); @@ -56,9 +57,10 @@ class Mage_Core_Model_ThemeTest extends Magento_Test_TestCase_ObjectManagerAbstr public function testLoadInvalidConfiguration() { $themePath = implode(DIRECTORY_SEPARATOR, array(__DIR__, '_files', 'theme', 'theme_invalid.xml')); + $objectManagerHelper = new Magento_Test_Helper_ObjectManager($this); /** @var $themeMock Mage_Core_Model_Theme */ - $arguments = $this->_getConstructArguments(self::MODEL_ENTITY); + $arguments = $objectManagerHelper->getConstructArguments(Magento_Test_Helper_ObjectManager::MODEL_ENTITY); $themeMock = $this->getMock('Mage_Core_Model_Theme', array('_init'), $arguments, '', true); $themeMock->loadFromConfiguration($themePath); diff --git a/dev/tests/unit/testsuite/Mage/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/LinksTest.php b/dev/tests/unit/testsuite/Mage/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/LinksTest.php index 91014cc4df7b599a0436fe529f85a80d232ed3fb..f225e936e7565a43ee9d88ad71c7260a6229d3f6 100644 --- a/dev/tests/unit/testsuite/Mage/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/LinksTest.php +++ b/dev/tests/unit/testsuite/Mage/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/LinksTest.php @@ -32,8 +32,12 @@ class Mage_Downloadable_Block_Adminhtml_Catalog_Product_Edit_Tab_Downloadable_Li { parent::setUp(); - $this->_block = $this->getBlock( - 'Mage_Downloadable_Block_Adminhtml_Catalog_Product_Edit_Tab_Downloadable_Links' + $objectManagerHelper = new Magento_Test_Helper_ObjectManager($this); + $this->_block = $objectManagerHelper->getBlock( + 'Mage_Downloadable_Block_Adminhtml_Catalog_Product_Edit_Tab_Downloadable_Links', + array( + 'urlBuilder' => $this->getMock('Mage_Backend_Model_Url', array(), array(), '', false) + ) ); } diff --git a/dev/tests/unit/testsuite/Mage/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/SamplesTest.php b/dev/tests/unit/testsuite/Mage/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/SamplesTest.php index 92002ec72f5a769dffb34670e6ba0df083388259..7a339248a0f2ec38595f40ca9f2a5c373499b570 100644 --- a/dev/tests/unit/testsuite/Mage/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/SamplesTest.php +++ b/dev/tests/unit/testsuite/Mage/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/SamplesTest.php @@ -32,8 +32,12 @@ class Mage_Downloadable_Block_Adminhtml_Catalog_Product_Edit_Tab_Downloadable_Sa { parent::setUp(); - $this->_block = $this->getBlock( - 'Mage_Downloadable_Block_Adminhtml_Catalog_Product_Edit_Tab_Downloadable_Samples' + $objectManagerHelper = new Magento_Test_Helper_ObjectManager($this); + $this->_block = $objectManagerHelper->getBlock( + 'Mage_Downloadable_Block_Adminhtml_Catalog_Product_Edit_Tab_Downloadable_Samples', + array( + 'urlBuilder' => $this->getMock('Mage_Backend_Model_Url', array(), array(), '', false) + ) ); } diff --git a/dev/tests/unit/testsuite/Mage/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/TestCaseAbstract.php b/dev/tests/unit/testsuite/Mage/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/TestCaseAbstract.php index 917f834c60ddd0907656e80d75195514ce1221f5..1c9034ce5bd84b90146f7381651c9668d64ed0e7 100644 --- a/dev/tests/unit/testsuite/Mage/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/TestCaseAbstract.php +++ b/dev/tests/unit/testsuite/Mage/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/TestCaseAbstract.php @@ -29,7 +29,7 @@ * Abstract class for downloadable tab tests */ class Mage_Downloadable_Block_Adminhtml_Catalog_Product_Edit_Tab_Downloadable_TestCaseAbstract - extends Magento_Test_TestCase_ObjectManagerAbstract + extends PHPUnit_Framework_TestCase { /** * @var Mage_Downloadable_Block_Adminhtml_Catalog_Product_Edit_Tab_Downloadable_Links diff --git a/dev/tests/unit/testsuite/Mage/Eav/Model/Attribute/Data/TextTest.php b/dev/tests/unit/testsuite/Mage/Eav/Model/Attribute/Data/TextTest.php index 2b88e0770b48519080122e8672dbf2dbbffa79c0..0e3098c38bb75a99d3bdca21d43dfa4cf6f0f453 100644 --- a/dev/tests/unit/testsuite/Mage/Eav/Model/Attribute/Data/TextTest.php +++ b/dev/tests/unit/testsuite/Mage/Eav/Model/Attribute/Data/TextTest.php @@ -25,7 +25,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Eav_Model_Attribute_Data_TextTest extends Magento_Test_TestCase_ObjectManagerAbstract +class Mage_Eav_Model_Attribute_Data_TextTest extends PHPUnit_Framework_TestCase { /** * @var Mage_Eav_Model_Attribute_Data_Text @@ -51,8 +51,9 @@ class Mage_Eav_Model_Attribute_Data_TextTest extends Magento_Test_TestCase_Objec ); $attributeClass = 'Mage_Eav_Model_Entity_Attribute_Abstract'; - $arguments = $this->_getConstructArguments( - self::MODEL_ENTITY, $attributeClass, array('data' => $attributeData) + $objectManagerHelper = new Magento_Test_Helper_ObjectManager($this); + $arguments = $objectManagerHelper->getConstructArguments( + Magento_Test_Helper_ObjectManager::MODEL_ENTITY, $attributeClass, array('data' => $attributeData) ); /** @var $attribute Mage_Eav_Model_Entity_Attribute_Abstract|PHPUnit_Framework_MockObject_MockObject */ diff --git a/dev/tests/unit/testsuite/Mage/Eav/Model/Entity/Attribute/SetTest.php b/dev/tests/unit/testsuite/Mage/Eav/Model/Entity/Attribute/SetTest.php index dee6b6cc810dd4e671a322c2374a133bad221757..e247cd5319104a4f637a40edf8188547430b9549 100644 --- a/dev/tests/unit/testsuite/Mage/Eav/Model/Entity/Attribute/SetTest.php +++ b/dev/tests/unit/testsuite/Mage/Eav/Model/Entity/Attribute/SetTest.php @@ -28,7 +28,7 @@ /** * Test class for Mage_Eav_Model_Entity_Attribute_Set */ -class Mage_Eav_Model_Entity_Attribute_SetTest extends Magento_Test_TestCase_ObjectManagerAbstract +class Mage_Eav_Model_Entity_Attribute_SetTest extends PHPUnit_Framework_TestCase { /** * @var Mage_Eav_Model_Entity_Attribute_Set @@ -48,7 +48,8 @@ class Mage_Eav_Model_Entity_Attribute_SetTest extends Magento_Test_TestCase_Obje 'resource' => $resource, 'data' => array('helper' => $helper) ); - $this->_model = $this->getModel('Mage_Eav_Model_Entity_Attribute_Set', $arguments); + $objectManagerHelper = new Magento_Test_Helper_ObjectManager($this); + $this->_model = $objectManagerHelper->getModel('Mage_Eav_Model_Entity_Attribute_Set', $arguments); } protected function tearDown() diff --git a/dev/tests/unit/testsuite/Mage/Eav/Model/Resource/Entity/AttributeTest.php b/dev/tests/unit/testsuite/Mage/Eav/Model/Resource/Entity/AttributeTest.php index 9cfc89b4f8943cfd6960b3d54ea838fdaf6f836f..ffe5a8fc84cd0bff0bcf68a3c46a79911059b543 100644 --- a/dev/tests/unit/testsuite/Mage/Eav/Model/Resource/Entity/AttributeTest.php +++ b/dev/tests/unit/testsuite/Mage/Eav/Model/Resource/Entity/AttributeTest.php @@ -25,7 +25,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Eav_Model_Resource_Entity_AttributeTest extends Magento_Test_TestCase_ObjectManagerAbstract +class Mage_Eav_Model_Resource_Entity_AttributeTest extends PHPUnit_Framework_TestCase { /** * @covers Mage_Eav_Model_Resource_Entity_Attribute::_saveOption @@ -51,8 +51,9 @@ class Mage_Eav_Model_Resource_Entity_AttributeTest extends Magento_Test_TestCase 'is_unique' => 0, ); + $objectManagerHelper = new Magento_Test_Helper_ObjectManager($this); /** @var $model Mage_Core_Model_Abstract */ - $arguments = $this->_getConstructArguments(self::MODEL_ENTITY); + $arguments = $objectManagerHelper->getConstructArguments(Magento_Test_Helper_ObjectManager::MODEL_ENTITY); $arguments['data'] = $attributeData; $model = $this->getMock('Mage_Core_Model_Abstract', null, $arguments); $model->setDefault(array('2')); @@ -104,8 +105,10 @@ class Mage_Eav_Model_Resource_Entity_AttributeTest extends Magento_Test_TestCase 'is_unique' => 0, ); + + $objectManagerHelper = new Magento_Test_Helper_ObjectManager($this); /** @var $model Mage_Core_Model_Abstract */ - $arguments = $this->_getConstructArguments(self::MODEL_ENTITY); + $arguments = $objectManagerHelper->getConstructArguments(Magento_Test_Helper_ObjectManager::MODEL_ENTITY); $arguments['data'] = $attributeData; $model = $this->getMock('Mage_Core_Model_Abstract', null, $arguments); $model->setOption(array('value' => array('option_1' => array('Backend Label', 'Frontend Label')))); @@ -164,8 +167,9 @@ class Mage_Eav_Model_Resource_Entity_AttributeTest extends Magento_Test_TestCase /** @var $resourceModel Mage_Eav_Model_Resource_Entity_Attribute */ list($adapter, $resourceModel) = $this->_prepareResourceModel(); + $objectManagerHelper = new Magento_Test_Helper_ObjectManager($this); /** @var $model Mage_Core_Model_Abstract */ - $arguments = $this->_getConstructArguments(self::MODEL_ENTITY); + $arguments = $objectManagerHelper->getConstructArguments(Magento_Test_Helper_ObjectManager::MODEL_ENTITY); $model = $this->getMock('Mage_Core_Model_Abstract', null, $arguments); $model->setOption('not-an-array'); diff --git a/dev/tests/unit/testsuite/Mage/ImportExport/Block/Adminhtml/Import/Edit/BeforeTest.php b/dev/tests/unit/testsuite/Mage/ImportExport/Block/Adminhtml/Import/Edit/BeforeTest.php index c91bf8b2906e1a3ac2cae6499704fd52c35e86a7..a0464711ff2a67b566e4eda77385685190ae702c 100644 --- a/dev/tests/unit/testsuite/Mage/ImportExport/Block/Adminhtml/Import/Edit/BeforeTest.php +++ b/dev/tests/unit/testsuite/Mage/ImportExport/Block/Adminhtml/Import/Edit/BeforeTest.php @@ -28,7 +28,7 @@ /** * Test class for Mage_ImportExport_Block_Adminhtml_Import_Edit_Before */ -class Mage_ImportExport_Block_Adminhtml_Import_Edit_BeforeTest extends Magento_Test_TestCase_ObjectManagerAbstract +class Mage_ImportExport_Block_Adminhtml_Import_Edit_BeforeTest extends PHPUnit_Framework_TestCase { /** * Test model @@ -100,9 +100,13 @@ class Mage_ImportExport_Block_Adminhtml_Import_Edit_BeforeTest extends Magento_T $arguments = array( 'coreHelper' => $coreHelper, - 'importModel' => $importModel + 'importModel' => $importModel, + 'urlBuilder' => $this->getMock('Mage_Backend_Model_Url', array(), array(), '', false) + ); + $objectManagerHelper = new Magento_Test_Helper_ObjectManager($this); + $this->_model = $objectManagerHelper->getBlock('Mage_ImportExport_Block_Adminhtml_Import_Edit_Before', + $arguments ); - $this->_model = $this->getBlock('Mage_ImportExport_Block_Adminhtml_Import_Edit_Before', $arguments); } public function tearDown() diff --git a/dev/tests/unit/testsuite/Mage/ImportExport/Model/Export/Entity/Eav/Customer/AddressTest.php b/dev/tests/unit/testsuite/Mage/ImportExport/Model/Export/Entity/Eav/Customer/AddressTest.php index 4c4b3f8f5edb92c177ef43db8ba8c5e12b6609ff..76d2f42c78d061b03d3a0b7f8c93358b56b56904 100644 --- a/dev/tests/unit/testsuite/Mage/ImportExport/Model/Export/Entity/Eav/Customer/AddressTest.php +++ b/dev/tests/unit/testsuite/Mage/ImportExport/Model/Export/Entity/Eav/Customer/AddressTest.php @@ -25,7 +25,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_ImportExport_Model_Export_Entity_Eav_Customer_AddressTest extends Magento_Test_TestCase_ObjectManagerAbstract +class Mage_ImportExport_Model_Export_Entity_Eav_Customer_AddressTest extends PHPUnit_Framework_TestCase { /** * Test attribute code @@ -81,6 +81,13 @@ class Mage_ImportExport_Model_Export_Entity_Eav_Customer_AddressTest extends Mag self::ATTRIBUTE_CODE => 1, ); + /** + * ObjectManager helper + * + * @var Magento_Test_Helper_ObjectManager + */ + protected $_objectManager; + /** * Customer address export model * @@ -90,6 +97,7 @@ class Mage_ImportExport_Model_Export_Entity_Eav_Customer_AddressTest extends Mag public function setUp() { + $this->_objectManager = new Magento_Test_Helper_ObjectManager($this); $this->_model = new Mage_ImportExport_Model_Export_Entity_Eav_Customer_Address($this->_getModelDependencies()); } @@ -97,6 +105,7 @@ class Mage_ImportExport_Model_Export_Entity_Eav_Customer_AddressTest extends Mag public function tearDown() { unset($this->_model); + unset($this->_objectManager); } /** @@ -122,7 +131,7 @@ class Mage_ImportExport_Model_Export_Entity_Eav_Customer_AddressTest extends Mag ->method('getEntityTypeCode') ->will($this->returnValue('customer_address')); foreach ($this->_attributes as $attributeData) { - $arguments = $this->_getConstructArguments(self::MODEL_ENTITY); + $arguments = $this->_objectManager->getConstructArguments(Magento_Test_Helper_ObjectManager::MODEL_ENTITY); $arguments['data'] = $attributeData; $attribute = $this->getMockForAbstractClass('Mage_Eav_Model_Entity_Attribute_Abstract', $arguments, '', true, true, true, array('_construct') @@ -198,7 +207,7 @@ class Mage_ImportExport_Model_Export_Entity_Eav_Customer_AddressTest extends Mag */ public function iterate(Varien_Data_Collection_Db $collection, $pageSize, array $callbacks) { - $arguments = $this->_getConstructArguments(self::MODEL_ENTITY); + $arguments = $this->_objectManager->getConstructArguments(Magento_Test_Helper_ObjectManager::MODEL_ENTITY); $arguments['data'] = $this->_customerData; /** @var $customer Mage_Customer_Model_Customer */ $customer = $this->getMock('Mage_Customer_Model_Customer', array('_construct'), $arguments); @@ -226,7 +235,7 @@ class Mage_ImportExport_Model_Export_Entity_Eav_Customer_AddressTest extends Mag $this->_model->setWriter($writer); $this->_model->setParameters(array()); - $arguments = $this->_getConstructArguments(self::MODEL_ENTITY); + $arguments = $this->_objectManager->getConstructArguments(Magento_Test_Helper_ObjectManager::MODEL_ENTITY); $arguments['data'] = $this->_addressData; $item = $this->getMockForAbstractClass('Mage_Core_Model_Abstract', $arguments); $this->_model->exportItem($item); diff --git a/dev/tests/unit/testsuite/Mage/ImportExport/Model/Export/Entity/Eav/CustomerTest.php b/dev/tests/unit/testsuite/Mage/ImportExport/Model/Export/Entity/Eav/CustomerTest.php index 58dd034140c9ecc99bffdc780e46b9c1712913ce..84ccdf39274baef5da207d149ca6f644411f8a46 100644 --- a/dev/tests/unit/testsuite/Mage/ImportExport/Model/Export/Entity/Eav/CustomerTest.php +++ b/dev/tests/unit/testsuite/Mage/ImportExport/Model/Export/Entity/Eav/CustomerTest.php @@ -25,7 +25,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_ImportExport_Model_Export_Entity_Eav_CustomerTest extends Magento_Test_TestCase_ObjectManagerAbstract +class Mage_ImportExport_Model_Export_Entity_Eav_CustomerTest extends PHPUnit_Framework_TestCase { /**#@+ * Test attribute code @@ -115,9 +115,10 @@ class Mage_ImportExport_Model_Export_Entity_Eav_CustomerTest extends Magento_Tes ->method('__') ->will($this->returnArgument(0)); + $objectManagerHelper = new Magento_Test_Helper_ObjectManager($this); $attributeCollection = new Varien_Data_Collection(); foreach ($this->_attributes as $attributeData) { - $arguments = $this->_getConstructArguments(self::MODEL_ENTITY); + $arguments = $objectManagerHelper->getConstructArguments(Magento_Test_Helper_ObjectManager::MODEL_ENTITY); $arguments['data'] = $attributeData; $attribute = $this->getMockForAbstractClass('Mage_Eav_Model_Entity_Attribute_Abstract', $arguments, '', true, true, true, array('_construct') @@ -209,7 +210,8 @@ class Mage_ImportExport_Model_Export_Entity_Eav_CustomerTest extends Magento_Tes $this->_model->setWriter($writer); - $arguments = $this->_getConstructArguments(self::MODEL_ENTITY); + $objectManagerHelper = new Magento_Test_Helper_ObjectManager($this); + $arguments = $objectManagerHelper->getConstructArguments(Magento_Test_Helper_ObjectManager::MODEL_ENTITY); $arguments['data'] = $this->_customerData; $item = $this->getMockForAbstractClass('Mage_Core_Model_Abstract', $arguments); diff --git a/dev/tests/unit/testsuite/Mage/ImportExport/Model/Import/Entity/Eav/Customer/AddressTest.php b/dev/tests/unit/testsuite/Mage/ImportExport/Model/Import/Entity/Eav/Customer/AddressTest.php index 7a7cceb05e1127faa4b1289cec00827b774e5160..a1350da5f50bf6b1f3e685a14497a8a1cbf95ec0 100644 --- a/dev/tests/unit/testsuite/Mage/ImportExport/Model/Import/Entity/Eav/Customer/AddressTest.php +++ b/dev/tests/unit/testsuite/Mage/ImportExport/Model/Import/Entity/Eav/Customer/AddressTest.php @@ -30,7 +30,7 @@ * * @todo Fix tests in the scope of https://wiki.magento.com/display/MAGE2/Technical+Debt+%28Team-Donetsk-B%29 */ -class Mage_ImportExport_Model_Import_Entity_Eav_Customer_AddressTest extends Magento_Test_TestCase_ObjectManagerAbstract +class Mage_ImportExport_Model_Import_Entity_Eav_Customer_AddressTest extends PHPUnit_Framework_TestCase { /** * Customer address entity adapter mock @@ -177,8 +177,9 @@ class Mage_ImportExport_Model_Import_Entity_Eav_Customer_AddressTest extends Mag /** @var $attributeCollection Varien_Data_Collection|PHPUnit_Framework_TestCase */ $attributeCollection = $this->getMock('Varien_Data_Collection', array('getEntityTypeCode')); + $objectManagerHelper = new Magento_Test_Helper_ObjectManager($this); foreach ($this->_attributes as $attributeData) { - $arguments = $this->_getConstructArguments(self::MODEL_ENTITY); + $arguments = $objectManagerHelper->getConstructArguments(Magento_Test_Helper_ObjectManager::MODEL_ENTITY); $arguments['data'] = $attributeData; $attribute = $this->getMockForAbstractClass('Mage_Eav_Model_Entity_Attribute_Abstract', $arguments, '', true, true, true, array('_construct', 'getBackend') @@ -195,8 +196,9 @@ class Mage_ImportExport_Model_Import_Entity_Eav_Customer_AddressTest extends Mag /** @var $customerStorage Mage_ImportExport_Model_Resource_Customer_Storage */ $customerStorage = $this->getMock('Mage_ImportExport_Model_Resource_Customer_Storage', array('load'), array(), '', false); + $objectManagerHelper = new Magento_Test_Helper_ObjectManager($this); foreach ($this->_customers as $customerData) { - $arguments = $this->_getConstructArguments(self::MODEL_ENTITY); + $arguments = $objectManagerHelper->getConstructArguments(Magento_Test_Helper_ObjectManager::MODEL_ENTITY); $arguments['data'] = $customerData; /** @var $customer Mage_Customer_Model_Customer */ $customer = $this->getMock('Mage_Customer_Model_Customer', array('_construct'), $arguments); diff --git a/dev/tests/unit/testsuite/Mage/ImportExport/Model/Resource/Import/CustomerComposite/DataTest.php b/dev/tests/unit/testsuite/Mage/ImportExport/Model/Resource/Import/CustomerComposite/DataTest.php index 78f21bd105411c811c8e681ae12c24406e1f3484..40825973182bddb450b97b39a65b410813e5165f 100644 --- a/dev/tests/unit/testsuite/Mage/ImportExport/Model/Resource/Import/CustomerComposite/DataTest.php +++ b/dev/tests/unit/testsuite/Mage/ImportExport/Model/Resource/Import/CustomerComposite/DataTest.php @@ -28,8 +28,7 @@ /** * Test class for Mage_ImportExport_Model_Resource_Import_CustomerComposite_Data */ -class Mage_ImportExport_Model_Resource_Import_CustomerComposite_DataTest - extends Magento_Test_TestCase_ObjectManagerAbstract +class Mage_ImportExport_Model_Resource_Import_CustomerComposite_DataTest extends PHPUnit_Framework_TestCase { /** * Array of customer attributes diff --git a/dev/tests/unit/testsuite/Mage/Payment/Block/Form/ContainerTest.php b/dev/tests/unit/testsuite/Mage/Payment/Block/Form/ContainerTest.php index ed538cb7179b58a71ff6321dd0619bcd48f01d34..1d2cd2175c437c5fdf460ce34470450623b0dacb 100644 --- a/dev/tests/unit/testsuite/Mage/Payment/Block/Form/ContainerTest.php +++ b/dev/tests/unit/testsuite/Mage/Payment/Block/Form/ContainerTest.php @@ -28,15 +28,16 @@ /** * Test class for Mage_Payment_Block_Form_ContainerAbstract */ -class Mage_Payment_Block_Form_ContainerAbstractTest extends Magento_Test_TestCase_ObjectManagerAbstract +class Mage_Payment_Block_Form_ContainerAbstractTest extends PHPUnit_Framework_TestCase { /** * @covers Mage_Payment_Block_Form_ContainerAbstract::getChildBlock */ public function testSetMethodFormTemplate() { - $childBlockA = $this->getBlock('Mage_Core_Block_Template'); - $childBlockB = $this->getBlock('Mage_Core_Block_Template'); + $objectManagerHelper = new Magento_Test_Helper_ObjectManager($this); + $childBlockA = $objectManagerHelper->getBlock('Mage_Core_Block_Template'); + $childBlockB = $objectManagerHelper->getBlock('Mage_Core_Block_Template'); $func = function ($blockName) use ($childBlockA, $childBlockB) { switch ($blockName) { diff --git a/dev/tests/unit/testsuite/Mage/Payment/Block/Info/ContainerAbstractTest.php b/dev/tests/unit/testsuite/Mage/Payment/Block/Info/ContainerAbstractTest.php index fcbd3a37626c886cbdb526fc8da3dcdbfe1c1755..cb523e0f794437ab3738feeaddbafac294361cd7 100644 --- a/dev/tests/unit/testsuite/Mage/Payment/Block/Info/ContainerAbstractTest.php +++ b/dev/tests/unit/testsuite/Mage/Payment/Block/Info/ContainerAbstractTest.php @@ -28,20 +28,21 @@ /** * Test class for Mage_Payment_Block_Info_ContainerAbstract */ -class Mage_Payment_Block_Info_ContainerAbstractTest extends Magento_Test_TestCase_ObjectManagerAbstract +class Mage_Payment_Block_Info_ContainerAbstractTest extends PHPUnit_Framework_TestCase { public function testSetInfoTemplate() { $block = $this->getMock('Mage_Payment_Block_Info_ContainerAbstract', array('getChildBlock', 'getPaymentInfo'), array(), '', false); - $paymentInfo = $this->getModel('Mage_Payment_Model_Info'); - $methodInstance = $this->getModel('Mage_Payment_Model_Method_Checkmo'); + $objectManagerHelper = new Magento_Test_Helper_ObjectManager($this); + $paymentInfo = $objectManagerHelper->getModel('Mage_Payment_Model_Info'); + $methodInstance = $objectManagerHelper->getModel('Mage_Payment_Model_Method_Checkmo'); $paymentInfo->setMethodInstance($methodInstance); $block->expects($this->atLeastOnce()) ->method('getPaymentInfo') ->will($this->returnValue($paymentInfo)); - $childBlock = $this->getBlock('Mage_Core_Block_Template'); + $childBlock = $objectManagerHelper->getBlock('Mage_Core_Block_Template'); $block->expects($this->atLeastOnce()) ->method('getChildBlock') ->with('payment.info.checkmo') diff --git a/dev/tests/unit/testsuite/Mage/Payment/Block/Info/InstructionsTest.php b/dev/tests/unit/testsuite/Mage/Payment/Block/Info/InstructionsTest.php index 6f7f8e2a64c7c76f3c6072c4a1581a8c5f5660d7..81d305894666574a366c9d4fdf0c2b718c5702ae 100644 --- a/dev/tests/unit/testsuite/Mage/Payment/Block/Info/InstructionsTest.php +++ b/dev/tests/unit/testsuite/Mage/Payment/Block/Info/InstructionsTest.php @@ -28,7 +28,7 @@ /** * Test class for Mage_Payment_Block_Info_Instructions */ -class Mage_Payment_Block_Info_InstructionsTest extends Magento_Test_TestCase_ObjectManagerAbstract +class Mage_Payment_Block_Info_InstructionsTest extends PHPUnit_Framework_TestCase { /** * @var Varien_Object @@ -47,9 +47,10 @@ class Mage_Payment_Block_Info_InstructionsTest extends Magento_Test_TestCase_Obj protected function setUp() { + $objectManagerHelper = new Magento_Test_Helper_ObjectManager($this); $this->_method = new Varien_Object(); - $this->_info = $this->getModel('Mage_Payment_Model_Info'); - $this->_instructions = $this->getBlock('Mage_Payment_Block_Info_Instructions'); + $this->_info = $objectManagerHelper->getModel('Mage_Payment_Model_Info'); + $this->_instructions = $objectManagerHelper->getBlock('Mage_Payment_Block_Info_Instructions'); $this->_info->setMethodInstance($this->_method); $this->_instructions->setInfo($this->_info); diff --git a/dev/tests/unit/testsuite/Mage/Sales/Model/Order/Invoice/Total/ShippingTest.php b/dev/tests/unit/testsuite/Mage/Sales/Model/Order/Invoice/Total/ShippingTest.php index 9178c21c3de6b5c5a28442d266ea616131beee36..4ba17d3f701e3329125f0708bd524523e263a268 100644 --- a/dev/tests/unit/testsuite/Mage/Sales/Model/Order/Invoice/Total/ShippingTest.php +++ b/dev/tests/unit/testsuite/Mage/Sales/Model/Order/Invoice/Total/ShippingTest.php @@ -25,7 +25,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Sales_Model_Order_Invoice_Total_ShippingTest extends Magento_Test_TestCase_ObjectManagerAbstract +class Mage_Sales_Model_Order_Invoice_Total_ShippingTest extends PHPUnit_Framework_TestCase { /** * Retrieve new invoice collection from an array of invoices' data @@ -37,9 +37,10 @@ class Mage_Sales_Model_Order_Invoice_Total_ShippingTest extends Magento_Test_Tes { $className = 'Mage_Sales_Model_Order_Invoice'; $result = new Varien_Data_Collection(); + $objectManagerHelper = new Magento_Test_Helper_ObjectManager($this); foreach ($invoicesData as $oneInvoiceData) { - $arguments = $this->_getConstructArguments( - self::MODEL_ENTITY, $className, array('data' => $oneInvoiceData) + $arguments = $objectManagerHelper->getConstructArguments( + Magento_Test_Helper_ObjectManager::MODEL_ENTITY, $className, array('data' => $oneInvoiceData) ); /** @var $prevInvoice Mage_Sales_Model_Order_Invoice */ $prevInvoice = $this->getMock($className, array('_init'), $arguments); diff --git a/dev/tests/unit/testsuite/Mage/Tag/Block/Adminhtml/Catalog/Product/Edit/Tab/TagTestCaseAbstract.php b/dev/tests/unit/testsuite/Mage/Tag/Block/Adminhtml/Catalog/Product/Edit/Tab/TagTestCaseAbstract.php index 89f89188a5632db16cef4d709dc5b4fa3c3d0b69..a1c8dac7cf99f1bee886bca6ae5749b4a0aa8093 100644 --- a/dev/tests/unit/testsuite/Mage/Tag/Block/Adminhtml/Catalog/Product/Edit/Tab/TagTestCaseAbstract.php +++ b/dev/tests/unit/testsuite/Mage/Tag/Block/Adminhtml/Catalog/Product/Edit/Tab/TagTestCaseAbstract.php @@ -25,8 +25,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Tag_Block_Adminhtml_Catalog_Product_Edit_Tab_TagTestCaseAbstract - extends Magento_Test_TestCase_ObjectManagerAbstract +class Mage_Tag_Block_Adminhtml_Catalog_Product_Edit_Tab_TagTestCaseAbstract extends PHPUnit_Framework_TestCase { /** * @var Mage_Tag_Block_Adminhtml_Catalog_Product_Edit_Tab_Tag @@ -57,6 +56,7 @@ class Mage_Tag_Block_Adminhtml_Catalog_Product_Edit_Tab_TagTestCaseAbstract protected function setUp() { + $objectManagerHelper = new Magento_Test_Helper_ObjectManager($this); $helperMock = $this->getMock('Mage_Tag_Helper_Data', array('__'), array(), '', false); $helperMock->expects($this->any()) ->method('__') @@ -69,9 +69,10 @@ class Mage_Tag_Block_Adminhtml_Catalog_Product_Edit_Tab_TagTestCaseAbstract $data = array( 'authSession' => $authSession, + 'urlBuilder' => $this->getMock('Mage_Backend_Model_Url', array(), array(), '', false), 'data' => array('helpers' => array('Mage_Tag_Helper_Data' => $helperMock)) ); - $this->_model = $this->getBlock($this->_modelName, $data); + $this->_model = $objectManagerHelper->getBlock($this->_modelName, $data); } protected function tearDown() diff --git a/dev/tests/unit/testsuite/Mage/Tag/Block/Adminhtml/Customer/Edit/Tab/TagTest.php b/dev/tests/unit/testsuite/Mage/Tag/Block/Adminhtml/Customer/Edit/Tab/TagTest.php index 03b2fa7915815723b5b310dd9499d2c5406e4c8c..5a474c4ed109a28d0649d0e65f202da58b090a85 100644 --- a/dev/tests/unit/testsuite/Mage/Tag/Block/Adminhtml/Customer/Edit/Tab/TagTest.php +++ b/dev/tests/unit/testsuite/Mage/Tag/Block/Adminhtml/Customer/Edit/Tab/TagTest.php @@ -28,7 +28,7 @@ /** * Test class for Mage_Tag_Block_Adminhtml_Customer_Edit_Tab_Tag */ -class Mage_Tag_Block_Adminhtml_Customer_Edit_Tab_TagTest extends Magento_Test_TestCase_ObjectManagerAbstract +class Mage_Tag_Block_Adminhtml_Customer_Edit_Tab_TagTest extends PHPUnit_Framework_TestCase { /** * Test model @@ -68,11 +68,13 @@ class Mage_Tag_Block_Adminhtml_Customer_Edit_Tab_TagTest extends Magento_Test_Te $arguments = array( 'authSession' => $authSession, + 'urlBuilder' => $this->getMock('Mage_Backend_Model_Url', array(), array(), '', false), 'data' => array( 'helpers' => $this->_helpers, ) ); - $this->_model = $this->getBlock('Mage_Tag_Block_Adminhtml_Customer_Edit_Tab_Tag', $arguments); + $objectManagerHelper = new Magento_Test_Helper_ObjectManager($this); + $this->_model = $objectManagerHelper->getBlock('Mage_Tag_Block_Adminhtml_Customer_Edit_Tab_Tag', $arguments); } public function tearDown() @@ -104,11 +106,13 @@ class Mage_Tag_Block_Adminhtml_Customer_Edit_Tab_TagTest extends Magento_Test_Te $arguments = array( 'authSession' => $authSession, + 'urlBuilder' => $this->getMock('Mage_Backend_Model_Url', array(), array(), '', false), 'data' => array( 'helpers' => $this->_helpers, ) ); - $this->_model = $this->getBlock('Mage_Tag_Block_Adminhtml_Customer_Edit_Tab_Tag', $arguments); + $objectManagerHelper = new Magento_Test_Helper_ObjectManager($this); + $this->_model = $objectManagerHelper->getBlock('Mage_Tag_Block_Adminhtml_Customer_Edit_Tab_Tag', $arguments); if ($customer) { $this->_model->setCustomer($customer); } diff --git a/dev/tests/unit/testsuite/Mage/Tag/Block/Catalog/Product/Rss/LinkTest.php b/dev/tests/unit/testsuite/Mage/Tag/Block/Catalog/Product/Rss/LinkTest.php index f26446161f1e1340e057a686504a51c836b15802..afcd6ae2519ada917d86aaa0c7c936df04c48927 100644 --- a/dev/tests/unit/testsuite/Mage/Tag/Block/Catalog/Product/Rss/LinkTest.php +++ b/dev/tests/unit/testsuite/Mage/Tag/Block/Catalog/Product/Rss/LinkTest.php @@ -25,7 +25,7 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_Tag_Block_Catalog_Product_Rss_LinkTest extends Magento_Test_TestCase_ObjectManagerAbstract +class Mage_Tag_Block_Catalog_Product_Rss_LinkTest extends PHPUnit_Framework_TestCase { /** * @var Mage_Tag_Block_Catalog_Product_Rss_Link @@ -67,7 +67,10 @@ class Mage_Tag_Block_Catalog_Product_Rss_LinkTest extends Magento_Test_TestCase_ 'tag_model' => $tagModelMock, 'core_url_model' => $urlModelMock ); - $this->_model = $this->getBlock('Mage_Tag_Block_Catalog_Product_Rss_Link', array('data' => $data)); + $objectManagerHelper = new Magento_Test_Helper_ObjectManager($this); + $this->_model = $objectManagerHelper->getBlock('Mage_Tag_Block_Catalog_Product_Rss_Link', + array('data' => $data) + ); $this->assertSame($expected, $this->_model->getLinkUrl()); } diff --git a/dev/tests/unit/testsuite/Magento/DiTest.php b/dev/tests/unit/testsuite/Magento/DiTest.php index df409bd67b8aeced2a79c890b84a2bc120e0d43a..d9e2c861befc2099fbe43eb8b07301566ecd2fbb 100644 --- a/dev/tests/unit/testsuite/Magento/DiTest.php +++ b/dev/tests/unit/testsuite/Magento/DiTest.php @@ -28,7 +28,7 @@ /** * Test case for Magento_Di */ -class Magento_DiTest extends Magento_Test_TestCase_ObjectManagerAbstract +class Magento_DiTest extends PHPUnit_Framework_TestCase { /**#@+ * Parent classes for test classes @@ -71,12 +71,14 @@ class Magento_DiTest extends Magento_Test_TestCase_ObjectManagerAbstract '_request' => 'Mage_Core_Controller_Request_Http', '_layout' => 'Mage_Core_Model_Layout', '_eventManager' => 'Mage_Core_Model_Event_Manager', + '_urlBuilder' => 'Mage_Core_Model_Url', '_translator' => 'Mage_Core_Model_Translate', '_cache' => 'Mage_Core_Model_Cache', '_designPackage' => 'Mage_Core_Model_Design_Package', '_session' => 'Mage_Core_Model_Session', '_storeConfig' => 'Mage_Core_Model_Store_Config', '_frontController' => 'Mage_Core_Controller_Varien_Front', + '_helperFactory' => 'Mage_Core_Model_Factory_Helper', ), ); @@ -92,6 +94,7 @@ class Magento_DiTest extends Magento_Test_TestCase_ObjectManagerAbstract ), self::TEST_CLASS_BLOCK => array( 'eventManager' => 'Mage_Core_Model_Event_Manager', + 'urlBuilder' => 'Mage_Core_Model_Url', 'cache' => 'Mage_Core_Model_Cache', 'request' => 'Mage_Core_Controller_Request_Http', 'layout' => 'Mage_Core_Model_Layout', @@ -100,6 +103,7 @@ class Magento_DiTest extends Magento_Test_TestCase_ObjectManagerAbstract 'session' => 'Mage_Core_Model_Session', 'storeConfig' => 'Mage_Core_Model_Store_Config', 'frontController' => 'Mage_Core_Controller_Varien_Front', + 'helperFactory' => 'Mage_Core_Model_Factory_Helper', ), ); @@ -141,14 +145,19 @@ class Magento_DiTest extends Magento_Test_TestCase_ObjectManagerAbstract protected function setUp() { + $objectManagerHelper = new Magento_Test_Helper_ObjectManager($this); if (!self::$_isClassMocks) { $this->getMockForAbstractClass( self::PARENT_CLASS_MODEL, - $this->_getConstructArguments(self::MODEL_ENTITY, self::PARENT_CLASS_MODEL), + $objectManagerHelper->getConstructArguments(Magento_Test_Helper_ObjectManager::MODEL_ENTITY, + self::PARENT_CLASS_MODEL + ), self::TEST_CLASS_MODEL, false ); $this->getMockForAbstractClass(self::PARENT_CLASS_BLOCK, - $this->_getConstructArguments(self::BLOCK_ENTITY, self::PARENT_CLASS_BLOCK), + $objectManagerHelper->getConstructArguments(Magento_Test_Helper_ObjectManager::BLOCK_ENTITY, + self::PARENT_CLASS_BLOCK + ), self::TEST_CLASS_BLOCK, false ); self::$_isClassMocks = true; @@ -227,9 +236,9 @@ class Magento_DiTest extends Magento_Test_TestCase_ObjectManagerAbstract // assert cache if (isset($this->_cachedInstances[$className])) { $expectedCache = array(); - foreach ($this->_cachedInstances[$className] as $key => $class) { + foreach ($this->_cachedInstances[$className] as $class) { $this->assertArrayHasKey($class, $this->_sharedInstances); - $expectedCache[$key] = $this->_sharedInstances[$class]; + $expectedCache[$class] = $this->_sharedInstances[$class]; } $this->assertAttributeEquals($expectedCache, '_cachedInstances', $this->_model); } diff --git a/dev/tests/unit/testsuite/Varien/Data/Form/Element/MultiselectTest.php b/dev/tests/unit/testsuite/Varien/Data/Form/Element/MultiselectTest.php new file mode 100644 index 0000000000000000000000000000000000000000..c8c3158ee096a7e11aba6f3ead49832d64d958c1 --- /dev/null +++ b/dev/tests/unit/testsuite/Varien/Data/Form/Element/MultiselectTest.php @@ -0,0 +1,53 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Varien + * @package Varien_Data + * @subpackage unit_tests + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +class Varien_Data_Form_Element_MultiselectTest extends PHPUnit_Framework_TestCase +{ + /** + * @var Varien_Data_Form_Element_Multiselect + */ + protected $_model; + + protected function setUp() + { + $this->_model = new Varien_Data_Form_Element_Multiselect(); + $this->_model->setForm(new Varien_Object()); + } + + /** + * Verify that hidden input is present in multiselect + * + * @covers Varien_Data_Form_Element_Multiselect::getElementHtml + */ + public function testHiddenFieldPresentInMultiSelect() + { + $this->_model->setDisabled(true); + $this->_model->setCanBeEmpty(true); + $elementHtml = $this->_model->getElementHtml(); + $this->assertContains('<input type="hidden"', $elementHtml); + } +} diff --git a/dev/tests/unit/testsuite/Varien/Io/FileTest.php b/dev/tests/unit/testsuite/Varien/Io/FileTest.php index abaf5d891cb1b4f880f2624c7c85dd86ea9deb4d..7a71401351276e475d2e257d66522620d69da169 100644 --- a/dev/tests/unit/testsuite/Varien/Io/FileTest.php +++ b/dev/tests/unit/testsuite/Varien/Io/FileTest.php @@ -36,7 +36,7 @@ class Varien_Io_FileTest extends PHPUnit_Framework_TestCase * @var string $_file */ protected $_file; - + public function testChmodRecursive() { try { diff --git a/dev/tests/unit/testsuite/tools/migration/Acl/GeneratorTest.php b/dev/tests/unit/testsuite/tools/migration/Acl/GeneratorTest.php index 4f093c2acd26c4eb3dba472261ec45c77e5aac2b..a46e18170445290ad05fdbee21c7f8af7b77b229 100644 --- a/dev/tests/unit/testsuite/tools/migration/Acl/GeneratorTest.php +++ b/dev/tests/unit/testsuite/tools/migration/Acl/GeneratorTest.php @@ -85,21 +85,6 @@ class Tools_Migration_Acl_GeneratorTest extends PHPUnit_Framework_TestCase $this->_model->setBasePath($this->_fixturePath); } - /** - * @param $file - * @param $expected - * - */ - public function testGetLicenseTemplate() - { - $this->_fileManagerMock->expects($this->once()) - ->method('getContents') - ->with('someFile') - ->will($this->returnValue('<?xml version="1.0"?> <!-- /** license_notice */ -->')); - $actual = $this->_model->getLicenseTemplate('someFile'); - $this->assertEquals(' /** license_notice */ ', $actual); - } - /** * @param $filePath * @param $expectedModuleName @@ -285,19 +270,17 @@ class Tools_Migration_Acl_GeneratorTest extends PHPUnit_Framework_TestCase public function testGetResultDomDocument() { - $expectedDccument = <<<TEMPLATE + $expectedDocument = <<<TEMPLATE <config> <acl> <resources xpath="config/acl/resources"/> </acl> </config> TEMPLATE; - $dom = $this->_model->getResultDomDocument('license_placeholder'); + $dom = $this->_model->getResultDomDocument(); $expectedDom = new DOMDocument(); $expectedDom->formatOutput = true; - - $this->assertContains('license_placeholder', $dom->saveXML()); - $this->assertEquals($expectedDccument, $dom->saveXML($dom->documentElement)); + $this->assertEquals($expectedDocument, $dom->saveXML($dom->documentElement)); } public function testParseAdminhtmlFiles() diff --git a/dev/tests/unit/testsuite/tools/migration/System/Configuration/GeneratorTest.php b/dev/tests/unit/testsuite/tools/migration/System/Configuration/GeneratorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..fe296700367cdce8486ffb8c178fd701dc116bbb --- /dev/null +++ b/dev/tests/unit/testsuite/tools/migration/System/Configuration/GeneratorTest.php @@ -0,0 +1,111 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Magento + * @package tools + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +require_once realpath(dirname(__FILE__) . '/../../../../../../../') + . '/tools/migration/System/Configuration/Generator.php'; +require_once realpath(dirname(__FILE__) . '/../../../../../../../') + . '/tools/migration/System/FileManager.php'; +require_once realpath(dirname(__FILE__) . '/../../../../../../../') + . '/tools/migration/System/Configuration/LoggerAbstract.php'; +require_once realpath(dirname(__FILE__) . '/../../../../../../../') + . '/tools/migration/System/Configuration/Formatter.php'; + + +class Tools_Migration_System_Configuration_GeneratorTest extends PHPUnit_Framework_TestCase +{ + /** + * @var Tools_Migration_System_Configuration_Generator + */ + protected $_model; + + /** + * @var PHPUnit_Framework_MockObject_MockObject + */ + protected $_fileManagerMock; + + /** + * @var PHPUnit_Framework_MockObject_MockObject + */ + protected $_loggerMock; + + /** + * @var PHPUnit_Framework_MockObject_MockObject + */ + protected $_formatterMock; + + protected function setUp() + { + $this->_fileManagerMock = $this->getMock('Tools_Migration_System_FileManager', array(), array(), '', false); + $this->_loggerMock = $this->getMockForAbstractClass('Tools_Migration_System_Configuration_LoggerAbstract', + array(), '', false, false, false, array('add') + ); + $this->_formatterMock = $this->getMock('Tools_Migration_System_Configuration_Formatter', array(), array(), + '', false + ); + + $this->_model = new Tools_Migration_System_Configuration_Generator( + $this->_formatterMock, $this->_fileManagerMock, $this->_loggerMock + ); + } + + public function testCreateConfigurationGeneratesConfiguration() + { + $dom = new DOMDocument(); + $dom->loadXML( + preg_replace('/\n|\s{4}/', '', file_get_contents(__DIR__ . '/_files/convertedConfiguration.xml')) + ); + $stripComments = new DOMXPath($dom); + foreach ($stripComments->query('//comment()') as $comment) { + $comment->parentNode->removeChild($comment); + } + $dom->formatOutput = true; + $dom->preserveWhiteSpace = false; + $expectedXml = $dom->saveXML(); + + $this->_fileManagerMock->expects($this->once())->method('write') + ->with($this->stringContains('system.xml'), $expectedXml); + + $this->_formatterMock->expects($this->once())->method('parseString') + ->will( + $this->returnCallback( + function($xml) { + $dom = new DOMDocument(); + $dom->loadXML($xml); + $dom->preserveWhiteSpace = false; + $dom->formatOutput = true; + return $dom->saveXML(); + } + ) + ); + + $this->_loggerMock->expects($this->once())->method('add')->with( + 'someFile', + Tools_Migration_System_Configuration_LoggerAbstract:: FILE_KEY_VALID + ); + + $this->_model->createConfiguration('someFile', include __DIR__ . '/_files/mappedConfiguration.php'); + } +} diff --git a/dev/tests/unit/testsuite/tools/migration/System/Configuration/Logger/ConsoleTest.php b/dev/tests/unit/testsuite/tools/migration/System/Configuration/Logger/ConsoleTest.php new file mode 100644 index 0000000000000000000000000000000000000000..24dcb89d9a83e35ff8bb926f49146dc92fa76f00 --- /dev/null +++ b/dev/tests/unit/testsuite/tools/migration/System/Configuration/Logger/ConsoleTest.php @@ -0,0 +1,41 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Tools + * @package unit_tests + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +require_once realpath(dirname(__FILE__) . '/../../../../../../../../') + . '/tools/migration/System/Configuration/LoggerAbstract.php'; +require_once realpath(dirname(__FILE__) . '/../../../../../../../../') + . '/tools/migration/System/Configuration/Logger/Console.php'; + +class Tools_Migration_System_Configuration_Logger_ConsoleTest extends PHPUnit_Framework_TestCase +{ + public function testReport() + { + $this->expectOutputRegex('/^valid: 0(.)*/'); + $model = new Tools_Migration_System_Configuration_Logger_Console(); + $model->report(); + } +} + diff --git a/dev/tests/unit/testsuite/tools/migration/System/Configuration/Logger/FactoryTest.php b/dev/tests/unit/testsuite/tools/migration/System/Configuration/Logger/FactoryTest.php new file mode 100644 index 0000000000000000000000000000000000000000..20f720179d076f61f8a7d46bd09aed0aa658f0a6 --- /dev/null +++ b/dev/tests/unit/testsuite/tools/migration/System/Configuration/Logger/FactoryTest.php @@ -0,0 +1,95 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Tools + * @package unit_tests + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +require_once realpath(dirname(__FILE__) . '/../../../../../../../../') + . '/tools/migration/System/Configuration/LoggerAbstract.php'; + +require_once realpath(dirname(__FILE__) . '/../../../../../../../../') + . '/tools/migration/System/Configuration/Logger/File.php'; + +require_once realpath(dirname(__FILE__) . '/../../../../../../../../') + . '/tools/migration/System/Configuration/Logger/Console.php'; + +require_once realpath(dirname(__FILE__) . '/../../../../../../../../') + . '/tools/migration/System/Configuration/Logger/Factory.php'; + +require_once realpath(dirname(__FILE__) . '/../../../../../../../../') . '/tools/migration/System/FileManager.php'; +require_once realpath(dirname(__FILE__) . '/../../../../../../../../') . '/tools/migration/System/FileReader.php'; +require_once realpath(dirname(__FILE__) . '/../../../../../../../../') + . '/tools/migration/System/WriterInterface.php'; +require_once realpath(dirname(__FILE__) . '/../../../../../../../../') . '/tools/migration/System/Writer/Memory.php'; + + +class Tools_Migration_System_Configuration_Logger_FactoryTest extends PHPUnit_Framework_TestCase +{ + /** + * @var Tools_Migration_System_Configuration_Logger_Factory + */ + protected $_model; + + /** + * @var PHPUnit_Framework_MockObject_MockObject + */ + protected $_fileManagerMock; + + public function setUp() + { + $this->_model = new Tools_Migration_System_Configuration_Logger_Factory(); + $this->_fileManagerMock = $this->getMock('Tools_Migration_System_FileManager', array(), array(), '', false); + } + + public function tearDown() + { + unset($this->_model); + unset($this->_fileManagerMock); + } + + /** + * @return array + */ + public function getLoggerDataProvider() + { + return array( + array('Tools_Migration_System_Configuration_Logger_File', 'file', 'report.log'), + array('Tools_Migration_System_Configuration_Logger_Console', 'console', null), + array('Tools_Migration_System_Configuration_Logger_Console', 'dummy', null), + ); + } + + /** + * @param string $expectedInstance + * @param string $loggerType + * @param string $path + * @dataProvider getLoggerDataProvider + */ + public function testGetLogger($expectedInstance, $loggerType, $path) + { + $this->assertInstanceOf($expectedInstance, + $this->_model->getLogger($loggerType, $path, $this->_fileManagerMock) + ); + } +} + diff --git a/dev/tests/unit/testsuite/tools/migration/System/Configuration/Logger/FileTest.php b/dev/tests/unit/testsuite/tools/migration/System/Configuration/Logger/FileTest.php new file mode 100644 index 0000000000000000000000000000000000000000..54b6d9021c9bbc9138a79379f1d8d029cd4a684e --- /dev/null +++ b/dev/tests/unit/testsuite/tools/migration/System/Configuration/Logger/FileTest.php @@ -0,0 +1,75 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Tools + * @package unit_tests + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +require_once realpath(dirname(__FILE__) . '/../../../../../../../../') . '/tools/migration/Acl/Db/LoggerAbstract.php'; +require_once realpath(dirname(__FILE__) . '/../../../../../../../../') . '/tools/migration/Acl/Db/Logger/File.php'; + + +require_once realpath(dirname(__FILE__) . '/../../../../../../../../') + . '/tools/migration/System/Configuration/LoggerAbstract.php'; + +require_once realpath(dirname(__FILE__) . '/../../../../../../../../') + . '/tools/migration/System/Configuration/Logger/File.php'; + +require_once realpath(dirname(__FILE__) . '/../../../../../../../../') . '/tools/migration/System/FileManager.php'; + +class Tools_Migration_System_Configuration_Logger_FileTest extends PHPUnit_Framework_TestCase +{ + /** + * @var PHPUnit_Framework_MockObject_MockObject + */ + protected $_fileManagerMock; + + public function setUp() + { + $this->_fileManagerMock = $this->getMock('Tools_Migration_System_FileManager', array(), array(), '', false); + } + + public function tearDown() + { + unset($this->_fileManagerMock); + } + + public function testConstructWithValidFile() + { + new Tools_Migration_System_Configuration_Logger_File('report.log', $this->_fileManagerMock); + } + + /** + * @expectedException InvalidArgumentException + */ + public function testConstructWithInValidFile() + { + new Tools_Migration_System_Configuration_Logger_File(null, $this->_fileManagerMock); + } + + public function testReport() + { + $model = new Tools_Migration_System_Configuration_Logger_File('report.log', $this->_fileManagerMock); + $this->_fileManagerMock->expects($this->once())->method('write')->with($this->stringEndsWith('report.log')); + $model->report(); + } +} diff --git a/dev/tests/unit/testsuite/tools/migration/System/Configuration/LoggerAbstractTest.php b/dev/tests/unit/testsuite/tools/migration/System/Configuration/LoggerAbstractTest.php new file mode 100644 index 0000000000000000000000000000000000000000..4d509c58f8525d33e10f60dc0f78391eff709d43 --- /dev/null +++ b/dev/tests/unit/testsuite/tools/migration/System/Configuration/LoggerAbstractTest.php @@ -0,0 +1,69 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Tools + * @package unit_tests + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +require_once realpath(dirname(__FILE__) . '/../../../../../../../') + . '/tools/migration/System/Configuration/LoggerAbstract.php'; + +class Tools_Migration_System_Configuration_LoggerAbstractTest extends PHPUnit_Framework_TestCase +{ + /** + * @var Tools_Migration_System_Configuration_LoggerAbstract + */ + protected $_model; + + public function setUp() + { + $this->_model = $this->getMockForAbstractClass('Tools_Migration_System_Configuration_LoggerAbstract'); + } + + public function tearDown() + { + unset($this->_model); + } + + /** + * @covers Tools_Migration_System_Configuration_LoggerAbstract::add() + * @covers Tools_Migration_System_Configuration_LoggerAbstract::__toString() + */ + public function testToString() + { + $this->_model->add('file1', Tools_Migration_System_Configuration_LoggerAbstract::FILE_KEY_VALID); + $this->_model->add('file2', Tools_Migration_System_Configuration_LoggerAbstract::FILE_KEY_INVALID); + + $expected = 'valid: 1' . PHP_EOL + . 'invalid: 1' . PHP_EOL + . 'Total: 2' . PHP_EOL + . '------------------------------' . PHP_EOL + . 'valid:' . PHP_EOL + . 'file1' . PHP_EOL + . '------------------------------' . PHP_EOL + . 'invalid:' . PHP_EOL + . 'file2'; + + $this->assertEquals($expected, (string)$this->_model); + } +} + diff --git a/dev/tests/unit/testsuite/tools/migration/System/Configuration/Mapper/FieldTest.php b/dev/tests/unit/testsuite/tools/migration/System/Configuration/Mapper/FieldTest.php new file mode 100644 index 0000000000000000000000000000000000000000..91b8983779b7813f26d7872492c4678d6ea0374d --- /dev/null +++ b/dev/tests/unit/testsuite/tools/migration/System/Configuration/Mapper/FieldTest.php @@ -0,0 +1,148 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Magento + * @package tools + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +require_once realpath(dirname(__FILE__) . '/../../../../../../../../') + . '/tools/migration/System/Configuration/Mapper/Abstract.php'; + +require_once realpath(dirname(__FILE__) . '/../../../../../../../../') + . '/tools/migration/System/Configuration/Mapper/Field.php'; + +/** + * Test case for Tools_Migration_System_Configuration_Mapper_Field + */ +class Tools_Migration_System_Configuration_Mapper_FieldTest extends PHPUnit_Framework_TestCase +{ + /** + * @var Tools_Migration_System_Configuration_Mapper_Field + */ + protected $_object; + + protected function setUp() + { + $this->_object = new Tools_Migration_System_Configuration_Mapper_Field(); + } + + protected function tearDown() + { + $this->_object = null; + } + + public function testTransform() + { + $config = array( + 'field_1' => array( + 'comment' => array('#cdata-section' => 'comment_test'), + 'tooltip' => array('#text' => 'tooltip_test'), + 'frontend_class' => array('#text' => 'frontend_class_test'), + 'validate' => array('#text' => 'validate_test'), + 'can_be_empty' => array('#text' => 'can_be_empty_test'), + 'if_module_enabled' => array('#text' => 'if_module_enabled_test'), + 'frontend_model' => array('#text' => 'frontend_model_test'), + 'backend_model' => array('#text' => 'backend_model_test'), + 'source_model' => array('#text' => 'source_model_test'), + 'config_path' => array('#text' => 'config_path_test'), + 'base_url' => array('#text' => 'base_url_test'), + 'upload_dir' => array('#text' => 'upload_dir_test'), + 'button_url' => array('#text' => 'button_url_test'), + 'button_label' => array('#text' => 'button_label_test'), + 'depends' => array( + 'module1' => array('#text' => 'yes') + ), + 'more_url' => array('#text' => 'more_url_test'), + 'demo_url' => array('#text' => 'demo_url_test'), + 'undefined' => array('#text' => 'undefined_test', '@attributes' => array('some' => 'attribute')), + 'node' => array( + 'label' => array( + 'nodeLabel' => array('#text' => 'nodeValue') + ), + ), + ), + ); + + $expected = array( + array( + 'nodeName' => 'field', + '@attributes' => array('id' => 'field_1'), + 'parameters' => array( + array('name' => 'comment', '#cdata-section' => 'comment_test'), + array('name' => 'tooltip', '#text' => 'tooltip_test'), + array('name' => 'frontend_class', '#text' => 'frontend_class_test'), + array('name' => 'validate', '#text' => 'validate_test'), + array('name' => 'can_be_empty', '#text' => 'can_be_empty_test'), + array('name' => 'if_module_enabled', '#text' => 'if_module_enabled_test'), + array('name' => 'frontend_model', '#text' => 'frontend_model_test'), + array('name' => 'backend_model', '#text' => 'backend_model_test'), + array('name' => 'source_model', '#text' => 'source_model_test'), + array('name' => 'config_path', '#text' => 'config_path_test'), + array('name' => 'base_url', '#text' => 'base_url_test'), + array('name' => 'upload_dir','#text' => 'upload_dir_test'), + array('name' => 'button_url', '#text' => 'button_url_test',), + array('name' => 'button_label', '#text' => 'button_label_test'), + array( + 'name' => 'depends', + 'subConfig' => array( + array( + 'nodeName' => 'field', + '@attributes' => array('id' => 'module1'), + '#text' => 'yes' + ) + ) + ), + array('name' => 'more_url', '#text' => 'more_url_test'), + array('name' => 'demo_url', '#text' => 'demo_url_test'), + array( + '@attributes' => array( + 'type' => 'undefined', + 'some' => 'attribute', + ), + 'name' => 'attribute', + '#text' => 'undefined_test', + ), + array( + '@attributes' => array( + 'type' => 'node' + ), + 'name' => 'attribute', + 'subConfig' => array( + array( + 'nodeName' => 'label', + 'subConfig' => array( + array( + 'nodeName' => 'nodeLabel', + '#text' => 'nodeValue', + ) + ) + ) + ) + ) + ), + ), + ); + + $actual = $this->_object->transform($config); + $this->assertEquals($expected, $actual); + } +} diff --git a/dev/tests/unit/testsuite/tools/migration/System/Configuration/Mapper/GroupTest.php b/dev/tests/unit/testsuite/tools/migration/System/Configuration/Mapper/GroupTest.php new file mode 100644 index 0000000000000000000000000000000000000000..49eba4438c742e2af5185e268c265b4170209495 --- /dev/null +++ b/dev/tests/unit/testsuite/tools/migration/System/Configuration/Mapper/GroupTest.php @@ -0,0 +1,138 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Magento + * @package tools + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +require_once realpath(dirname(__FILE__) . '/../../../../../../../../') + . '/tools/migration/System/Configuration/Mapper/Abstract.php'; + +require_once realpath(dirname(__FILE__) . '/../../../../../../../../') + . '/tools/migration/System/Configuration/Mapper/Field.php'; + +require_once realpath(dirname(__FILE__) . '/../../../../../../../../') + . '/tools/migration/System/Configuration/Mapper/Group.php'; + +/** + * Test case for Tools_Migration_System_Configuration_Mapper_Group + */ +class Tools_Migration_System_Configuration_Mapper_GroupTest extends PHPUnit_Framework_TestCase +{ + /** + * @var PHPUnit_Framework_MockObject_MockObject + */ + protected $_fieldMapperMock; + + /** + * @var Tools_Migration_System_Configuration_Mapper_Group + */ + protected $_object; + + protected function setUp() + { + $this->_fieldMapperMock = $this->getMock('Tools_Migration_System_Configuration_Mapper_Field', + array(), array(), '', false + ); + + $this->_object = new Tools_Migration_System_Configuration_Mapper_Group($this->_fieldMapperMock); + } + + protected function tearDown() + { + $this->_object = null; + $this->_fieldMapperMock = null; + } + + public function testTransform() + { + $config = array( + 'group_1' => array( + 'sort_order' => array('#text' => 10), + 'frontend_type' => array('#text' => 'text'), + 'class' => array('#text' => 'css class'), + 'label' => array('#text' => 'group label'), + 'comment' => array('#cdata-section' => 'group comment'), + 'resource' => array('#text' => 'acl'), + 'fieldset_css' => array('#text' => 'some css class'), + 'clone_fields' => array('#text' => 'some fields'), + 'clone_model' => array('#text' => 'some model'), + 'help_url' => array('#text' => 'some url'), + 'hide_in_single_store_mode' => array('#text' => 'mode'), + 'expanded' => array('#text' => 'yes'), + ), + 'group_2' => array(), + 'group_3' => array( + 'fields' => array( + 'label' => 'label' + ) + ), + ); + + + $expected = array( + array( + 'nodeName' => 'group', + '@attributes' => array( + 'id' => 'group_1', + 'sortOrder' => 10, + 'type' => 'text', + ), + 'parameters' => array( + array('name' => 'class', '#text' => 'css class'), + array('name' => 'label','#text' => 'group label'), + array('name' => 'comment','#cdata-section' => 'group comment'), + array('name' => 'resource', '#text' => 'acl'), + array('name' => 'fieldset_css', '#text' => 'some css class'), + array('name' => 'clone_fields', '#text' => 'some fields'), + array('name' => 'clone_model', '#text' => 'some model'), + array('name' => 'help_url', '#text' => 'some url'), + array('name' => 'hide_in_single_store_mode', '#text' => 'mode'), + array('name' => 'expanded', '#text' => 'yes'), + ) + ), + array( + 'nodeName' => 'group', + '@attributes' => array( + 'id' => 'group_2', + ), + 'parameters' => array () + ), + array( + 'nodeName' => 'group', + '@attributes' => array( + 'id' => 'group_3', + ), + 'parameters' => array(), + 'subConfig' => array( + 'label' => 'label' + ) + ) + ); + + $this->_fieldMapperMock->expects($this->once()) + ->method('transform')->with(array('label' => 'label'))->will($this->returnArgument(0)); + + $actual = $this->_object->transform($config); + $this->assertEquals($expected, $actual); + } +} diff --git a/dev/tests/unit/testsuite/tools/migration/System/Configuration/Mapper/SectionTest.php b/dev/tests/unit/testsuite/tools/migration/System/Configuration/Mapper/SectionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..4fa5bad3e7d920e48527b4b44caf24b85eacfd81 --- /dev/null +++ b/dev/tests/unit/testsuite/tools/migration/System/Configuration/Mapper/SectionTest.php @@ -0,0 +1,147 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Magento + * @package tools + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +require_once realpath(dirname(__FILE__) . '/../../../../../../../../') + . '/tools/migration/System/Configuration/Mapper/Abstract.php'; + +require_once realpath(dirname(__FILE__) . '/../../../../../../../../') + . '/tools/migration/System/Configuration/Mapper/Group.php'; + +require_once realpath(dirname(__FILE__) . '/../../../../../../../../') + . '/tools/migration/System/Configuration/Mapper/Section.php'; + +/** + * Test case for Tools_Migration_System_Configuration_Mapper_Section + */ +class Tools_Migration_System_Configuration_Mapper_SectionTest extends PHPUnit_Framework_TestCase +{ + /** + * @var PHPUnit_Framework_MockObject_MockObject + */ + protected $_groupMapperMock; + + /** + * @var Tools_Migration_System_Configuration_Mapper_Section + */ + protected $_object; + + protected function setUp() + { + $this->_groupMapperMock = $this->getMock('Tools_Migration_System_Configuration_Mapper_Group', + array(), array(), '', false + ); + + $this->_object = new Tools_Migration_System_Configuration_Mapper_Section($this->_groupMapperMock); + } + + protected function tearDown() + { + $this->_object = null; + $this->_groupMapperMock = null; + } + + public function testTransform() + { + $config = array( + 'section_1' => array( + 'sort_order' => array('#text' => 10), + 'frontend_type' => array('#text' => 'text'), + 'class' => array('#text' => 'css class'), + 'label' => array('#text' => 'section label'), + 'comment' => array('#cdata-section' => 'section comment'), + 'resource' => array('#text' => 'acl'), + 'header_css' => array('#text' => 'some css class'), + 'tab' => array('#text' => 'some tab'), + ), + 'section_2' => array(), + 'section_3' => array( + 'groups' => array( + 'label' => 'label' + ) + ), + ); + + $expected = array( + array( + 'nodeName' => 'section', + '@attributes' => array( + 'id' => 'section_1', + 'sortOrder' => 10, + 'type' => 'text', + ), + 'parameters' => array( + array( + 'name' => 'class', + '#text' => 'css class' + ), + array( + 'name' => 'label', + '#text' => 'section label' + ), + array( + 'name' => 'comment', + '#cdata-section' => 'section comment' + ), + array( + 'name' => 'resource', + '#text' => 'acl' + ), + array( + 'name' => 'header_css', + '#text' => 'some css class' + ), + array( + 'name' => 'tab', + '#text' => 'some tab' + ), + ) + ), + array( + 'nodeName' => 'section', + '@attributes' => array( + 'id' => 'section_2', + ), + 'parameters' => array () + ), + array( + 'nodeName' => 'section', + '@attributes' => array( + 'id' => 'section_3', + ), + 'parameters' => array(), + 'subConfig' => array( + 'label' => 'label' + ) + ) + ); + + $this->_groupMapperMock->expects($this->once()) + ->method('transform')->with(array('label' => 'label'))->will($this->returnArgument(0)); + + $actual = $this->_object->transform($config); + $this->assertEquals($expected, $actual); + } +} diff --git a/dev/tests/unit/testsuite/tools/migration/System/Configuration/Mapper/TabTest.php b/dev/tests/unit/testsuite/tools/migration/System/Configuration/Mapper/TabTest.php new file mode 100644 index 0000000000000000000000000000000000000000..f60a52cc6066f02d76722951ab1cf6a86656e194 --- /dev/null +++ b/dev/tests/unit/testsuite/tools/migration/System/Configuration/Mapper/TabTest.php @@ -0,0 +1,98 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Magento + * @package tools + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +require_once realpath(dirname(__FILE__) . '/../../../../../../../../') + . '/tools/migration/System/Configuration/Mapper/Abstract.php'; + +require_once realpath(dirname(__FILE__) . '/../../../../../../../../') + . '/tools/migration/System/Configuration/Mapper/Tab.php'; + +/** + * Test case for Tools_Migration_System_Configuration_Mapper_Tab + */ +class Tools_Migration_System_Configuration_Mapper_TabTest extends PHPUnit_Framework_TestCase +{ + /** + * @var Tools_Migration_System_Configuration_Mapper_Tab + */ + protected $_object; + + protected function setUp() + { + $this->_object = new Tools_Migration_System_Configuration_Mapper_Tab(); + } + + protected function tearDown() + { + $this->_object = null; + } + + public function testTransform() + { + $config = array( + 'tab_1' => array( + 'sort_order' => array('#text' => 10), + 'frontend_type' => array('#text' => 'text'), + 'class' => array('#text' => 'css class'), + 'label' => array('#text' => 'tab label'), + 'comment' => array('#cdata-section' => 'tab comment') + ), + 'tab_2' => array(), + ); + + $expected = array( + array( + 'nodeName' => 'tab', + '@attributes' => array ( + 'id' => 'tab_1', + 'sortOrder' => 10, + 'type' => 'text', + 'class' => 'css class', + ), + 'parameters' => array ( + array( + 'name' => 'label', + '#text' => 'tab label' + ), + array( + 'name' => 'comment', + '#cdata-section' => 'tab comment' + ), + ) + ), + array( + 'nodeName' => 'tab', + '@attributes' => array ( + 'id' => 'tab_2', + ), + 'parameters' => array () + ) + ); + + $actual = $this->_object->transform($config); + $this->assertEquals($expected, $actual); + } +} diff --git a/dev/tests/unit/testsuite/tools/migration/System/Configuration/MapperTest.php b/dev/tests/unit/testsuite/tools/migration/System/Configuration/MapperTest.php new file mode 100644 index 0000000000000000000000000000000000000000..ba8eab159ed2df044ff6dd6a3917510ca7dd8b3c --- /dev/null +++ b/dev/tests/unit/testsuite/tools/migration/System/Configuration/MapperTest.php @@ -0,0 +1,131 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Magento + * @package tools + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +require_once realpath(dirname(__FILE__) . '/../../../../../../../') + . '/tools/migration/System/Configuration/Mapper/Abstract.php'; + +require_once realpath(dirname(__FILE__) . '/../../../../../../../') + . '/tools/migration/System/Configuration/Mapper.php'; + +require_once realpath(dirname(__FILE__) . '/../../../../../../../') + . '/tools/migration/System/Configuration/Mapper/Tab.php'; + +require_once realpath(dirname(__FILE__) . '/../../../../../../../') + . '/tools/migration/System/Configuration/Mapper/Section.php'; + +/** + * Test case for Tools_Migration_System_Configuration_Mapper + */ +class Tools_Migration_System_Configuration_MapperTest extends PHPUnit_Framework_TestCase +{ + /** + * @var Tools_Migration_System_Configuration_Mapper + */ + protected $_object; + + /** + * @var PHPUnit_Framework_MockObject_MockObject + */ + protected $_tabMapperMock; + + /** + * @var PHPUnit_Framework_MockObject_MockObject + */ + protected $_sectionMapperMock; + + protected function setUp() + { + $this->_tabMapperMock = $this->getMock('Tools_Migration_System_Configuration_Mapper_Tab', + array(), array(), '', false + ); + $this->_sectionMapperMock = $this->getMock('Tools_Migration_System_Configuration_Mapper_Section', + array(), array(), '', false + ); + + $this->_object = new Tools_Migration_System_Configuration_Mapper( + $this->_tabMapperMock, + $this->_sectionMapperMock + ); + } + + protected function tearDown() + { + $this->_object = null; + $this->_tabMapperMock = null; + $this->_sectionMapperMock = null; + } + + public function testTransformWithSetTabsAndSections() + { + $config = array( + 'comment' => 'test comment', + 'tabs' => array( + 'test tabs config', + ), + 'sections' => array( + 'test sections config', + ), + ); + + $this->_tabMapperMock->expects($this->once())->method('transform') + ->with(array('test tabs config'))->will($this->returnArgument(0)); + + $this->_sectionMapperMock->expects($this->once())->method('transform') + ->with(array('test sections config'))->will($this->returnArgument(0)); + + $expected = array( + 'comment' => 'test comment', + 'nodes' => array( + 'test tabs config', + 'test sections config', + ), + ); + $actual = $this->_object->transform($config); + + $this->assertEquals($expected, $actual); + } + + public function testTransformWithoutSetTabsAndSections() + { + $config = array( + 'comment' => 'test comment', + ); + + $this->_tabMapperMock->expects($this->once())->method('transform') + ->with(array())->will($this->returnArgument(0)); + + $this->_sectionMapperMock->expects($this->once())->method('transform') + ->with(array())->will($this->returnArgument(0)); + + $expected = array( + 'comment' => 'test comment', + 'nodes' => array(), + ); + $actual = $this->_object->transform($config); + + $this->assertEquals($expected, $actual); + } +} diff --git a/dev/tests/unit/testsuite/tools/migration/System/Configuration/ParserTest.php b/dev/tests/unit/testsuite/tools/migration/System/Configuration/ParserTest.php new file mode 100644 index 0000000000000000000000000000000000000000..932f70a65788fa0e9554935af8a4e2555d65affb --- /dev/null +++ b/dev/tests/unit/testsuite/tools/migration/System/Configuration/ParserTest.php @@ -0,0 +1,122 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Magento + * @package tools + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +require_once realpath(dirname(__FILE__) . '/../../../../../../../') + . '/tools/migration/System/Configuration/Parser.php'; + +/** + * Tools_Migration_System_Configuration_Parser test case + */ +class Tools_Migration_System_Configuration_ParserTest extends PHPUnit_Framework_TestCase +{ + /** + * @var Tools_Migration_System_Configuration_Parser + */ + protected $_parser; + + protected function setUp() + { + $this->_parser = new Tools_Migration_System_Configuration_Parser(); + } + + protected function tearDown() + { + $this->_parser = null; + } + + + public function testParseEmptyDom() + { + $this->assertEquals(array(), $this->_parser->parse(new DOMDocument())); + } + + public function testParseDomWithoutNodes() + { + $xml = <<<XML +<?xml version="1.0"?> +<config> +</config> +XML; + + $expected = array(); + $dom = new DOMDocument(); + $dom->loadXML($xml); + $this->assertEquals($expected, $this->_parser->parse($dom)); + } + + public function testParseDomNodes() + { + $xml = <<<XML +<?xml version="1.0"?> +<!-- +/** + * some comment + */ +--> +<config> + <sections> + <some_section translate="label" module="Mage_Some"> + <label>Section Name</label> + <tab>test</tab> + <frontend_type>text</frontend_type> + <sort_order>140</sort_order> + <show_in_default>1</show_in_default> + <show_in_website>1</show_in_website> + <show_in_store>1</show_in_store> + <resource>Mage_Some::resource</resource> + </some_section> + </sections> +</config> +XML; + + $comment = <<<XMLCOMMENT + +/** + * some comment + */ + +XMLCOMMENT; + $expected = array( + 'comment' => $comment, + 'sections' => array( + 'some_section' => array( + 'label' => array('#text' => 'Section Name'), + 'tab' => array('#text' => 'test'), + 'frontend_type' => array('#text' => 'text'), + 'sort_order' => array('#text' => '140'), + 'show_in_default' => array('#text' => '1'), + 'show_in_website' => array('#text' => '1'), + 'show_in_store' => array('#text' => '1'), + 'resource' => array('#text' => 'Mage_Some::resource'), + '@attributes' => array('translate' => 'label', 'module' => 'Mage_Some') + ) + ) + ); + $dom = new DOMDocument(); + $dom->loadXML($xml); + $this->assertEquals($expected, $this->_parser->parse($dom)); + } +} diff --git a/dev/tests/unit/testsuite/tools/migration/System/Configuration/ReaderTest.php b/dev/tests/unit/testsuite/tools/migration/System/Configuration/ReaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..e8a4ee0326ccecda9c8dfd16284ed146fcc80f23 --- /dev/null +++ b/dev/tests/unit/testsuite/tools/migration/System/Configuration/ReaderTest.php @@ -0,0 +1,87 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Magento + * @package tools + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +require_once realpath(dirname(__FILE__) . '/../../../../../../../') + . '/tools/migration/System/Configuration/Reader.php'; +require_once realpath(dirname(__FILE__) . '/../../../../../../../') + . '/tools/migration/System/FileManager.php'; +require_once realpath(dirname(__FILE__) . '/../../../../../../../') + . '/tools/migration/System/Configuration/Mapper.php'; +require_once realpath(dirname(__FILE__) . '/../../../../../../../') + . '/tools/migration/System/Configuration/Parser.php'; + + +class Tools_Migration_System_Configuration_ReaderTest extends PHPUnit_Framework_TestCase +{ + /** + * @var Tools_Migration_System_Configuration_Reader + */ + protected $_model; + + /** + * @var PHPUnit_Framework_MockObject_MockObject + */ + protected $_fileManagerMock; + + /** + * @var PHPUnit_Framework_MockObject_MockObject + */ + protected $_parserMock; + + /** + * @var PHPUnit_Framework_MockObject_MockObject + */ + protected $_mapperMock; + + protected function setUp() + { + $this->_fileManagerMock = $this->getMock('Tools_Migration_System_FileManager', array(), array(), '', false); + $this->_parserMock = $this->getMock('Tools_Migration_System_Configuration_Parser', array(), array(), '', false); + $this->_mapperMock = $this->getMock('Tools_Migration_System_Configuration_Mapper', array(), array(), '', false); + + $this->_model = new Tools_Migration_System_Configuration_Reader( + $this->_fileManagerMock, $this->_parserMock, $this->_mapperMock + ); + } + + public function testGetConfiguration() + { + $this->_fileManagerMock->expects($this->once())->method('getFileList') + ->will($this->returnValue(array('testFile'))); + $this->_fileManagerMock->expects($this->once())->method('getContents')->with('testFile') + ->will($this->returnValue('<config><system><tabs></tabs></system></config>')); + $parsedArray = array('config' => array('system' => array('tabs'))); + $this->_parserMock->expects($this->once())->method('parse')->with($this->isInstanceOf('DOMDocument')) + ->will($this->returnValue($parsedArray)); + + $transformedArray = array('value' => 'expected'); + $this->_mapperMock->expects($this->once())->method('transform')->with($parsedArray) + ->will($this->returnValue($transformedArray)); + + + $this->assertEquals(array('testFile' => $transformedArray), $this->_model->getConfiguration()); + } +} diff --git a/dev/tests/unit/testsuite/tools/migration/System/Configuration/_files/convertedConfiguration.xml b/dev/tests/unit/testsuite/tools/migration/System/Configuration/_files/convertedConfiguration.xml new file mode 100644 index 0000000000000000000000000000000000000000..e1f4a06b7309e1b2846c0d491fc19734c4429ad9 --- /dev/null +++ b/dev/tests/unit/testsuite/tools/migration/System/Configuration/_files/convertedConfiguration.xml @@ -0,0 +1,78 @@ +<?xml version="1.0"?> +<!-- +/** + * 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 Dummy + * @package Module_Dummy + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +--> +<config> + <system> + <tab id="tab_1" sortOrder="10" class="css class"> + <label>tab label</label> + </tab> + <section id="section_1" sortOrder="10" type="text"> + <class>css class</class> + <label>section label</label> + <resource>Mage_Adminhtml::acl</resource> + <header_css>some css class</header_css> + <tab>tab_1</tab> + <group id="group_1" sortOrder="10" type="text"> + <label>group label</label> + <comment><![CDATA[group comment]]></comment> + <fieldset_css>some css class</fieldset_css> + <clone_fields>1</clone_fields> + <clone_model>Mage_Some_Model_Name</clone_model> + <help_url>some_url</help_url> + <hide_in_single_store_mode>1</hide_in_single_store_mode> + <expanded>1</expanded> + <field id="field_1"> + <comment><![CDATA[comment_test]]></comment> + <tooltip>tooltip_test</tooltip> + <frontend_class>frontend_class_test</frontend_class> + <validate>validate_test</validate> + <can_be_empty>1</can_be_empty> + <if_module_enabled>Mage_Backend</if_module_enabled> + <frontend_model>Mage_Some_Model_Name</frontend_model> + <backend_model>Mage_Some_Model_Name</backend_model> + <source_model>Mage_Some_Model_Name</source_model> + <config_path>config/path/test</config_path> + <base_url>some_url</base_url> + <upload_dir>some_directory</upload_dir> + <button_url>some_url</button_url> + <button_label>some_label</button_label> + <depends> + <field id="module1">yes</field> + </depends> + <more_url>more_url_test</more_url> + <demo_url>demo_url_test</demo_url> + <attribute type="undefined" some="attribute">undefined_test</attribute> + <attribute type="node"> + <label> + <nodeLabel>nodeValue</nodeLabel> + </label> + </attribute> + </field> + </group> + </section> + </system> +</config> diff --git a/dev/tests/unit/testsuite/tools/migration/System/Configuration/_files/mappedConfiguration.php b/dev/tests/unit/testsuite/tools/migration/System/Configuration/_files/mappedConfiguration.php new file mode 100644 index 0000000000000000000000000000000000000000..ce17c856182827c6d7702170f62468710730340d --- /dev/null +++ b/dev/tests/unit/testsuite/tools/migration/System/Configuration/_files/mappedConfiguration.php @@ -0,0 +1,154 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Dummy + * @package Module_Dummy + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +return array( + 'comment' => 'comment', + 'nodes' => array( + array( + 'nodeName' => 'tab', + '@attributes' => array ( + 'id' => 'tab_1', + 'sortOrder' => 10, + 'class' => 'css class', + ), + 'parameters' => array ( + array( + 'name' => 'label', + '#text' => 'tab label' + ), + ) + ), + array( + 'nodeName' => 'section', + '@attributes' => array( + 'id' => 'section_1', + 'sortOrder' => 10, + 'type' => 'text', + ), + 'parameters' => array( + array( + 'name' => 'class', + '#text' => 'css class' + ), + array( + 'name' => 'label', + '#text' => 'section label' + ), + array( + 'name' => 'resource', + '#text' => 'Mage_Adminhtml::acl' + ), + array( + 'name' => 'header_css', + '#text' => 'some css class' + ), + array( + 'name' => 'tab', + '#text' => 'tab_1' + ), + ), + 'subConfig' => array( + array( + 'nodeName' => 'group', + '@attributes' => array( + 'id' => 'group_1', + 'sortOrder' => 10, + 'type' => 'text', + ), + 'parameters' => array( + array('name' => 'label','#text' => 'group label'), + array('name' => 'comment','#cdata-section' => 'group comment'), + array('name' => 'fieldset_css', '#text' => 'some css class'), + array('name' => 'clone_fields', '#text' => '1'), + array('name' => 'clone_model', '#text' => 'Mage_Some_Model_Name'), + array('name' => 'help_url', '#text' => 'some_url'), + array('name' => 'hide_in_single_store_mode', '#text' => '1'), + array('name' => 'expanded', '#text' => '1'), + ), + 'subConfig' => array( + array( + 'nodeName' => 'field', + '@attributes' => array('id' => 'field_1'), + 'parameters' => array( + array('name' => 'comment', '#cdata-section' => 'comment_test'), + array('name' => 'tooltip', '#text' => 'tooltip_test'), + array('name' => 'frontend_class', '#text' => 'frontend_class_test'), + array('name' => 'validate', '#text' => 'validate_test'), + array('name' => 'can_be_empty', '#text' => '1'), + array('name' => 'if_module_enabled', '#text' => 'Mage_Backend'), + array('name' => 'frontend_model', '#text' => 'Mage_Some_Model_Name'), + array('name' => 'backend_model', '#text' => 'Mage_Some_Model_Name'), + array('name' => 'source_model', '#text' => 'Mage_Some_Model_Name'), + array('name' => 'config_path', '#text' => 'config/path/test'), + array('name' => 'base_url', '#text' => 'some_url'), + array('name' => 'upload_dir','#text' => 'some_directory'), + array('name' => 'button_url', '#text' => 'some_url',), + array('name' => 'button_label', '#text' => 'some_label'), + array( + 'name' => 'depends', + 'subConfig' => array( + array( + 'nodeName' => 'field', + '@attributes' => array('id' => 'module1'), + '#text' => 'yes' + ) + ) + ), + array('name' => 'more_url', '#text' => 'more_url_test'), + array('name' => 'demo_url', '#text' => 'demo_url_test'), + array( + '@attributes' => array( + 'type' => 'undefined', + 'some' => 'attribute', + ), + 'name' => 'attribute', + '#text' => 'undefined_test', + ), + array( + '@attributes' => array( + 'type' => 'node' + ), + 'name' => 'attribute', + 'subConfig' => array( + array( + 'nodeName' => 'label', + 'subConfig' => array( + array( + 'nodeName' => 'nodeLabel', + '#text' => 'nodeValue', + ) + ) + ) + ) + ) + ), + ), + ) + ) + ) + ) + ) +); diff --git a/dev/tests/unit/testsuite/tools/migration/System/FileManagerTest.php b/dev/tests/unit/testsuite/tools/migration/System/FileManagerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..d967436efcf6892818e81eda662e4e77023bc640 --- /dev/null +++ b/dev/tests/unit/testsuite/tools/migration/System/FileManagerTest.php @@ -0,0 +1,89 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Magento + * @package tools + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +require_once realpath(dirname(__FILE__) . '/../../../../../../') . '/tools/migration/System/FileManager.php'; +require_once realpath(dirname(__FILE__) . '/../../../../../../') . '/tools/migration/System/FileReader.php'; +require_once realpath(dirname(__FILE__) . '/../../../../../../') . '/tools/migration/System/Writer/Memory.php'; + +class Tools_Migration_System_FileManagerTest extends PHPUnit_Framework_TestCase +{ + /** + * @var Tools_Migration_System_FileManager + */ + protected $_model; + + /** + * @var PHPUnit_Framework_MockObject_MockObject + */ + protected $_readerMock; + + /** + * @var PHPUnit_Framework_MockObject_MockObject + */ + protected $_writerMock; + + protected function setUp() + { + $this->_readerMock = $this->getMock('Tools_Migration_System_FileReader', array(), array(), '', false); + $this->_writerMock = $this->getMock('Tools_Migration_System_Writer_Memory', array(), array(), '', false); + $this->_model = new Tools_Migration_System_FileManager($this->_readerMock, $this->_writerMock); + } + + protected function tearDown() + { + $this->_model = null; + $this->_readerMock = null; + $this->_writerMock = null; + } + + public function testWrite() + { + $this->_writerMock->expects($this->once())->method('write')->with('someFile', 'someContent'); + $this->_model->write('someFile', 'someContent'); + } + + public function testRemove() + { + $this->_writerMock->expects($this->once())->method('remove')->with('someFile'); + $this->_model->remove('someFile'); + } + + public function testGetContents() + { + $this->_readerMock->expects($this->once())->method('getContents') + ->with('someFile')->will($this->returnValue('123')); + $this->assertEquals('123', $this->_model->getContents('someFile')); + } + + public function testGetFileList() + { + $expected = array('file1', 'file2'); + $this->_readerMock->expects($this->once())->method('getFileList')->with('pattern') + ->will($this->returnValue($expected)); + + $this->assertEquals($expected, $this->_model->getFileList('pattern')); + } +} diff --git a/dev/tests/unit/testsuite/tools/migration/System/Writer/FactoryTest.php b/dev/tests/unit/testsuite/tools/migration/System/Writer/FactoryTest.php new file mode 100644 index 0000000000000000000000000000000000000000..6b9a159425a511d548e82202da0631c603723ff2 --- /dev/null +++ b/dev/tests/unit/testsuite/tools/migration/System/Writer/FactoryTest.php @@ -0,0 +1,47 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Magento + * @package tools + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +require_once realpath(dirname(__FILE__) . '/../../../../../../../') . '/tools/migration/System/Writer/Factory.php'; +require_once realpath(dirname(__FILE__) . '/../../../../../../../') . '/tools/migration/System/Writer/FileSystem.php'; + +class Tools_Migration_System_Writer_FactoryTest extends PHPUnit_Framework_TestCase +{ + /** + * @var Tools_Migration_System_Writer_Factory + */ + protected $_model; + + protected function setUp() + { + $this->_model = new Tools_Migration_System_Writer_Factory(); + } + + public function testGetWriterReturnsProperWriter() + { + $this->assertInstanceOf('Tools_Migration_System_Writer_FileSystem', $this->_model->getWriter('write')); + $this->assertInstanceOf('Tools_Migration_System_Writer_Memory', $this->_model->getWriter('someWriter')); + } +} diff --git a/dev/tools/di/compiler.php b/dev/tools/di/compiler.php index b2e969e8f199651f920951d982ed1a283d166cae..2a1483e1c3d429cad462a75575de095359631e94 100644 --- a/dev/tools/di/compiler.php +++ b/dev/tools/di/compiler.php @@ -24,17 +24,14 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** - * Require necessary files - */ /** * Constants definition */ -use \Zend\Di\Di; - define('DS', DIRECTORY_SEPARATOR); define('BP', realpath(__DIR__ . '/../../..')); - +/** + * Require necessary files + */ require_once BP . '/lib/Magento/Autoload.php'; require_once BP . '/app/code/core/Mage/Core/functions.php'; require_once BP . '/app/Mage.php'; @@ -44,102 +41,254 @@ $paths[] = BP . DS . 'app' . DS . 'code' . DS . 'community'; $paths[] = BP . DS . 'app' . DS . 'code' . DS . 'core'; $paths[] = BP . DS . 'lib'; Magento_Autoload::getInstance()->addIncludePath($paths); - Mage::setRoot(); -$config = new Mage_Core_Model_Config(new Magento_ObjectManager_Zend()); -$config->loadBase(); -$config->loadModules(); - $definitions = array(); -/** - * Compile definitions using Magento_Di_Definition_CompilerDefinition_Zend - * - * @param string $moduleDir - * @return array - */ -function compileModuleDefinitions($moduleDir) +class ArrayDefinitionCompiler { - $strategy = new \Zend\Di\Definition\IntrospectionStrategy(new \Zend\Code\Annotation\AnnotationManager()); - $strategy->setMethodNameInclusionPatterns(array()); - $strategy->setInterfaceInjectionInclusionPatterns(array()); - - $compiler = new Magento_Di_Definition_CompilerDefinition_Zend($strategy); - $compiler->addDirectory($moduleDir); - - $controllerPath = $moduleDir . '/controllers/'; - if (file_exists($controllerPath)) { - foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($controllerPath)) as $file) { - if (!$file->isDir()) { - require_once $file->getPathname(); + /**#@+ + * Abstract classes + */ + const ABSTRACT_MODEL = 'Mage_Core_Model_Abstract'; + const ABSTRACT_BLOCK = 'Mage_Core_Block_Abstract'; + /**#@-*/ + + /** + * Main config + * + * @var Mage_Core_Model_Config + */ + protected $_config; + + /** + * Information about abstract block/model constructor + * + * @var ReflectionMethod[] + */ + protected $_constructorList; + + /** + * List of common dependencies for model and block abstract + * + * @var array + */ + protected $_commonDependencies = array(); + + /** + * Class constructor + */ + public function __construct() + { + $this->_config = new Mage_Core_Model_Config(new Magento_ObjectManager_Zend()); + $this->_config->loadBase(); + $this->_config->loadModules(); + + $this->_initCommonDependencies(); + } + + /** + * Compile module definitions + * + * @param string $moduleDir + * @return array + */ + public function compileModule($moduleDir) + { + $moduleDefinitions = $this->_compileModuleDefinitions($moduleDir); + $this->_removeModelAndBlockConstructors($moduleDefinitions); + + array_walk($moduleDefinitions, function (&$item) + { + unset($item['supertypes']); + }); + + return $moduleDefinitions; + } + + /** + * Check is module enabled + * + * @param string $moduleName + * @return bool + */ + public function isModuleEnabled($moduleName) + { + return $this->_config->isModuleEnabled($moduleName); + } + + /** + * Init list of common dependencies of model and block abstract classes + * + * @return ArrayDefinitionCompiler + */ + protected function _initCommonDependencies() + { + $classList = array( + self::ABSTRACT_MODEL, + self::ABSTRACT_BLOCK + ); + + foreach ($classList as $className) { + $this->_constructorList[$className] = new ReflectionMethod($className, '__construct'); + + /** @var $param ReflectionParameter */ + foreach ($this->_constructorList[$className]->getParameters() as $param) { + if ($param->getClass() && !in_array($param->getClass()->getName(), $this->_commonDependencies)) { + $this->_commonDependencies[] = $param->getClass()->getName(); + } } } + + return $this; } - $compiler->compile(); - $moduleDefinitions = $compiler->toArray(); - array_walk($moduleDefinitions, function (&$item) + /** + * Compile definitions using Magento_Di_Definition_CompilerDefinition_Zend + * + * @param string $moduleDir + * @return array + */ + protected function _compileModuleDefinitions($moduleDir) { - unset($item['supertypes']); - }); + $strategy = new \Zend\Di\Definition\IntrospectionStrategy(new \Zend\Code\Annotation\AnnotationManager()); + $strategy->setMethodNameInclusionPatterns(array()); + $strategy->setInterfaceInjectionInclusionPatterns(array()); - return $moduleDefinitions; -} + $compiler = new Magento_Di_Definition_CompilerDefinition_Zend($strategy); + $compiler->addDirectory($moduleDir); -/** - * Remove model and block constructors - * - * @see Zend\Di\Di::newInstance() - * @param $moduleDefinitions - */ -function removeModelAndBlockConstructors(&$moduleDefinitions) -{ - foreach ($moduleDefinitions as $name => $definition) { + $controllerPath = $moduleDir . '/controllers/'; + if (file_exists($controllerPath)) { + /** @var $file DirectoryIterator */ + foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($controllerPath)) as $file) { + if (!$file->isDir()) { + require_once $file->getPathname(); + } + } + } + + $compiler->compile(); + $moduleDefinitions = $compiler->toArray(); + + return $moduleDefinitions; + } + + /** + * Remove model and block constructors + * + * @see Zend\Di\Di::newInstance() + * @param $moduleDefinitions + */ + protected function _removeModelAndBlockConstructors(&$moduleDefinitions) + { + foreach ($moduleDefinitions as $name => $definition) { + if (!$this->_hasConstructorParams($name, $definition) + || $this->_areConstructorParamsEquals(self::ABSTRACT_MODEL, $definition) + || $this->_areConstructorParamsEquals(self::ABSTRACT_BLOCK, $definition) + ) { + unset($moduleDefinitions[$name]); + } + } + } + + /** + * Check if class has constructor params + * + * For cases when *_Model_* found function will return true, because such classes must be in compiled array. + * + * @param $className + * @param $definition + * @return bool + */ + protected function _hasConstructorParams($className, $definition) + { $constructorParams = array(); if (isset($definition['parameters']['__construct'])) { $constructorParams = array_values($definition['parameters']['__construct']); } - //TODO: fix this condition - if (!count($constructorParams) - || (count($constructorParams) == 5 && preg_match('/\w*_\w*\_Model/', $name)) - || (count($constructorParams) == 10 && preg_match('/\w*_\w*\_Block/', $name))) { - unset($moduleDefinitions[$name]); + + $paramNumber = count($constructorParams); + if (!$paramNumber && in_array($className, $this->_commonDependencies)) { + return true; } + + return (bool) $paramNumber; } -} -/** - * Compile module definitions - * - * @param string $moduleDir - * @return array - */ -function compileModule($moduleDir) -{ - $moduleDefinitions = compileModuleDefinitions($moduleDir); - removeModelAndBlockConstructors($moduleDefinitions); + /** + * Check is class constructor params are same as in abstract + * + * @param string $className + * @param array $definition + * @return bool + */ + protected function _areConstructorParamsEquals($className, $definition) + { + if (!isset($this->_constructorList[$className])) { + $this->_constructorList[$className] = new ReflectionMethod($className, '__construct'); + } + + if (isset($definition['supertypes']) && isset($definition['parameters']['__construct'])) { + foreach ($definition['supertypes'] as $type) { + if (($type == $className) + && (count($definition['parameters']['__construct']) == + count($this->_constructorList[$className]->getParameters()) + ) + ) { + return $this->_compareConstructorParams($definition['parameters']['__construct'], + $this->_constructorList[$className]->getParameters() + ); + } + } + } - return $moduleDefinitions; + return false; + } + + /** + * Compare constructors params + * + * @param array $classArguments + * @param ReflectionParameter[] $abstractArguments + * @return bool + */ + protected function _compareConstructorParams($classArguments, $abstractArguments) + { + $index = 0; + foreach ($classArguments as $argumentInfo) { + $argumentType = null; + if ($abstractArguments[$index]->getClass()) { + $argumentType = $abstractArguments[$index]->getClass()->getName(); + } + if ($argumentInfo[1] != $argumentType) { + return false; + } + $index++; + } + return true; + } } +$compiler = new ArrayDefinitionCompiler(); + foreach (glob(BP . '/app/code/*') as $codePoolDir) { foreach (glob($codePoolDir . '/*') as $vendorDir) { foreach (glob($vendorDir . '/*') as $moduleDir) { $moduleName = basename($vendorDir) . '_' . basename($moduleDir); - if (is_dir($moduleDir) && $config->isModuleEnabled($moduleName)) { + if (is_dir($moduleDir) && $compiler->isModuleEnabled($moduleName)) { echo "Compiling module " . $moduleName . "\n"; - $definitions = array_merge_recursive($definitions, compileModule($moduleDir)); + $definitions = array_merge_recursive($definitions, $compiler->compileModule($moduleDir)); } } } } echo "Compiling Varien\n"; -$definitions = array_merge_recursive($definitions, compileModule(BP . '/lib/Varien')); +$definitions = array_merge_recursive($definitions, $compiler->compileModule(BP . '/lib/Varien')); echo "Compiling Magento\n"; -$definitions = array_merge_recursive($definitions, compileModule(BP . '/lib/Magento')); +$definitions = array_merge_recursive($definitions, $compiler->compileModule(BP . '/lib/Magento')); echo "Compiling Mage\n"; -$definitions = array_merge_recursive($definitions, compileModule(BP . '/lib/Mage')); +$definitions = array_merge_recursive($definitions, $compiler->compileModule(BP . '/lib/Mage')); foreach ($definitions as $key => $definition) { $definitions[$key] = json_encode($definition); @@ -149,4 +298,3 @@ if (!file_exists(BP . '/var/di/')) { } file_put_contents(BP . '/var/di/definitions.php', serialize($definitions)); -//file_put_contents(BP . '/var/di/definitions.php', '<?php return ' . var_export($definitions, true) . ';'); diff --git a/dev/tools/license_placeholder/blacklist.php b/dev/tools/license_placeholder/blacklist.php new file mode 100644 index 0000000000000000000000000000000000000000..b058e67875cebdee82d0c4cd4063a09d2e6a2645 --- /dev/null +++ b/dev/tools/license_placeholder/blacklist.php @@ -0,0 +1,66 @@ +<?php +/** + * Files excluded from license notices replacement + * + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 build + * @package license + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +return array( + 'app/code/core/*/*/etc/{wsi,wsdl,wsdl2}.xml', + 'app/code/core/Zend', + 'app/design/frontend/*/*/js/dnd.js', + 'app/design/frontend/*/*/js/modernizr.js', + 'app/design/frontend/enterprise/fixed/js/jqzoom', + 'app/etc/local.xml', + 'dev/build/publication/license', + 'dev/tests/functional', + 'dev/tests/integration/tmp', + 'dev/tests/static/report', + 'dev/tests/static/testsuite/Php/Exemplar/_files/phpcs', + 'dev/tests/static/testsuite/Php/Exemplar/_files/phpmd/input', + 'dev/tests/static/testsuite/Php/Exemplar/_files/phpmd_ruleset.xsd', + 'downloader/js/prototype.js', + 'lib/Apache', + 'lib/PEAR', + 'lib/phpseclib', + 'lib/Zend', + 'pub/lib/calendar', + 'pub/lib/extjs', + 'pub/lib/firebug', + 'pub/lib/flash', + 'pub/lib/jscolor', + 'pub/lib/jquery', + 'pub/lib/lib/boxover.js', + 'pub/lib/lib/ccard.js', + 'pub/lib/lib/ds-sleight.js', + 'pub/lib/lib/FABridge.js', + 'pub/lib/mage/adminhtml/hash.js', + 'pub/lib/prototype', + 'pub/lib/scriptaculous', + 'pub/lib/tiny_mce', + 'pub/lib/globalize', + 'pub/lib/jquery', + 'pub/media', + 'var', +); diff --git a/dev/tools/license_placeholder/replace.php b/dev/tools/license_placeholder/replace.php new file mode 100644 index 0000000000000000000000000000000000000000..b7bd6dc29066fd54303232ef517ad209bf1234af --- /dev/null +++ b/dev/tools/license_placeholder/replace.php @@ -0,0 +1,100 @@ +<?php +/** + * Automated replacement of license notice into placeholders + * + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Magento + * @package tools + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +$sourceDir = realpath(__DIR__ . '/../../..'); + +// scan for files (split up into several calls to overcome maximum limitation of 260 chars in glob pattern) +$files = globDir($sourceDir, '*.{xml,xml.template,xml.additional,xml.dist,xml.sample,xsd,mxml}', GLOB_BRACE); +$files = array_merge($files, globDir($sourceDir, '*.{php,php.sample,phtml,html,htm,css,js,as,sql}', GLOB_BRACE)); + +// exclude files from blacklist +$blacklist = require __DIR__ . '/blacklist.php'; +foreach ($blacklist as $item) { + $excludeDirs = glob("{$sourceDir}/{$item}", GLOB_ONLYDIR) ?: array(); + foreach ($excludeDirs as $excludeDir) { + foreach ($files as $i => $file) { + if (0 === strpos($file, $excludeDir)) { + unset($files[$i]); + } + } + } + if (!$excludeDirs) { + $excludeFiles = glob("{$sourceDir}/{$item}", GLOB_BRACE) ?: array(); + foreach ($excludeFiles as $excludeFile) { + $i = array_search($excludeFile, $files); + if (false !== $i) { + unset($files[$i]); + } + } + } +} + +// replace +$licensePlaceholder = ' * {license}' . "\n"; +$replacements = array( + array('/\s\*\sMagento.+?NOTICE OF LICENSE.+?DISCLAIMER.+?@/s', $licensePlaceholder . " *\n * @"), + array('/\ \*\ \{license_notice\}\s/s', $licensePlaceholder), +); +foreach ($files as $file) { + $content = file_get_contents($file); + $newContent = $content; + foreach ($replacements as $row) { + list($regex, $replacement) = $row; + $newContent = preg_replace($regex, $replacement, $content); + if ($newContent != $content) { + break; + } + } + $newContent = preg_replace('/^\s\*\s@copyright.+?$/m', '', $newContent); + $newContent = preg_replace('/^\s\*\s@license.+$/m', '', $newContent); + $newContent = preg_replace('/(\{license\}.+?)\n\n\ \*/s', '\\1' . " *", $newContent); + if ($newContent != $content) { + file_put_contents($file, $newContent); + } +} + +/** + * Perform a glob search in specified directory + * + * @param string $dir + * @param string $filesPattern + * @param int $flags + * @return array + */ +function globDir($dir, $filesPattern, $flags) +{ + if (!$dir || !is_dir($dir)) { + return array(); + } + $result = glob($dir . '/' . $filesPattern, $flags) ?: array(); + $dirs = glob($dir . '/*', GLOB_ONLYDIR) ?: array(); + foreach ($dirs as $innerDir) { + $result = array_merge($result, globDir($innerDir, $filesPattern, $flags)); + } + return $result; +} diff --git a/dev/tools/migration/Acl/Generator.php b/dev/tools/migration/Acl/Generator.php index 2db187f02dfefd897e15cef1c189af480510e5dd..f9ad12b2c71c67839e8cf972aad260e44aa8f017 100644 --- a/dev/tools/migration/Acl/Generator.php +++ b/dev/tools/migration/Acl/Generator.php @@ -135,24 +135,6 @@ class Tools_Migration_Acl_Generator $this->_artifactsPath = realpath(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'log' . DIRECTORY_SEPARATOR; } - /** - * Get License Template for a file - * - * @param $file string File path - * @return string - */ - public function getLicenseTemplate($file) - { - $content = $this->_fileManager->getContents($file); - - $licenseTemplate = ''; - if (preg_match('#<\?xml[^>]+>\s+<\!--(\s+/\*\*[\w\W\d\s]+\*/\s+)-->#', $content, $matches)) { - $licenseTemplate = $matches[1]; - } - - return $licenseTemplate; - } - /** * Get module name from file name * @@ -427,17 +409,13 @@ class Tools_Migration_Acl_Generator /** * Get template for result DOMDocument * - * @param $licenseTemplate * @return DOMDocument */ - public function getResultDomDocument($licenseTemplate) + public function getResultDomDocument() { $resultDom = new DOMDocument(); $resultDom->formatOutput = true; - $comment = $resultDom->createComment($licenseTemplate); - $resultDom->appendChild($comment); - $config = $resultDom->createElement('config'); $resultDom->appendChild($config); @@ -457,8 +435,7 @@ class Tools_Migration_Acl_Generator { foreach ($this->getAdminhtmlFiles() as $file) { $module = $this->getModuleName($file); - $licenseTemplate = $this->getLicenseTemplate($file); - $resultDom = $this->getResultDomDocument($licenseTemplate); + $resultDom = $this->getResultDomDocument(); $adminhtmlDom = new DOMDocument(); $adminhtmlDom->load($file); diff --git a/dev/tools/migration/System/Configuration/Formatter.php b/dev/tools/migration/System/Configuration/Formatter.php new file mode 100644 index 0000000000000000000000000000000000000000..de117a5ff1988311235fabdcb2d29809c2f0a501 --- /dev/null +++ b/dev/tools/migration/System/Configuration/Formatter.php @@ -0,0 +1,38 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Magento + * @package tools + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +class Tools_Migration_System_Configuration_Formatter +{ + /** + * @param string $string + * @param string $parameters + */ + public function parseString($string, $parameters) + { + $tidy = tidy_parse_string($string, $parameters); + return $tidy->value; + } +} diff --git a/dev/tools/migration/System/Configuration/Generator.php b/dev/tools/migration/System/Configuration/Generator.php new file mode 100644 index 0000000000000000000000000000000000000000..0165956c5e2120264a567f11079577cb3335fcbf --- /dev/null +++ b/dev/tools/migration/System/Configuration/Generator.php @@ -0,0 +1,210 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Magento + * @package tools + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + + +class Tools_Migration_System_Configuration_Generator +{ + /** + * @var Tools_Migration_System_FileManager + */ + protected $_fileManager; + + /** + * @var Tools_Migration_System_Configuration_Formatter + */ + protected $_xmlFormatter; + + /** + * @var Tools_Migration_System_Configuration_LoggerAbstract + */ + protected $_logger; + + /** + * Base directory path + * + * @var string + */ + protected $_basePath; + + /** + * @var Tools_Migration_System_Configuration_LoggerAbstract + */ + protected $_fileSchemaPath; + + public function __construct( + Tools_Migration_System_Configuration_Formatter $xmlFormatter, + Tools_Migration_System_FileManager $fileManager, + Tools_Migration_System_Configuration_LoggerAbstract $logger + ) { + $this->_fileManager = $fileManager; + $this->_xmlFormatter = $xmlFormatter; + $this->_logger = $logger; + + + $this->_basePath = realpath(dirname(__FILE__) . '/../../../../../'); + $this->_fileSchemaPath = $this->_basePath + . '/app/code/core/Mage/Backend/Model/Config/Structure/system_file.xsd'; + } + + /** + * Create configuration array from xml file + * + * @param string $fileName + * @param array $configuration + */ + public function createConfiguration($fileName, array $configuration) + { + $domDocument = $this->_createDOMDocument($configuration); + if (@!$domDocument->schemaValidate($this->_fileSchemaPath)) { + $this->_logger->add( + $this->_removeBasePath($fileName), + Tools_Migration_System_Configuration_LoggerAbstract::FILE_KEY_INVALID + ); + } else { + $this->_logger->add( + $this->_removeBasePath($fileName), + Tools_Migration_System_Configuration_LoggerAbstract::FILE_KEY_VALID + ); + } + + $output = $this->_xmlFormatter->parseString($domDocument->saveXml(), array( + 'indent' => true, + 'input-xml' => true, + 'output-xml' => true, + 'add-xml-space' => false, + 'indent-spaces' => 4, + 'wrap' => 1000 + )); + $newFileName = $this->_getPathToSave($fileName); + $this->_fileManager->write($newFileName, $output); + } + + /** + * Create DOM document based on configuration + * + * @param array $configuration + * @return DOMDocument + */ + protected function _createDOMDocument(array $configuration) + { + $dom = new DOMDocument(); + $configElement = $dom->createElement('config'); + $systemElement = $dom->createElement('system'); + $configElement->appendChild($systemElement); + $dom->appendChild($configElement); + + foreach ($configuration['nodes'] as $config) { + $element = $this->_createElement($config, $dom); + $systemElement->appendChild($element); + } + return $dom; + } + + /** + * Create element + * + * @param array $config + * @param DOMDocument $dom + * @return DOMElement + */ + protected function _createElement($config, DOMDocument $dom) + { + $element = $dom->createElement($this->_getValue($config, 'nodeName'), $this->_getValue($config, '#text', '')); + if ($this->_getValue($config, '#cdata-section')) { + $cdataSection = $dom->createCDATASection($this->_getValue($config, '#cdata-section', '')); + $element->appendChild($cdataSection); + } + + foreach ($this->_getValue($config, '@attributes', array()) as $attributeName => $attributeValue) { + $element->setAttribute($attributeName, $attributeValue); + } + + foreach ($this->_getValue($config, 'parameters', array()) as $paramConfig) { + if ($this->_getValue($paramConfig, 'name') == '#text') { + $element->nodeValue = $this->_getValue($paramConfig, 'value', ''); + continue; + } + + $childElement = $dom->createElement($paramConfig['name'], $this->_getValue($paramConfig, '#text', '')); + + if ($this->_getValue($paramConfig, '#cdata-section')) { + $childCDataSection = $dom->createCDATASection($this->_getValue($paramConfig, '#cdata-section')); + $childElement->appendChild($childCDataSection); + } + + foreach ($this->_getValue($paramConfig, '@attributes', array()) as $attributeName => $attributeValue) { + $childElement->setAttribute($attributeName, $attributeValue); + } + + foreach ($this->_getValue($paramConfig, 'subConfig', array()) as $subConfig) { + $childElement->appendChild($this->_createElement($subConfig, $dom)); + } + + $element->appendChild($childElement); + } + + foreach ($this->_getValue($config, 'subConfig', array()) as $subConfig) { + $element->appendChild($this->_createElement($subConfig, $dom)); + } + + return $element; + } + + /** + * Get value from array by key + * + * @param array $source + * @param string $key + * @param mixed $default + * @return mixed + */ + protected function _getValue($source, $key, $default = null) + { + return array_key_exists($key, $source) ? $source[$key] : $default; + } + + /** + * Get new path to system configuration file + * + * @param $fileName + * @return string + */ + protected function _getPathToSave($fileName) + { + return dirname($fileName) . DIRECTORY_SEPARATOR . 'adminhtml' . DIRECTORY_SEPARATOR . 'system.xml'; + } + + /** + * Remove path to magento application + * + * @param $filename + * @return string + */ + protected function _removeBasePath($filename) + { + return str_replace($this->_basePath . DIRECTORY_SEPARATOR, '', $filename); + } +} diff --git a/dev/tools/migration/System/Configuration/Logger/Console.php b/dev/tools/migration/System/Configuration/Logger/Console.php new file mode 100644 index 0000000000000000000000000000000000000000..a0320f489f27cad9709f4b6142848bd322dc484b --- /dev/null +++ b/dev/tools/migration/System/Configuration/Logger/Console.php @@ -0,0 +1,39 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Magento + * @package tools + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +/** + * Migration logger. Output result print to console + */ +class Tools_Migration_System_Configuration_Logger_Console extends Tools_Migration_System_Configuration_LoggerAbstract +{ + /** + * Print logs to console + */ + public function report() + { + echo $this; + } +} diff --git a/dev/tools/migration/System/Configuration/Logger/Factory.php b/dev/tools/migration/System/Configuration/Logger/Factory.php new file mode 100644 index 0000000000000000000000000000000000000000..d7503c9228733bb7483e188a809ac4c603421cd2 --- /dev/null +++ b/dev/tools/migration/System/Configuration/Logger/Factory.php @@ -0,0 +1,52 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Magento + * @package tools + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +class Tools_Migration_System_Configuration_Logger_Factory +{ + /** + * Get logger instance + * + * @param string $loggerType + * @param string $filePath + * @param Tools_Migration_System_FileManager $fileManager + * @return Tools_Migration_System_Configuration_LoggerAbstract + */ + public function getLogger($loggerType, $filePath, Tools_Migration_System_FileManager $fileManager) + { + /** @var Tools_Migration_System_Configuration_LoggerAbstract $loggerInstance */ + $loggerInstance = null; + switch ($loggerType) { + case 'file': + $loggerInstance = new Tools_Migration_System_Configuration_Logger_File($filePath, $fileManager); + break; + default: + $loggerInstance = new Tools_Migration_System_Configuration_Logger_Console(); + break; + } + + return $loggerInstance; + } +} diff --git a/dev/tools/migration/System/Configuration/Logger/File.php b/dev/tools/migration/System/Configuration/Logger/File.php new file mode 100644 index 0000000000000000000000000000000000000000..6a61c714302dd63f786e2dc4d60f67f14681d3b8 --- /dev/null +++ b/dev/tools/migration/System/Configuration/Logger/File.php @@ -0,0 +1,68 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Magento + * @package tools + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +/** + * Migration logger. Output result put to file + */ +class Tools_Migration_System_Configuration_Logger_File extends Tools_Migration_System_Configuration_LoggerAbstract +{ + /** + * Path to log file + * + * @var string + */ + protected $_file = null; + + /** + * @var Tools_Migration_System_FileManager + */ + protected $_fileManager; + + /** + * @param string $file + * @param Tools_Migration_System_FileManager $fileManger + * @throws InvalidArgumentException + */ + public function __construct($file, Tools_Migration_System_FileManager $fileManger) + { + $this->_fileManager = $fileManger; + + $logDir = realpath(__DIR__ . '/../../') . '/log/'; + + if (empty($file)) { + throw new InvalidArgumentException('Log file name is required'); + } + $this->_file = $logDir . $file; + } + + /** + * Put report to file + */ + public function report() + { + $this->_fileManager->write($this->_file, (string)$this); + } +} diff --git a/dev/tools/migration/System/Configuration/LoggerAbstract.php b/dev/tools/migration/System/Configuration/LoggerAbstract.php new file mode 100644 index 0000000000000000000000000000000000000000..8992ea2030ff300c2b9a941645288a507a2408a0 --- /dev/null +++ b/dev/tools/migration/System/Configuration/LoggerAbstract.php @@ -0,0 +1,94 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Magento + * @package tools + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +/** + * System configuration migration logger + */ +abstract class Tools_Migration_System_Configuration_LoggerAbstract +{ + CONST FILE_KEY_VALID = 'valid'; + CONST FILE_KEY_INVALID = 'invalid'; + + /** + * List of logs + * + * @var array + */ + protected $_logs = array( + self::FILE_KEY_VALID => array(), + self::FILE_KEY_INVALID => array() + ); + + /** + * Add log data + * + * @param string $fileName + * @param string $type + * @return Tools_Migration_System_Configuration_LoggerAbstract + */ + public function add($fileName, $type) + { + $this->_logs[$type][] = $fileName; + return $this; + } + + /** + * Convert logger object to string + * + * @return string + */ + public function __toString() + { + $result = array(); + $totalCount = 0; + foreach ($this->_logs as $type => $data) { + $countElements = count($data); + $totalCount += $countElements; + $total[] = $type . ': ' . $countElements; + + if (!$countElements) { + continue; + } + + $result[] = '------------------------------'; + $result[] = $type . ':'; + foreach ($data as $fileName) { + $result[] = $fileName; + } + } + + $total[] = 'Total: ' . $totalCount; + $result = array_merge($total, $result); + return implode(PHP_EOL, $result); + } + + /** + * Generate report + * + * @abstract + */ + public abstract function report(); +} diff --git a/dev/tools/migration/System/Configuration/Mapper.php b/dev/tools/migration/System/Configuration/Mapper.php new file mode 100644 index 0000000000000000000000000000000000000000..5a492a91b111483bd0cd016fc46488464147c5bb --- /dev/null +++ b/dev/tools/migration/System/Configuration/Mapper.php @@ -0,0 +1,76 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Magento + * @package tools + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +class Tools_Migration_System_Configuration_Mapper +{ + + /** + * @var Tools_Migration_System_Configuration_Mapper_Tab + */ + protected $_tabMapper; + + /** + * @var Tools_Migration_System_Configuration_Mapper_Section + */ + protected $_sectionMapper; + + /** + * @param Tools_Migration_System_Configuration_Mapper_Tab $tabMapper + * @param Tools_Migration_System_Configuration_Mapper_Section $sectionMapper + */ + public function __construct(Tools_Migration_System_Configuration_Mapper_Tab $tabMapper, + Tools_Migration_System_Configuration_Mapper_Section $sectionMapper + ) { + $this->_tabMapper = $tabMapper; + $this->_sectionMapper = $sectionMapper; + } + + /** + * Transform configuration + * + * @param array $config + * @return array + */ + public function transform(array $config) + { + $output = array(); + $output['comment'] = $config['comment']; + + $tabsConfig = isset($config['tabs']) ? $config['tabs'] : array(); + $sectionsConfig = isset($config['sections']) ? $config['sections'] : array(); + + /** @var array $nodes */ + $nodes = $this->_tabMapper->transform($tabsConfig); + + $transformedSections = $this->_sectionMapper->transform($sectionsConfig); + + $nodes = array_merge($nodes, $transformedSections); + + $output['nodes'] = $nodes; + + return $output; + } +} diff --git a/dev/tools/migration/System/Configuration/Mapper/Abstract.php b/dev/tools/migration/System/Configuration/Mapper/Abstract.php new file mode 100644 index 0000000000000000000000000000000000000000..7ab1a1740917d37aa7ee90ddad1c30b1a7df6094 --- /dev/null +++ b/dev/tools/migration/System/Configuration/Mapper/Abstract.php @@ -0,0 +1,221 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Magento + * @package tools + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +abstract class Tools_Migration_System_Configuration_Mapper_Abstract +{ + /** + * Attribute maps + * oldName => newName + * @var array + */ + protected $_attributeMaps = array( + 'sort_order' => 'sortOrder', + 'show_in_default' => 'showInDefault', + 'show_in_store' => 'showInStore', + 'show_in_website' => 'showInWebsite', + 'frontend_type' => 'type', + ); + + /** + * List of allowed field names + * + * @var array + */ + protected $_allowedFieldNames = array(); + + /** + * Transform configuration + * + * @param array $config + * @return array + */ + public abstract function transform(array $config); + + /** + * Transform sub configuration + * + * @param array $config + * @param array $parentNode + * @param array $element + * @return mixed + */ + protected abstract function _transformSubConfig(array $config, $parentNode, $element); + + /** + * Transform element configuration + * + * @param string $nodeId + * @param array $config + * @param string $nodeName + * @param array $allowedNames + * @return array + */ + protected function _transformElement($nodeId, $config, $nodeName, $allowedNames = array()) + { + $element = array(); + $element['nodeName'] = $nodeName; + if (false === empty($nodeId)) { + $element['@attributes']['id'] = $nodeId; + } + $attributes = $this->_getValue($config, '@attributes', array()); + $element = $this->_transformAttributes($attributes, $element); + + if (false === empty($attributes)) { + unset($config['@attributes']); + } + + $element = $this->_transformNodes($config, $element, $allowedNames); + return $element; + } + + /** + * Transform attributes + * + * @param array $attributes + * @param array $element + * @return array + */ + protected function _transformAttributes($attributes, $element) + { + foreach ($attributes as $attributeName => $attributeValue) { + $element['@attributes'][$this->_getAttributeName($attributeName)] = $attributeValue; + } + return $element; + } + + /** + * Get attribute name + * + * @param string $key + * @return string + */ + protected function _getAttributeName($key) + { + return $this->_getValue($this->_attributeMaps, $key, $key); + } + + /** + * Check if node must be moved to attribute + * + * @param string $key + * @return bool + */ + protected function _needMoveToAttribute($key) + { + return $this->_getValue($this->_attributeMaps, $key, false); + } + + /** + * Transform nodes configuration + * + * @param array $config + * @param array $element + * @param array $allowedNames + * @return array + */ + protected function _transformNodes($config, $element, $allowedNames = array()) + { + $element['parameters'] = array(); + foreach ($config as $nodeName => $nodeValue) { + if ($this->_needMoveToAttribute($nodeName)) { + $element['@attributes'][$this->_getAttributeName($nodeName)] = $nodeValue['#text']; + unset($config[$nodeName]); + continue; + } + + $node = array(); + if ($this->_isNotAllowedNodeName($allowedNames, $nodeName)) { + $node['@attributes'] = array('type' => $nodeName); + $nodeName = 'attribute'; + } + + $node['name'] = $nodeName; + if ($this->_isSubConfigValue($nodeValue)) { + $element = $this->_transformSubConfig($nodeValue, $node, $element); + continue; + } else { + if ($this->_getValue($nodeValue, '@attributes', false)) { + if ($this->_getValue($node, '@attributes', false)) { + $node['@attributes'] = array_merge( + $this->_getValue($node, '@attributes', array()), + $this->_getValue($nodeValue, '@attributes', array()) + ); + } else { + $node['@attributes'] = $this->_getValue($nodeValue, '@attributes', array()); + } + } + + if ($this->_getValue($nodeValue, '#text', false)) { + $node['#text'] = $this->_getValue($nodeValue, '#text'); + } + if ($this->_getValue($nodeValue, '#cdata-section', false)) { + $node['#cdata-section'] = $this->_getValue($nodeValue, '#cdata-section'); + } + } + + $element['parameters'][] = $node; + } + + return $element; + } + + /** + * Check if node value must be converted as sub config + * + * @param mixed $nodeValue + * @return bool + */ + protected function _isSubConfigValue($nodeValue) + { + return is_array($nodeValue) && + !($this->_getValue($nodeValue, '#text', false) || $this->_getValue($nodeValue, '#cdata-section', false)); + } + + /** + * Check if specified node name is not allowed + * + * @param array $allowedNames + * @param string $nodeName + * @return bool + */ + protected function _isNotAllowedNodeName($allowedNames, $nodeName) + { + return false === empty($allowedNames) && false == in_array($nodeName, $allowedNames); + } + + /** + * Get value from array by key + * + * @param array $source + * @param string $key + * @param mixed $default + * @return mixed + */ + protected function _getValue($source, $key, $default = null) + { + return array_key_exists($key, $source) ? $source[$key] : $default; + } +} diff --git a/dev/tools/migration/System/Configuration/Mapper/Field.php b/dev/tools/migration/System/Configuration/Mapper/Field.php new file mode 100644 index 0000000000000000000000000000000000000000..2ad39fba731c522789a22effccebe17ed2b81ea9 --- /dev/null +++ b/dev/tools/migration/System/Configuration/Mapper/Field.php @@ -0,0 +1,156 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Magento + * @package tools + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +class Tools_Migration_System_Configuration_Mapper_Field extends Tools_Migration_System_Configuration_Mapper_Abstract +{ + /** + * List of allowed node names + * @var array + */ + protected $_allowedFieldNames = array( + 'label', + 'comment', + 'tooltip', + 'frontend_class', + 'validate', + 'can_be_empty', + 'if_module_enabled', + 'frontend_model', + 'backend_model', + 'source_model', + 'config_path', + 'base_url', + 'upload_dir', + 'button_url', + 'button_label', + 'depends', + 'more_url', + 'demo_url', + 'hide_in_single_store_mode', + ); + + /** + * Transform field config + * + * @param array $config + * @return array + */ + public function transform(array $config) + { + $output = array(); + foreach ($config as $fieldName => $fieldConfig) { + $output[] = $this->_transformElement($fieldName, $fieldConfig, 'field', $this->_allowedFieldNames); + } + return $output; + } + + /** + * Transform sub configuration + * + * @param array $config + * @param $parentNode + * @param $element + * @return array + */ + public function _transformSubConfig(array $config, $parentNode, $element) + { + switch ($parentNode['name']) { + case 'depends': + $parentNode['subConfig'] = $this->_transformElementDepends($config); + break; + + case 'attribute': + $parentNode['subConfig'] = $this->_transformElementAttribute($config); + break; + } + + $element['parameters'][] = $parentNode; + + return $element; + } + + /** + * Transform depends configuration + * + * @param array $config + * @return array + */ + protected function _transformElementDepends(array $config) + { + $result = array(); + foreach ($config as $nodeName => $nodeValue) { + $element = array(); + $element['nodeName'] = 'field'; + $element['@attributes']['id'] = $nodeName; + $attributes = $this->_getValue($nodeValue, '@attributes', array()); + $element = $this->_transformAttributes($attributes, $element); + + if (false === empty($attributes)) { + unset($nodeValue['@attributes']); + } + + $element['#text'] = $nodeValue['#text']; + $result[] = $element; + } + + return $result; + } + + /** + * Transform element configuration + * + * @param array $config + * @return array + */ + protected function _transformElementAttribute(array $config) + { + $result = array(); + foreach ($config as $nodeName => $nodeValue) { + $element = array(); + $element['nodeName'] = $nodeName; + $attributes = $this->_getValue($nodeValue, '@attributes', array()); + $element = $this->_transformAttributes($attributes, $element); + + if (false === empty($attributes)) { + unset($nodeValue['@attributes']); + } + if ($this->_isSubConfigValue($nodeValue)) { + $element['subConfig'] = $this->_transformElementAttribute($nodeValue); + } else { + if ($this->_getValue($nodeValue, '#text', false)) { + $element['#text'] = $this->_getValue($nodeValue, '#text'); + } + if ($this->_getValue($nodeValue, '#cdata-section', false)) { + $element['#cdata-section'] = $this->_getValue($nodeValue, '#cdata-section'); + } + } + + $result[] = $element; + } + + return $result; + } +} diff --git a/dev/tools/migration/System/Configuration/Mapper/Group.php b/dev/tools/migration/System/Configuration/Mapper/Group.php new file mode 100644 index 0000000000000000000000000000000000000000..91939d19281b01fd9a4e36de068745c868636477 --- /dev/null +++ b/dev/tools/migration/System/Configuration/Mapper/Group.php @@ -0,0 +1,90 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Magento + * @package tools + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +class Tools_Migration_System_Configuration_Mapper_Group extends Tools_Migration_System_Configuration_Mapper_Abstract +{ + /** + * @var Tools_Migration_System_Configuration_Mapper_Field + */ + protected $_fieldMapper; + + /** + * List of allowed field names for group + * @var array + */ + protected $_allowedFieldNames = array( + 'label', + 'frontend_model', + 'clone_fields', + 'clone_model', + 'fieldset_css', + 'help_url', + 'comment', + 'hide_in_single_store_mode', + 'expanded' + ); + + /** + * @param Tools_Migration_System_Configuration_Mapper_Field $fieldMapper + */ + public function __construct(Tools_Migration_System_Configuration_Mapper_Field $fieldMapper) + { + $this->_fieldMapper = $fieldMapper; + } + + /** + * Transform group configuration + * + * @param array $config + * @return array + */ + public function transform(array $config) + { + $output = array(); + foreach ($config as $groupName => $groupConfig) { + $output[] = $this->_transformElement($groupName, $groupConfig, 'group'); + } + return $output; + } + + /** + * @param array $config + * @param array $parentNode + * @param array $element + * @return array + */ + protected function _transformSubConfig(array $config, $parentNode, $element) + { + if ($parentNode['name'] == 'fields') { + $subConfig = $this->_fieldMapper->transform($config); + if (null !== $subConfig) { + $element['subConfig'] = $subConfig; + } + } + return $element; + } + +} diff --git a/dev/tools/migration/System/Configuration/Mapper/Section.php b/dev/tools/migration/System/Configuration/Mapper/Section.php new file mode 100644 index 0000000000000000000000000000000000000000..a1485615958b64256783974c85af886da49a0eea --- /dev/null +++ b/dev/tools/migration/System/Configuration/Mapper/Section.php @@ -0,0 +1,88 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Magento + * @package tools + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +class Tools_Migration_System_Configuration_Mapper_Section extends Tools_Migration_System_Configuration_Mapper_Abstract +{ + /** + * @var Tools_Migration_System_Configuration_Mapper_Group + */ + protected $_groupMapper; + + /** + * List of allowed filed names for section + * + * @var array + */ + protected $_allowedFieldNames = array( + 'label', + 'class', + 'resource', + 'header_css', + 'tab' + ); + + /** + * @param Tools_Migration_System_Configuration_Mapper_Group $groupMapper + */ + public function __construct(Tools_Migration_System_Configuration_Mapper_Group $groupMapper) + { + $this->_groupMapper = $groupMapper; + } + + /** + * Transform section config + * + * @param array $config + * @return array + */ + public function transform(array $config) + { + $output = array(); + foreach ($config as $sectionName => $sectionConfig) { + $output[] = $this->_transformElement($sectionName, $sectionConfig, 'section'); + } + return $output; + } + + /** + * Transform section sub configuration + * + * @param array $config + * @param array $parentNode + * @param array $element + * @return array + */ + protected function _transformSubConfig(array $config, $parentNode, $element) + { + if ($parentNode['name'] == 'groups') { + $subConfig = $this->_groupMapper->transform($config); + if (null !== $subConfig) { + $element['subConfig'] = $subConfig; + } + } + return $element; + } +} diff --git a/dev/tools/migration/System/Configuration/Mapper/Tab.php b/dev/tools/migration/System/Configuration/Mapper/Tab.php new file mode 100644 index 0000000000000000000000000000000000000000..1b677b26ea69e744d3d5ecc374f35fb3efcac395 --- /dev/null +++ b/dev/tools/migration/System/Configuration/Mapper/Tab.php @@ -0,0 +1,76 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Magento + * @package tools + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +class Tools_Migration_System_Configuration_Mapper_Tab extends Tools_Migration_System_Configuration_Mapper_Abstract +{ + /** + * Attribute maps + * oldName => newName + * @var array + */ + protected $_attributeMaps = array( + 'sort_order' => 'sortOrder', + 'frontend_type' => 'type', + 'class' => 'class' + ); + + /** + * List of allowed filed names for tab + * + * @var array + */ + protected $_allowedFieldNames = array( + 'label', + ); + + /** + * Transform tabs configuration + * + * @param array $config + * @return array + */ + public function transform(array $config) + { + $output = array(); + foreach ($config as $tabName => $tabConfig) { + $output[] = $this->_transformElement($tabName, $tabConfig, 'tab'); + } + return $output; + } + + /** + * Transform sub configuration + * + * @param array $config + * @param array $parentNode + * @param array $element + * @return array + */ + protected function _transformSubConfig(array $config, $parentNode, $element) + { + return $element; + } +} diff --git a/dev/tools/migration/System/Configuration/Parser.php b/dev/tools/migration/System/Configuration/Parser.php new file mode 100644 index 0000000000000000000000000000000000000000..11b57f61e8a6714a51197acfbd2799f4f051beff --- /dev/null +++ b/dev/tools/migration/System/Configuration/Parser.php @@ -0,0 +1,165 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Magento + * @package tools + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +/** + * System configuration migration parser + */ +class Tools_Migration_System_Configuration_Parser +{ + /** + * Parse dom document + * + * @param DOMDocument $dom + * @return array + */ + public function parse(DOMDocument $dom) + { + $result = array(); + if ($dom->hasChildNodes()) { + foreach ($dom->childNodes as $child) { + if (XML_COMMENT_NODE == $child->nodeType) { + $result['comment'] = $child->nodeValue; + } else if (XML_ELEMENT_NODE == $child->nodeType && 'config' == $child->nodeName) { + $result = array_merge($result, $this->_parseNode($child)); + } + } + } + return $result; + } + + /** + * Parse dom node + * + * @param DOMNode $node + * @return array + */ + protected function _parseNode(DOMNode $node) + { + $result = array(); + if (false === $node->hasChildNodes()) { + $result = $this->_getSimpleNodeValue($node); + } else { + foreach ($node->childNodes as $childNode) { + $sameNodesCount = $this->_getSameNodesCount( + $node->getElementsByTagName($childNode->nodeName), + $childNode + ); + /** @var array $nodeValue */ + $nodeValue = $this->_parseNode($childNode); + + $siblingKey = $this->_getSiblingKey($childNode); + + if ($siblingKey !== 0) { + $nodeValue = isset($nodeValue[$childNode->nodeName]) ? + $nodeValue[$childNode->nodeName] : + $nodeValue; + } elseif (empty($nodeValue)) { + continue; + } + + // how many of these child nodes do we have? + if ($sameNodesCount > 1) { + // more than 1 child - make numeric array + $result[$siblingKey][] = $nodeValue; + } else { + $result[$siblingKey] = $nodeValue; + } + } + // if the child is <foo>bar</foo>, the result will be array(bar) + // make the result just 'bar' + if (count($result) == 1 && isset($result[0])) { + $result = current($result); + } + } + + $attributes = $this->_parseNodeAttributes($node); + $result = array_merge($result, $attributes); + return $result; + } + + /** + * Get sibling key + * + * @param DOMNode $childNode + * @return int|string + */ + protected function _getSiblingKey($childNode) + { + return ($childNode->nodeName{0} == '#') ? 0 : $childNode->nodeName; + } + + + /** + * Get count of the same nodes + * + * @param DOMNodeList $childNodeList + * @param DOMNode $childNode + * @return int + */ + protected function _getSameNodesCount(DOMNodeList $childNodeList, DOMNode $childNode) + { + $childCount = 0; + foreach ($childNodeList as $oNode) { + if ($oNode->parentNode->isSameNode($childNode->parentNode)) { + $childCount++; + } + } + return $childCount; + } + + /** + * Get value of node without child nodes + * + * @param DOMNode $node + * @return array + */ + protected function _getSimpleNodeValue(DOMNode $node) + { + return (trim($node->nodeValue) !== '') ? array($node->nodeName => $node->nodeValue) : array(); + } + + /** + * Parse node attributes + * + * @param DOMNode $node + * @return array + */ + protected function _parseNodeAttributes(DOMNode $node) + { + $result = array(); + $attributes = array(); + if ($node->hasAttributes()) { + foreach ($node->attributes as $oAttrNode) { + $attributes[$oAttrNode->nodeName] = $oAttrNode->nodeValue; + } + } + + if (count($attributes)) { + $result = array('@attributes' => $attributes); + } + return $result; + } +} diff --git a/dev/tools/migration/System/Configuration/Reader.php b/dev/tools/migration/System/Configuration/Reader.php new file mode 100644 index 0000000000000000000000000000000000000000..9d857ea3ba9ef9290b14089ebbe2ac07b6985b12 --- /dev/null +++ b/dev/tools/migration/System/Configuration/Reader.php @@ -0,0 +1,111 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Magento + * @package tools + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +/** + * System configuration migration reader + */ +class Tools_Migration_System_Configuration_Reader +{ + /** + * @var Tools_Migration_System_FileManager + */ + protected $_fileManager; + + /** + * @var Tools_Migration_System_Configuration_Parser + */ + protected $_parser; + + /** + * @var Tools_Migration_System_Configuration_Mapper + */ + protected $_mapper; + + /** + * @var string base application path + */ + protected $_basePath; + + /** + * pattern to find all system.xml files + */ + CONST SYSTEM_CONFIG_PATH_PATTERN = 'app/code/*/*/*/etc/system.xml'; + + /** + * @param Tools_Migration_System_FileManager $fileManager + * @param Tools_Migration_System_Configuration_Parser $parser + * @param Tools_Migration_System_Configuration_Mapper $mapper + */ + public function __construct( + Tools_Migration_System_FileManager $fileManager, + Tools_Migration_System_Configuration_Parser $parser, + Tools_Migration_System_Configuration_Mapper $mapper + ) { + $this->_fileManager = $fileManager; + $this->_parser = $parser; + $this->_mapper = $mapper; + + $this->_basePath = realpath(dirname(__FILE__) . '/../../../../..'); + } + + /** + * Get configuration per file + * + * @return array + */ + public function getConfiguration() + { + $files = $this->_fileManager->getFileList( + $this->_basePath . DIRECTORY_SEPARATOR + . Tools_Migration_System_Configuration_Reader::SYSTEM_CONFIG_PATH_PATTERN + ); + $result = array(); + foreach ($files as $fileName) { + $result[$fileName] = $this->_mapper->transform( + $this->_parser->parse( + $this->_getDOMDocument( + $this->_fileManager->getContents($fileName) + ) + ) + ); + } + + return $result; + } + + /** + * Create Dom document from xml string + * + * @param $xml + * @return DOMDocument + */ + protected function _getDOMDocument($xml) + { + $dom = new DOMDocument(); + $dom->loadXML($xml); + return $dom; + } +} diff --git a/dev/tools/migration/System/FileManager.php b/dev/tools/migration/System/FileManager.php new file mode 100644 index 0000000000000000000000000000000000000000..e7c4ccb8cb96e70c5641c22120209c4ecf8aa583 --- /dev/null +++ b/dev/tools/migration/System/FileManager.php @@ -0,0 +1,92 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Magento + * @package tools + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +class Tools_Migration_System_FileManager +{ + /** + * @var Tools_Migration_System_FileReader + */ + protected $_reader; + + /** + * @var Tools_Migration_System_WriterInterface + */ + protected $_writer; + + + /** + * @param Tools_Migration_System_FileReader $reader + * @param Tools_Migration_System_WriterInterface $writer + */ + public function __construct( + Tools_Migration_System_FileReader $reader, + Tools_Migration_System_WriterInterface $writer + ) { + $this->_reader = $reader; + $this->_writer = $writer; + } + + /** + * @param string $fileName + * @param string $contents + */ + public function write($fileName, $contents) + { + $this->_writer->write($fileName, $contents); + } + + /** + * Remove file + * + * @param $fileName + */ + public function remove($fileName) + { + $this->_writer->remove($fileName); + } + + /** + * Retrieve contents of a file + * + * @param string $fileName + * @return string + */ + public function getContents($fileName) + { + return $this->_reader->getContents($fileName); + } + + /** + * Get file list + * + * @param string $pattern + * @return array + */ + public function getFileList($pattern) + { + return $this->_reader->getFileList($pattern); + } +} diff --git a/dev/tools/migration/System/FileReader.php b/dev/tools/migration/System/FileReader.php new file mode 100644 index 0000000000000000000000000000000000000000..8ca097a956bad9413b06be4ed86d62b6cfb02ad9 --- /dev/null +++ b/dev/tools/migration/System/FileReader.php @@ -0,0 +1,54 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Magento + * @package tools + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +class Tools_Migration_System_FileReader +{ + /** + * Retrieve contents of a file + * + * @param string $fileName + * @return string + * @throws InvalidArgumentException + */ + public function getContents($fileName) + { + if (false === file_exists($fileName)) { + throw new InvalidArgumentException($fileName . ' does not exist'); + } + return file_get_contents($fileName); + } + + /** + * Get file list + * + * @param string $pattern + * @return array + */ + public function getFileList($pattern) + { + return glob($pattern); + } +} diff --git a/dev/tools/migration/System/Writer/Factory.php b/dev/tools/migration/System/Writer/Factory.php new file mode 100644 index 0000000000000000000000000000000000000000..13be7b0f1874fc60a2d6ca9f30af0a2b5e9ccf16 --- /dev/null +++ b/dev/tools/migration/System/Writer/Factory.php @@ -0,0 +1,46 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Magento + * @package tools + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +class Tools_Migration_System_Writer_Factory +{ + /** + * @param string $type + * @return Tools_Migration_System_WriterInterface + */ + public function getWriter($type) + { + $writerClassName = null; + switch ($type) { + case 'write': + $writerClassName = 'Tools_Migration_System_Writer_FileSystem'; + break; + default: + $writerClassName = 'Tools_Migration_System_Writer_Memory'; + break; + } + return new $writerClassName(); + } +} diff --git a/dev/tools/migration/System/Writer/FileSystem.php b/dev/tools/migration/System/Writer/FileSystem.php new file mode 100644 index 0000000000000000000000000000000000000000..8f6214a7d9680adff0b470d21388570c6a94565b --- /dev/null +++ b/dev/tools/migration/System/Writer/FileSystem.php @@ -0,0 +1,50 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Magento + * @package tools + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +class Tools_Migration_System_Writer_FileSystem implements Tools_Migration_System_WriterInterface +{ + /** + * @param string $fileName + * @param string $contents + */ + public function write($fileName, $contents) + { + if (false == is_dir(dirname($fileName))) { + mkdir(dirname($fileName), 0777, true); + } + file_put_contents($fileName, $contents); + } + + /** + * Remove file + * + * @param $fileName + */ + public function remove($fileName) + { + unlink($fileName); + } +} diff --git a/dev/tools/migration/System/Writer/Memory.php b/dev/tools/migration/System/Writer/Memory.php new file mode 100644 index 0000000000000000000000000000000000000000..b103dc3b65f630d4d0242fba5bf67b5f16545f98 --- /dev/null +++ b/dev/tools/migration/System/Writer/Memory.php @@ -0,0 +1,47 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Magento + * @package tools + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +class Tools_Migration_System_Writer_Memory implements Tools_Migration_System_WriterInterface +{ + /** + * @param string $fileName + * @param string $contents + */ + public function write($fileName, $contents) + { + + } + + /** + * Remove file + * + * @param $fileName + */ + public function remove($fileName) + { + + } +} diff --git a/app/code/core/Mage/Admin/Helper/Data.php b/dev/tools/migration/System/WriterInterface.php similarity index 60% rename from app/code/core/Mage/Admin/Helper/Data.php rename to dev/tools/migration/System/WriterInterface.php index 24f3396f0baf0e65f0c3c0da3373b6773993196d..fe4f706f920f640ca7df90a53f7591bfd8e3704a 100644 --- a/app/code/core/Mage/Admin/Helper/Data.php +++ b/dev/tools/migration/System/WriterInterface.php @@ -18,22 +18,24 @@ * 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_Customer - * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @category Magento + * @package tools + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** - * Admin Data Helper - * - * @category Mage - * @package Mage_Admin - * @author Magento Core Team <core@magentocommerce.com> - * @deprecated Moved to Mage_Backend - * @see Mage_User_Helper_Data - */ -class Mage_Admin_Helper_Data extends Mage_Core_Helper_Abstract +interface Tools_Migration_System_WriterInterface { + /** + * @param string $fileName + * @param string $contents + */ + public function write($fileName, $contents); + /** + * Remove file + * + * @param $fileName + */ + public function remove($fileName); } diff --git a/dev/tools/migration/system_config.php b/dev/tools/migration/system_config.php new file mode 100644 index 0000000000000000000000000000000000000000..bfc95f223002cd1c5f5b40d98d58ed0f1662dab9 --- /dev/null +++ b/dev/tools/migration/system_config.php @@ -0,0 +1,77 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Tools + * @package system_configuration + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +$rootDir = realpath(__DIR__ . '../../../..'); +require_once $rootDir . '/lib/Magento/Autoload.php'; +$paths[] = $rootDir . '/lib'; +$paths[] = $rootDir . '/dev'; +Magento_Autoload::getInstance()->addIncludePath($paths); +$defaultReportFile = 'report.log'; + +try { + $options = new Zend_Console_Getopt(array( + 'mode|w' => "Application mode. Preview mode is default. If set to 'write' - file system is updated", + 'output|f-w' => "Report output type. Report is flushed to console by default." + . "If set to 'file', report is written to file /log/report.log", + )); + + $writerFactory = new Tools_Migration_System_Writer_Factory(); + + $fileManager = new Tools_Migration_System_FileManager(new Tools_Migration_System_FileReader(), + $writerFactory->getWriter($options->getOption('mode')) + ); + + $loggerFactory = new Tools_Migration_System_Configuration_Logger_Factory(); + $logger = $loggerFactory->getLogger($options->getOption('output'), $defaultReportFile, $fileManager); + + $generator = new Tools_Migration_System_Configuration_Generator( + new Tools_Migration_System_Configuration_Formatter(), + $fileManager, + $logger + ); + + $fieldMapper = new Tools_Migration_System_Configuration_Mapper_Field(); + $groupMapper = new Tools_Migration_System_Configuration_Mapper_Group($fieldMapper); + $sectionMapper = new Tools_Migration_System_Configuration_Mapper_Section($groupMapper); + $tabMapper = new Tools_Migration_System_Configuration_Mapper_Tab(); + $mapper = new Tools_Migration_System_Configuration_Mapper($tabMapper, $sectionMapper); + + $parser = new Tools_Migration_System_Configuration_Parser(); + $reader = new Tools_Migration_System_Configuration_Reader($fileManager, $parser, $mapper); + + foreach ($reader->getConfiguration() as $file => $config) { + $generator->createConfiguration($file, $config); + $fileManager->remove($file); + } + $logger->report(); +} catch (Zend_Console_Getopt_Exception $e) { + echo $e->getUsageMessage(); + exit; +} catch (InvalidArgumentException $exp) { + echo $exp->getMessage(); +} catch (Exception $exp) { + echo $exp->getMessage(); +} diff --git a/downloader/Maged/Controller.php b/downloader/Maged/Controller.php index b80f277ec897c763a964067d56569498c37d4e35..8e8c115770365316877e9d0619601945c6e5b46a 100755 --- a/downloader/Maged/Controller.php +++ b/downloader/Maged/Controller.php @@ -506,7 +506,7 @@ final class Maged_Controller if (self::$_instance->isDownloaded() && self::$_instance->isInstalled()) { Mage::app('', 'store', array('global_ban_use_cache'=>true)); - Mage::getSingleton('Mage_Adminhtml_Model_Url')->turnOffSecretKey(); + Mage::getSingleton('Mage_Backend_Model_Url')->turnOffSecretKey(); } } return self::$_instance; diff --git a/downloader/target.xml b/downloader/target.xml index 55d4c97f2f5bd5372e8a38408f8431111f2540aa..a722a45bd320e6bbf81322e32f4551e59791ebe7 100644 --- a/downloader/target.xml +++ b/downloader/target.xml @@ -34,8 +34,7 @@ <target name="magelib" label="Magento PHP Library file" uri="./lib" /> <target name="magelocale" label="Magento Locale language file" uri="./app/locale" /> <target name="magemedia" label="Magento Media library" uri="./media" /> - <target name="mageskin" label="Magento Theme Skin (Images, CSS, JS)" uri="./skin" /> <target name="mageweb" label="Magento Other web accessible file" uri="." /> <target name="magetest" label="Magento PHPUnit test" uri="./tests" /> <target name="mage" label="Magento other" uri="." /> - </targets> \ No newline at end of file + </targets> diff --git a/lib/Mage/Xml/Parser.php b/lib/Mage/Xml/Parser.php index f4937f52ac2c9594c36cdb5743e3e41aba8db3f8..a9b8dde193054795bd1662de22072a4a9990ba10 100644 --- a/lib/Mage/Xml/Parser.php +++ b/lib/Mage/Xml/Parser.php @@ -113,4 +113,4 @@ class Mage_Xml_Parser return $this; } -} \ No newline at end of file +} diff --git a/lib/Magento/Config/XmlAbstract.php b/lib/Magento/Config/XmlAbstract.php index 7c2c577bdd371a9f1c15f74bf6fd0a137caa6ae2..ab0a5d8741440f127bf422c76779850ede26a134 100644 --- a/lib/Magento/Config/XmlAbstract.php +++ b/lib/Magento/Config/XmlAbstract.php @@ -64,6 +64,16 @@ abstract class Magento_Config_XmlAbstract */ abstract public function getSchemaFile(); + /** + * Get absolute path to per-file XML-schema file + * + * @return string + */ + public function getPerFileSchemaFile() + { + return null; + } + /** * Extract configuration data from the DOM structure * @@ -90,6 +100,9 @@ abstract class Magento_Config_XmlAbstract $this->_performValidate($file); } } + if ($this->_isRuntimeValidated()) { + $this->_performValidate(); + } return $this->_getDomConfigModel()->getDom(); } @@ -101,7 +114,11 @@ abstract class Magento_Config_XmlAbstract */ protected function _performValidate($file = null) { - if (!$this->_getDomConfigModel()->validate($this->getSchemaFile(), $errors)) { + $schemaFile = $this->getSchemaFile(); + if ($file) { + $schemaFile = $this->getPerFileSchemaFile() ? $this->getPerFileSchemaFile() : $schemaFile; + } + if (!$this->_getDomConfigModel()->validate($schemaFile, $errors)) { $message = is_null($file) ? "Invalid Document \n" : "Invalid XML-file: {$file}\n"; /** @var libXMLError $error */ foreach ($errors as $error) { @@ -146,4 +163,14 @@ abstract class Magento_Config_XmlAbstract * @return array */ abstract protected function _getIdAttributes(); + + /** + * Serialize configuration data + * + * @return array + */ + public function __sleep() + { + return array('_data'); + } } diff --git a/lib/Magento/Di.php b/lib/Magento/Di.php index 9919b0ee564ebb3ee27edc7f20e30923c87ece3d..add976a777f804711d853eb3fbbe159f1aa43c7a 100644 --- a/lib/Magento/Di.php +++ b/lib/Magento/Di.php @@ -25,13 +25,16 @@ */ use Zend\Di\Exception; - +/** + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @todo Need decrease ExcessiveClassComplexity of this class, it will be implemented in MAGETWO-3861 + */ class Magento_Di extends Zend\Di\Di { /** * @var array */ - protected $_cachedInstances; + protected $_cachedInstances = array(); /** * @var array @@ -64,51 +67,38 @@ class Magento_Di extends Zend\Di\Di if (!$this->definitions()->hasClass($name)) { array_push($this->instanceContext, array('NEW', $name, $name)); - if (!$this->_cachedInstances) { - $this->_cachedInstances = array( - 'eventManager' => $this->get('Mage_Core_Model_Event_Manager'), - 'cache' => $this->get('Mage_Core_Model_Cache'), - ); + if ($this->_isArrayHasDataKey($parameters)) { + $parameters = reset($parameters); } + if (preg_match('/\w*_\w*\_Model/', $name)) { $instance = new $name( - $this->_cachedInstances['eventManager'], - $this->_cachedInstances['cache'], + $this->_getCachedDependency('Mage_Core_Model_Event_Manager'), + $this->_getCachedDependency('Mage_Core_Model_Cache'), null, null, $parameters ); } else if (preg_match('/\w*_\w*\_Block/', $name)) { - if (!isset($this->_cachedInstances['request'])) { - $this->_cachedInstances['request'] = $this->get('Mage_Core_Controller_Request_Http'); - $this->_cachedInstances['layout'] = $this->get('Mage_Core_Model_Layout'); - $this->_cachedInstances['translate'] = $this->get('Mage_Core_Model_Translate'); - $this->_cachedInstances['design'] = $this->get('Mage_Core_Model_Design_Package'); - $this->_cachedInstances['session'] = $this->get('Mage_Core_Model_Session'); - $this->_cachedInstances['storeConfig'] = $this->get('Mage_Core_Model_Store_Config'); - $this->_cachedInstances['frontController'] = $this->get('Mage_Core_Controller_Varien_Front'); - } $instance = new $name( - $this->_cachedInstances['request'], - $this->_cachedInstances['layout'], - $this->_cachedInstances['eventManager'], - $this->_cachedInstances['translate'], - $this->_cachedInstances['cache'], - $this->_cachedInstances['design'], - $this->_cachedInstances['session'], - $this->_cachedInstances['storeConfig'], - $this->_cachedInstances['frontController'], + $this->_getCachedDependency('Mage_Core_Controller_Request_Http'), + $this->_getCachedDependency('Mage_Core_Model_Layout'), + $this->_getCachedDependency('Mage_Core_Model_Event_Manager'), + $this->_getCachedDependency('Mage_Core_Model_Url'), + $this->_getCachedDependency('Mage_Core_Model_Translate'), + $this->_getCachedDependency('Mage_Core_Model_Cache'), + $this->_getCachedDependency('Mage_Core_Model_Design_Package'), + $this->_getCachedDependency('Mage_Core_Model_Session'), + $this->_getCachedDependency('Mage_Core_Model_Store_Config'), + $this->_getCachedDependency('Mage_Core_Controller_Varien_Front'), + $this->_getCachedDependency('Mage_Core_Model_Factory_Helper'), $parameters ); } else { $instance = new $name(); } if ($isShared) { - if ($parameters) { - $this->instanceManager->addSharedInstanceWithParameters($instance, $name, $parameters); - } else { - $this->instanceManager->addSharedInstance($instance, $name); - } + $this->_addSharedInstance($instance, $name, $parameters); } array_pop($this->instanceContext); return $instance; @@ -157,17 +147,59 @@ class Magento_Di extends Zend\Di\Di } if ($isShared) { - if ($parameters) { - $this->instanceManager->addSharedInstanceWithParameters($instance, $name, $parameters); - } else { - $this->instanceManager->addSharedInstance($instance, $name); - } + $this->_addSharedInstance($instance, $name, $parameters); } array_pop($this->instanceContext); return $instance; } + /** + * Check is array has 'data' key + * Function used to provide possibility to use old and new format of params array, when new model instantiated + * + * @param $array + * @return bool + */ + protected function _isArrayHasDataKey($array) + { + return (count($array) == 1) && array_key_exists('data', $array); + } + + /** + * Add shared instance to instance manager + * + * @param object $instance + * @param string $name + * @param array $parameters + * @return Magento_Di + */ + protected function _addSharedInstance($instance, $name, array $parameters = array()) + { + if ($parameters) { + $this->instanceManager->addSharedInstanceWithParameters($instance, $name, $parameters); + } else { + $this->instanceManager->addSharedInstance($instance, $name); + } + + return $this; + } + + /** + * Retrieve cached object + * + * @param string $className + * @return mixed + */ + protected function _getCachedDependency($className) + { + if (!isset($this->_cachedInstances[$className])) { + $this->_cachedInstances[$className] = $this->get($className); + } + + return $this->_cachedInstances[$className]; + } + /** * Retrieve a class instance based on class name * diff --git a/lib/Varien/Data/Collection/Factory.php b/lib/Varien/Data/Collection/Factory.php new file mode 100644 index 0000000000000000000000000000000000000000..c009ccf67163bc41940cbebcedc1d84705855b23 --- /dev/null +++ b/lib/Varien/Data/Collection/Factory.php @@ -0,0 +1,38 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Varien + * @package Varien_Data + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +class Varien_Data_Collection_Factory +{ + /** + * Create data collection instance + * + * @return Varien_Data_Collection + */ + public function create() + { + return new Varien_Data_Collection(); + } +} diff --git a/lib/Varien/Data/Form/Element/Multiselect.php b/lib/Varien/Data/Form/Element/Multiselect.php index a4b0b168eaf488b838c8e7bf7b22d6ef611fd162..d183bcd390a830117483ddee0a5c29bc3b9c49d5 100644 --- a/lib/Varien/Data/Form/Element/Multiselect.php +++ b/lib/Varien/Data/Form/Element/Multiselect.php @@ -54,7 +54,7 @@ class Varien_Data_Form_Element_Multiselect extends Varien_Data_Form_Element_Abst { $this->addClass('select multiselect'); $html = ''; - if ($this->getCanBeEmpty() && empty($this->_data['disabled'])) { + if ($this->getCanBeEmpty()) { $html .= '<input type="hidden" name="' . parent::getName() . '" value="" />'; } $html .= '<select id="' . $this->getHtmlId() . '" name="' . $this->getName() . '" ' . diff --git a/lib/Varien/Data/Form/Factory.php b/lib/Varien/Data/Form/Factory.php new file mode 100644 index 0000000000000000000000000000000000000000..fd3849e8c75f00f7d8384f20d6400e0d5ff91eed --- /dev/null +++ b/lib/Varien/Data/Form/Factory.php @@ -0,0 +1,40 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Varien + * @package Varien_Data + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + + +class Varien_Data_Form_Factory +{ + /** + * Create varien data form with provided params + * + * @param array $data + * @return Varien_Data_Form + */ + public function create(array $data = array()) + { + return new Varien_Data_Form($data); + } +} diff --git a/lib/Varien/Object/Factory.php b/lib/Varien/Object/Factory.php new file mode 100644 index 0000000000000000000000000000000000000000..430d9e5398d3221dbea7d25a5c752926479c4eb4 --- /dev/null +++ b/lib/Varien/Object/Factory.php @@ -0,0 +1,40 @@ +<?php +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Open Software License (OSL 3.0) + * that is bundled with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/osl-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 Varien + * @package Varien_Object + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + + +class Varien_Object_Factory +{ + /** + * Create varien object with provided params + * + * @param array $data + * @return Varien_Object + */ + public function create(array $data = array()) + { + return new Varien_Object($data); + } +} diff --git a/lib/Varien/Simplexml/Config.php b/lib/Varien/Simplexml/Config.php index 1e67925df12e66ee609ac2e81c089a74601a71dd..e5be15de12c2797f2aef6785a47dad6ec1e013bb 100644 --- a/lib/Varien/Simplexml/Config.php +++ b/lib/Varien/Simplexml/Config.php @@ -601,4 +601,14 @@ class Varien_Simplexml_Config return $this; } + /** + * Cleanup circular references + * + * Destructor should be called explicitly in order to work around the PHP bug + * https://bugs.php.net/bug.php?id=62468 + */ + public function __destruct() + { + $this->_xml = null; + } } diff --git a/pub/errors/default/page.phtml b/pub/errors/default/page.phtml index db6a89e5325447262ad789f3824520b61fb6238e..802653cbfebecbd798ba8249531b2e4a2c6d475b 100644 --- a/pub/errors/default/page.phtml +++ b/pub/errors/default/page.phtml @@ -28,7 +28,7 @@ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title><?php echo $this->pageTitle?></title> -<base href="<?php echo $this->getSkinUrl()?>" /> +<base href="<?php echo $this->getViewFileUrl()?>" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="description" content="" /> <meta name="keywords" content="" /> diff --git a/pub/errors/processor.php b/pub/errors/processor.php index 43ed0ef1f0fb53e4a8a6a61f8831c8bfcb15255f..2b00314588eb4fed447dcf8a713b3964d7160977 100644 --- a/pub/errors/processor.php +++ b/pub/errors/processor.php @@ -208,7 +208,7 @@ class Error_Processor * * @return string */ - public function getSkinUrl() + public function getViewFileUrl() { return $this->getBaseUrl() . self::ERROR_DIR. '/' . $this->_config->skin . '/'; } diff --git a/pub/lib/mage/backend/ajax-setup.js b/pub/lib/mage/backend/ajax-setup.js index 475fe33ff83e9abbff5987330998c8f41c52740a..d4e24bfecd53f8f5d0542216d415f5c9b5311be2 100644 --- a/pub/lib/mage/backend/ajax-setup.js +++ b/pub/lib/mage/backend/ajax-setup.js @@ -49,7 +49,7 @@ }); } else { if (!settings.data) { - this.options.data = { + settings.data = { form_key: FORM_KEY }; } diff --git a/pub/lib/mage/backend/editablemultiselect.js b/pub/lib/mage/backend/editablemultiselect.js index 951fd89f88a639344f5668597421ecf6662ca15e..b111b2903e2bcef22596f707c3283d731f200430 100644 --- a/pub/lib/mage/backend/editablemultiselect.js +++ b/pub/lib/mage/backend/editablemultiselect.js @@ -124,9 +124,9 @@ */ EditableMultiselect.prototype.makeMultiselectEditable = function() { var entityIdName = this.entityIdName, - entityValueName = this.entityValueName; - - $('.mselect-list-item:not(.mselect-list-item-not-editable) label span').editable(this.saveUrl, + entityValueName = this.entityValueName, + selectList = $('#' + this.targetSelectId).next(); + selectList.find('.mselect-list-item:not(.mselect-list-item-not-editable) label span').editable(this.saveUrl, { type: 'text', submit: '<button class="mselect-save" title="Save" type="submit" />', diff --git a/pub/lib/mage/loader.js b/pub/lib/mage/loader.js index 4b6f608d637fe3009897e5fcbfde487a10dd7b55..4e471b6581667abdce35ee45152806f84275aba8 100644 --- a/pub/lib/mage/loader.js +++ b/pub/lib/mage/loader.js @@ -105,7 +105,9 @@ }); $(document).ready(function(){ $('body').on('ajaxSend', function(e){ - $(e.target).loader().loader('show'); + $(e.target).loader({ + icon: $('#loading_mask_loader img').attr('src') + }).loader('show'); }); }); })(jQuery);