diff --git a/LICENSE_AFL.txt b/LICENSE_AFL.txt new file mode 100644 index 00000000..f3144bd4 --- /dev/null +++ b/LICENSE_AFL.txt @@ -0,0 +1,48 @@ + +Academic Free License ("AFL") v. 3.0 + +This Academic Free License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following licensing notice adjacent to the copyright notice for the Original Work: + +Licensed under the Academic Free License version 3.0 + + 1. Grant of Copyright License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, for the duration of the copyright, to do the following: + + 1. to reproduce the Original Work in copies, either alone or as part of a collective work; + + 2. to translate, adapt, alter, transform, modify, or arrange the Original Work, thereby creating derivative works ("Derivative Works") based upon the Original Work; + + 3. to distribute or communicate copies of the Original Work and Derivative Works to the public, under any license of your choice that does not contradict the terms and conditions, including Licensor's reserved rights and remedies, in this Academic Free License; + + 4. to perform the Original Work publicly; and + + 5. to display the Original Work publicly. + + 2. Grant of Patent License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, for the duration of the patents, to make, use, sell, offer for sale, have made, and import the Original Work and Derivative Works. + + 3. Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work. + + 4. Exclusions From License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior permission of the Licensor. Except as expressly stated herein, nothing in this License grants any license to Licensor's trademarks, copyrights, patents, trade secrets or any other intellectual property. No patent license is granted to make, use, sell, offer for sale, have made, or import embodiments of any patent claims other than the licensed claims defined in Section 2. No license is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under terms different from this License any Original Work that Licensor otherwise would have a right to license. + + 5. External Deployment. The term "External Deployment" means the use, distribution, or communication of the Original Work or Derivative Works in any way such that the Original Work or Derivative Works may be used by anyone other than You, whether those works are distributed or communicated to those persons or made available as an application intended for use over a network. As an express condition for the grants of license hereunder, You must treat any External Deployment by You of the Original Work or a Derivative Work as a distribution under section 1(c). + + 6. Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent, or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work. + + 7. Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights. Except as expressly stated in the immediately preceding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of non-infringement, merchantability or fitness for a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to the Original Work is granted by this License except under this disclaimer. + + 8. Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to anyone for any indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to the extent applicable law prohibits such limitation. + + 9. Acceptance and Termination. If, at any time, You expressly assented to this License, that assent indicates your clear and irrevocable acceptance of this License and all of its terms and conditions. If You distribute or communicate copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. This License conditions your rights to undertake the activities listed in Section 1, including your right to create Derivative Works based upon the Original Work, and doing so without honoring these terms and conditions is prohibited by copyright law and international treaty. Nothing in this License is intended to affect copyright exceptions and limitations (including "fair use" or "fair dealing"). This License shall terminate immediately and You may no longer exercise any of the rights granted to You by this License upon your failure to honor the conditions in Section 1(c). + + 10. Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, against Licensor or any licensee alleging that the Original Work infringes a patent. This termination provision shall not apply for an action alleging patent infringement by combinations of the Original Work with other software or hardware. + + 11. Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of copyright or patent law in the appropriate jurisdiction. This section shall survive the termination of this License. + + 12. Attorneys' Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License. + + 13. Miscellaneous. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. + + 14. Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + + 15. Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You. + + 16. Modification of This License. This License is Copyright © 2005 Lawrence Rosen. Permission is granted to copy, distribute, or communicate this License without modification. Nothing in this License permits You to modify this License as applied to the Original Work or to Derivative Works. However, You may modify the text of this License and copy, distribute or communicate your modified version (the "Modified License") and apply it to other original works of authorship subject to the following conditions: (i) You may not indicate in any way that your Modified License is the "Academic Free License" or "AFL" and you may not use those names in the name of your Modified License; (ii) You must replace the notice specified in the first paragraph above with the notice "Licensed under " or with a notice of your own that is not confusingly similar to the notice in this License; and (iii) You may not claim that your original works are open source software unless your Modified License has been approved by Open Source Initiative (OSI) and You comply with its license review and certification process. \ No newline at end of file diff --git a/app/Mage.php b/app/Mage.php index fc2ffd8f..2ad46367 100644 --- a/app/Mage.php +++ b/app/Mage.php @@ -82,7 +82,7 @@ final class Mage { public static function getVersion() { - return '1.1.6'; + return '1.1.7'; } /** @@ -449,6 +449,10 @@ public static function run($code = '', $type = 'store', $options=array()) Varien_Profiler::stop('app'); } + catch (Mage_Core_Model_Session_Exception $e) { + header('Location: ' . Mage::getBaseUrl()); + die(); + } catch (Mage_Core_Model_Store_Exception $e) { $baseUrl = rtrim(dirname($_SERVER['SCRIPT_NAME']), '/'); header('Location: ' . $baseUrl.'/404/'); @@ -598,7 +602,7 @@ public static function printException(Exception $e, $extra = '') } catch (Exception $e) {} - $baseUrl = rtrim(dirname($_SERVER['SCRIPT_NAME']), '/'); + $baseUrl = rtrim(str_replace('\\', '/', dirname($_SERVER['SCRIPT_NAME'])), '/'); $reportUrl = $baseUrl . '/report/?id=' . $reportId . '&s=' . $storeCode; diff --git a/app/code/core/Mage/Admin/etc/admin.xml b/app/code/core/Mage/Admin/etc/admin.xml index d9cb5503..a89ac2a0 100644 --- a/app/code/core/Mage/Admin/etc/admin.xml +++ b/app/code/core/Mage/Admin/etc/admin.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Admin * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Admin/etc/config.xml b/app/code/core/Mage/Admin/etc/config.xml index 3e04ded5..57c90f8e 100644 --- a/app/code/core/Mage/Admin/etc/config.xml +++ b/app/code/core/Mage/Admin/etc/config.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Admin * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/AdminNotification/etc/config.xml b/app/code/core/Mage/AdminNotification/etc/config.xml index 12e87901..f2372766 100644 --- a/app/code/core/Mage/AdminNotification/etc/config.xml +++ b/app/code/core/Mage/AdminNotification/etc/config.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_ProductAlert * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/AdminNotification/etc/system.xml b/app/code/core/Mage/AdminNotification/etc/system.xml index 692ee5cc..b82e372e 100644 --- a/app/code/core/Mage/AdminNotification/etc/system.xml +++ b/app/code/core/Mage/AdminNotification/etc/system.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_ProductAlert * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Adminhtml/Block/Api/User/Grid.php b/app/code/core/Mage/Adminhtml/Block/Api/User/Grid.php index f138debd..71738c6d 100644 --- a/app/code/core/Mage/Adminhtml/Block/Api/User/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Api/User/Grid.php @@ -52,7 +52,7 @@ protected function _prepareCollection() protected function _prepareColumns() { - $this->addColumn('id', array( + $this->addColumn('user_id', array( 'header' => Mage::helper('adminhtml')->__('ID'), 'width' => 5, 'align' => 'right', diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Edit.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Edit.php index 392acddd..f0d49906 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Edit.php @@ -42,4 +42,14 @@ public function __construct() parent::__construct(); $this->setTemplate('catalog/category/edit.phtml'); } + + protected function _prepareLayout() + { + if (Mage::app()->getConfig()->getModuleConfig('Mage_GoogleOptimizer')->is('active', true)) { + $this->setChild('googleoptimizer_js', + $this->getLayout()->createBlock('googleoptimizer/js')->setTemplate('googleoptimizer/js.phtml') + ); + } + return parent::_prepareLayout(); + } } diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tab/Product.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tab/Product.php index fa85b208..cf87ba20 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tab/Product.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tab/Product.php @@ -38,7 +38,7 @@ public function __construct() { parent::__construct(); $this->setId('catalog_category_products'); - $this->setDefaultSort('id'); + $this->setDefaultSort('entity_id'); $this->setUseAjax(true); } @@ -99,7 +99,7 @@ protected function _prepareColumns() 'align' => 'center', 'index' => 'entity_id' )); - $this->addColumn('id', array( + $this->addColumn('entity_id', array( 'header' => Mage::helper('catalog')->__('ID'), 'sortable' => true, 'width' => '60', diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tabs.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tabs.php index 2800b248..48f17f51 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tabs.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tabs.php @@ -61,6 +61,13 @@ protected function _prepareLayout() 'label' => Mage::helper('catalog')->__('Custom Design'), 'content' => $this->getLayout()->createBlock('adminhtml/catalog_category_tab_design')->toHtml(), )); + if (Mage::app()->getConfig()->getModuleConfig('Mage_GoogleOptimizer')->is('active', true) + && Mage::helper('googleoptimizer')->isOptimizerActive()) { + $this->addTab('googleoptimizer', array( + 'label' => Mage::helper('googleoptimizer')->__('Category View Optimization'), + 'content' => $this->getLayout()->createBlock('googleoptimizer/adminhtml_catalog_category_edit_tab_googleoptimizer')->toHtml(), + )); + } /*$this->addTab('features', array( 'label' => Mage::helper('catalog')->__('Feature Products'), 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 e8fc5fbb..87e08d66 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tree.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tree.php @@ -50,6 +50,7 @@ protected function _prepareLayout() $addUrl = $this->getUrl("*/*/add", array( '_current'=>true, 'id'=>null, + '_query' => false )); $this->setChild('add_sub_button', @@ -66,7 +67,8 @@ protected function _prepareLayout() ->setData(array( 'label' => Mage::helper('catalog')->__('Add Root Category'), 'onclick' => "addNew('".$addUrl."', true)", - 'class' => 'add' + 'class' => 'add', + 'id' => 'add_root_category_button' )) ); diff --git a/skin/frontend/default/default/css/styles.css b/app/code/core/Mage/Adminhtml/Block/Catalog/Form/Renderer/Googleoptimizer/Import.php similarity index 50% rename from skin/frontend/default/default/css/styles.css rename to app/code/core/Mage/Adminhtml/Block/Catalog/Form/Renderer/Googleoptimizer/Import.php index 4bb90a95..32c62579 100644 --- a/skin/frontend/default/default/css/styles.css +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Form/Renderer/Googleoptimizer/Import.php @@ -1,3 +1,4 @@ + + */ +class Mage_Adminhtml_Block_Catalog_Form_Renderer_Googleoptimizer_Import extends Mage_Adminhtml_Block_Widget_Form_Renderer_Fieldset_Element +{ + public function __construct() + { + $this->setTemplate('catalog/form/renderer/googleoptimizer/import.phtml'); + } + + public function render(Varien_Data_Form_Element_Abstract $element) + { + $this->setElement($element); + return $this->toHtml(); + } + + public function setElement(Varien_Data_Form_Element_Abstract $element) + { + $this->_element = $element; + return $this; + } + + public function getElement() + { + return $this->_element; + } + + protected function _prepareLayout() + { + } +} \ No newline at end of file diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit.php index 99a17a57..7a75f02e 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit.php @@ -56,6 +56,15 @@ public function __construct() } $this->_updateButton('save', 'label', Mage::helper('catalog')->__('Save Attribute')); + $this->_addButton( + 'save_and_edit_button', + array( + 'label' => Mage::helper('catalog')->__('Save And Continue Edit'), + 'onclick' => 'saveAndContinueEdit()', + 'class' => 'save' + ), + 100 + ); if (! Mage::registry('entity_attribute')->getIsUserDefined()) { $this->_removeButton('delete'); @@ -81,6 +90,6 @@ public function getValidationUrl() public function getSaveUrl() { - return $this->getUrl('*/'.$this->_controller.'/save', array('_current'=>true)); + return $this->getUrl('*/'.$this->_controller.'/save', array('_current'=>true, 'back'=>null)); } } diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Tab/Front.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Tab/Front.php index 2c4ff9ac..b921517e 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Tab/Front.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Tab/Front.php @@ -87,14 +87,14 @@ protected function _prepareForm() ), )); - if ($model->getIsUserDefined() || !$model->getId()) { +// if ($model->getIsUserDefined() || !$model->getId()) { $fieldset->addField('is_visible_on_front', 'select', array( 'name' => 'is_visible_on_front', 'label' => Mage::helper('catalog')->__('Visible on Catalog Pages on Front-end'), 'title' => Mage::helper('catalog')->__('Visible on Catalog Pages on Front-end'), 'values' => $yesno, )); - } +// } $form->setValues($model->getData()); 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 b920c90a..224d95d0 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 @@ -163,12 +163,14 @@ protected function _prepareForm() 'value' => $model->getDefaultValue(), )); + $dateFormatIso = Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT); $fieldset->addField('default_value_date', 'date', array( - 'name' => 'default_value_date', - 'label' => Mage::helper('catalog')->__('Default value'), - 'title' => Mage::helper('catalog')->__('Default value'), - 'image' => $this->getSkinUrl('images/grid-cal.gif'), - 'value' => $model->getDefaultValue(), + 'name' => 'default_value_date', + 'label' => Mage::helper('catalog')->__('Default value'), + 'title' => Mage::helper('catalog')->__('Default value'), + 'image' => $this->getSkinUrl('images/grid-cal.gif'), + 'value' => $model->getDefaultValue(), + 'format' => $dateFormatIso )); $fieldset->addField('default_value_textarea', 'textarea', array( @@ -299,14 +301,14 @@ protected function _prepareForm() 'class' => 'validate-digits', )); - if ($model->getIsUserDefined() || !$model->getId()) { +// if ($model->getIsUserDefined() || !$model->getId()) { $fieldset->addField('is_visible_on_front', 'select', array( 'name' => 'is_visible_on_front', 'label' => Mage::helper('catalog')->__('Visible on Catalog Pages on Front-end'), 'title' => Mage::helper('catalog')->__('Visible on Catalog Pages on Front-end'), 'values' => $yesno, )); - } +// } if ($model->getId()) { diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit.php index ff148e0a..fe614c56 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit.php @@ -94,7 +94,7 @@ protected function _prepareLayout() $this->getLayout()->createBlock('adminhtml/widget_button') ->setData(array( 'label' => Mage::helper('catalog')->__('Save And Continue Edit'), - 'onclick' => 'saveAndContinueEdit()', + 'onclick' => 'saveAndContinueEdit(\''.$this->getSaveAndContinueUrl().'\')', 'class' => 'save' )) ); @@ -162,6 +162,15 @@ public function getSaveUrl() return $this->getUrl('*/*/save', array('_current'=>true, 'back'=>null)); } + public function getSaveAndContinueUrl() + { + return $this->getUrl('*/*/save', array( + '_current' => true, + 'back' => 'edit', + 'tab' => '{{tab_id}}' + )); + } + public function getProductId() { return $this->getProduct()->getId(); diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute.php index 07d1a920..dfecc6f5 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute.php @@ -101,7 +101,7 @@ public function getSaveButtonHtml() public function getSaveUrl() { - return $this->getUrl('*/*/save'); + return $this->getUrl('*/*/save', array('store'=>Mage::helper('adminhtml/catalog_product_edit_action_attribute')->getSelectedStoreId())); } } diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute/Tab/Inventory.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute/Tab/Inventory.php index 7480e3b6..d31ab9fe 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute/Tab/Inventory.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute/Tab/Inventory.php @@ -74,7 +74,7 @@ public function getStoreId() */ public function getDefaultConfigValue($field) { - return Mage::getStoreConfig('cataloginventory/options/'.$field, $this->getStoreId()); + return Mage::getStoreConfig(Mage_CatalogInventory_Model_Stock_Item::XML_PATH_ITEM . $field, $this->getStoreId()); } /** diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Crosssell.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Crosssell.php index f045e219..84149197 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Crosssell.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Crosssell.php @@ -37,7 +37,7 @@ public function __construct() { parent::__construct(); $this->setId('cross_sell_product_grid'); - $this->setDefaultSort('id'); + $this->setDefaultSort('entity_id'); $this->setUseAjax(true); if ($this->_getProduct()->getId()) { $this->setDefaultFilter(array('in_products'=>1)); @@ -99,7 +99,7 @@ protected function _prepareColumns() 'index' => 'entity_id' )); - $this->addColumn('id', array( + $this->addColumn('entity_id', array( 'header' => Mage::helper('catalog')->__('ID'), 'sortable' => true, 'width' => '60px', diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Inventory.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Inventory.php index a64a6bbe..06a09118 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Inventory.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Inventory.php @@ -47,6 +47,11 @@ public function getProduct() return Mage::registry('product'); } + /** + * Retrieve Catalog Inventory Stock Item Model + * + * @return Mage_CatalogInventory_Model_Stock_Item + */ public function getStockItem() { return Mage::registry('product')->getStockItem(); @@ -60,10 +65,10 @@ public function isConfigurable() public function getFieldValue($field) { if ($this->getStockItem()) { - return $this->getStockItem()->getData($field); + return $this->getStockItem()->getDataUsingMethod($field); } - return Mage::getStoreConfig('cataloginventory/options/'.$field); + return Mage::getStoreConfig(Mage_CatalogInventory_Model_Stock_Item::XML_PATH_ITEM . $field); } public function getConfigFieldValue($field) @@ -74,12 +79,12 @@ public function getConfigFieldValue($field) } } - return Mage::getStoreConfig('cataloginventory/options/'.$field); + return Mage::getStoreConfig(Mage_CatalogInventory_Model_Stock_Item::XML_PATH_ITEM . $field); } public function getDefaultConfigValue($field) { - return Mage::getStoreConfig('cataloginventory/options/'.$field); + return Mage::getStoreConfig(Mage_CatalogInventory_Model_Stock_Item::XML_PATH_ITEM . $field); } public function isNew() 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 2deb6207..7ed2cf4c 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 @@ -106,33 +106,15 @@ protected function _prepareLayout() )) ); - //text - $this->setChild('text_option_type', - $this->getLayout()->createBlock( - 'adminhtml/catalog_product_edit_tab_options_type_text' - ) - ); - - //file - $this->setChild('file_option_type', - $this->getLayout()->createBlock( - 'adminhtml/catalog_product_edit_tab_options_type_file' - ) - ); - - //select - $this->setChild('select_option_type', - $this->getLayout()->createBlock( - 'adminhtml/catalog_product_edit_tab_options_type_select' - ) - ); - - //date - $this->setChild('date_option_type', - $this->getLayout()->createBlock( - 'adminhtml/catalog_product_edit_tab_options_type_date' - ) - ); + $path = 'global/catalog/product/options/custom/groups'; + + foreach (Mage::getConfig()->getNode($path)->children() as $group) { + $this->setChild($group->getName() . '_option_type', + $this->getLayout()->createBlock( + (string) Mage::getConfig()->getNode($path . '/' . $group->getName() . '/render') + ) + ); + } return parent::_prepareLayout(); } diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Related.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Related.php index 864ad4e5..ca98639d 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Related.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Related.php @@ -37,7 +37,7 @@ public function __construct() { parent::__construct(); $this->setId('related_product_grid'); - $this->setDefaultSort('id'); + $this->setDefaultSort('entity_id'); $this->setUseAjax(true); if ($this->_getProduct()->getId()) { $this->setDefaultFilter(array('in_products'=>1)); @@ -99,7 +99,7 @@ protected function _prepareColumns() 'index' => 'entity_id' )); - $this->addColumn('id', array( + $this->addColumn('entity_id', array( 'header' => Mage::helper('catalog')->__('ID'), 'sortable' => true, 'width' => '60px', diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Settings.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Settings.php index 6e4a120f..f7805376 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Settings.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Settings.php @@ -81,6 +81,10 @@ protected function _prepareForm() public function getContinueUrl() { - return $this->getUrl('*/*/new', array('_current'=>true)); + return $this->getUrl('*/*/new', array( + '_current' => true, + 'set' => '{{attribute_set}}', + 'type' => '{{type}}' + )); } } diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config.php index a55c308b..b7b44d57 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config.php @@ -32,15 +32,21 @@ * @author Magento Core Team */ -class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config extends Mage_Adminhtml_Block_Widget +class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config extends Mage_Adminhtml_Block_Widget implements Mage_Adminhtml_Block_Widget_Tab_Interface { public function __construct() { parent::__construct(); + $this->setProductId($this->getRequest()->getParam('id')); $this->setTemplate('catalog/product/edit/super/config.phtml'); $this->setId('config_super_product'); } + public function getTabClass() + { + return 'ajax'; + } + protected function _prepareLayout() { $this->setChild('grid', @@ -186,4 +192,21 @@ public function escapeJs($string) return addcslashes($string, "'\r\n\\"); } + public function getTabLabel() + { + return Mage::helper('catalog')->__('Associated Products'); + } + public function getTabTitle() + { + return Mage::helper('catalog')->__('Associated Products'); + } + public function canShowTab() + { + return true; + } + public function isHidden() + { + return false; + } + }// Class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config END \ No newline at end of file diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Grid.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Grid.php index 5e2de89c..b4ad0075 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Grid.php @@ -157,7 +157,7 @@ protected function _prepareColumns() 'attributes' => $attributes )); - $this->addColumn('id', array( + $this->addColumn('entity_id', array( 'header' => Mage::helper('catalog')->__('ID'), 'sortable' => true, 'width' => '60px', @@ -196,11 +196,11 @@ protected function _prepareColumns() 'index' => 'price' )); - $this->addColumn('inventory', array( + $this->addColumn('is_saleable', array( 'header' => Mage::helper('catalog')->__('Inventory'), 'renderer' => 'adminhtml/catalog_product_edit_tab_super_config_grid_renderer_inventory', 'filter' => 'adminhtml/catalog_product_edit_tab_super_config_grid_filter_inventory', - 'index' => 'inventory_in_stock' + 'index' => 'is_saleable' )); foreach ($attributes as $attribute) { diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Group.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Group.php index f0f2a647..49bb027a 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Group.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Group.php @@ -29,21 +29,32 @@ * * @category Mage * @package Mage_Adminhtml - * @author Magento Core Team + * @author Magento Core Team */ -class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Group extends Mage_Adminhtml_Block_Widget_Grid +class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Group extends Mage_Adminhtml_Block_Widget_Grid implements Mage_Adminhtml_Block_Widget_Tab_Interface { public function __construct() { parent::__construct(); $this->setId('super_product_grid'); - $this->setDefaultSort('id'); + $this->setDefaultSort('entity_id'); + $this->setSkipGenerateContent(true); $this->setUseAjax(true); if ($this->_getProduct()->getId()) { $this->setDefaultFilter(array('in_products'=>1)); } } + public function getTabUrl() + { + return $this->getUrl('*/*/superGroup', array('_current'=>true)); + } + + public function getTabClass() + { + return 'ajax'; + } + /** * Retirve currently edited product model * @@ -105,7 +116,7 @@ protected function _prepareColumns() 'index' => 'entity_id' )); - $this->addColumn('id', array( + $this->addColumn('entity_id', array( 'header' => Mage::helper('catalog')->__('ID'), 'sortable' => true, 'width' => '60px', @@ -164,4 +175,21 @@ protected function _getSelectedProducts() } return $products; } + + public function getTabLabel() + { + return Mage::helper('catalog')->__('Associated Products'); + } + public function getTabTitle() + { + return Mage::helper('catalog')->__('Associated Products'); + } + public function canShowTab() + { + return true; + } + public function isHidden() + { + return false; + } } \ No newline at end of file diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Settings.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Settings.php index e4c689fd..4cd30101 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Settings.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Settings.php @@ -122,7 +122,10 @@ protected function _prepareForm() public function getContinueUrl() { - return $this->getUrl('*/*/new', array('_current'=>true)); + return $this->getUrl('*/*/new', array( + '_current' => true, + 'attributes' => '{{attributes}}' + )); } public function getBackUrl() diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Upsell.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Upsell.php index 6b6c1c6c..5dc06281 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Upsell.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Upsell.php @@ -38,7 +38,7 @@ public function __construct() { parent::__construct(); $this->setId('up_sell_product_grid'); - $this->setDefaultSort('id'); + $this->setDefaultSort('entity_id'); $this->setUseAjax(true); if ($this->_getProduct()->getId()) { $this->setDefaultFilter(array('in_products'=>1)); @@ -99,7 +99,7 @@ protected function _prepareColumns() 'index' => 'entity_id' )); - $this->addColumn('id', array( + $this->addColumn('entity_id', array( 'header' => Mage::helper('catalog')->__('ID'), 'sortable' => true, 'width' => '60px', diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs.php index a851bc61..621d2585 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs.php @@ -198,6 +198,15 @@ public function getProduct() */ public function getAttributeTabBlock() { - return $this->_attributeTabBlock; + if (is_null(Mage::helper('adminhtml/catalog')->getAttributeTabBlock())) { + return $this->_attributeTabBlock; + } + return Mage::helper('adminhtml/catalog')->getAttributeTabBlock(); + } + + public function setAttributeTabBlock($attributeTabBlock) + { + $this->_attributeTabBlock = $attributeTabBlock; + return $this; } } \ No newline at end of file diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs/Configurable.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs/Configurable.php index 8a890445..483883a5 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs/Configurable.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs/Configurable.php @@ -35,25 +35,25 @@ class Mage_Adminhtml_Block_Catalog_Product_Edit_Tabs_Configurable extends Mage_A { protected function _prepareLayout() { - $product = $this->getProduct(); +// $product = $this->getProduct(); - if (!($superAttributes = $product->getTypeInstance()->getUsedProductAttributeIds())) { +// if (!($superAttributes = $product->getTypeInstance()->getUsedProductAttributeIds())) { $this->addTab('super_settings', array( 'label' => Mage::helper('catalog')->__('Configurable Product Settings'), 'content' => $this->getLayout()->createBlock('adminhtml/catalog_product_edit_tab_super_settings')->toHtml(), 'active' => true )); - } else { - parent::_prepareLayout(); - - $this->addTab('configurable', array( - 'label' => Mage::helper('catalog')->__('Associated Products'), - 'content' => $this->getLayout()->createBlock('adminhtml/catalog_product_edit_tab_super_config', 'admin.super.config.product') - ->setProductId($this->getRequest()->getParam('id')) - ->toHtml(), - )); - $this->bindShadowTabs('configurable', 'customer_options'); - } +// } else { +// parent::_prepareLayout(); +// +// $this->addTab('configurable', array( +// 'label' => Mage::helper('catalog')->__('Associated Products'), +// 'content' => $this->getLayout()->createBlock('adminhtml/catalog_product_edit_tab_super_config', 'admin.super.config.product') +// ->setProductId($this->getRequest()->getParam('id')) +// ->toHtml(), +// )); +// $this->bindShadowTabs('configurable', 'customer_options'); +// } } } \ No newline at end of file diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Grid.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Grid.php index 8c0b81ad..ec7d02cf 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Grid.php @@ -38,7 +38,7 @@ public function __construct() { parent::__construct(); $this->setId('productGrid'); - $this->setDefaultSort('id'); + $this->setDefaultSort('entity_id'); $this->setDefaultDir('desc'); $this->setSaveParametersInSession(true); $this->setUseAjax(true); @@ -105,7 +105,7 @@ protected function _addColumnFilterToCollection($column) protected function _prepareColumns() { - $this->addColumn('id', + $this->addColumn('entity_id', array( 'header'=> Mage::helper('catalog')->__('ID'), 'width' => '50px', diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Image.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Image.php index 1b493087..5a21235a 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Image.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Image.php @@ -50,7 +50,7 @@ protected function _getDeleteCheckbox() $html.= parent::_getDeleteCheckbox(); } else { - $html.= ''; + $html.= ''; $html.= ''; 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 2fb08ea8..25cbd7d6 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 @@ -87,6 +87,17 @@ protected function _prepareForm() ), )); + $fieldset->addField('is_html', 'select', array( + 'label' => Mage::helper('checkout')->__('Show Content as'), + 'title' => Mage::helper('checkout')->__('Show Content as'), + 'name' => 'is_html', + 'required' => true, + 'options' => array( + 0 => Mage::helper('checkout')->__('Text'), + 1 => Mage::helper('checkout')->__('HTML'), + ), + )); + if (!Mage::app()->isSingleStoreMode()) { $fieldset->addField('store_id', 'multiselect', array( 'name' => 'stores[]', @@ -118,7 +129,7 @@ protected function _prepareForm() 'name' => 'content', 'label' => Mage::helper('checkout')->__('Content'), 'title' => Mage::helper('checkout')->__('Content'), - 'style' => 'height:24em;', + 'style' => 'height:24em;', 'wysiwyg' => false, 'required' => true, )); 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 1d8cea70..72115edb 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 @@ -54,12 +54,14 @@ public function _prepareForm() 'name' => 'custom_theme_from', 'label' => Mage::helper('cms')->__('Custom Theme From'), 'image' => $this->getSkinUrl('images/grid-cal.gif'), + 'format' => Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT) )); $fieldset->addField('custom_theme_to', 'date', array( 'name' => 'custom_theme_to', 'label' => Mage::helper('cms')->__('Custom Theme To'), 'image' => $this->getSkinUrl('images/grid-cal.gif'), + 'format' => Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT) )); $layouts = array(); diff --git a/app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tabs.php b/app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tabs.php index e91aeeb9..6ce53bf2 100644 --- a/app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tabs.php +++ b/app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tabs.php @@ -62,6 +62,14 @@ protected function _beforeToHtml() 'title' => Mage::helper('cms')->__('Meta Data'), 'content' => $this->getLayout()->createBlock('adminhtml/cms_page_edit_tab_meta')->toHtml(), )); + if (Mage::app()->getConfig()->getModuleConfig('Mage_GoogleOptimizer')->is('active', true) + && Mage::helper('googleoptimizer')->isOptimizerActive()) { + $this->addTab('googleoptimizer_section', array( + 'label' => Mage::helper('googleoptimizer')->__('Page View Optimization'), + 'title' => Mage::helper('googleoptimizer')->__('Page View Optimization'), + 'content' => $this->getLayout()->createBlock('googleoptimizer/adminhtml_cms_page_edit_tab_googleoptimizer')->toHtml(), + )); + } return parent::_beforeToHtml(); } diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Newsletter/Grid.php b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Newsletter/Grid.php index 4cca970d..f26bb942 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Newsletter/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Newsletter/Grid.php @@ -65,7 +65,7 @@ protected function _prepareCollection() protected function _prepareColumns() { - $this->addColumn('id', array( + $this->addColumn('queue_id', array( 'header' => Mage::helper('customer')->__('ID'), 'align' => 'left', 'index' => 'queue_id', diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Reviews.php b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Reviews.php index 8f86490b..8d3e0ad3 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Reviews.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Reviews.php @@ -59,7 +59,7 @@ protected function _prepareCollection() protected function _prepareColumns() { - $this->addColumn('id', array( + $this->addColumn('entity_id', array( 'header' => Mage::helper('customer')->__('ID'), 'width' => 5, 'align' => 'center', @@ -122,7 +122,7 @@ protected function _prepareColumns() 'sortable' => false, )); - $this->setColumnFilter('id') + $this->setColumnFilter('entity_id') ->setColumnFilter('email') ->setColumnFilter('name'); diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Tags.php b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Tags.php index 0154878d..6e52beb6 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Tags.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Tags.php @@ -59,7 +59,7 @@ protected function _prepareCollection() protected function _prepareColumns() { - $this->addColumn('id', array( + $this->addColumn('entity_id', array( 'header' => Mage::helper('customer')->__('ID'), 'width' =>5, 'align' =>'center', @@ -105,7 +105,7 @@ protected function _prepareColumns() 'is_system' =>true )); - $this->setColumnFilter('id') + $this->setColumnFilter('entity_id') ->setColumnFilter('email') ->setColumnFilter('name'); diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View.php b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View.php index fc8761d9..95b5fc8f 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View.php @@ -133,6 +133,18 @@ public function getCreateDate() return $this->formatDate($this->getCustomer()->getCreatedAt(), Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM, true); } + public function getStoreCreateDate() + { + $date = Mage::app()->getLocale()->storeDate($this->getCustomer()->getStoreId(), $this->getCustomer()->getCreatedAt(), true); + return $this->formatDate($date, Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM, true); + } + + public function getStoreCreateDateTimezone() + { + $date = Mage::app()->getLocale()->storeDate($this->getCustomer()->getStoreId(), $this->getCustomer()->getCreatedAt(), true); + return $date->getTimezone(); + } + public function getLastLoginDate() { if ($date = $this->getCustomerLog()->getLoginAt()) { @@ -141,6 +153,18 @@ public function getLastLoginDate() return Mage::helper('customer')->__('Never'); } + public function getStoreLastLoginDate() + { + $date = Mage::app()->getLocale()->storeDate($this->getCustomer()->getStoreId(), $this->getCustomer()->getLoginAt(), true); + return $this->formatDate($date, Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM, true); + } + + public function getStoreLastLoginDateTimezone() + { + $date = Mage::app()->getLocale()->storeDate($this->getCustomer()->getStoreId(), $this->getCustomer()->getLoginAt(), true); + return $date->getTimezone(); + } + public function getCurrentStatus() { $log = $this->getCustomerLog(); @@ -168,6 +192,11 @@ public function getCreatedInStore() return Mage::app()->getStore($this->getCustomer()->getStoreId())->getName(); } + public function getStoreId() + { + return $this->getCustomer()->getStoreId(); + } + public function getBillingAddressHtml() { $html = ''; diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View/Wishlist.php b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View/Wishlist.php index 72a4cb05..6cce1dda 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View/Wishlist.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View/Wishlist.php @@ -58,7 +58,7 @@ protected function _prepareCollection() protected function _prepareColumns() { - $this->addColumn('id', array( + $this->addColumn('product_id', array( 'header' => Mage::helper('customer')->__('Product ID'), 'index' => 'product_id', 'type' => 'number', diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Wishlist.php b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Wishlist.php index 07d5fbb2..9eb4fc72 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Wishlist.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Wishlist.php @@ -64,7 +64,7 @@ protected function _prepareCollection() protected function _prepareColumns() { - /*$this->addColumn('id', array( + /*$this->addColumn('product_id', array( 'header' => Mage::helper('customer')->__('ID'), 'index' => 'product_id', 'type' => 'number', diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Grid.php b/app/code/core/Mage/Adminhtml/Block/Customer/Grid.php index 380ce00c..8f87f1ba 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Grid.php @@ -39,7 +39,7 @@ public function __construct() parent::__construct(); $this->setId('customerGrid'); $this->setUseAjax(true); - $this->setDefaultSort('id'); + $this->setDefaultSort('entity_id'); } protected function _prepareCollection() @@ -52,7 +52,7 @@ protected function _prepareCollection() ->joinAttribute('billing_postcode', 'customer_address/postcode', 'default_billing', null, 'left') ->joinAttribute('billing_city', 'customer_address/city', 'default_billing', null, 'left') ->joinAttribute('billing_telephone', 'customer_address/telephone', 'default_billing', null, 'left') - ->joinAttribute('billing_regione', 'customer_address/region', 'default_billing', null, 'left') + ->joinAttribute('billing_region', 'customer_address/region', 'default_billing', null, 'left') ->joinAttribute('billing_country_id', 'customer_address/country_id', 'default_billing', null, 'left'); $this->setCollection($collection); @@ -62,7 +62,7 @@ protected function _prepareCollection() protected function _prepareColumns() { - $this->addColumn('id', array( + $this->addColumn('entity_id', array( 'header' => Mage::helper('customer')->__('ID'), 'width' => '50px', 'index' => 'entity_id', @@ -118,10 +118,10 @@ protected function _prepareColumns() 'index' => 'billing_country_id', )); - $this->addColumn('billing_regione', array( + $this->addColumn('billing_region', array( 'header' => Mage::helper('customer')->__('State/Province'), 'width' => '100', - 'index' => 'billing_regione', + 'index' => 'billing_region', )); $this->addColumn('customer_since', array( diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Online/Grid.php b/app/code/core/Mage/Adminhtml/Block/Customer/Online/Grid.php index f31e7f2a..0f3ca187 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Online/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Online/Grid.php @@ -64,7 +64,7 @@ protected function _initCollection() protected function _beforeToHtml() { - $this->addColumn('id', array( + $this->addColumn('customer_id', array( 'header'=>Mage::helper('customer')->__('ID'), 'width'=>'40px', 'align'=>'right', diff --git a/app/code/core/Mage/Adminhtml/Block/Newsletter/Problem/Grid.php b/app/code/core/Mage/Adminhtml/Block/Newsletter/Problem/Grid.php index ebf9071a..496b634f 100644 --- a/app/code/core/Mage/Adminhtml/Block/Newsletter/Problem/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Newsletter/Problem/Grid.php @@ -63,7 +63,7 @@ protected function _prepareColumns() 'width' => '20px' )); - $this->addColumn('id', array( + $this->addColumn('problem_id', array( 'header' => Mage::helper('newsletter')->__('ID'), 'index' => 'problem_id', 'width' => '50px' 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 6bb27f24..0acd36e5 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 @@ -44,16 +44,13 @@ protected function _prepareForm() 'legend' => Mage::helper('newsletter')->__('Queue Information') )); - $formatStr = Mage::app()->getLocale()->getDateStrFormat(Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM) - . ' ' . Mage::app()->getLocale()->getTimeStrFormat(Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM); - - $format = Mage::app()->getLocale()->getDateTimeFormat(Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM); + $outputFormat = Mage::app()->getLocale()->getDateTimeFormat(Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM); if($queue->getQueueStatus() == Mage_Newsletter_Model_Queue::STATUS_NEVER) { - $fieldset->addField('date','date',array( + $fieldset->addField('date', 'date',array( 'name' => 'start_at', 'time' => true, - 'format' => $formatStr, + 'format' => $outputFormat, 'label' => Mage::helper('newsletter')->__('Queue Date Start'), 'image' => $this->getSkinUrl('images/grid-cal.gif') )); @@ -78,7 +75,7 @@ protected function _prepareForm() 'name' => 'start_at', 'time' => true, 'disabled' => 'true', - 'format' => $formatStr, + 'format' => $outputFormat, 'label' => Mage::helper('newsletter')->__('Queue Date Start'), 'image' => $this->getSkinUrl('images/grid-cal.gif') )); @@ -103,8 +100,7 @@ protected function _prepareForm() if ($queue->getQueueStartAt()) { $form->getElement('date')->setValue( - Mage::app()->getLocale()->date($queue->getQueueStartAt(), 'yyyy-MM-dd HH:mm:ss') - ->toString($format) + Mage::app()->getLocale()->date($queue->getQueueStartAt(), Varien_Date::DATETIME_INTERNAL_FORMAT) ); } diff --git a/app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Grid.php b/app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Grid.php index ad6f93cf..4ed21e1e 100644 --- a/app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Grid.php @@ -57,7 +57,7 @@ protected function _prepareCollection() protected function _prepareColumns() { - $this->addColumn('id', array( + $this->addColumn('queue_id', array( 'header' => Mage::helper('newsletter')->__('ID'), 'index' => 'queue_id', 'width' => 10 diff --git a/app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber/Grid.php b/app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber/Grid.php index 44be17c1..d22e19f2 100644 --- a/app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber/Grid.php @@ -43,7 +43,7 @@ public function __construct() parent::__construct(); $this->setId('subscriberGrid'); $this->setUseAjax(true); - $this->setDefaultSort('id', 'desc'); + $this->setDefaultSort('subscriber_id', 'desc'); } /** @@ -53,7 +53,9 @@ public function __construct() */ protected function _prepareCollection() { - $collection = Mage::getResourceSingleton('newsletter/subscriber_collection') + $collection = Mage::getResourceSingleton('newsletter/subscriber_collection'); + /* @var $collection Mage_Newsletter_Model_Mysql4_Subscriber_Collection */ + $collection ->showCustomerInfo(true) ->addSubscriberTypeField() ->showStoreInfo(); @@ -71,81 +73,81 @@ protected function _prepareCollection() protected function _prepareColumns() { - $this->addColumn('id', array( - 'header' => Mage::helper('newsletter')->__('ID'), - 'index' => 'subscriber_id' - )); - - $this->addColumn('email', array( - 'header' => Mage::helper('newsletter')->__('Email'), - 'index' => 'subscriber_email' - )); - - $this->addColumn('type', array( - 'header' => Mage::helper('newsletter')->__('Type'), - 'index' => 'type', - 'type' => 'options', - 'options' => array( - 1 => Mage::helper('newsletter')->__('Guest'), - 2 => Mage::helper('newsletter')->__('Customer') - ) - )); - - $this->addColumn('firstname', array( - 'header' => Mage::helper('newsletter')->__('Customer Firstname'), - 'index' => 'customer_firstname', - 'default' => '----' - )); - - $this->addColumn('lastname', array( - 'header' => Mage::helper('newsletter')->__('Customer Lastname'), - 'index' => 'customer_lastname', - 'default' => '----' - )); + $this->addColumn('subscriber_id', array( + 'header' => Mage::helper('newsletter')->__('ID'), + 'index' => 'subscriber_id' + )); + + $this->addColumn('email', array( + 'header' => Mage::helper('newsletter')->__('Email'), + 'index' => 'subscriber_email' + )); + + $this->addColumn('type', array( + 'header' => Mage::helper('newsletter')->__('Type'), + 'index' => 'type', + 'type' => 'options', + 'options' => array( + 1 => Mage::helper('newsletter')->__('Guest'), + 2 => Mage::helper('newsletter')->__('Customer') + ) + )); + + $this->addColumn('firstname', array( + 'header' => Mage::helper('newsletter')->__('Customer Firstname'), + 'index' => 'customer_firstname', + 'default' => '----' + )); + + $this->addColumn('lastname', array( + 'header' => Mage::helper('newsletter')->__('Customer Lastname'), + 'index' => 'customer_lastname', + 'default' => '----' + )); $this->addColumn('status', array( - 'header' => Mage::helper('newsletter')->__('Status'), - 'index' => 'subscriber_status', - 'type' => 'options', - 'options' => array( - Mage_Newsletter_Model_Subscriber::STATUS_NOT_ACTIVE => Mage::helper('newsletter')->__('Not activated'), - Mage_Newsletter_Model_Subscriber::STATUS_SUBSCRIBED => Mage::helper('newsletter')->__('Subscribed'), - Mage_Newsletter_Model_Subscriber::STATUS_UNSUBSCRIBED => Mage::helper('newsletter')->__('Unsubscribed'), - ) - )); - - $this->addColumn('website', array( - 'header' => Mage::helper('newsletter')->__('Website'), - 'index' => 'website_id', - 'type' => 'options', - 'options' => $this->_getOptions( - Mage::getSingleton('core/website')->getCollection()->toOptionArray() - ) + 'header' => Mage::helper('newsletter')->__('Status'), + 'index' => 'subscriber_status', + 'type' => 'options', + 'options' => array( + Mage_Newsletter_Model_Subscriber::STATUS_NOT_ACTIVE => Mage::helper('newsletter')->__('Not activated'), + Mage_Newsletter_Model_Subscriber::STATUS_SUBSCRIBED => Mage::helper('newsletter')->__('Subscribed'), + Mage_Newsletter_Model_Subscriber::STATUS_UNSUBSCRIBED => Mage::helper('newsletter')->__('Unsubscribed'), + ) + )); + + $this->addColumn('website', array( + 'header' => Mage::helper('newsletter')->__('Website'), + 'index' => 'website_id', + 'type' => 'options', + 'options' => $this->_getWebsiteOptions() )); $this->addColumn('group', array( - 'header' => Mage::helper('newsletter')->__('Store'), - 'index' => 'group_id', - 'type' => 'options', - 'options' => $this->_getOptions( - Mage::getSingleton('core/store_group')->getCollection()->toOptionArray() - ) + 'header' => Mage::helper('newsletter')->__('Store'), + 'index' => 'group_id', + 'type' => 'options', + 'options' => $this->_getStoreGroupOptions() )); $this->addColumn('store', array( - 'header' => Mage::helper('newsletter')->__('Store View'), - 'index' => 'store_id', - 'type' => 'options', - 'options' => $this->_getOptions( - Mage::getSingleton('core/store')->getCollection()->toOptionArray() - ) + 'header' => Mage::helper('newsletter')->__('Store View'), + 'index' => 'store_id', + 'type' => 'options', + 'options' => $this->_getStoreOptions() )); $this->addExportType('*/*/exportCsv', Mage::helper('customer')->__('CSV')); $this->addExportType('*/*/exportXml', Mage::helper('customer')->__('XML')); - return parent::_prepareColumns(); + return parent::_prepareColumns(); } + /** + * Convert OptionsValue array to Options array + * + * @param array $optionsArray + * @return array + */ protected function _getOptions($optionsArray) { $options = array(); @@ -155,6 +157,53 @@ protected function _getOptions($optionsArray) return $options; } + /** + * Retrieve Website Options array + * + * @return array + */ + protected function _getWebsiteOptions() + { + $options = array(); + foreach (Mage::app()->getWebsites() as $website) { + $options[$website->getId()] = $website->getName(); + } + return $options; + } + + /** + * Retrieve Store Group Options array + * + * @return array + */ + protected function _getStoreGroupOptions() + { + $options = array(); + foreach (Mage::app()->getWebsites() as $website) { + /* @var $website Mage_Core_Model_Website */ + foreach ($website->getGroups() as $group) { + /* @var $group Mage_Core_Model_Store_Group */ + $options[$group->getId()] = $group->getName(); + } + } + return $options; + } + + /** + * Retrieve Store Options array + * + * @return array + */ + protected function _getStoreOptions() + { + $options = array(); + foreach (Mage::app()->getStores() as $store) { + /* @var $store Mage_Core_Model_Store */ + $options[$store->getId()] = $store->getName(); + } + return $options; + } + protected function _prepareMassaction() { $this->setMassactionIdField('subscriber_id'); @@ -167,5 +216,4 @@ protected function _prepareMassaction() return $this; } - -}// Class Mage_Adminhtml_Block_Newsletter_Subscriber_Grid END +} diff --git a/app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Grid.php b/app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Grid.php index c5bf5d88..20876dc2 100644 --- a/app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Grid.php @@ -50,7 +50,7 @@ protected function _prepareCollection() protected function _prepareColumns() { - $this->addColumn('id', + $this->addColumn('template_code', array('header'=>Mage::helper('newsletter')->__('ID'), 'align'=>'center', 'index'=>'template_id')); $this->addColumn('code', array( diff --git a/app/code/core/Mage/Adminhtml/Block/Notification/Window.php b/app/code/core/Mage/Adminhtml/Block/Notification/Window.php index 6ea5dbe3..a26ad374 100644 --- a/app/code/core/Mage/Adminhtml/Block/Notification/Window.php +++ b/app/code/core/Mage/Adminhtml/Block/Notification/Window.php @@ -44,8 +44,8 @@ protected function _construct() $this->setCriticalText(addslashes($this->__('CRITICAL'))); - $this->setNoticeMessageText($this->getLastNotice()->getTitle()); - $this->setNoticeMessageUrl($this->getLastNotice()->getUrl()); + $this->setNoticeMessageText(addslashes($this->getLastNotice()->getTitle())); + $this->setNoticeMessageUrl(addslashes($this->getLastNotice()->getUrl())); switch ($this->getLastNotice()->getSeverity()) { default: diff --git a/app/code/core/Mage/Adminhtml/Block/Page/Menu.php b/app/code/core/Mage/Adminhtml/Block/Page/Menu.php index 4043b447..1f9d052d 100644 --- a/app/code/core/Mage/Adminhtml/Block/Page/Menu.php +++ b/app/code/core/Mage/Adminhtml/Block/Page/Menu.php @@ -73,7 +73,6 @@ protected function _getHelperValue(Varien_Simplexml_Element $child) // if (isset($childAttributes['translate'])) { // $titleNodeName = (string)$childAttributes['translate']; // } - $titleNodeName = 'title'; return Mage::helper($helperName)->__((string)$child->$titleNodeName); } diff --git a/app/code/core/Mage/Adminhtml/Block/Permissions/Grid/User.php b/app/code/core/Mage/Adminhtml/Block/Permissions/Grid/User.php index c3705cd6..c0a448bf 100644 --- a/app/code/core/Mage/Adminhtml/Block/Permissions/Grid/User.php +++ b/app/code/core/Mage/Adminhtml/Block/Permissions/Grid/User.php @@ -53,7 +53,7 @@ protected function _prepareCollection() protected function _prepareColumns() { - $this->addColumn('id', array( + $this->addColumn('user_id', array( 'header' =>Mage::helper('adminhtml')->__('ID'), 'width' =>5, 'align' =>'right', diff --git a/app/code/core/Mage/Adminhtml/Block/Permissions/Tab/Rolesedit.php b/app/code/core/Mage/Adminhtml/Block/Permissions/Tab/Rolesedit.php index 5cd34ffe..343436c8 100644 --- a/app/code/core/Mage/Adminhtml/Block/Permissions/Tab/Rolesedit.php +++ b/app/code/core/Mage/Adminhtml/Block/Permissions/Tab/Rolesedit.php @@ -61,7 +61,7 @@ public function getResTreeJson() $rid = Mage::app()->getRequest()->getParam('rid', false); $resources = Mage::getModel('admin/roles')->getResourcesTree(); - $rootArray = $this->_getNodeJson($resources); + $rootArray = $this->_getNodeJson($resources->admin, 1); $json = Zend_Json::encode(isset($rootArray['children']) ? $rootArray['children'] : array()); diff --git a/app/code/core/Mage/Adminhtml/Block/Permissions/User/Grid.php b/app/code/core/Mage/Adminhtml/Block/Permissions/User/Grid.php index e3ea1e18..1defe4f5 100644 --- a/app/code/core/Mage/Adminhtml/Block/Permissions/User/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Permissions/User/Grid.php @@ -52,7 +52,7 @@ protected function _prepareCollection() protected function _prepareColumns() { - $this->addColumn('id', array( + $this->addColumn('user_id', array( 'header' => Mage::helper('adminhtml')->__('ID'), 'width' => 5, 'align' => 'right', 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 85b63b2d..ae3df4c5 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 @@ -119,18 +119,22 @@ protected function _prepareForm() 'values' => $customerGroups, )); + $dateFormatIso = Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT); $fieldset->addField('from_date', 'date', array( - 'name' => 'from_date', - 'label' => Mage::helper('catalogrule')->__('From Date'), - 'title' => Mage::helper('catalogrule')->__('From Date'), - 'image' => $this->getSkinUrl('images/grid-cal.gif'), + 'name' => 'from_date', + 'label' => Mage::helper('catalogrule')->__('From Date'), + 'title' => Mage::helper('catalogrule')->__('From Date'), + 'image' => $this->getSkinUrl('images/grid-cal.gif'), + 'input_format' => Varien_Date::DATE_INTERNAL_FORMAT, + 'format' => $dateFormatIso )); - $fieldset->addField('to_date', 'date', array( - 'name' => 'to_date', - 'label' => Mage::helper('catalogrule')->__('To Date'), - 'title' => Mage::helper('catalogrule')->__('To Date'), - 'image' => $this->getSkinUrl('images/grid-cal.gif'), + 'name' => 'to_date', + 'label' => Mage::helper('catalogrule')->__('To Date'), + 'title' => Mage::helper('catalogrule')->__('To Date'), + 'image' => $this->getSkinUrl('images/grid-cal.gif'), + 'input_format' => Varien_Date::DATE_INTERNAL_FORMAT, + 'format' => $dateFormatIso )); $fieldset->addField('sort_order', 'text', array( 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 1c5d0f93..49c7e32f 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 @@ -47,16 +47,16 @@ protected function _prepareForm() $fieldset = $form->addFieldset('base_fieldset', array('legend'=>Mage::helper('salesrule')->__('General Information'))); if ($model->getId()) { - $fieldset->addField('rule_id', 'hidden', array( + $fieldset->addField('rule_id', 'hidden', array( 'name' => 'rule_id', )); } - $fieldset->addField('product_ids', 'hidden', array( + $fieldset->addField('product_ids', 'hidden', array( 'name' => 'product_ids', )); - $fieldset->addField('name', 'text', array( + $fieldset->addField('name', 'text', array( 'name' => 'name', 'label' => Mage::helper('salesrule')->__('Rule Name'), 'title' => Mage::helper('salesrule')->__('Rule Name'), @@ -70,7 +70,7 @@ protected function _prepareForm() 'style' => 'width: 98%; height: 100px;', )); - $fieldset->addField('is_active', 'select', array( + $fieldset->addField('is_active', 'select', array( 'label' => Mage::helper('salesrule')->__('Status'), 'title' => Mage::helper('salesrule')->__('Status'), 'name' => 'is_active', @@ -104,15 +104,15 @@ protected function _prepareForm() $found = false; foreach ($customerGroups as $group) { - if ($group['value']==0) { - $found = true; - } + if ($group['value']==0) { + $found = true; + } } if (!$found) { - array_unshift($customerGroups, array('value'=>0, 'label'=>Mage::helper('salesrule')->__('NOT LOGGED IN'))); + array_unshift($customerGroups, array('value'=>0, 'label'=>Mage::helper('salesrule')->__('NOT LOGGED IN'))); } - $fieldset->addField('customer_group_ids', 'multiselect', array( + $fieldset->addField('customer_group_ids', 'multiselect', array( 'name' => 'customer_group_ids[]', 'label' => Mage::helper('salesrule')->__('Customer Groups'), 'title' => Mage::helper('salesrule')->__('Customer Groups'), @@ -135,18 +135,22 @@ protected function _prepareForm() 'label' => Mage::helper('salesrule')->__('Uses per customer'), )); - $fieldset->addField('from_date', 'date', array( - 'name' => 'from_date', - 'label' => Mage::helper('salesrule')->__('From Date'), - 'title' => Mage::helper('salesrule')->__('From Date'), - 'image' => $this->getSkinUrl('images/grid-cal.gif'), + $dateFormatIso = Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT); + $fieldset->addField('from_date', 'date', array( + 'name' => 'from_date', + 'label' => Mage::helper('salesrule')->__('From Date'), + 'title' => Mage::helper('salesrule')->__('From Date'), + 'image' => $this->getSkinUrl('images/grid-cal.gif'), + 'input_format' => Varien_Date::DATE_INTERNAL_FORMAT, + 'format' => $dateFormatIso )); - - $fieldset->addField('to_date', 'date', array( - 'name' => 'to_date', - 'label' => Mage::helper('salesrule')->__('To Date'), - 'title' => Mage::helper('salesrule')->__('To Date'), - 'image' => $this->getSkinUrl('images/grid-cal.gif'), + $fieldset->addField('to_date', 'date', array( + 'name' => 'to_date', + 'label' => Mage::helper('salesrule')->__('To Date'), + 'title' => Mage::helper('salesrule')->__('To Date'), + 'image' => $this->getSkinUrl('images/grid-cal.gif'), + 'input_format' => Varien_Date::DATE_INTERNAL_FORMAT, + 'format' => $dateFormatIso )); $fieldset->addField('sort_order', 'text', array( @@ -154,7 +158,7 @@ protected function _prepareForm() 'label' => Mage::helper('salesrule')->__('Priority'), )); - $fieldset->addField('is_rss', 'select', array( + $fieldset->addField('is_rss', 'select', array( 'label' => Mage::helper('salesrule')->__('Public In RSS Feed'), 'title' => Mage::helper('salesrule')->__('Public In RSS Feed'), 'name' => 'is_rss', diff --git a/app/code/core/Mage/Adminhtml/Block/Promo/Widget/Chooser/Sku.php b/app/code/core/Mage/Adminhtml/Block/Promo/Widget/Chooser/Sku.php index 2f995e90..911c7909 100644 --- a/app/code/core/Mage/Adminhtml/Block/Promo/Widget/Chooser/Sku.php +++ b/app/code/core/Mage/Adminhtml/Block/Promo/Widget/Chooser/Sku.php @@ -104,7 +104,7 @@ protected function _prepareColumns() 'use_index' => true, )); - $this->addColumn('id', array( + $this->addColumn('entity_id', array( 'header' => Mage::helper('sales')->__('ID'), 'sortable' => true, 'width' => '60px', diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Product/Grid.php b/app/code/core/Mage/Adminhtml/Block/Report/Product/Grid.php index 4fe44631..610f6e5e 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Product/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Product/Grid.php @@ -38,7 +38,7 @@ public function __construct() { parent::__construct(); $this->setId('productsReportGrid'); - $this->setDefaultSort('id'); + $this->setDefaultSort('entity_id'); $this->setDefaultDir('desc'); } @@ -61,7 +61,7 @@ protected function _afterLoadCollection() protected function _prepareColumns() { - $this->addColumn('id', array( + $this->addColumn('entity_id', array( 'header' =>Mage::helper('reports')->__('ID'), 'width' =>'50px', 'index' =>'entity_id', diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Shopcart/Product/Grid.php b/app/code/core/Mage/Adminhtml/Block/Report/Shopcart/Product/Grid.php index 7dec8c4e..059bd220 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Shopcart/Product/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Shopcart/Product/Grid.php @@ -48,7 +48,9 @@ protected function _prepareCollection() ->setStoreId('') ->addStoreFilter('') ->addCartsCount() - ->addOrdersCount(); + ->addOrdersCount() + ->setSelectCountSqlType(Mage_Reports_Model_Mysql4_Product_Collection::SELECT_COUNT_SQL_TYPE_CART); + /* @var $collection Mage_Reports_Model_Mysql4_Product_Collection */ $this->setCollection($collection); return parent::_prepareCollection(); diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Tag/Customer/Grid.php b/app/code/core/Mage/Adminhtml/Block/Report/Tag/Customer/Grid.php index f02a52f7..50932e2e 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Tag/Customer/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Tag/Customer/Grid.php @@ -56,7 +56,7 @@ protected function _prepareCollection() protected function _prepareColumns() { - $this->addColumn('id', array( + $this->addColumn('entity_id', array( 'header' =>Mage::helper('reports')->__('ID'), 'width' => '50px', 'align' =>'right', diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Wishlist/Grid.php b/app/code/core/Mage/Adminhtml/Block/Report/Wishlist/Grid.php index 85f827ab..5c793294 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Wishlist/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Wishlist/Grid.php @@ -38,7 +38,7 @@ public function __construct() { parent::__construct(); $this->setId('wishlistReportGrid'); - $this->setDefaultSort('id'); + $this->setDefaultSort('entity_id'); $this->setDefaultDir('desc'); } @@ -59,7 +59,7 @@ protected function _prepareCollection() protected function _prepareColumns() { - $this->addColumn('id', array( + $this->addColumn('entity_id', array( 'header' =>Mage::helper('reports')->__('ID'), 'width' =>'50px', 'index' =>'entity_id' 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 b694bfee..e4c7cd88 100644 --- a/app/code/core/Mage/Adminhtml/Block/Review/Edit/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Review/Edit/Form.php @@ -50,15 +50,15 @@ protected function _prepareForm() 'method' => 'post' )); - $fieldset = $form->addFieldset('review_details', array('legend' => Mage::helper('review')->__('Review Details'))); + $fieldset = $form->addFieldset('review_details', array('legend' => Mage::helper('review')->__('Review Details'), 'class' => 'fieldset-wide')); $fieldset->addField('product_name', 'note', array( 'label' => Mage::helper('review')->__('Product'), - 'text' => '' . $product->getName() . '' + 'text' => '' . $product->getName() . '' )); if ($customer->getId()) { - $customerText = Mage::helper('review')->__('%2$s %3$s (%4$s)', + $customerText = Mage::helper('review')->__('%2$s %3$s (%4$s)', $this->getUrl('*/customer/edit', array('id' => $customer->getId(), 'active_tab'=>'review')), $this->htmlEscape($customer->getFirstname()), $this->htmlEscape($customer->getLastname()), @@ -130,7 +130,7 @@ protected function _prepareForm() 'label' => Mage::helper('review')->__('Review'), 'required' => true, 'name' => 'detail', - 'style' => 'width: 98%; height: 600px;', + 'style' => 'height:24em;', )); $form->setUseContainer(true); diff --git a/app/code/core/Mage/Adminhtml/Block/Review/Grid.php b/app/code/core/Mage/Adminhtml/Block/Review/Grid.php index 1f3349bd..7eb54b0e 100644 --- a/app/code/core/Mage/Adminhtml/Block/Review/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Review/Grid.php @@ -200,7 +200,7 @@ protected function _prepareColumns() 'sortable' => false )); - $this->addRssList('rss/catalog/review', Mage::helper('catalog')->__('Pending Reviews RSS')); + $this->addRssList('*/rss_catalog/review', Mage::helper('catalog')->__('Pending Reviews RSS')); return parent::_prepareColumns(); } diff --git a/app/code/core/Mage/Adminhtml/Block/Review/Product/Grid.php b/app/code/core/Mage/Adminhtml/Block/Review/Product/Grid.php index 347534fc..1acc120e 100644 --- a/app/code/core/Mage/Adminhtml/Block/Review/Product/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Review/Product/Grid.php @@ -43,7 +43,7 @@ public function __construct() protected function _prepareColumns() { - $this->addColumn('id', array( + $this->addColumn('entity_id', array( 'header' => Mage::helper('review')->__('ID'), 'width' => '50px', 'index' => 'entity_id', diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Items/Abstract.php b/app/code/core/Mage/Adminhtml/Block/Sales/Items/Abstract.php index e61670a8..e18ac0f8 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Items/Abstract.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Items/Abstract.php @@ -343,7 +343,7 @@ public function displayTaxCalculation(Varien_Object $item) public function displayTaxPercent(Varien_Object $item) { if ($item->getTaxPercent()) { - return sprintf('%.2f%%', $item->getTaxPercent()); + return sprintf('%s%%', $item->getTaxPercent() + 0); } else { return '0%'; } @@ -414,9 +414,8 @@ public function getInvoice() */ public function canReturnToStock() { - - $canReturnToStock = Mage::getStoreConfig('cataloginventory/options/can_subtract'); - if (Mage::getStoreConfig('cataloginventory/options/can_subtract')) { + $canReturnToStock = Mage::getStoreConfig(Mage_CatalogInventory_Model_Stock_Item::XML_PATH_CAN_SUBTRACT); + if (Mage::getStoreConfig(Mage_CatalogInventory_Model_Stock_Item::XML_PATH_CAN_SUBTRACT)) { return true; } else { return false; @@ -449,4 +448,4 @@ public function isShipmentRegular() return true; } -} \ No newline at end of file +} diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Comments/View.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Comments/View.php index 3abe3232..a2e91eaa 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Comments/View.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Comments/View.php @@ -68,4 +68,17 @@ public function getSubmitUrl() return $this->getUrl('*/*/addComment',array('id'=>$this->getEntity()->getId())); } + public function canSendCommentEmail() + { + switch ($this->getParentType()) { + case 'invoice': + return Mage::helper('sales')->canSendInvoiceCommentEmail($this->getEntity()->getOrder()->getStore()->getId()); + case 'shipment': + return Mage::helper('sales')->canSendShipmentCommentEmail($this->getEntity()->getOrder()->getStore()->getId()); + case 'creditmemo': + return Mage::helper('sales')->canSendCreditmemoCommentEmail($this->getEntity()->getOrder()->getStore()->getId()); + } + + return true; + } } diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Customer/Grid.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Customer/Grid.php index 588282d8..65dd8622 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Customer/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Customer/Grid.php @@ -38,7 +38,7 @@ public function __construct() $this->setId('sales_order_create_customer_grid'); $this->setRowClickCallback('order.selectCustomer.bind(order)'); $this->setUseAjax(true); - $this->setDefaultSort('id'); + $this->setDefaultSort('entity_id'); } protected function _prepareCollection() @@ -61,7 +61,7 @@ protected function _prepareCollection() protected function _prepareColumns() { - $this->addColumn('id', array( + $this->addColumn('entity_id', array( 'header' =>Mage::helper('sales')->__('ID'), 'width' =>'50px', 'index' =>'entity_id', @@ -110,11 +110,19 @@ protected function _prepareColumns() return parent::_prepareColumns(); } + /** + * Deprecated since 1.1.7 + */ public function getRowId($row) { return $row->getId(); } + public function getRowUrl($row) + { + return $row->getId(); + } + public function getGridUrl() { return $this->getUrl('*/*/loadBlock', array('block'=>'customer_grid')); diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Items/Grid.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Items/Grid.php index 9d056d6f..d5976c2b 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Items/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Items/Grid.php @@ -57,7 +57,18 @@ protected function _prepareLayout() public function getItems() { - return $this->getParentBlock()->getItems(); + $items = $this->getParentBlock()->getItems(); + foreach ($items as $item) { + $stockItem = $item->getProduct()->getStockItem(); + $check = $stockItem->checkQuoteItemQty($item->getQty(),$item->getQty()); + $item->setMessage($check->getMessage()); + $item->setHasError($check->getHasError()); + if ($item->getProduct()->getStatus() == Mage_Catalog_Model_Product_Status::STATUS_DISABLED) { + $item->setMessage(Mage::helper('adminhtml')->__('This product is currently disabled')); + $item->setHasError(true); + } + } + return $items; } public function getSession() @@ -109,6 +120,7 @@ public function isAllowedForGiftMessage($item) public function getSubtotal() { +// return '66'; $totals = $this->getQuote()->getTotals(); if (isset($totals['subtotal'])) { return $totals['subtotal']->getValue(); @@ -118,6 +130,7 @@ public function getSubtotal() public function getSubtotalWithDiscount() { +// return '55'; return $this->getQuote()->getShippingAddress()->getSubtotalWithDiscount(); } diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Search/Grid.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Search/Grid.php index b5d14f03..98860a92 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Search/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Search/Grid.php @@ -41,7 +41,7 @@ public function __construct() $this->setRowClickCallback('order.productGridRowClick.bind(order)'); $this->setCheckboxCheckCallback('order.productGridCheckboxCheck.bind(order)'); $this->setRowInitCallback('order.productGridRowInit.bind(order)'); - $this->setDefaultSort('id'); + $this->setDefaultSort('entity_id'); $this->setUseAjax(true); if ($this->getRequest()->getParam('collapse')) { $this->setIsCollapsed(true); @@ -94,9 +94,8 @@ protected function _prepareCollection() ->addAttributeToSelect('name') ->addAttributeToSelect('sku') ->addAttributeToSelect('price') - ->addAttributeToFilter('type_id', array( - Mage_Catalog_Model_Product_Type::TYPE_SIMPLE, - Mage_Catalog_Model_Product_Type::TYPE_VIRTUAL + ->addAttributeToFilter('type_id', array_keys( + Mage::getConfig()->getNode('adminhtml/sales/order/create/available_product_types')->asArray() )) ->addStoreFilter(); @@ -119,7 +118,7 @@ protected function _prepareCollection() protected function _prepareColumns() { - $this->addColumn('id', array( + $this->addColumn('entity_id', array( 'header' => Mage::helper('sales')->__('ID'), 'sortable' => true, 'width' => '60', diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar.php index 667889d3..00ca5e30 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar.php @@ -61,6 +61,8 @@ protected function _prepareLayout() $this->setChild('pcompared', $this->getLayout()->createBlock('adminhtml/sales_order_create_sidebar_pcompared')); $this->setChild('pviewed', $this->getLayout()->createBlock('adminhtml/sales_order_create_sidebar_pviewed')); if ($this->getCustomerId()) { + $button = clone $button; + $button->unsId(); $this->setChild('bottom_button', $button); } return parent::_prepareLayout(); diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Pcompared.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Pcompared.php index 17eacb92..bbfe1d7b 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Pcompared.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Pcompared.php @@ -55,7 +55,8 @@ public function getItemCollection() { $productCollection = $this->getData('item_collection'); if (is_null($productCollection)) { - $ignore = array(); + // get products to skip + $skipProducts = array(); if ($collection = $this->getCreateOrderModel()->getCustomerCompareList()) { $collection = $collection->getItemCollection() ->useProductItem(true) @@ -63,37 +64,20 @@ public function getItemCollection() ->setCustomerId($this->getCustomerId()) ->load(); foreach ($collection as $_item) { - $ignore[] = $_item->getProductId(); + $skipProducts[] = $_item->getProductId(); } } - $collection = $this->getCreateOrderModel()->getCustomerCompareList(); + // prepare products collection and apply visitors log to it + $productCollection = Mage::getModel('catalog/product')->getCollection() + ->addAttributeToSelect('name') + ->addAttributeToSelect('price') + ->addAttributeToSelect('small_image'); + Mage::getResourceSingleton('reports/event')->applyLogToCollection( + $productCollection, Mage_Reports_Model_Event::EVENT_PRODUCT_COMPARE, $this->getCustomerId(), 0, $skipProducts + ); - $stores = array(); - $website = Mage::app()->getStore($this->getStoreId())->getWebsite(); - foreach ($website->getStores() as $store) { - $stores[] = $store->getId(); - } - - $collection = Mage::getModel('reports/event') - ->getCollection() - ->addStoreFilter($stores) - ->addRecentlyFiler(Mage_Reports_Model_Event::EVENT_PRODUCT_COMPARE, $this->getCustomerId(), 0, $ignore); - $productIds = array(); - foreach ($collection as $event) { - $productIds[] = $event->getObjectId(); - } - unset($collection); - $productCollection = null; - if ($productIds) { - $productCollection = Mage::getModel('catalog/product') - ->getCollection() - ->addAttributeToSelect('name') - ->addAttributeToSelect('price') - ->addAttributeToSelect('small_image') - ->addIdFilter($productIds) - ->load(); - } + $productCollection->load(); $this->setData('item_collection', $productCollection); } return $productCollection; @@ -109,6 +93,17 @@ public function canRemoveItems() return false; } + /** + * Get product Id + * + * @param Mage_Catalog_Model_Product $item + * @return int + */ + public function getIdentifierId($item) + { + return $item->getId(); + } + /** * Retrieve product identifier of block item * diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals.php index 2620359d..e9363a3a 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals.php @@ -91,4 +91,9 @@ public function renderTotals($area = null, $colspan = 1) return $html; } + + public function canSendNewOrderConfirmationEmail() + { + return Mage::helper('sales')->canSendNewOrderConfirmationEmail($this->getQuote()->getStoreId()); + } } diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/Create/Items.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/Create/Items.php index c99c4326..6858209b 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/Create/Items.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/Create/Items.php @@ -170,11 +170,16 @@ public function getUpdateUrl() public function canReturnToStock() { - $canReturnToStock = Mage::getStoreConfig('cataloginventory/options/can_subtract'); - if (Mage::getStoreConfig('cataloginventory/options/can_subtract')) { + $canReturnToStock = Mage::getStoreConfig(Mage_CatalogInventory_Model_Stock_Item::XML_PATH_CAN_SUBTRACT); + if (Mage::getStoreConfig(Mage_CatalogInventory_Model_Stock_Item::XML_PATH_CAN_SUBTRACT)) { return true; } else { return false; } } -} \ No newline at end of file + + public function canSendCreditmemoEmail() + { + return Mage::helper('sales')->canSendNewCreditmemoEmail($this->getOrder()->getStore()->getId()); + } +} diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/Create/Items.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/Create/Items.php index f743fc9e..007659ee 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/Create/Items.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/Create/Items.php @@ -166,4 +166,9 @@ public function canCapture() } return false; } + + public function canSendInvoiceEmail() + { + return Mage::helper('sales')->canSendNewInvoiceEmail($this->getOrder()->getStore()->getId()); + } } \ No newline at end of file diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Create/Items.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Create/Items.php index cb76bc19..41afdf90 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Create/Items.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Create/Items.php @@ -121,4 +121,9 @@ public function isShipmentRegular() } return true; } + + public function canSendShipmentEmail() + { + return Mage::helper('sales')->canSendNewShipmentEmail($this->getOrder()->getStore()->getId()); + } } \ No newline at end of file diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Totals.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Totals.php index d183f3f1..36dcb922 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Totals.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Totals.php @@ -62,6 +62,16 @@ public function getSource() return $this->getData('source'); } + /** + * Retrieve Order instance + * + * @return Mage_Sales_Model_Order + */ + public function getOrder() + { + return $this->getData('order'); + } + /** * Retrieve currency instance * diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/View.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/View.php index 47efc213..b6c4279c 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/View.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/View.php @@ -48,11 +48,25 @@ public function __construct() $this->setId('sales_order_view'); if ($this->_isAllowedAction('edit') && $this->getOrder()->canEdit()) { - $message = Mage::helper('sales')->__('Are you sure? This order will be cancelled and a new one will be created instead'); + $onclickJs = 'deleteConfirm(\'' + . Mage::helper('sales')->__('Are you sure? This order will be cancelled and a new one will be created instead') + . '\', \'' . $this->getEditUrl() . '\');'; $this->_addButton('order_edit', array( - 'label' => Mage::helper('sales')->__('Edit'), - 'onclick' => 'deleteConfirm(\''.$message.'\', \'' . $this->getEditUrl() . '\')', + 'label' => Mage::helper('sales')->__('Edit'), + 'onclick' => $onclickJs, )); + // see if order has non-editable products as items + $nonEditableTypes = array_keys(Mage::getResourceSingleton('sales/order')->aggregateProductsByTypes( + $this->getOrder()->getId(), array_keys(Mage::getConfig()->getNode('adminhtml/sales/order/create/available_product_types')->asArray()), false + )); + if ($nonEditableTypes) { + $this->_updateButton('order_edit', 'onclick', + 'if (!confirm(\'' . Mage::helper('sales')->__( + 'This order contains items (%s) that cannot be added to order from admin interface and will not be put to new order.', + implode(', ', $nonEditableTypes) + ) . '\')) return false;' . $onclickJs + ); + } } if ($this->_isAllowedAction('cancel') && $this->getOrder()->canCancel()) { @@ -202,4 +216,4 @@ protected function _isAllowedAction($action) { return Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/' . $action); } -} \ No newline at end of file +} diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/History.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/History.php index 8fc6b4ac..d48970b4 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/History.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/History.php @@ -53,6 +53,11 @@ public function getStatuses() return $statuses; } + public function canSendCommentEmail() + { + return Mage::helper('sales')->canSendOrderCommentEmail($this->getOrder()->getStore()->getId()); + } + /** * Retrieve order model * diff --git a/app/code/core/Mage/Adminhtml/Block/Sitemap/Edit.php b/app/code/core/Mage/Adminhtml/Block/Sitemap/Edit.php index 4f03b214..022d3eb0 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sitemap/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Sitemap/Edit.php @@ -45,8 +45,11 @@ public function __construct() parent::__construct(); - $this->_updateButton('save', 'label', Mage::helper('adminhtml')->__('Save Sitemap')); - $this->_updateButton('delete', 'label', Mage::helper('adminhtml')->__('Delete Sitemap')); + $this->_addButton('generate', array( + 'label' => Mage::helper('adminhtml')->__('Save & Generate'), + 'onclick' => "$('generate').value=1; editForm.submit();", + 'class' => 'add', + )); } /** @@ -63,5 +66,4 @@ public function getHeaderText() return Mage::helper('sitemap')->__('New Sitemap'); } } - } 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 b31803f7..e8797caa 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sitemap/Edit/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Sitemap/Edit/Form.php @@ -98,6 +98,11 @@ protected function _prepareForm() $model->setStoreId(Mage::app()->getStore(true)->getId()); } + $fieldset->addField('generate', 'hidden', array( + 'name' => 'generate', + 'value' => '' + )); + $form->setValues($model->getData()); $form->setUseContainer(true); diff --git a/app/code/core/Mage/Adminhtml/Block/Sitemap/Grid.php b/app/code/core/Mage/Adminhtml/Block/Sitemap/Grid.php index 84fc707a..35253968 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sitemap/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Sitemap/Grid.php @@ -90,6 +90,14 @@ protected function _prepareColumns() )); } + $this->addColumn('action', array( + 'header' => Mage::helper('sitemap')->__('Action'), + 'filter' => false, + 'sortable' => false, + 'width' => '100', + 'renderer' => 'adminhtml/sitemap_grid_renderer_action' + )); + return parent::_prepareColumns(); } diff --git a/app/code/core/Mage/Adminhtml/Block/Sitemap/Grid/Renderer/Action.php b/app/code/core/Mage/Adminhtml/Block/Sitemap/Grid/Renderer/Action.php new file mode 100644 index 00000000..ce4d99e9 --- /dev/null +++ b/app/code/core/Mage/Adminhtml/Block/Sitemap/Grid/Renderer/Action.php @@ -0,0 +1,43 @@ +getColumn()->setActions(array(array( + 'url' => $this->getUrl('*/sitemap/generate', array('sitemap_id' => $row->getSitemapId())), + 'caption' => Mage::helper('sitemap')->__('Generate'), + ))); + return parent::render($row); + } +} diff --git a/app/code/core/Mage/Adminhtml/Block/Sitemap/Grid/Renderer/Link.php b/app/code/core/Mage/Adminhtml/Block/Sitemap/Grid/Renderer/Link.php index 95b6d73b..1f7ff7ef 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sitemap/Grid/Renderer/Link.php +++ b/app/code/core/Mage/Adminhtml/Block/Sitemap/Grid/Renderer/Link.php @@ -41,7 +41,13 @@ class Mage_Adminhtml_Block_Sitemap_Grid_Renderer_Link extends Mage_Adminhtml_Blo */ public function render(Varien_Object $row) { - return str_replace('//', '/', Mage::getBaseUrl('web') . $row->getSitemapPath() . $row->getSitemapFilename()); + $fileName = preg_replace('/^\//', '', $row->getSitemapPath() . $row->getSitemapFilename()); + $url = $this->htmlEscape(Mage::getBaseUrl('web') . $fileName); + + if (file_exists(BP . DS . $fileName)) { + return sprintf('%1$s', $url); + } + return $url; } } diff --git a/app/code/core/Mage/Adminhtml/Block/System/Config/Form.php b/app/code/core/Mage/Adminhtml/Block/System/Config/Form.php index 14b2f426..d313ce00 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Config/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Config/Form.php @@ -260,6 +260,9 @@ public function initFields($fieldset, $group, $section, $fieldPrefix='', $labelP 'can_use_default_value' => $this->canUseDefaultValue((int)$e->show_in_default), 'can_use_website_value' => $this->canUseWebsiteValue((int)$e->show_in_website), )); + if (isset($e->frontend_type) && 'multiselect' === (string)$e->frontend_type && isset($e->can_be_empty)) { + $field->setCanBeEmpty(true); + } $field->setRenderer($fieldRenderer); @@ -274,8 +277,8 @@ public function initFields($fieldset, $group, $section, $fieldPrefix='', $labelP } return $this; } - - + + /** * Enter description here... * diff --git a/app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Edit/Tab/Wizard.php b/app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Edit/Tab/Wizard.php index 1520947b..3441854d 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Edit/Tab/Wizard.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Edit/Tab/Wizard.php @@ -75,10 +75,16 @@ public function getAttributes($entityType) return $this->_attributes[$entityType]; } - public function getValue($key, $default='') + public function getValue($key, $default='', $defaultNew = null) { + if (null !== $defaultNew) { + if (0 == $this->getProfileId()) { + $default = $defaultNew; + } + } + $value = $this->getData($key); - return htmlspecialchars(strlen($value) > 0 ? $value : $default); + return $this->htmlEscape(strlen($value) > 0 ? $value : $default); } public function getSelected($key, $value) @@ -126,8 +132,6 @@ public function getProductTypeFilterOptions() public function getProductAttributeSetFilterOptions() { - - $options = Mage::getResourceModel('eav/entity_attribute_set_collection') ->setEntityTypeFilter(Mage::getModel('catalog/product')->getResource()->getTypeId()) ->load() diff --git a/app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Grid.php b/app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Grid.php index db4d1ba4..390f8c8f 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Grid.php @@ -38,7 +38,7 @@ public function __construct() { parent::__construct(); $this->setId('convertProfileGrid'); - $this->setDefaultSort('id'); + $this->setDefaultSort('profile_id'); } protected function _prepareCollection() @@ -53,7 +53,7 @@ protected function _prepareCollection() protected function _prepareColumns() { - $this->addColumn('id', array( + $this->addColumn('profile_id', array( 'header' => Mage::helper('adminhtml')->__('ID'), 'width' => '50px', 'index' => 'profile_id', diff --git a/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Grid.php b/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Grid.php index 5f381afa..d874fd12 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Grid.php @@ -38,7 +38,7 @@ public function __construct() { parent::__construct(); $this->setId('convertProfileGrid'); - $this->setDefaultSort('id'); + $this->setDefaultSort('profile_id'); } protected function _prepareCollection() @@ -53,7 +53,7 @@ protected function _prepareCollection() protected function _prepareColumns() { - $this->addColumn('id', array( + $this->addColumn('profile_id', array( 'header' => Mage::helper('adminhtml')->__('ID'), 'width' => '50px', 'index' => 'profile_id', 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 93aa320e..33b039ab 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 @@ -55,19 +55,21 @@ protected function _prepareForm() 'required' => true, )); + $dateFormatIso = Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT); $fieldset->addField('date_from', 'date', array( 'label' => Mage::helper('core')->__('Date From'), 'title' => Mage::helper('core')->__('Date From'), 'name' => 'date_from', 'image' => $this->getSkinUrl('images/grid-cal.gif'), + 'format' => $dateFormatIso, //'required' => true, )); - $fieldset->addField('date_to', 'date', array( 'label' => Mage::helper('core')->__('Date To'), 'title' => Mage::helper('core')->__('Date To'), 'name' => 'date_to', 'image' => $this->getSkinUrl('images/grid-cal.gif'), + 'format' => $dateFormatIso, //'required' => true, )); diff --git a/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Edit/Form.php b/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Edit/Form.php index 8acf5fcc..36ce88cc 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Edit/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Edit/Form.php @@ -40,7 +40,7 @@ protected function _prepareForm() $form = new Varien_Data_Form(); $fieldset = $form->addFieldset('base_fieldset', - array('legend'=>Mage::helper('adminhtml')->__('Template Information')) + array('legend'=>Mage::helper('adminhtml')->__('Template Information'),'class'=>'fieldset-wide') ); $fieldset->addField('template_code', 'text', array( @@ -63,7 +63,7 @@ protected function _prepareForm() 'required' => true, 'theme' => 'advanced', 'state' => 'html', - 'style' => 'width:98%; height: 600px;', + 'style' => 'height:24em;', )); if (Mage::registry('email_template')->getId()) { 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 669dcf22..8596d76e 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 @@ -50,7 +50,7 @@ protected function _prepareCollection() protected function _prepareColumns() { - $this->addColumn('id', + $this->addColumn('template_id', array( 'header'=>Mage::helper('adminhtml')->__('ID'), 'index'=>'template_id' diff --git a/app/code/core/Mage/Adminhtml/Block/Tag/Grid/Customers.php b/app/code/core/Mage/Adminhtml/Block/Tag/Grid/Customers.php index 2a2e008c..ccc303e9 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tag/Grid/Customers.php +++ b/app/code/core/Mage/Adminhtml/Block/Tag/Grid/Customers.php @@ -62,7 +62,7 @@ protected function _prepareCollection() protected function _prepareColumns() { - $this->addColumn('id', array( + $this->addColumn('entity_id', array( 'header' =>Mage::helper('tag')->__('ID'), 'width' => '40px', 'align' =>'center', @@ -120,7 +120,7 @@ protected function _prepareColumns() 'is_system' =>true )); - $this->setColumnFilter('id') + $this->setColumnFilter('entity_id') ->setColumnFilter('email') ->setColumnFilter('firstname') ->setColumnFilter('lastname'); diff --git a/app/code/core/Mage/Adminhtml/Block/Tag/Grid/Products.php b/app/code/core/Mage/Adminhtml/Block/Tag/Grid/Products.php index e2bcf370..969de55d 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tag/Grid/Products.php +++ b/app/code/core/Mage/Adminhtml/Block/Tag/Grid/Products.php @@ -53,7 +53,7 @@ protected function _prepareCollection() protected function _prepareColumns() { - $this->addColumn('id', array( + $this->addColumn('product_id', array( 'header' => Mage::helper('tag')->__('ID'), 'align' => 'center', 'width' => '60px', diff --git a/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Grid.php b/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Grid.php index 81b4af08..b86b86a6 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Grid.php @@ -45,54 +45,47 @@ protected function _prepareCollection() protected function _prepareColumns() { - $this->addColumn('code', - array( - 'header'=>Mage::helper('tax')->__('Tax Identifier'), - 'align' =>'left', - 'index' => 'code', - 'filter_index' => 'main_table.code', - ) - ); + $this->addColumn('code', array( + 'header' => Mage::helper('tax')->__('Tax Identifier'), + 'header_export' => Mage::helper('tax')->__('Code'), + 'align' =>'left', + 'index' => 'code', + 'filter_index' => 'main_table.code', + )); - $this->addColumn('tax_country_id', - array( - 'header'=>Mage::helper('tax')->__('Country'), - 'type' =>'country', - 'align' =>'left', - 'index' => 'tax_country_id', - 'filter_index' => 'main_table.tax_country_id', - ) - ); + $this->addColumn('tax_country_id', array( + 'header' => Mage::helper('tax')->__('Country'), + 'type' => 'country', + 'align' => 'left', + 'index' => 'tax_country_id', + 'filter_index' => 'main_table.tax_country_id', + 'renderer' => 'adminhtml/tax_rate_grid_renderer_country', + )); - $this->addColumn('region_name', - array( - 'header'=>Mage::helper('tax')->__('State/Region'), - 'align' =>'left', - 'index' => 'region_name', - 'filter_index' => 'region_table.code', - 'default' => '*', - ) - ); + $this->addColumn('region_name', array( + 'header' => Mage::helper('tax')->__('State/Region'), + 'header_export' => Mage::helper('tax')->__('State'), + 'align' =>'left', + 'index' => 'region_name', + 'filter_index' => 'region_table.code', + 'default' => '*', + )); - $this->addColumn('tax_postcode', - array( - 'header'=>Mage::helper('tax')->__('Zip/Post Code'), - 'align' =>'left', - 'index' => 'tax_postcode', - 'default' => '*', - ) - ); + $this->addColumn('tax_postcode', array( + 'header' => Mage::helper('tax')->__('Zip/Post Code'), + 'align' =>'left', + 'index' => 'tax_postcode', + 'default' => '*', + )); - $this->addColumn('rate', - array( - 'header'=>Mage::helper('tax')->__('Rate'), - 'align' =>'right', - 'index' => 'rate', - 'type' => 'number', - 'default' => '0.00', - 'renderer' => 'adminhtml/tax_rate_grid_renderer_data', - ) - ); + $this->addColumn('rate', array( + 'header' => Mage::helper('tax')->__('Rate'), + 'align' =>'right', + 'index' => 'rate', + 'type' => 'number', + 'default' => '0.00', + 'renderer' => 'adminhtml/tax_rate_grid_renderer_data', + )); $this->addExportType('*/*/exportCsv', Mage::helper('tax')->__('CSV')); $this->addExportType('*/*/exportXml', Mage::helper('tax')->__('XML')); diff --git a/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Grid/Renderer/Country.php b/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Grid/Renderer/Country.php new file mode 100644 index 00000000..0e70abce --- /dev/null +++ b/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Grid/Renderer/Country.php @@ -0,0 +1,46 @@ + + */ +class Mage_Adminhtml_Block_Tax_Rate_Grid_Renderer_Country extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Country +{ +/** + * Render column for export + * + * @param Varien_Object $row + * @return string + */ + public function renderExport(Varien_Object $row) + { + return $row->getData($this->getColumn()->getIndex()); + } +} diff --git a/app/code/core/Mage/Adminhtml/Block/Urlrewrite/Grid.php b/app/code/core/Mage/Adminhtml/Block/Urlrewrite/Grid.php index 88a6c21e..9abf72ba 100644 --- a/app/code/core/Mage/Adminhtml/Block/Urlrewrite/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Urlrewrite/Grid.php @@ -38,7 +38,7 @@ public function __construct() { parent::__construct(); $this->setId('urlrewriteGrid'); - $this->setDefaultSort('id'); + $this->setDefaultSort('url_rewrite_id'); } protected function _prepareCollection() @@ -50,7 +50,7 @@ protected function _prepareCollection() protected function _prepareColumns() { - $this->addColumn('id', array( + $this->addColumn('url_rewrite_id', array( 'header' => $this->__('ID'), 'width' => '50px', 'index' => 'url_rewrite_id' diff --git a/app/code/core/Mage/Adminhtml/Block/Urlrewrite/Product/Grid.php b/app/code/core/Mage/Adminhtml/Block/Urlrewrite/Product/Grid.php index 41befa21..5760f0af 100644 --- a/app/code/core/Mage/Adminhtml/Block/Urlrewrite/Product/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Urlrewrite/Product/Grid.php @@ -48,7 +48,7 @@ protected function _prepareMassaction() protected function _prepareColumns() { - $this->addColumn('id', + $this->addColumn('entity_id', array( 'header'=> Mage::helper('adminhtml')->__('ID'), 'width' => '50px', diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Button.php b/app/code/core/Mage/Adminhtml/Block/Widget/Button.php index 4a2b522d..a54c0b18 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Button.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Button.php @@ -61,7 +61,7 @@ protected function _toHtml() . ' onclick="'.$this->getOnClick().'"' . ' style="'.$this->getStyle() .'"' . ($this->getValue()?' value="'.$this->getValue() . '"':'') - . ($this->getDisabled() ? 'disabled' : '') + . ($this->getDisabled() ? 'disabled="disabled"' : '') . '>' .$this->getLabel().''.$this->getAfterHtml(); return $html; diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Form.php b/app/code/core/Mage/Adminhtml/Block/Widget/Form.php index 289c3540..ed6b166f 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Form.php @@ -125,7 +125,7 @@ protected function _setFieldset($attributes, $fieldset, $exclude=array()) if ($inputType == 'date') { $element->setImage($this->getSkinUrl('images/grid-cal.gif')); - $element->setFormat(Mage::app()->getLocale()->getDateStrFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT)); + $element->setFormat(Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT)); } } } diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid.php index 4236e7e5..2100b7f6 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid.php @@ -695,7 +695,7 @@ public function getCsv() $data = array(); foreach ($this->_columns as $column) { if (!$column->getIsSystem()) { - $data[] = '"'.$column->getHeader().'"'; + $data[] = '"'.$column->getExportHeader().'"'; } } $csv.= implode(',', $data)."\n"; @@ -704,7 +704,7 @@ public function getCsv() $data = array(); foreach ($this->_columns as $column) { if (!$column->getIsSystem()) { - $data[] = '"'.str_replace(array('"', '\\'), array('""', '\\\\'), $column->getRowField($item)).'"'; + $data[] = '"'.str_replace(array('"', '\\'), array('""', '\\\\'), $column->getRowFieldExport($item)).'"'; } } $csv.= implode(',', $data)."\n"; @@ -715,7 +715,7 @@ public function getCsv() $data = array(); foreach ($this->_columns as $column) { if (!$column->getIsSystem()) { - $data[] = '"'.str_replace(array('"', '\\'), array('""', '\\\\'), $column->getRowField($this->getTotals())).'"'; + $data[] = '"'.str_replace(array('"', '\\'), array('""', '\\\\'), $column->getRowFieldExport($this->getTotals())).'"'; } } $csv.= implode(',', $data)."\n"; @@ -838,9 +838,7 @@ public function getJsObjectName() } /** - * Retrieve row identifier - * - * By default we retrieve row edit url + * Deprecated since 1.1.7 * * @return string */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column.php index b817d3d5..f28fcbee 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column.php @@ -128,6 +128,17 @@ public function getRowField(Varien_Object $row) return $this->getRenderer()->render($row); } + /** + * Retrieve row column field value for export + * + * @param Varien_Object $row + * @return string + */ + public function getRowFieldExport(Varien_Object $row) + { + return $this->getRenderer()->renderExport($row); + } + public function setRenderer($renderer) { $this->_renderer = $renderer; @@ -195,6 +206,11 @@ protected function _getRendererByType() return $rendererClass; } + /** + * Retrieve column renderer + * + * @return Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract + */ public function getRenderer() { if (!$this->_renderer) { @@ -286,4 +302,17 @@ public function getFilterHtml() } return null; } + + /** + * Retrieve Header Name for Export + * + * @return string + */ + public function getExportHeader() + { + if ($this->getHeaderExport()) { + return $this->getHeaderExport(); + } + return $this->getHeader(); + } } \ No newline at end of file diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Abstract.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Abstract.php index 9e9b461f..5933f0d8 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Abstract.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Abstract.php @@ -65,6 +65,17 @@ public function render(Varien_Object $row) return $this->_getValue($row); } + /** + * Render column for export + * + * @param Varien_Object $row + * @return string + */ + public function renderExport(Varien_Object $row) + { + return $this->render($row); + } + protected function _getValue(Varien_Object $row) { if ($getter = $this->getColumn()->getGetter()) { diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Country.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Country.php index de101395..ba71f491 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Country.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Country.php @@ -23,7 +23,7 @@ * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ - + /** * Country column renderer * @@ -40,11 +40,11 @@ class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Country extends Mage_Admi public function render(Varien_Object $row) { if ($data = $row->getData($this->getColumn()->getIndex())) { - $name =Mage::app()->getLocale()->getLocale()->getCountryTranslation($data); - if (empty($name)) { - $name = $data; - } - return $name; + $name = Mage::app()->getLocale()->getLocale()->getCountryTranslation($data); + if (empty($name)) { + $name = $data; + } + return $name; } return null; } diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Date.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Date.php index 618a5055..3bbe7f14 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Date.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Date.php @@ -76,7 +76,7 @@ public function render(Varien_Object $row) $format = $this->_getFormat(); try { if($this->getColumn()->getGmtoffset()) { - $data = Mage::app()->getLocale()->date($data, 'yyyy-MM-dd HH:mm:ss')->toString($format); + $data = Mage::app()->getLocale()->date($data, Varien_Date::DATETIME_INTERNAL_FORMAT)->toString($format); } else { $data = Mage::getSingleton('core/locale')->date($data, Zend_Date::ISO_8601, null, false)->toString($format); } @@ -84,7 +84,7 @@ public function render(Varien_Object $row) catch (Exception $e) { if($this->getColumn()->getTimezone()) { - $data = Mage::app()->getLocale()->date($data, 'yyyy-MM-dd HH:mm:ss')->toString($format); + $data = Mage::app()->getLocale()->date($data, Varien_Date::DATETIME_INTERNAL_FORMAT)->toString($format); } else { $data = Mage::getSingleton('core/locale')->date($data, null, null, false)->toString($format); } diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Datetime.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Datetime.php index 713d1008..eb370e5a 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Datetime.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Datetime.php @@ -74,11 +74,11 @@ public function render(Varien_Object $row) if ($data = $row->getData($this->getColumn()->getIndex())) { $format = $this->_getFormat(); try { - $data = Mage::app()->getLocale()->date($data, 'yyyy-MM-dd HH:mm:ss')->toString($format); + $data = Mage::app()->getLocale()->date($data, Varien_Date::DATETIME_INTERNAL_FORMAT)->toString($format); } catch (Exception $e) { - $data = Mage::app()->getLocale()->date($data, 'yyyy-MM-dd HH:mm:ss')->toString($format); + $data = Mage::app()->getLocale()->date($data, Varien_Date::DATETIME_INTERNAL_FORMAT)->toString($format); } return $data; diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Text.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Text.php index 8d63857a..40ba7610 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Text.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Text.php @@ -49,7 +49,7 @@ class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Text extends Mage_Adminht */ public function _getValue(Varien_Object $row) { - $format = ( $this->getColumn()->getFormat() ) ? $this->getColumn()->getFormat() : $row->getFormat(); + $format = ( $this->getColumn()->getFormat() ) ? $this->getColumn()->getFormat() : null; $defaultValue = $this->getColumn()->getDefault(); if (is_null($format)) { // If no format and it column not filtered specified return data as is. diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Massaction/Abstract.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Massaction/Abstract.php index 856d6633..6b336de2 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Massaction/Abstract.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Massaction/Abstract.php @@ -185,9 +185,11 @@ public function getSelectedJson() { if($selected = $this->getRequest()->getParam($this->getFormFieldNameInternal())) { $selected = explode(',', $selected); - return Zend_Json::encode($selected); + return join(',', $selected); +// return Zend_Json::encode($selected); } else { - return '[]'; + return ''; +// return '[]'; } } @@ -219,9 +221,9 @@ public function getApplyButtonHtml() public function getJavaScript() { return " - var {$this->getJsObjectName()} = new varienGridMassaction('{$this->getHtmlId()}', {$this->getGridJsObjectName()}, {$this->getSelectedJson()}, '{$this->getFormFieldNameInternal()}', '{$this->getFormFieldName()}'); + var {$this->getJsObjectName()} = new varienGridMassaction('{$this->getHtmlId()}', {$this->getGridJsObjectName()}, '{$this->getSelectedJson()}', '{$this->getFormFieldNameInternal()}', '{$this->getFormFieldName()}'); {$this->getJsObjectName()}.setItems({$this->getItemsJson()}); - {$this->getJsObjectName()}.setGridIds({$this->getGridIdsJson()}); + {$this->getJsObjectName()}.setGridIds('{$this->getGridIdsJson()}'); ". ($this->getUseAjax() ? "{$this->getJsObjectName()}.setUseAjax(true);" : ''); } @@ -230,9 +232,11 @@ public function getGridIdsJson() $gridIds = $this->getParentBlock()->getCollection()->getAllIds(); if(!empty($gridIds)) { - return Zend_Json::encode($gridIds); + return join(",", $gridIds); + //return Zend_Json::encode($gridIds); } - return '[]'; + return ''; + //return '[]'; } public function getHtmlId() diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Tabs.php b/app/code/core/Mage/Adminhtml/Block/Widget/Tabs.php index 4b0253cc..e42c694a 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Tabs.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Tabs.php @@ -263,6 +263,9 @@ public function getTabLabel($tab) public function getTabContent($tab) { if ($tab instanceof Mage_Adminhtml_Block_Widget_Tab_Interface) { + if ($tab->getSkipGenerateContent()) { + return ''; + } return $tab->toHtml(); } return $tab->getContent(); diff --git a/app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber/Grid/Renderer/Website.php b/app/code/core/Mage/Adminhtml/Helper/Catalog.php similarity index 70% rename from app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber/Grid/Renderer/Website.php rename to app/code/core/Mage/Adminhtml/Helper/Catalog.php index c859218b..e8b0b3ec 100644 --- a/app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber/Grid/Renderer/Website.php +++ b/app/code/core/Mage/Adminhtml/Helper/Catalog.php @@ -25,20 +25,25 @@ */ /** - * Adminhtml newsletter subscribers grid website renderer + * Adminhtml Catalog helper * * @category Mage * @package Mage_Adminhtml - * @author Magento Core Team + * @author Magento Core Team */ -class Mage_Adminhtml_Block_Newsletter_Subscriber_Grid_Renderer_Website extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract +class Mage_Adminhtml_Helper_Catalog extends Mage_Core_Helper_Abstract { - public function render(Varien_Object $row) - { - $collection = Mage::registry('website_collection'); + protected $_attributeTabBlock = null; - return $collection->getItemById($row->getWebsiteId())->getName(); + public function getAttributeTabBlock() + { + return $this->_attributeTabBlock; } + public function setAttributeTabBlock($attributeTabBlock) + { + $this->_attributeTabBlock = $attributeTabBlock; + return $this; + } } diff --git a/app/code/core/Mage/Adminhtml/Helper/Rss.php b/app/code/core/Mage/Adminhtml/Helper/Rss.php new file mode 100644 index 00000000..c2be23ce --- /dev/null +++ b/app/code/core/Mage/Adminhtml/Helper/Rss.php @@ -0,0 +1,50 @@ + + */ +class Mage_Adminhtml_Helper_Rss extends Mage_Core_Helper_Abstract +{ + public function authAdmin($path) + { + $session = Mage::getSingleton('rss/session'); + if ($session->isAdminLoggedIn()) { + return; + } + list($username, $password) = Mage::helper('core/http')->authValidate(); + $adminSession = Mage::getModel('admin/session'); + $user = $adminSession->login($username, $password); + //$user = Mage::getModel('admin/user')->login($username, $password); + if($user && $user->getId() && $user->getIsActive() == '1' && $adminSession->isAllowed($path)){ + $session->setAdmin($user); + } else { + Mage::helper('core/http')->authFailed(); + } + } +} \ No newline at end of file diff --git a/app/code/core/Mage/Adminhtml/Model/Extension/Collection.php b/app/code/core/Mage/Adminhtml/Model/Extension/Collection.php index 24810e4e..90bb753f 100644 --- a/app/code/core/Mage/Adminhtml/Model/Extension/Collection.php +++ b/app/code/core/Mage/Adminhtml/Model/Extension/Collection.php @@ -65,6 +65,11 @@ protected function _fetchPackages() protected function _collectRecursive($dir, &$result, $dirsFirst = true) { $_result = glob($dir . DS . '*'); + + if (!is_array($_result)) { + return; + } + if (!$dirsFirst) { // collect all the stuff recursively foreach ($_result as $item) { diff --git a/app/code/core/Mage/Adminhtml/Model/Observer.php b/app/code/core/Mage/Adminhtml/Model/Observer.php index 66703cb3..408dadae 100644 --- a/app/code/core/Mage/Adminhtml/Model/Observer.php +++ b/app/code/core/Mage/Adminhtml/Model/Observer.php @@ -51,4 +51,18 @@ public function bindStore() return $this; } + /** + * Prepare massaction separated data + * + * @return Mage_Adminhtml_Model_Observer + */ + public function massactionPrepareKey() + { + $request = Mage::app()->getFrontController()->getRequest(); + if ($key = $request->getPost('massaction_prepare_key')) { + $value = split(',', $request->getPost($key)); + $request->setPost($key, $value ? $value : null); + } + return $this; + } } diff --git a/app/code/core/Mage/Adminhtml/Model/Sales/Order/Create.php b/app/code/core/Mage/Adminhtml/Model/Sales/Order/Create.php index f6ae5ab5..02fc84cf 100644 --- a/app/code/core/Mage/Adminhtml/Model/Sales/Order/Create.php +++ b/app/code/core/Mage/Adminhtml/Model/Sales/Order/Create.php @@ -51,6 +51,11 @@ class Mage_Adminhtml_Model_Sales_Order_Create extends Varien_Object protected $_productOptions = array(); + /** + * @var Mage_Customer_Model_Customer + */ + protected $_customer; + public function __construct() { $this->_session = Mage::getSingleton('adminhtml/session_quote'); @@ -156,16 +161,19 @@ public function initFromOrder(Mage_Sales_Model_Order $order) $this->getSession()->setCustomerId($order->getCustomerId()); $this->getSession()->setStoreId($order->getStoreId()); - foreach ($order->getItemsCollection() as $orderItem) { + foreach ($order->getItemsCollection( + array_keys(Mage::getConfig()->getNode('adminhtml/sales/order/create/available_product_types')->asArray()), + true + ) as $orderItem) { /* @var $orderItem Mage_Sales_Model_Order_Item */ if (!$orderItem->getParentItem()) { if ($order->getReordered()) { - $qty = $orderItem->getQtyOrdered(); + $qty = $orderItem->getQtyOrdered(); } else { - $qty = $orderItem->getQtyOrdered() - $orderItem->getQtyShipped() - $orderItem->getQtyInvoiced(); + $qty = $orderItem->getQtyOrdered() - $orderItem->getQtyShipped() - $orderItem->getQtyInvoiced(); } - + if ($qty > 0) { $item = $this->initFromOrderItem($orderItem, $qty); if (is_string($item)) { @@ -525,9 +533,14 @@ public function addProduct($product, $qty=1) { $qty = (int) $qty; if (!($product instanceof Mage_Catalog_Model_Product)) { + $productId = $product; $product = Mage::getModel('catalog/product') ->setStore($this->getSession()->getStore()) + ->setStoreId($this->getSession()->getStoreId()) ->load($product); + if (!$product->getId()) { + Mage::throwException(Mage::helper('adminhtml')->__('Failed to add a product to cart by id "%s"', $productId)); + } } if ($item = $this->getQuote()->getItemByProduct($product)) { @@ -820,7 +833,7 @@ public function getShippingAddress() public function setShippingAddress($address) { if (is_array($address)) { - $address['save_in_address_book'] = isset($address['save_in_address_book']) ? 1 : 0; + $address['save_in_address_book'] = isset($address['save_in_address_book']) ? (empty($address['save_in_address_book']) ? 0 : 1) : 0; $shippingAddress = Mage::getModel('sales/quote_address') ->setData($address); $shippingAddress->implodeStreetAddress(); @@ -1001,7 +1014,7 @@ public function createOrder() $this->_validate(); if (!$this->getQuote()->getCustomerIsGuest()) { - $this->_saveCustomer(); + $this->_putCustomerIntoQuote(); } $quoteConvert = Mage::getModel('sales/convert_quote'); @@ -1087,8 +1100,9 @@ public function createOrder() $order->setIncrementId($originalId.'-'.$order->getEditIncrement()); } - $order->place() - ->save(); + $order->place(); + $this->_saveCustomerAfterOrder($order); + $order->save(); if ($this->getSession()->getOrder()->getId()) { $oldOrder = $this->getSession()->getOrder(); @@ -1126,7 +1140,7 @@ protected function _validate() $errors = array(); if (count($items) == 0) { - $errors[] = Mage::helper('adminhtml')->__('You need specify order items'); + $errors[] = Mage::helper('adminhtml')->__('You need to specify order items'); } if (!$this->getQuote()->isVirtual()) { @@ -1149,7 +1163,86 @@ protected function _validate() } /** - * Save order customer account data + * Create customer model and assign it to quote + */ + protected function _putCustomerIntoQuote() + { + if (!$this->getSession()->getCustomer()->getId()) { + $customer = Mage::getModel('customer/customer'); + /* @var $customer Mage_Customer_Model_Customer*/ + + $billingAddress = $this->getBillingAddress()->exportCustomerAddress(); + + $customer->addData($billingAddress->getData()) + ->addData($this->getData('account')) + ->setPassword($customer->generatePassword()) + ->setWebsiteId($this->getSession()->getStore()->getWebsiteId()) + ->setStoreId($this->getSession()->getStore()->getId()) + ->addAddress($billingAddress); + + if (!$this->getShippingAddress()->getSameAsBilling()) { + $shippingAddress = $this->getShippingAddress()->exportCustomerAddress(); + $customer->addAddress($shippingAddress); + } + else { + $shippingAddress = $billingAddress; + } + + $customer->setEmail($this->_getNewCustomerEmail($customer)) + ->setDefaultBilling($billingAddress->getId()) + ->setDefaultShipping($shippingAddress->getId()); + } + else { + $customer = $this->getSession()->getCustomer(); + $customer->addData($this->getData('account')); + } + $this->getQuote()->setCustomer($customer); + $this->_customer = $customer; + } + + /** + * Save customer + * + * @param Mage_Customer_Model_Customer $order + */ + protected function _saveCustomerAfterOrder($order) + { + if ($this->_customer) { + if (!$this->_customer->getId()) { + $this->_customer->save(); + $order->setCustomerId($this->_customer->getId()); + $this->getBillingAddress()->setCustomerId($this->_customer->getId()); + $this->getShippingAddress()->setCustomerId($this->_customer->getId()); + $this->_customer->sendNewAccountEmail(); + } + else { + $saveCusstomerAddress = false; + + if ($this->getBillingAddress()->getSaveInAddressBook()) { + $billingAddress = $this->getBillingAddress()->exportCustomerAddress(); + if ($this->getBillingAddress()->getCustomerAddressId()) { + $billingAddress->setId($this->getBillingAddress()->getCustomerAddressId()); + } + $this->_customer->addAddress($billingAddress); + $saveCusstomerAddress = true; + } + if ($this->getShippingAddress()->getSaveInAddressBook()) { + $shippingAddress = $this->getShippingAddress()->exportCustomerAddress(); + if ($this->getShippingAddress()->getCustomerAddressId()) { + $shippingAddress->setId($this->getShippingAddress()->getCustomerAddressId()); + } + $this->_customer->addAddress($shippingAddress); + $saveCusstomerAddress = true; + } + if ($saveCusstomerAddress) { + $this->_customer->save(); + } + } + } + } + + /** + * Deprecated since 1.1.7 * * @return unknown */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Abstract.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Abstract.php new file mode 100644 index 00000000..1abd9e16 --- /dev/null +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Abstract.php @@ -0,0 +1,95 @@ + + */ +abstract class Mage_Adminhtml_Model_System_Config_Backend_Currency_Abstract extends Mage_Core_Model_Config_Data +{ + /** + * Retrieve allowed currencies for current scope + * + * @return array + */ + protected function _getAllowedCurrencies() + { + if ($this->getData('groups/options/fields/allow/inherit')) { + return split(',', Mage::getConfig()->getNode('currency/options/allow', $this->getScope(), $this->getScopeId())); + } + return $this->getData('groups/options/fields/allow/value'); + } + + /** + * Retrieve Installed Currencies + * + * @return array + */ + protected function _getInstalledCurrencies() + { + return split(',', Mage::getStoreConfig('system/currency/installed')); + } + + /** + * Retrieve Base Currency value for current scope + * + * @return string + */ + protected function _getCurrencyBase() + { + if (!$value = $this->getData('groups/options/fields/base/value')) { + $value = Mage::getConfig()->getNode( + Mage_Directory_Model_Currency::XML_PATH_CURRENCY_BASE, + $this->getScope(), + $this->getScopeId() + ); + } + return strval($value); + } + + /** + * Retrieve Default desplay Currency value for current scope + * + * @return string + */ + protected function _getCurrencyDefault() + { + if (!$value = $this->getData('groups/options/fields/default/value')) { + $value = Mage::getConfig()->getNode( + Mage_Directory_Model_Currency::XML_PATH_CURRENCY_DEFAULT, + $this->getScope(), + $this->getScopeId() + ); + } + return strval($value); + } +} diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Allow.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Allow.php new file mode 100644 index 00000000..26401687 --- /dev/null +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Allow.php @@ -0,0 +1,64 @@ + + */ +class Mage_Adminhtml_Model_System_Config_Backend_Currency_Allow extends Mage_Adminhtml_Model_System_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 + */ + protected function _afterSave() + { + $exceptions = array(); + foreach ($this->_getAllowedCurrencies() as $currencyCode) { + if (!in_array($currencyCode, $this->_getInstalledCurrencies())) { + $exceptions[] = Mage::helper('adminhtml')->__('Selected allow currency "%s" is not available in installed currencies', Mage::app()->getLocale()->currency($currencyCode)->getName()); + } + } + + if (!in_array($this->_getCurrencyDefault(), $this->_getAllowedCurrencies())) { + $exceptions[] = Mage::helper('adminhtml')->__('Default display currency "%s" is not available in allowed currencies', Mage::app()->getLocale()->currency($this->_getCurrencyDefault())->getName()); + } + + if ($exceptions) { + Mage::throwException(join("\n", $exceptions)); + } + + return $this; + } +} diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Base.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Base.php new file mode 100644 index 00000000..162dfe19 --- /dev/null +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Base.php @@ -0,0 +1,53 @@ + + */ +class Mage_Adminhtml_Model_System_Config_Backend_Currency_Base extends Mage_Adminhtml_Model_System_Config_Backend_Currency_Abstract +{ + /** + * Check base currency is available in installed currencies + * + * @return Mage_Adminhtml_Model_System_Config_Backend_Currency_Base + */ + protected function _afterSave() + { + if (!in_array($this->getValue(), $this->_getInstalledCurrencies())) { + Mage::throwException(Mage::helper('adminhtml')->__('Selected base currency is not available in installed currencies')); + } + + return $this; + } +} + diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Default.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Default.php new file mode 100644 index 00000000..33789f1f --- /dev/null +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Default.php @@ -0,0 +1,57 @@ + + */ +class Mage_Adminhtml_Model_System_Config_Backend_Currency_Default extends Mage_Adminhtml_Model_System_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 + */ + protected function _afterSave() + { + if (!in_array($this->getValue(), $this->_getInstalledCurrencies())) { + Mage::throwException(Mage::helper('adminhtml')->__('Selected default display currency is not available in installed currencies')); + } + + if (!in_array($this->getValue(), $this->_getAllowedCurrencies())) { + Mage::throwException(Mage::helper('adminhtml')->__('Selected default display currency is not available in allowed currencies')); + } + + return $this; + } +} diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Log/Cron.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Log/Cron.php new file mode 100644 index 00000000..bdab0a0f --- /dev/null +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Log/Cron.php @@ -0,0 +1,88 @@ + + */ +class Mage_Adminhtml_Model_System_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'; + + /** + * Cron settings after save + * + * @return Mage_Adminhtml_Model_System_Config_Backend_Log_Cron + */ + protected function _afterSave() + { + $enabled = $this->getData('groups/log/enabled/value'); + $time = $this->getData('groups/log/fields/time/value'); + $frequncy = $this->getData('groups/log/frequency/value'); + $errorEmail = $this->getData('groups/log/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; + + if ($enabled) { + $cronDayOfWeek = date('N'); + $cronExprArray = array( + intval($time[1]), # Minute + intval($time[0]), # Hour + ($frequncy == $frequencyMonthly) ? '1' : '*', # Day of the Month + '*', # Month of the Year + ($frequncy == $frequencyWeekly) ? '1' : '*', # Day of the Week + ); + $cronExprString = join(' ', $cronExprArray); + } + else { + $cronExprString = ''; + } + + try { + Mage::getModel('core/config_data') + ->load(self::CRON_STRING_PATH, 'path') + ->setValue($cronExprString) + ->setPath(self::CRON_STRING_PATH) + ->save(); + + Mage::getModel('core/config_data') + ->load(self::CRON_MODEL_PATH, 'path') + ->setValue((string) Mage::getConfig()->getNode(self::CRON_MODEL_PATH)) + ->setPath(self::CRON_MODEL_PATH) + ->save(); + } + catch (Exception $e) { + Mage::throwException(Mage::helper('adminhtml')->__('Unable to save Cron expression')); + } + } +} \ No newline at end of file diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Locale/Weekdays.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Locale/Weekdays.php new file mode 100644 index 00000000..384ddb2f --- /dev/null +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Locale/Weekdays.php @@ -0,0 +1,38 @@ + + */ +class Mage_Adminhtml_Model_System_Config_Source_Locale_Weekdays +{ + public function toOptionArray() + { + return Mage::app()->getLocale()->getOptionWeekdays(); + } +} diff --git a/app/code/core/Mage/Adminhtml/Model/Url.php b/app/code/core/Mage/Adminhtml/Model/Url.php index a72c528c..57a768c9 100644 --- a/app/code/core/Mage/Adminhtml/Model/Url.php +++ b/app/code/core/Mage/Adminhtml/Model/Url.php @@ -25,9 +25,16 @@ */ class Mage_Adminhtml_Model_Url extends Mage_Core_Model_Url { - + /** + * Retrieve is secure mode for ULR logic + * + * @return bool + */ public function getSecure() { + if ($this->hasData('secure_is_forced')) { + return $this->getData('secure'); + } return Mage::getStoreConfigFlag('web/secure/use_in_adminhtml'); } diff --git a/app/code/core/Mage/Adminhtml/controllers/Catalog/CategoryController.php b/app/code/core/Mage/Adminhtml/controllers/Catalog/CategoryController.php index b6ae81fa..e6d665a5 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Catalog/CategoryController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Catalog/CategoryController.php @@ -91,6 +91,7 @@ public function editAction() $redirect = false; $storeId = (int) $this->getRequest()->getParam('store'); + $parentId = (int) $this->getRequest()->getParam('parent'); $_prevStoreId = Mage::getSingleton('admin/session') ->getLastViewedStore(true); @@ -115,7 +116,7 @@ public function editAction() return; } - if ($storeId && !$categoryId) { + if ($storeId && !$categoryId && !$parentId) { $store = Mage::app()->getStore($storeId); $_prevCategoryId = (int) $store->getRootCategoryId(); $this->getRequest()->setParam('id', $_prevCategoryId); @@ -247,6 +248,11 @@ public function saveAction() $category->setPostedProducts($products); } + Mage::dispatchEvent('catalog_category_prepare_save', array( + 'category' => $category, + 'request' => $this->getRequest() + )); + try { // if( $this->getRequest()->getParam('image') ) diff --git a/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/AttributeController.php b/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/AttributeController.php index 9458e8a7..2ebee6cd 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/AttributeController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/AttributeController.php @@ -134,6 +134,7 @@ public function validateAction() public function saveAction() { if ($data = $this->getRequest()->getPost()) { + $redirectBack = $this->getRequest()->getParam('back', false); $model = Mage::getModel('catalog/entity_attribute'); /* @var $model Mage_Catalog_Model_Entity_Attribute */ @@ -199,8 +200,10 @@ public function saveAction() 'attribute'=> $model->getId(), '_current' => true )); + } elseif ($redirectBack) { + $this->_redirect('*/*/edit', array('attribute_id' => $model->getId(),'_current'=>true)); } else { - $this->_redirect('*/*/'); + $this->_redirect('*/*/', array()); } return; } catch (Exception $e) { diff --git a/app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php b/app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php index 2d9ffa78..c236b6e6 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php @@ -169,12 +169,21 @@ public function newAction() { $product = $this->_initProduct(); + Mage::dispatchEvent('catalog_product_new_action', array('product' => $product)); + if ($this->getRequest()->getParam('popup')) { $this->loadLayout('popup'); } else { + $_additionalLayoutPart = ''; + if ($product->getTypeId() == Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE + && !($product->getTypeInstance()->getUsedProductAttributeIds())) + { + $_additionalLayoutPart = '_new'; + } $this->loadLayout(array( 'default', - 'adminhtml_catalog_product_'.$product->getTypeId() + strtolower($this->getFullActionName()), + 'adminhtml_catalog_product_'.$product->getTypeId() . $_additionalLayoutPart )); $this->_setActiveMenu('catalog/products'); } @@ -190,9 +199,19 @@ public function editAction() { $product = $this->_initProduct(); + Mage::dispatchEvent('catalog_product_edit_action', array('product' => $product)); + + $_additionalLayoutPart = ''; + if ($product->getTypeId() == Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE + && !($product->getTypeInstance()->getUsedProductAttributeIds())) + { + $_additionalLayoutPart = '_new'; + } + $this->loadLayout(array( 'default', - 'adminhtml_catalog_product_'.$product->getTypeId() + strtolower($this->getFullActionName()), + 'adminhtml_catalog_product_'.$product->getTypeId() . $_additionalLayoutPart )); $this->_setActiveMenu('catalog/products'); @@ -726,7 +745,7 @@ public function massStatusAction() $this->_getSession()->addError($e->getMessage()); } catch (Exception $e) { - $this->_getSession->addException($e, $this->__('There was an error while updating product(s) status')); + $this->_getSession()->addException($e, $this->__('There was an error while updating product(s) status')); } $this->_redirect('*/*/', array('store'=> $storeId)); diff --git a/app/code/core/Mage/Adminhtml/controllers/Cms/BlockController.php b/app/code/core/Mage/Adminhtml/controllers/Cms/BlockController.php index 1c0da935..0463e3a6 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Cms/BlockController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Cms/BlockController.php @@ -115,26 +115,6 @@ public function saveAction() $model = Mage::getModel('cms/block'); $model->setData($data); - $format = Mage::app()->getLocale()->getDateTimeFormat( - Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM - ); - - if (!empty($data['custom_theme_from'])) { - $date = Mage::app()->getLocale()->date($data['custom_theme_from'], $format); - $time = $date->getTimestamp(); - $model->setCustomThemeFrom( - Mage::getSingleton('core/date')->gmtDate(null, $time) - ); - } - - if (!empty($data['custom_theme_to'])) { - $date = Mage::app()->getLocale()->date($data['custom_theme_to'], $format); - $time = $date->getTimestamp(); - $model->setCustomThemeTo( - Mage::getSingleton('core/date')->gmtDate(null, $time) - ); - } - // try to save it try { // save the data diff --git a/app/code/core/Mage/Adminhtml/controllers/Cms/PageController.php b/app/code/core/Mage/Adminhtml/controllers/Cms/PageController.php index 8f9f43a4..890aabe7 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Cms/PageController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Cms/PageController.php @@ -102,8 +102,13 @@ public function editAction() $this->_initAction() ->_addBreadcrumb($id ? Mage::helper('cms')->__('Edit Page') : Mage::helper('cms')->__('New Page'), $id ? Mage::helper('cms')->__('Edit Page') : Mage::helper('cms')->__('New Page')) ->_addContent($this->getLayout()->createBlock('adminhtml/cms_page_edit')->setData('action', $this->getUrl('*/cms_page/save'))) - ->_addLeft($this->getLayout()->createBlock('adminhtml/cms_page_edit_tabs')) - ->renderLayout(); + ->_addLeft($this->getLayout()->createBlock('adminhtml/cms_page_edit_tabs')); + + if (Mage::app()->getConfig()->getModuleConfig('Mage_GoogleOptimizer')->is('active', true)) { + $this->_addJs($this->getLayout()->createBlock('googleoptimizer/js')->setTemplate('googleoptimizer/js.phtml')); + } + + $this->renderLayout(); } /** @@ -128,25 +133,7 @@ public function saveAction() $model->setData($data); - $format = Mage::app()->getLocale()->getDateFormat( - Mage_Core_Model_Locale::FORMAT_TYPE_SHORT - ); - - if (!empty($data['custom_theme_from'])) { - $date = Mage::app()->getLocale()->date($data['custom_theme_from'], $format); - $time = $date->getTimestamp(); - $model->setCustomThemeFrom( - Mage::getSingleton('core/date')->gmtDate(null, $time) - ); - } - - if (!empty($data['custom_theme_to'])) { - $date = Mage::app()->getLocale()->date($data['custom_theme_to'], $format); - $time = $date->getTimestamp(); - $model->setCustomThemeTo( - Mage::getSingleton('core/date')->gmtDate(null, $time) - ); - } + Mage::dispatchEvent('cms_page_prepare_save', array('page' => $model, 'request' => $this->getRequest())); // try to save it try { diff --git a/app/code/core/Mage/Adminhtml/controllers/Newsletter/SubscriberController.php b/app/code/core/Mage/Adminhtml/controllers/Newsletter/SubscriberController.php index cda3a2bb..1253edfd 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Newsletter/SubscriberController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Newsletter/SubscriberController.php @@ -34,35 +34,35 @@ class Mage_Adminhtml_Newsletter_SubscriberController extends Mage_Adminhtml_Controller_Action { - public function indexAction() - { - if ($this->getRequest()->getParam('ajax')) { - $this->_forward('grid'); - return; - } + public function indexAction() + { + if ($this->getRequest()->getParam('ajax')) { + $this->_forward('grid'); + return; + } - $this->loadLayout(); + $this->loadLayout(); - $this->_setActiveMenu('newsletter/subscriber'); + $this->_setActiveMenu('newsletter/subscriber'); - $this->_addBreadcrumb(Mage::helper('newsletter')->__('Newsletter'), Mage::helper('newsletter')->__('Newsletter')); - $this->_addBreadcrumb(Mage::helper('newsletter')->__('Subscribers'), Mage::helper('newsletter')->__('Subscribers')); + $this->_addBreadcrumb(Mage::helper('newsletter')->__('Newsletter'), Mage::helper('newsletter')->__('Newsletter')); + $this->_addBreadcrumb(Mage::helper('newsletter')->__('Subscribers'), Mage::helper('newsletter')->__('Subscribers')); - $this->_addContent( - $this->getLayout()->createBlock('adminhtml/newsletter_subscriber','subscriber') - ); + $this->_addContent( + $this->getLayout()->createBlock('adminhtml/newsletter_subscriber','subscriber') + ); - $this->renderLayout(); - } + $this->renderLayout(); + } - public function gridAction() - { - $this->getResponse()->setBody( - $this->getLayout()->createBlock('adminhtml/newsletter_subscriber_grid')->toHtml() - ); - } + public function gridAction() + { + $this->getResponse()->setBody( + $this->getLayout()->createBlock('adminhtml/newsletter_subscriber_grid')->toHtml() + ); + } - /** + /** * Export subscribers grid to CSV format */ public function exportCsvAction() @@ -103,13 +103,14 @@ protected function _sendUploadResponse($fileName, $content) public function massUnsubscribeAction() { $subscribersIds = $this->getRequest()->getParam('subscriber'); - if(!is_array($subscribersIds)) { + if (!is_array($subscribersIds)) { Mage::getSingleton('adminhtml/session')->addError(Mage::helper('newsletter')->__('Please select subscriber(s)')); - } else { + } + else { try { foreach ($subscribersIds as $subscriberId) { $subscriber = Mage::getModel('newsletter/subscriber')->load($subscriberId); - $subscriber->unsubscribe($subscriber->getEmail()); + $subscriber->unsubscribe(); } Mage::getSingleton('adminhtml/session')->addSuccess( Mage::helper('adminhtml')->__( @@ -126,6 +127,6 @@ public function massUnsubscribeAction() protected function _isAllowed() { - return Mage::getSingleton('admin/session')->isAllowed('newsletter/subscriber'); + return Mage::getSingleton('admin/session')->isAllowed('newsletter/subscriber'); } } \ No newline at end of file diff --git a/app/code/core/Mage/Adminhtml/controllers/Promo/CatalogController.php b/app/code/core/Mage/Adminhtml/controllers/Promo/CatalogController.php index 26f218b3..a563b07b 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Promo/CatalogController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Promo/CatalogController.php @@ -111,39 +111,23 @@ public function saveAction() unset($data['rule']); if (!empty($data['auto_apply'])) { - $autoApply = true; - unset($data['auto_apply']); + $autoApply = true; + unset($data['auto_apply']); } else { - $autoApply = false; + $autoApply = false; } $model->loadPost($data); Mage::getSingleton('adminhtml/session')->setPageData($model->getData()); try { - if ($this->getRequest()->getParam('discount_amount') < 0) { - Mage::throwException(Mage::helper('salesrule')->__('Invalid discount amount.')); - } - - // validate from and to dates - $dateValidator = Mage::getModel('core/date'); - foreach (array('from_date', 'to_date') as $param) { - $value = $this->getRequest()->getParam($param); - if (!empty($value)) { - list($y, $m, $d) = $dateValidator->parseDateTime($value, 'm/d/y'); - if (!$dateValidator->checkDateTime($y, $m, $d)) { - Mage::throwException(Mage::helper('salesrule')->__('Invalid date "%s".', $value)); - } - } - } - $model->save(); Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('catalogrule')->__('Rule was successfully saved')); Mage::getSingleton('adminhtml/session')->setPageData(false); if ($autoApply) { - $this->_forward('applyRules'); + $this->_forward('applyRules'); } else { Mage::app()->saveCache(1, 'catalog_rules_dirty'); - $this->_redirect('*/*/'); + $this->_redirect('*/*/'); } return; } catch (Exception $e) { @@ -245,15 +229,22 @@ public function newActionHtmlAction() $this->getResponse()->setBody($html); } + /** + * Apply all active catalog price rules + */ public function applyRulesAction() { try { $resource = Mage::getResourceSingleton('catalogrule/rule'); - $resource->applyAllRulesForDateRange($resource->formatDate(mktime(0,0,0))); + $resource->applyAllRulesForDateRange(); Mage::app()->removeCache('catalog_rules_dirty'); - Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('catalogrule')->__('Rules were successfully applied')); + Mage::getSingleton('adminhtml/session')->addSuccess( + Mage::helper('catalogrule')->__('Rules were successfully applied') + ); } catch (Exception $e) { - Mage::getSingleton('adminhtml/session')->addError(Mage::helper('catalogrule')->__('Unable to apply rules')); + Mage::getSingleton('adminhtml/session')->addError( + Mage::helper('catalogrule')->__('Unable to apply rules') + ); throw $e; } @@ -272,6 +263,6 @@ public function addToAlersAction() protected function _isAllowed() { - return Mage::getSingleton('admin/session')->isAllowed('promo/catalog'); + return Mage::getSingleton('admin/session')->isAllowed('promo/catalog'); } } diff --git a/app/code/core/Mage/Adminhtml/controllers/Promo/QuoteController.php b/app/code/core/Mage/Adminhtml/controllers/Promo/QuoteController.php index 7510904d..dc18c737 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Promo/QuoteController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Promo/QuoteController.php @@ -128,22 +128,6 @@ public function saveAction() Mage::getSingleton('adminhtml/session')->setPageData($model->getData()); try { - if ($this->getRequest()->getParam('discount_amount') < 0) { - Mage::throwException(Mage::helper('salesrule')->__('Invalid discount amount.')); - } - - // validate from and to dates - $dateValidator = Mage::getModel('core/date'); - foreach (array('from_date', 'to_date') as $param) { - $value = $this->getRequest()->getParam($param); - if (!empty($value)) { - list($y, $m, $d) = $dateValidator->parseDateTime($value, 'm/d/y'); - if (!$dateValidator->checkDateTime($y, $m, $d)) { - Mage::throwException(Mage::helper('salesrule')->__('Invalid date "%s".', $value)); - } - } - } - $model->save(); Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('salesrule')->__('Rule was successfully saved')); Mage::getSingleton('adminhtml/session')->setPageData(false); diff --git a/app/code/core/Mage/Adminhtml/controllers/Rss/CatalogController.php b/app/code/core/Mage/Adminhtml/controllers/Rss/CatalogController.php new file mode 100644 index 00000000..627e725d --- /dev/null +++ b/app/code/core/Mage/Adminhtml/controllers/Rss/CatalogController.php @@ -0,0 +1,63 @@ + + */ + +class Mage_Adminhtml_Rss_CatalogController extends Mage_Adminhtml_Controller_Action +{ + public function preDispatch() + { + $path = ''; + if ($this->getRequest()->getActionName() == 'review') { + $path = 'catalog/reviews_ratings'; + } elseif ($this->getRequest()->getActionName() == 'notifystock') { + $path = 'catalog/products'; + } + Mage::helper('adminhtml/rss')->authAdmin($path); + parent::preDispatch(); + return $this; + } + + public function notifystockAction() + { + $this->getResponse()->setHeader('Content-type', 'text/xml; charset=UTF-8'); + $this->loadLayout(false); + $this->renderLayout(); + } + + public function reviewAction() + { + $this->getResponse()->setHeader('Content-type', 'text/xml; charset=UTF-8'); + $this->loadLayout(false); + $this->renderLayout(); + } +} \ No newline at end of file diff --git a/app/code/core/Mage/Adminhtml/controllers/Rss/OrderController.php b/app/code/core/Mage/Adminhtml/controllers/Rss/OrderController.php new file mode 100644 index 00000000..74f58b52 --- /dev/null +++ b/app/code/core/Mage/Adminhtml/controllers/Rss/OrderController.php @@ -0,0 +1,51 @@ + + */ + +class Mage_Adminhtml_Rss_OrderController extends Mage_Adminhtml_Controller_Action +{ + public function preDispatch() + { + Mage::helper('adminhtml/rss')->authAdmin('catalog/reviews_ratings'); + parent::preDispatch(); + return $this; + } + + public function newAction() + { + Mage::helper('rss')->authAdmin('sales/order'); + $this->getResponse()->setHeader('Content-type', 'text/xml; charset=UTF-8'); + $this->loadLayout(false); + $this->renderLayout(); + } +} \ No newline at end of file diff --git a/app/code/core/Mage/Adminhtml/controllers/Sales/Order/CreateController.php b/app/code/core/Mage/Adminhtml/controllers/Sales/Order/CreateController.php index 7e7b558c..05ec5109 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Sales/Order/CreateController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Sales/Order/CreateController.php @@ -399,7 +399,6 @@ public function saveAction() $url = $this->_redirect('*/*/'); } catch (Exception $e){ - echo $e; $this->_getSession()->addException($e, $this->__('Order saving error: %s', $e->getMessage())); $url = $this->_redirect('*/*/'); } diff --git a/app/code/core/Mage/Adminhtml/controllers/Sales/Order/CreditmemoController.php b/app/code/core/Mage/Adminhtml/controllers/Sales/Order/CreditmemoController.php index 4300161c..889a5cbd 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Sales/Order/CreditmemoController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Sales/Order/CreditmemoController.php @@ -453,13 +453,19 @@ public function addCommentAction() protected function _needToAddDummy($item, $qtys) { if ($item->getHasChildren()) { foreach ($item->getChildrenItems() as $child) { - if (isset($qtys[$child->getId()]) && $qtys[$child->getId()]['qty'] > 0) { + if (isset($qtys[$child->getId()]) + && isset($qtys[$child->getId()]['qty']) + && $qtys[$child->getId()]['qty'] > 0) + { return true; } } return false; } else if($item->getParentItem()) { - if (isset($qtys[$item->getParentItem()->getId()]) && $qtys[$item->getParentItem()->getId()]['qty'] > 0) { + if (isset($qtys[$item->getParentItem()->getId()]) + && isset($qtys[$item->getParentItem()->getId()]['qty']) + && $qtys[$item->getParentItem()->getId()]['qty'] > 0) + { return true; } return false; diff --git a/app/code/core/Mage/Adminhtml/controllers/Sales/Order/InvoiceController.php b/app/code/core/Mage/Adminhtml/controllers/Sales/Order/InvoiceController.php index ad819bc3..fe03f4d3 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Sales/Order/InvoiceController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Sales/Order/InvoiceController.php @@ -129,16 +129,22 @@ protected function _saveInvoice($invoice) return $this; } + /** + * Prepare shipment + * + * @param Mage_Sales_Model_Order_Invoice $invoice + * @return Mage_Sales_Model_Order_Shipment + */ protected function _prepareShipment($invoice) { $convertor = Mage::getModel('sales/convert_order'); + /* @var $convertor Mage_Sales_Model_Convert_Order */ $shipment = $convertor->toShipment($invoice->getOrder()); $savedQtys = $this->_getItemQtys(); $skipedParent = array(); - //echo "
";
+
         foreach ($invoice->getOrder()->getAllItems() as $item) {
-            //echo "\n".$item->getSku();
             /*
              * if this is child and its parent was skipped
              * bc of something we need to skip child also
@@ -146,17 +152,17 @@ protected function _prepareShipment($invoice)
             if ($item->getParentItem() && isset($skipedParent[$item->getParentItem()->getId()])){
                 continue;
             }
-            //echo "1";
+
             if (isset($savedQtys[$item->getId()])) {
                 $qty = min($savedQtys[$item->getId()], $item->getQtyToShip());
             } else {
                 $qty = $item->getQtyToShip();
             }
-            //echo "2";
+
             if (!$item->isDummy(true) && !$item->getQtyToShip()) {
                 continue;
             }
-            //echo "3";
+
             /**
              * if this is a dummy item and we don't need it. we skip it.
              * also if this item is parent we need to mark that we skipped
@@ -168,21 +174,21 @@ protected function _prepareShipment($invoice)
                 }
                 continue;
             }
-            //echo "4";
+
             if ($item->getIsVirtual()) {
                 continue;
             }
-            //echo "5";
+
             $shipItem = $convertor->itemToShipmentItem($item);
 
             if ($item->isDummy(true)) {
                 $qty = 1;
             }
-            //echo "Qty:".$qty;
+
             $shipItem->setQty($qty);
             $shipment->addItem($shipItem);
         }
-        //die;
+
         if (!count($shipment->getAllItems())) {
             // no need to create empty shipment
             return false;
@@ -305,6 +311,7 @@ public function saveAction()
                 if (!empty($data['do_shipment'])) {
                     $shipment = $this->_prepareShipment($invoice);
                     if ($shipment) {
+                        $shipment->setEmailSent($invoice->getEmailSent());
                         $transactionSave->addObject($shipment);
                     }
                 }
diff --git a/app/code/core/Mage/Adminhtml/controllers/Sales/OrderController.php b/app/code/core/Mage/Adminhtml/controllers/Sales/OrderController.php
index a8391b03..c10f5886 100644
--- a/app/code/core/Mage/Adminhtml/controllers/Sales/OrderController.php
+++ b/app/code/core/Mage/Adminhtml/controllers/Sales/OrderController.php
@@ -359,22 +359,22 @@ public function pdfinvoicesAction(){
                     ->addAttributeToSelect('*')
                     ->setOrderFilter($orderId)
                     ->load();
-				if ($invoices->getSize() > 0) {
-					$flag = true;
-					if (!isset($pdf)){
-                    	$pdf = Mage::getModel('sales/order_pdf_invoice')->getPdf($invoices);
-	                } else {
-	                    $pages = Mage::getModel('sales/order_pdf_invoice')->getPdf($invoices);
-	                    $pdf->pages = array_merge ($pdf->pages, $pages->pages);
-	                }
-				}
+                if ($invoices->getSize() > 0) {
+                    $flag = true;
+                    if (!isset($pdf)){
+                        $pdf = Mage::getModel('sales/order_pdf_invoice')->getPdf($invoices);
+                    } else {
+                        $pages = Mage::getModel('sales/order_pdf_invoice')->getPdf($invoices);
+                        $pdf->pages = array_merge ($pdf->pages, $pages->pages);
+                    }
+                }
+            }
+            if ($flag) {
+                return $this->_prepareDownloadResponse('invoice'.Mage::getSingleton('core/date')->date('Y-m-d_H-i-s').'.pdf', $pdf->render(), 'application/pdf');
+            } else {
+                $this->_getSession()->addError($this->__('There are no printable documents related to selected orders'));
+                $this->_redirect('*/*/');
             }
-			if ($flag) {
-				return $this->_prepareDownloadResponse('invoice'.Mage::getSingleton('core/date')->date('Y-m-d_H-i-s').'.pdf', $pdf->render(), 'application/pdf');
-			} else {
-				$this->_getSession()->addError($this->__('There are no printable documents related to selected orders'));
-        		$this->_redirect('*/*/');
-			}
 
         }
         $this->_redirect('*/*/');
@@ -392,21 +392,21 @@ public function pdfshipmentsAction(){
                     ->setOrderFilter($orderId)
                     ->load();
                 if ($shipments->getSize()) {
-                	$flag = true;
-	                if (!isset($pdf)){
-	                    $pdf = Mage::getModel('sales/order_pdf_shipment')->getPdf($shipments);
-	                } else {
-	                    $pages = Mage::getModel('sales/order_pdf_shipment')->getPdf($shipments);
-	                    $pdf->pages = array_merge ($pdf->pages, $pages->pages);
-	                }
+                    $flag = true;
+                    if (!isset($pdf)){
+                        $pdf = Mage::getModel('sales/order_pdf_shipment')->getPdf($shipments);
+                    } else {
+                        $pages = Mage::getModel('sales/order_pdf_shipment')->getPdf($shipments);
+                        $pdf->pages = array_merge ($pdf->pages, $pages->pages);
+                    }
                 }
             }
-			if ($flag) {
-				return $this->_prepareDownloadResponse('packingslip'.Mage::getSingleton('core/date')->date('Y-m-d_H-i-s').'.pdf', $pdf->render(), 'application/pdf');
-			} else {
-				$this->_getSession()->addError($this->__('There are no printable documents related to selected orders'));
-        		$this->_redirect('*/*/');
-			}
+            if ($flag) {
+                return $this->_prepareDownloadResponse('packingslip'.Mage::getSingleton('core/date')->date('Y-m-d_H-i-s').'.pdf', $pdf->render(), 'application/pdf');
+            } else {
+                $this->_getSession()->addError($this->__('There are no printable documents related to selected orders'));
+                $this->_redirect('*/*/');
+            }
         }
         $this->_redirect('*/*/');
     }
@@ -423,21 +423,21 @@ public function pdfcreditmemosAction(){
                     ->setOrderFilter($orderId)
                     ->load();
                 if ($creditmemos->getSize()) {
-                	$flag = true;
-                	if (!isset($pdf)){
-	                    $pdf = Mage::getModel('sales/order_pdf_creditmemo')->getPdf($creditmemos);
-	                } else {
-	                    $pages = Mage::getModel('sales/order_pdf_creditmemo')->getPdf($creditmemos);
-	                    $pdf->pages = array_merge ($pdf->pages, $pages->pages);
-	                }
+                    $flag = true;
+                    if (!isset($pdf)){
+                        $pdf = Mage::getModel('sales/order_pdf_creditmemo')->getPdf($creditmemos);
+                    } else {
+                        $pages = Mage::getModel('sales/order_pdf_creditmemo')->getPdf($creditmemos);
+                        $pdf->pages = array_merge ($pdf->pages, $pages->pages);
+                    }
                 }
             }
-			if ($flag) {
-				return $this->_prepareDownloadResponse('creditmemo'.Mage::getSingleton('core/date')->date('Y-m-d_H-i-s').'.pdf', $pdf->render(), 'application/pdf');
-			} else {
-				$this->_getSession()->addError($this->__('There are no printable documents related to selected orders'));
-        		$this->_redirect('*/*/');
-			}
+            if ($flag) {
+                return $this->_prepareDownloadResponse('creditmemo'.Mage::getSingleton('core/date')->date('Y-m-d_H-i-s').'.pdf', $pdf->render(), 'application/pdf');
+            } else {
+                $this->_getSession()->addError($this->__('There are no printable documents related to selected orders'));
+                $this->_redirect('*/*/');
+            }
         }
         $this->_redirect('*/*/');
     }
@@ -454,7 +454,7 @@ public function pdfdocsAction(){
                     ->setOrderFilter($orderId)
                     ->load();
                 if ($invoices->getSize()){
-                	$flag = true;
+                    $flag = true;
                     if (!isset($pdf)){
                         $pdf = Mage::getModel('sales/order_pdf_invoice')->getPdf($invoices);
                     } else {
@@ -468,7 +468,7 @@ public function pdfdocsAction(){
                     ->setOrderFilter($orderId)
                     ->load();
                 if ($shipments->getSize()){
-                	$flag = true;
+                    $flag = true;
                     if (!isset($pdf)){
                         $pdf = Mage::getModel('sales/order_pdf_shipment')->getPdf($shipments);
                     } else {
@@ -482,21 +482,21 @@ public function pdfdocsAction(){
                     ->setOrderFilter($orderId)
                     ->load();
                 if ($creditmemos->getSize()) {
-                	$flag = true;
-                	if (!isset($pdf)){
-	                    $pdf = Mage::getModel('sales/order_pdf_creditmemo')->getPdf($creditmemos);
-	                } else {
-	                    $pages = Mage::getModel('sales/order_pdf_creditmemo')->getPdf($creditmemos);
-	                    $pdf->pages = array_merge ($pdf->pages, $pages->pages);
-	                }
+                    $flag = true;
+                    if (!isset($pdf)){
+                        $pdf = Mage::getModel('sales/order_pdf_creditmemo')->getPdf($creditmemos);
+                    } else {
+                        $pages = Mage::getModel('sales/order_pdf_creditmemo')->getPdf($creditmemos);
+                        $pdf->pages = array_merge ($pdf->pages, $pages->pages);
+                    }
                 }
             }
-			if ($flag) {
-				return $this->_prepareDownloadResponse('docs'.Mage::getSingleton('core/date')->date('Y-m-d_H-i-s').'.pdf', $pdf->render(), 'application/pdf');
-			} else {
-				$this->_getSession()->addError($this->__('There are no printable documents related to selected orders'));
-        		$this->_redirect('*/*/');
-			}
+            if ($flag) {
+                return $this->_prepareDownloadResponse('docs'.Mage::getSingleton('core/date')->date('Y-m-d_H-i-s').'.pdf', $pdf->render(), 'application/pdf');
+            } else {
+                $this->_getSession()->addError($this->__('There are no printable documents related to selected orders'));
+                $this->_redirect('*/*/');
+            }
         }
         $this->_redirect('*/*/');
     }
diff --git a/app/code/core/Mage/Adminhtml/controllers/SitemapController.php b/app/code/core/Mage/Adminhtml/controllers/SitemapController.php
index a8b4e19d..e2f5e98f 100644
--- a/app/code/core/Mage/Adminhtml/controllers/SitemapController.php
+++ b/app/code/core/Mage/Adminhtml/controllers/SitemapController.php
@@ -114,9 +114,9 @@ public function saveAction()
             $model = Mage::getModel('sitemap/sitemap');
 
             if ($this->getRequest()->getParam('sitemap_id')) {
-            	$model ->load($this->getRequest()->getParam('sitemap_id'));
+                $model ->load($this->getRequest()->getParam('sitemap_id'));
 
-            	if ($model->getSitemapFilename() && file_exists($model->getPreparedFilename())){
+                if ($model->getSitemapFilename() && file_exists($model->getPreparedFilename())){
                     unlink($model->getPreparedFilename());
                 }
             }
@@ -138,7 +138,12 @@ public function saveAction()
                     $this->_redirect('*/*/edit', array('sitemap_id' => $model->getId()));
                     return;
                 }
-                // go to grid
+                // go to grid or forward to generate action
+                if ($this->getRequest()->getParam('generate')) {
+                    $this->getRequest()->setParam('sitemap_id', $model->getId());
+                    $this->_forward('generate');
+                    return;
+                }
                 $this->_redirect('*/*/');
                 return;
 
@@ -208,15 +213,22 @@ public function generateAction()
         $sitemap->load($id);
         // if sitemap record exists
         if ($sitemap->getId()) {
-            // generate sitemap
-            $xml = $sitemap->generateXml();
-            // save it to a file
-            $io = new Varien_Io_File();
-            $io->setAllowCreateFolders(true);
-            $destinationFolder['path'] = $io->getDestinationFolder($sitemap->getPreparedFilename());
-            $io->open($destinationFolder);
-            $io->write($sitemap->getPreparedFilename(), $xml);
+            try {
+                $sitemap->generateXml();
+
+                $this->_getSession()->addSuccess(Mage::helper('sitemap')->__('Sitemap "%s" has been successfully generated', $sitemap->getSitemapFilename()));
+            }
+            catch (Mage_Core_Exception $e) {
+                $this->_getSession()->addError($e->getMessage());
+            }
+            catch (Exception $e) {
+                $this->_getSession()->addException($e, Mage::helper('sitemap')->__('Unable to generate a sitemap'));
+            }
         }
+        else {
+            $this->_getSession()->addError(Mage::helper('sitemap')->__('Unable to find a sitemap to generate'));
+        }
+
         // go to grid
         $this->_redirect('*/*/');
     }
diff --git a/app/code/core/Mage/Adminhtml/controllers/System/CacheController.php b/app/code/core/Mage/Adminhtml/controllers/System/CacheController.php
index 67105e5b..a155cfe7 100644
--- a/app/code/core/Mage/Adminhtml/controllers/System/CacheController.php
+++ b/app/code/core/Mage/Adminhtml/controllers/System/CacheController.php
@@ -84,7 +84,7 @@ public function saveAction()
                 case 'refresh_catalog_rewrites':
                     try {
                         Mage::getSingleton('catalog/url')->refreshRewrites();
-                        $this->_getSession()->addSuccess(Mage::helper('adminhtml')->__('Catalog Rewrites were refreshed succesfuly'));
+                        $this->_getSession()->addSuccess(Mage::helper('adminhtml')->__('Catalog Rewrites were refreshed successfully'));
                     }
                     catch (Mage_Core_Exception $e) {
                         $this->_getSession()->addError($e->getMessage());
@@ -97,7 +97,7 @@ public function saveAction()
                 case 'clear_images_cache':
                     try {
                         Mage::getModel('catalog/product_image')->clearCache();
-                        $this->_getSession()->addSuccess(Mage::helper('adminhtml')->__('Image cache were cleared succesfuly'));
+                        $this->_getSession()->addSuccess(Mage::helper('adminhtml')->__('Image cache were cleared successfully'));
                     }
                     catch (Mage_Core_Exception $e) {
                         $this->_getSession()->addError($e->getMessage());
@@ -117,7 +117,7 @@ public function saveAction()
 
                         $flag->setState(Mage_CatalogIndex_Model_Catalog_Index_Flag::STATE_QUEUED)->save();
                         Mage::getSingleton('catalogindex/indexer')->plainReindex();
-                        $this->_getSession()->addSuccess(Mage::helper('adminhtml')->__('Layered Navigation Indices were refreshed succesfuly'));
+                        $this->_getSession()->addSuccess(Mage::helper('adminhtml')->__('Layered Navigation Indices were refreshed successfully'));
                     }
                     catch (Mage_Core_Exception $e) {
                         $this->_getSession()->addError($e->getMessage());
@@ -168,7 +168,7 @@ public function refreshCatalogRewritesAction()
     {
         try {
             Mage::getSingleton('catalog/url')->refreshRewrites();
-            $this->_getSession()->addSuccess(Mage::helper('adminhtml')->__('Catalog Rewrites was refreshed succesfuly'));
+            $this->_getSession()->addSuccess(Mage::helper('adminhtml')->__('Catalog Rewrites was refreshed successfully'));
         }
         catch (Mage_Core_Exception $e) {
             $this->_getSession()->addError($e->getMessage());
@@ -184,7 +184,7 @@ public function clearImagesCacheAction()
     {
         try {
             Mage::getModel('catalog/product_image')->clearCache();
-            $this->_getSession()->addSuccess(Mage::helper('adminhtml')->__('Image cache was cleared succesfuly'));
+            $this->_getSession()->addSuccess(Mage::helper('adminhtml')->__('Image cache was cleared successfully'));
         }
         catch (Mage_Core_Exception $e) {
             $this->_getSession()->addError($e->getMessage());
@@ -200,7 +200,7 @@ public function refreshLayeredNavigationAction()
     {
         try {
             Mage::getSingleton('catalogindex/indexer')->plainReindex();
-            $this->_getSession()->addSuccess(Mage::helper('adminhtml')->__('Layered Navigation Indices was refreshed succesfuly'));
+            $this->_getSession()->addSuccess(Mage::helper('adminhtml')->__('Layered Navigation Indices was refreshed successfully'));
         }
         catch (Mage_Core_Exception $e) {
             $this->_getSession()->addError($e->getMessage());
diff --git a/app/code/core/Mage/Adminhtml/controllers/System/ConfigController.php b/app/code/core/Mage/Adminhtml/controllers/System/ConfigController.php
index c63191e2..c30cf1fd 100644
--- a/app/code/core/Mage/Adminhtml/controllers/System/ConfigController.php
+++ b/app/code/core/Mage/Adminhtml/controllers/System/ConfigController.php
@@ -63,10 +63,10 @@ public function editAction()
         $current = $this->getRequest()->getParam('section');
         $website = $this->getRequest()->getParam('website');
         $store   = $this->getRequest()->getParam('store');
-		
+
         $configFields = Mage::getSingleton('adminhtml/config');
- 
-        
+
+
         $sections     = $configFields->getSections($current);
         $section      = $sections->$current;
         $hasChildren  = $configFields->hasChildren($section, $website, $store);
@@ -83,14 +83,14 @@ public function editAction()
 
         $this->getLayout()->getBlock('left')
             ->append($this->getLayout()->createBlock('adminhtml/system_config_tabs')->initTabs());
-       
+
         if ($this->_isSectionAllowed($this->getRequest()->getParam('section'))) {
             $this->_addContent($this->getLayout()->createBlock('adminhtml/system_config_edit')->initForm());
-           
+
             $this->_addJs($this->getLayout()->createBlock('adminhtml/template')->setTemplate('system/shipping/ups.phtml'));
             $this->_addJs($this->getLayout()->createBlock('adminhtml/template')->setTemplate('system/config/js.phtml'));
             $this->_addJs($this->getLayout()->createBlock('adminhtml/template')->setTemplate('system/shipping/applicable_country.phtml'));
-            
+
             $this->renderLayout();
         }
     }
@@ -105,8 +105,8 @@ public function saveAction()
         /* @var $session Mage_Adminhtml_Model_Session */
 
         $groups = $this->getRequest()->getPost('groups');
-       
-   	
+
+
         if (isset($_FILES['groups']['name']) && is_array($_FILES['groups']['name'])) {
             /**
              * Carefully merge $_FILES and $_POST information
@@ -128,13 +128,28 @@ public function saveAction()
             if (!$this->_isSectionAllowed($this->getRequest()->getParam('section'))) {
                 throw new Exception(Mage::helper('adminhtml')->__('This section is not allowed.'));
             }
+
+            // custom save logic
+            $this->_saveSection();
+            $section = $this->getRequest()->getParam('section');
+            $website = $this->getRequest()->getParam('website');
+            $store   = $this->getRequest()->getParam('store');
             Mage::getModel('adminhtml/config_data')
-                ->setSection($this->getRequest()->getParam('section'))
-                ->setWebsite($this->getRequest()->getParam('website'))
-                ->setStore($this->getRequest()->getParam('store'))
+                ->setSection($section)
+                ->setWebsite($website)
+                ->setStore($store)
                 ->setGroups($groups)
                 ->save();
 
+            // reinit configuration
+            Mage::getConfig()->reinit();
+            Mage::app()->reinitStores();
+
+            // website and store codes can be used in event implementation, so set them as well
+            Mage::dispatchEvent("admin_system_config_changed_section_{$section}",
+                array('website' => $website, 'store' => $store)
+            );
+
             $session->addSuccess(Mage::helper('adminhtml')->__('Configuration successfully saved'));
         }
         catch (Mage_Core_Exception $e) {
@@ -151,6 +166,36 @@ public function saveAction()
         $this->_redirect('*/*/edit', array('_current' => array('section', 'website', 'store')));
     }
 
+    /**
+     *  Custom save logic for section
+     *
+     *  @param    none
+     *  @return	  void
+     */
+    protected function _saveSection ()
+    {
+        $method = '_save' . uc_words($this->getRequest()->getParam('section'), '');
+        if (method_exists($this, $method)) {
+            $this->$method();
+        }
+    }
+
+    /**
+     *  Description goes here...
+     *
+     *  @param    none
+     *  @return	  void
+     */
+    protected function _saveAdvanced ()
+    {
+        Mage::app()->cleanCache(
+            array(
+                'layout',
+                Mage_Core_Model_Layout_Update::LAYOUT_GENERAL_CACHE_TAG
+            )
+        );
+    }
+
     /**
      * action for ajax saving of fieldset state
      *
diff --git a/app/code/core/Mage/Adminhtml/controllers/System/StoreController.php b/app/code/core/Mage/Adminhtml/controllers/System/StoreController.php
index 2127f1f0..ab6469f6 100644
--- a/app/code/core/Mage/Adminhtml/controllers/System/StoreController.php
+++ b/app/code/core/Mage/Adminhtml/controllers/System/StoreController.php
@@ -98,19 +98,19 @@ public function editStoreAction()
             case 'website':
                 $itemId     = $this->getRequest()->getParam('website_id', null);
                 $model      = Mage::getModel('core/website')->load($itemId);
-                $notExists  = Mage::helper('core')->__('Website not exists');
+                $notExists  = Mage::helper('core')->__("Website doesn't exist");
                 $codeBase   = Mage::helper('core')->__('Before modifying the website code please make sure that it is not used in index.php');
                 break;
             case 'group':
                 $itemId     = $this->getRequest()->getParam('group_id', null);
                 $model      = Mage::getModel('core/store_group')->load($itemId);
-                $notExists  = Mage::helper('core')->__('Store not exists');
+                $notExists  = Mage::helper('core')->__("Store doesn't exist");
                 $codeBase   = false;
                 break;
             case 'store':
                 $itemId     = $this->getRequest()->getParam('store_id', null);
                 $model      = Mage::getModel('core/store')->load($itemId);
-                $notExists  = Mage::helper('core')->__('Store View not exists');
+                $notExists  = Mage::helper('core')->__("Store view doesn't exist");
                 $codeBase   = Mage::helper('core')->__('Before modifying the store view code please make sure that it is not used in index.php');
                 break;
         }
@@ -229,7 +229,7 @@ public function deleteWebsiteAction()
             return ;
         }
         if (!$model->isCanDelete()) {
-            $session->addError(Mage::helper('core')->__('This Website cannot be deleted'));
+            $session->addError(Mage::helper('core')->__('This website cannot be deleted'));
             $this->_redirect('*/*/editWebsite/', array('website_id'=>$model->getId()));
             return ;
         }
@@ -254,7 +254,7 @@ public function deleteGroupAction()
             return ;
         }
         if (!$model->isCanDelete()) {
-            $session->addError(Mage::helper('core')->__('This Store cannot be deleted'));
+            $session->addError(Mage::helper('core')->__('This store cannot be deleted'));
             $this->_redirect('*/*/editGroup/', array('group_id'=>$model->getId()));
             return ;
         }
@@ -279,7 +279,7 @@ public function deleteStoreAction()
             return ;
         }
         if (!$model->isCanDelete()) {
-            $session->addError(Mage::helper('core')->__('This Store View cannot be deleted'));
+            $session->addError(Mage::helper('core')->__('This store view cannot be deleted'));
             $this->_redirect('*/*/editStore/', array('store_id'=>$model->getId()));
             return ;
         }
@@ -306,7 +306,7 @@ public function deleteWebsitePostAction()
             return ;
         }
         if (!$model->isCanDelete()) {
-            $session->addError(Mage::helper('core')->__('This Website cannot be deleted.'));
+            $session->addError(Mage::helper('core')->__('This website cannot be deleted.'));
             $this->_redirect('*/*/editWebsite/', array('website_id'=>$model->getId()));
             return ;
         }
@@ -344,7 +344,7 @@ public function deleteWebsitePostAction()
             $session->addError($e->getMessage());
         }
         catch (Exception $e) {
-            $session->addException($e, Mage::helper('core')->__('Unable to delete Website. Please, try again later.'));
+            $session->addException($e, Mage::helper('core')->__('Unable to delete website. Please, try again later.'));
         }
         $this->_redirect('*/*/editWebsite', array('website_id'=>$itemId));
     }
@@ -361,7 +361,7 @@ public function deleteGroupPostAction()
             return ;
         }
         if (!$model->isCanDelete()) {
-            $session->addError(Mage::helper('core')->__('This Store cannot be deleted.'));
+            $session->addError(Mage::helper('core')->__('This store cannot be deleted.'));
             $this->_redirect('*/*/editGroup/', array('group_id'=>$model->getId()));
             return ;
         }
@@ -399,7 +399,7 @@ public function deleteGroupPostAction()
             $session->addError($e->getMessage());
         }
         catch (Exception $e) {
-            $session->addException($e, Mage::helper('core')->__('Unable to delete Store. Please, try again later.'));
+            $session->addException($e, Mage::helper('core')->__('Unable to delete store. Please, try again later.'));
         }
         $this->_redirect('*/*/editGroup', array('group_id'=>$itemId));
     }
@@ -416,7 +416,7 @@ public function deleteStorePostAction()
             return ;
         }
         if (!$model->isCanDelete()) {
-            $session->addError(Mage::helper('core')->__('This Store View cannot be deleted.'));
+            $session->addError(Mage::helper('core')->__('This store view cannot be deleted.'));
             $this->_redirect('*/*/editStore/', array('store_id'=>$model->getId()));
             return ;
         }
@@ -449,7 +449,7 @@ public function deleteStorePostAction()
 
             Mage::dispatchEvent('store_delete', array('store'=>$model));
 
-            $session->addSuccess(Mage::helper('core')->__('Store View was successfully deleted.'));
+            $session->addSuccess(Mage::helper('core')->__('Store view was successfully deleted.'));
             $this->_redirect('*/*/');
             return ;
         }
@@ -457,7 +457,7 @@ public function deleteStorePostAction()
             $session->addError($e->getMessage());
         }
         catch (Exception $e) {
-            $session->addException($e, Mage::helper('core')->__('Unable to delete Store View. Please, try again later.'));
+            $session->addException($e, Mage::helper('core')->__('Unable to delete store view. Please, try again later.'));
         }
         $this->_redirect('*/*/editStore', array('store_id'=>$itemId));
     }
diff --git a/app/code/core/Mage/Adminhtml/etc/config.xml b/app/code/core/Mage/Adminhtml/etc/config.xml
index 72a190d8..eb5a7a87 100644
--- a/app/code/core/Mage/Adminhtml/etc/config.xml
+++ b/app/code/core/Mage/Adminhtml/etc/config.xml
@@ -5,10 +5,10 @@
  *
  * 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.
+ * 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/osl-3.0.php
+ * 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.
@@ -65,6 +65,11 @@
                         adminhtml/observer
                         bindStore
                     
+                    
+                        singleton
+                        adminhtml/observer
+                        massactionPrepareKey
+                    
                 
             
         
diff --git a/app/code/core/Mage/Api/etc/api.xml b/app/code/core/Mage/Api/etc/api.xml
index 21bd83cd..8fb322d4 100644
--- a/app/code/core/Mage/Api/etc/api.xml
+++ b/app/code/core/Mage/Api/etc/api.xml
@@ -5,10 +5,10 @@
  *
  * 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.
+ * 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/osl-3.0.php
+ * 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.
@@ -97,8 +97,8 @@
                 
                     
                     
-                    
-                    
+                    
+                    
                 
             
         
diff --git a/app/code/core/Mage/Api/etc/config.xml b/app/code/core/Mage/Api/etc/config.xml
index 0440fadd..12b0c929 100644
--- a/app/code/core/Mage/Api/etc/config.xml
+++ b/app/code/core/Mage/Api/etc/config.xml
@@ -5,10 +5,10 @@
  *
  * 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.
+ * 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/osl-3.0.php
+ * 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.
diff --git a/app/code/core/Mage/Api/etc/system.xml b/app/code/core/Mage/Api/etc/system.xml
index 1239e5a3..64d0f40c 100644
--- a/app/code/core/Mage/Api/etc/system.xml
+++ b/app/code/core/Mage/Api/etc/system.xml
@@ -5,10 +5,10 @@
  *
  * 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.
+ * 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/osl-3.0.php
+ * 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.
@@ -22,7 +22,7 @@
  * @category   Mage
  * @package    Mage_Api
  * @copyright  Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
- * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ * @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
  */
 -->
 
diff --git a/app/code/core/Mage/Backup/Model/Fs/Collection.php b/app/code/core/Mage/Backup/Model/Fs/Collection.php
index 47a76c2d..e43e36d7 100644
--- a/app/code/core/Mage/Backup/Model/Fs/Collection.php
+++ b/app/code/core/Mage/Backup/Model/Fs/Collection.php
@@ -67,10 +67,11 @@ public function getSize()
 
     public function load($printQuery = false, $logQuery = false)
     {
-        $this->_loadFiles();
-
-        if($this->getPageSize()) {
-            $this->_items = array_slice($this->_items, ($this->getCurPage()-1)*$this->getPageSize(), $this->getPageSize());
+        if (!$this->_isLoaded) {
+            $this->_loadFiles();
+            if($this->getPageSize()) {
+                $this->_items = array_slice($this->_items, ($this->getCurPage()-1)*$this->getPageSize(), $this->getPageSize());
+            }
         }
 
         return $this;
@@ -78,7 +79,7 @@ public function load($printQuery = false, $logQuery = false)
 
     protected function _loadFiles()
     {
-        if(!$this->_isLoaded) {
+        if (!$this->_isLoaded) {
 
             $readPath = Mage::getBaseDir('var') . DS . "backups";
 
diff --git a/app/code/core/Mage/Backup/etc/config.xml b/app/code/core/Mage/Backup/etc/config.xml
index 5fd39054..ea9b82f2 100644
--- a/app/code/core/Mage/Backup/etc/config.xml
+++ b/app/code/core/Mage/Backup/etc/config.xml
@@ -5,10 +5,10 @@
  *
  * 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.
+ * 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/osl-3.0.php
+ * 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.
@@ -22,7 +22,7 @@
  * @category   Mage
  * @package    Mage_Backup
  * @copyright  Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
- * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ * @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
  */
 -->
 
diff --git a/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle.php b/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle.php
index 03eade12..45aefa43 100644
--- a/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle.php
+++ b/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle.php
@@ -32,15 +32,26 @@
  * @author      Magento Core Team 
  */
 
-class Mage_Bundle_Block_Adminhtml_Catalog_Product_Edit_Tab_Bundle extends Mage_Adminhtml_Block_Widget
+class Mage_Bundle_Block_Adminhtml_Catalog_Product_Edit_Tab_Bundle extends Mage_Adminhtml_Block_Widget implements Mage_Adminhtml_Block_Widget_Tab_Interface
 {
     protected $_product = null;
     public function __construct()
     {
         parent::__construct();
+        $this->setSkipGenerateContent(true);
         $this->setTemplate('bundle/product/edit/bundle.phtml');
     }
 
+    public function getTabUrl()
+    {
+        return $this->getUrl('*/*/bundles', array('_current' => true));
+    }
+
+    public function getTabClass()
+    {
+        return 'ajax';
+    }
+
     protected function _prepareLayout()
     {
         $this->setChild('add_button',
@@ -80,5 +91,20 @@ public function getProduct()
         return Mage::registry('product');
     }
 
-
+    public function getTabLabel()
+    {
+        return Mage::helper('bundle')->__('Bundle Items');
+    }
+    public function getTabTitle()
+    {
+        return Mage::helper('bundle')->__('Bundle Items');
+    }
+    public function canShowTab()
+    {
+        return true;
+    }
+    public function isHidden()
+    {
+        return false;
+    }
 }
diff --git a/app/code/core/Mage/Bundle/Model/Observer.php b/app/code/core/Mage/Bundle/Model/Observer.php
index 5a900e77..f120aea5 100644
--- a/app/code/core/Mage/Bundle/Model/Observer.php
+++ b/app/code/core/Mage/Bundle/Model/Observer.php
@@ -86,16 +86,13 @@ public function appendUpsellProducts($observer)
 
         $bundles = Mage::getModel('catalog/product')->getResourceCollection()
             ->addAttributeToSelect(Mage::getSingleton('catalog/config')->getProductAttributes())
-            ->addAttributeToSort('position', 'asc')
             ->addStoreFilter()
             ->addMinimalPrice()
 
             ->joinTable('bundle/option', 'parent_id=entity_id', array('option_id' => 'option_id'))
             ->joinTable('bundle/selection', 'option_id=option_id', array('product_id' => 'product_id'), '{{table}}.product_id='.$product->getId());
 
-        $ids = Mage::getSingleton('checkout/cart')->getProductIds();
-        $ids = array_merge($ids, $collection->getAllIds());
-
+        $ids = $collection->getAllIds();
         if (count($ids)) {
             $bundles->addIdFilter($ids, true);
         }
@@ -123,7 +120,8 @@ public function appendUpsellProducts($observer)
      * @param Varien_Object $observer
      * @return Mage_Bundle_Model_Observer
      */
-    public function appendBundleSelectionData($observer) {
+    public function appendBundleSelectionData($observer)
+    {
         $orderItem = $observer->getEvent()->getOrderItem();
         $quoteItem = $observer->getEvent()->getItem();
 
@@ -143,7 +141,8 @@ public function appendBundleSelectionData($observer) {
      * @param Varien_Object $observer
      * @return Mage_Bundle_Model_Observer
      */
-    public function loadProductOptions($observer) {
+    public function loadProductOptions($observer)
+    {
         $collection = $observer->getEvent()->getCollection();
         foreach ($collection->getItems() as $item){
             if ($item->getTypeId() == Mage_Catalog_Model_Product_Type::TYPE_BUNDLE) {
@@ -154,4 +153,75 @@ public function loadProductOptions($observer) {
         return $this;
     }
 
+    /**
+     * duplicating bundle options and selections
+     *
+     * @param Varien_Object $observer
+     * @return Mage_Bundle_Model_Observer
+     */
+    public function duplicateProduct($observer)
+    {
+        $product = $observer->getEvent()->getCurrentProduct();
+
+        if ($product->getTypeId() != Mage_Catalog_Model_Product_Type::TYPE_BUNDLE) {
+            //do nothing if not bundle
+            return $this;
+        }
+
+        $newProduct = $observer->getEvent()->getNewProduct();
+
+        $product->getTypeInstance()->setStoreFilter($product->getStoreId());
+        $optionCollection = $product->getTypeInstance()->getOptionsCollection();
+        $selectionCollection = $product->getTypeInstance()->getSelectionsCollection(
+                $product->getTypeInstance()->getOptionsIds()
+            );
+        $optionCollection->appendSelections($selectionCollection);
+
+        $optionRawData = array();
+        $selectionRawData = array();
+
+        $i = 0;
+        foreach ($optionCollection as $option) {
+            $optionRawData[$i] = array(
+                    'required' => $option->getData('required'),
+                    'position' => $option->getData('position'),
+                    'type' => $option->getData('type'),
+                    'title' => $option->getData('title')?$option->getData('title'):$option->getData('default_title'),
+                    'delete' => ''
+                );
+            foreach ($option->getSelections() as $selection) {
+                $selectionRawData[$i][] = array(
+                    'product_id' => $selection->getProductId(),
+                    'position' => $selection->getPosition(),
+                    'is_default' => $selection->getIsDefault(),
+                    'selection_price_type' => $selection->getSelectionPriceType(),
+                    'selection_price_value' => $selection->getSelectionPriceValue(),
+                    'selection_qty' => $selection->getSelectionQty(),
+                    'selection_can_change_qty' => $selection->getSelectionCanChangeQty(),
+                    'delete' => ''
+                );
+            }
+            $i++;
+        }
+
+        $newProduct->setBundleOptionsData($optionRawData);
+        $newProduct->setBundleSelectionsData($selectionRawData);
+        return $this;
+    }
+
+    /**
+     * Setting attribute tab block for bundle
+     *
+     * @param Varien_Object $observer
+     * @return Mage_Bundle_Model_Observer
+     */
+    public function setAttributeTabBlock($observer)
+    {
+        $product = $observer->getEvent()->getProduct();
+        if ($product->getTypeId() == Mage_Catalog_Model_Product_Type::TYPE_BUNDLE) {
+            Mage::helper('adminhtml/catalog')
+                ->setAttributeTabBlock('bundle/adminhtml_catalog_product_edit_tab_attributes');
+        }
+        return $this;
+    }
 }
diff --git a/app/code/core/Mage/Bundle/Model/Product/Price.php b/app/code/core/Mage/Bundle/Model/Product/Price.php
index b374c4dd..06cec25f 100644
--- a/app/code/core/Mage/Bundle/Model/Product/Price.php
+++ b/app/code/core/Mage/Bundle/Model/Product/Price.php
@@ -121,10 +121,9 @@ public function getPrices($product, $which = null)
                             continue;
                         }
 
+                        $qty = $selection->getSelectionQty();
                         if ($selection->getSelectionCanChangeQty() && $option->getType() != 'multi' && $option->getType() != 'checkbox') {
-                            $qty = 1;
-                        } else {
-                            $qty = $selection->getSelectionQty();
+                            $qty = min(1, $qty);
                         }
 
                         $selectionMinimalPrices[] = $this->getSelectionPrice($product, $selection, $qty);
@@ -389,12 +388,12 @@ protected function _applySpecialPrice($product, $finalPrice)
     {
         $specialPrice = $product->getSpecialPrice();
         if (is_numeric($specialPrice)) {
-            $today = floor(time()/86400)*86400;
-            $from = floor(strtotime($product->getSpecialFromDate())/86400)*86400;
-            $to = floor(strtotime($product->getSpecialToDate())/86400)*86400;
+            $storeDate  = Mage::app()->getLocale()->storeDate($product->getStore());
+            $fromDate   = Mage::app()->getLocale()->date($product->getSpecialFromDate(), null, null, false);
+            $toDate     = Mage::app()->getLocale()->date($product->getSpecialToDate(), null, null, false);
 
-            if ($product->getSpecialFromDate() && $today < $from) {
-            } elseif ($product->getSpecialToDate() && $today > $to) {
+            if ($product->getSpecialFromDate() && $storeDate->compare($fromDate)<0) {
+            } elseif ($product->getSpecialToDate() && $storeDate->compare($toDate)>0) {
             } else {
                 // special price in percents
                 $specialPrice = ($finalPrice*$specialPrice)/100;
@@ -409,12 +408,14 @@ public static function calculatePrice($basePrice, $specialPrice, $specialPriceFr
         $resource = Mage::getResourceSingleton('bundle/bundle');
         $selectionResource = Mage::getResourceSingleton('bundle/selection');
         $productPriceTypeId = Mage::getSingleton('eav/entity_attribute')->getIdByCode('catalog_product', 'price_type');
+
         if ($wId instanceof Mage_Core_Model_Store) {
             $store = $wId->getId();
+            $wId = $wId->getWebsiteId();
         } else {
-            $wId = Mage::app()->getStore();
-            $store = Mage::app()->getStore()->getId();
+            $store = Mage::app()->getWebsite($wId)->getDefaultGroup()->getDefaultStoreId();
         }
+        $storeDate = Mage::app()->getLocale()->storeDate($store);
 
         if (!$gId) {
             $gId = Mage::getSingleton('customer/session')->getCustomerGroupId();
@@ -432,7 +433,7 @@ public static function calculatePrice($basePrice, $specialPrice, $specialPriceFr
         $options = array(0);
         $results = $resource->getSelectionsData($productId);
 
-        if (!$attributes[0]['value']) { //dynamic
+        if (!$attributes || !$attributes[0]['value']) { //dynamic
             $dataRetreiver = Mage::getSingleton('catalogindex/data_simple');
 
             $childrenQty = array();
@@ -489,13 +490,12 @@ public static function calculatePrice($basePrice, $specialPrice, $specialPriceFr
 
         $finalPrice = $basePrice;
 
-        $today = floor(time()/86400)*86400;
-        $from = floor(strtotime($specialPriceFrom)/86400)*86400;
-        $to = floor(strtotime($specialPriceTo)/86400)*86400;
+        $fromDate   = Mage::app()->getLocale()->date($specialPriceFrom, null, null, false);
+        $toDate     = Mage::app()->getLocale()->date($specialPriceTo, null, null, false);
 
         if ($specialPrice !== null && $specialPrice !== false) {
-            if ($specialPriceFrom && $today < $from) {
-            } elseif ($specialPriceTo && $today > $to) {
+            if ($specialPriceFrom && $storeDate->compare($fromDate)<0) {
+            } elseif ($specialPriceTo && $storeDate->compare($toDate)>0) {
             } else {
                 // special price in percents
                 $specialPrice = ($finalPrice*$specialPrice)/100;
@@ -527,8 +527,7 @@ public static function calculatePrice($basePrice, $specialPrice, $specialPriceFr
         }
 
         if ($rulePrice === false) {
-            $date = mktime(0,0,0);
-            $rulePrice = Mage::getResourceModel('catalogrule/rule')->getRulePrice($date, $wId, $gId, $productId);
+            $rulePrice = Mage::getResourceModel('catalogrule/rule')->getRulePrice($storeDate, $wId, $gId, $productId);
         }
 
         if ($rulePrice !== null && $rulePrice !== false) {
diff --git a/app/code/core/Mage/Bundle/Model/Product/Type.php b/app/code/core/Mage/Bundle/Model/Product/Type.php
index 265aa1ae..ad6c26dd 100644
--- a/app/code/core/Mage/Bundle/Model/Product/Type.php
+++ b/app/code/core/Mage/Bundle/Model/Product/Type.php
@@ -320,6 +320,11 @@ public function prepareForCart(Varien_Object $buyRequest)
 
         $product = $this->getProduct();
 
+        $_appendAllSelections = false;
+        if ($product->getSkipCheckRequiredOption()) {
+            $_appendAllSelections = true;
+        }
+
         if ($options = $buyRequest->getBundleOption()) {
             $qtys = $buyRequest->getBundleOptionQty();
             foreach ($options as $_optionId => $_selections) {
@@ -378,7 +383,7 @@ public function prepareForCart(Varien_Object $buyRequest)
                 }
             }
 
-            $optionsCollection->appendSelections($selections, false, false);
+            $optionsCollection->appendSelections($selections, false, $_appendAllSelections);
 
             $selections = $selections->getItems();
         } else {
@@ -393,7 +398,7 @@ public function prepareForCart(Varien_Object $buyRequest)
                     $product->getTypeInstance()->getOptionsIds()
                 );
 
-            $options = $optionCollection->appendSelections($selectionCollection, false, false);
+            $options = $optionCollection->appendSelections($selectionCollection, false, $_appendAllSelections);
 
             foreach ($options as $option) {
                 if ($option->getRequired() && count($option->getSelections()) == 1) {
@@ -465,7 +470,7 @@ public function prepareForCart(Varien_Object $buyRequest)
 
             return $result;
         }
-        return Mage::helper('bundle')->__('Please specify the bundle option(s)');
+        return Mage::helper('bundle')->__('Please specify product option(s)');
     }
 
     /**
diff --git a/app/code/core/Mage/Bundle/etc/config.xml b/app/code/core/Mage/Bundle/etc/config.xml
index f64ba758..dc8b6503 100644
--- a/app/code/core/Mage/Bundle/etc/config.xml
+++ b/app/code/core/Mage/Bundle/etc/config.xml
@@ -5,10 +5,10 @@
  *
  * 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.
+ * 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/osl-3.0.php
+ * 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.
@@ -22,7 +22,7 @@
  * @category   Mage
  * @package    Mage_Bundle
  * @copyright  Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
- * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ * @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
  */
 -->
 
@@ -237,6 +237,33 @@
                     
                 
             
+            
+                
+                    
+                        singleton
+                        bundle/observer
+                        duplicateProduct
+                    
+                
+            
+            
+                
+                    
+                        singleton
+                        bundle/observer
+                        setAttributeTabBlock
+                    
+                
+            
+            
+                
+                    
+                        singleton
+                        bundle/observer
+                        setAttributeTabBlock
+                    
+                
+            
         
     
 
diff --git a/app/code/core/Mage/Catalog/Block/Breadcrumbs.php b/app/code/core/Mage/Catalog/Block/Breadcrumbs.php
index 6d907465..43e6dc4f 100644
--- a/app/code/core/Mage/Catalog/Block/Breadcrumbs.php
+++ b/app/code/core/Mage/Catalog/Block/Breadcrumbs.php
@@ -37,13 +37,16 @@ class Mage_Catalog_Block_Breadcrumbs extends Mage_Core_Block_Template
     protected function _prepareLayout()
     {
         if ($breadcrumbsBlock = $this->getLayout()->getBlock('breadcrumbs')) {
-            $breadcrumbsBlock->addCrumb('home',
-                array('label'=>Mage::helper('catalog')->__('Home'), 'title'=>Mage::helper('catalog')->__('Go to Home Page'), 'link'=>Mage::getBaseUrl())
-            );
+            $breadcrumbsBlock->addCrumb('home', array(
+                'label'=>Mage::helper('catalog')->__('Home'),
+                'title'=>Mage::helper('catalog')->__('Go to Home Page'),
+                'link'=>Mage::getBaseUrl()
+            ));
 
             $title = (string)Mage::getStoreConfig('system/store/name');
             $path = Mage::helper('catalog')->getBreadcrumbPath($this->getCategory());
-            foreach ($path as $name=>$breadcrumb) {
+
+            foreach ($path as $name => $breadcrumb) {
                 $breadcrumbsBlock->addCrumb($name, $breadcrumb);
                 $title = $breadcrumb['label'].' '.Mage::getStoreConfig('catalog/seo/title_separator').' '.$title;
             }
diff --git a/app/code/core/Mage/Catalog/Block/Product/Abstract.php b/app/code/core/Mage/Catalog/Block/Product/Abstract.php
index d8022980..102cdfe0 100644
--- a/app/code/core/Mage/Catalog/Block/Product/Abstract.php
+++ b/app/code/core/Mage/Catalog/Block/Product/Abstract.php
@@ -227,4 +227,21 @@ public function getTierPrices($product = null)
 
         return $res;
     }
+
+    /**
+     * Add all attributes and apply pricing logic to products collection
+     * to get correct values in different products lists.
+     * E.g. crosssells, upsells, new products, recently viewed
+     *
+     * @param Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection $collection
+     * @return Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection
+     */
+    protected function _addProductAttributesAndPrices(Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection $collection)
+    {
+        return $collection
+            ->addMinimalPrice()
+            ->addFinalPrice()
+            ->addTaxPercents()
+            ->addAttributeToSelect(Mage::getSingleton('catalog/config')->getProductAttributes());
+    }
 }
\ No newline at end of file
diff --git a/app/code/core/Mage/Catalog/Block/Product/Compare/List.php b/app/code/core/Mage/Catalog/Block/Product/Compare/List.php
index 2b0e3d1b..10bc0146 100644
--- a/app/code/core/Mage/Catalog/Block/Product/Compare/List.php
+++ b/app/code/core/Mage/Catalog/Block/Product/Compare/List.php
@@ -61,7 +61,8 @@ public function getItems()
             $this->_items
                 ->loadComaparableAttributes()
                 ->addAttributeToSelect(Mage::getSingleton('catalog/config')->getProductAttributes())
-                ->addMinimalPrice();
+                ->addMinimalPrice()
+                ->addTaxPercents();
 
             Mage::getSingleton('catalog/product_visibility')->addVisibleInSiteFilterToCollection($this->_items);
         }
diff --git a/app/code/core/Mage/Catalog/Block/Product/List.php b/app/code/core/Mage/Catalog/Block/Product/List.php
index 0a3112c1..dd068cc8 100644
--- a/app/code/core/Mage/Catalog/Block/Product/List.php
+++ b/app/code/core/Mage/Catalog/Block/Product/List.php
@@ -46,6 +46,7 @@ protected function _getProductCollection()
     {
         if (is_null($this->_productCollection)) {
             $layer = Mage::getSingleton('catalog/layer');
+            /* @var $layer Mage_Catalog_Model_Layer */
             if ($this->getShowRootCategory()) {
                 $this->setCategoryId(Mage::app()->getStore()->getRootCategoryId());
             }
@@ -63,11 +64,27 @@ protected function _getProductCollection()
                 }
             }
 
+            $origCategory = null;
             if ($this->getCategoryId()) {
                 $category = Mage::getModel('catalog/category')->load($this->getCategoryId());
-                $layer->setCurrentCategory($category);
+                if ($category->getId()) {
+                    $origCategory = $layer->getCurrentCategory();
+                    $layer->setCurrentCategory($category);
+                }
             }
             $this->_productCollection = $layer->getProductCollection();
+
+            if ($sortField = $this->getSortBy()) {
+                $sortOrder = 'asc';
+                if (strtolower($this->getSortOrder()) == 'desc') {
+                    $sortOrder = 'desc';
+                }
+                $this->_productCollection->addAttributeToSort($sortField, $sortOrder);
+            }
+
+            if ($origCategory) {
+                $layer->setCurrentCategory($origCategory);
+            }
         }
         return $this->_productCollection;
     }
diff --git a/app/code/core/Mage/Catalog/Block/Product/List/Related.php b/app/code/core/Mage/Catalog/Block/Product/List/Related.php
index d993a489..7aaf41aa 100644
--- a/app/code/core/Mage/Catalog/Block/Product/List/Related.php
+++ b/app/code/core/Mage/Catalog/Block/Product/List/Related.php
@@ -42,11 +42,14 @@ protected function _prepareData()
         /* @var $product Mage_Catalog_Model_Product */
 
         $this->_itemCollection = $product->getRelatedProductCollection()
-            ->addAttributeToSelect(Mage::getSingleton('catalog/config')->getProductAttributes())
             ->addAttributeToSelect('required_options')
             ->addAttributeToSort('position', 'asc')
             ->addStoreFilter()
-            ->addExcludeProductFilter(Mage::getSingleton('checkout/cart')->getProductIds());
+        ;
+        Mage::getResourceSingleton('checkout/cart')->addExcludeProductFilter($this->_itemCollection,
+            Mage::getSingleton('checkout/session')->getQuoteId()
+        );
+        $this->_addProductAttributesAndPrices($this->_itemCollection);
 
 //        Mage::getSingleton('catalog/product_status')->addSaleableFilterToCollection($this->_itemCollection);
         Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($this->_itemCollection);
diff --git a/app/code/core/Mage/Catalog/Block/Product/List/Upsell.php b/app/code/core/Mage/Catalog/Block/Product/List/Upsell.php
index d1355649..bd4b0b73 100644
--- a/app/code/core/Mage/Catalog/Block/Product/List/Upsell.php
+++ b/app/code/core/Mage/Catalog/Block/Product/List/Upsell.php
@@ -47,11 +47,13 @@ protected function _prepareData()
         $product = Mage::registry('product');
         /* @var $product Mage_Catalog_Model_Product */
         $this->_itemCollection = $product->getUpSellProductCollection()
-            ->addAttributeToSelect(Mage::getSingleton('catalog/config')->getProductAttributes())
             ->addAttributeToSort('position', 'asc')
             ->addStoreFilter()
-            ->addMinimalPrice()
-            ->addExcludeProductFilter(Mage::getSingleton('checkout/cart')->getProductIds());
+        ;
+        Mage::getResourceSingleton('checkout/cart')->addExcludeProductFilter($this->_itemCollection,
+            Mage::getSingleton('checkout/session')->getQuoteId()
+        );
+        $this->_addProductAttributesAndPrices($this->_itemCollection);
 
 //        Mage::getSingleton('catalog/product_status')->addSaleableFilterToCollection($this->_itemCollection);
         Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($this->_itemCollection);
diff --git a/app/code/core/Mage/Catalog/Block/Product/New.php b/app/code/core/Mage/Catalog/Block/Product/New.php
index 1323314b..a602aa93 100644
--- a/app/code/core/Mage/Catalog/Block/Product/New.php
+++ b/app/code/core/Mage/Catalog/Block/Product/New.php
@@ -24,7 +24,6 @@
  * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-
 /**
  * New products block
  *
@@ -38,34 +37,22 @@ class Mage_Catalog_Block_Product_New extends Mage_Catalog_Block_Product_Abstract
 
     const DEFAULT_PRODUCTS_COUNT = 5;
 
-    public function __construct()
+    protected function _beforeToHtml()
     {
-        parent::__construct();
-
-        $storeId    = Mage::app()->getStore()->getId();
-
-        $product    = Mage::getModel('catalog/product');
-        /* @var $product Mage_Catalog_Model_Product */
-        $todayDate  = $product->getResource()->formatDate(time());
-        $products   = $product->setStoreId($storeId)->getCollection()
-            ->addAttributeToFilter('news_from_date', array('date'=>true, 'to'=> $todayDate))
-            ->addAttributeToFilter(array(array('attribute'=>'news_to_date', 'date'=>true, 'from'=>$todayDate), array('attribute'=>'news_to_date', 'is' => new Zend_Db_Expr('null'))),'','left')
-            ->addAttributeToSort('news_from_date','desc')
-            ->addAttributeToSelect(array('name', 'price', 'small_image'), 'inner')
-            ->addAttributeToSelect(array('special_price', 'special_from_date', 'special_to_date'), 'left')
-            ->addAttributeToSelect('status')
+        $todayDate  = Mage::app()->getLocale()->date()->toString(Varien_Date::DATETIME_INTERNAL_FORMAT);
+        $collection = $this->_addProductAttributesAndPrices(Mage::getResourceModel('catalog/product_collection'))
+            ->addStoreFilter()
+            ->addAttributeToFilter('news_from_date', array('date' => true, 'to' => $todayDate))
+            ->addAttributeToFilter('news_to_date', array('or'=> array(
+                0 => array('date' => true, 'from' => $todayDate),
+                1 => array('is' => new Zend_Db_Expr('null')))
+            ), 'left')
+            ->addAttributeToSort('news_from_date', 'desc')
+            ->setPageSize($this->getProductsCount())
+            ->setCurPage(1)
         ;
-        /* @var $products Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection */
-
-        Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($products);
-        Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($products);
+        $this->setProductCollection($collection);
 
-        $this->setProductCollection($products);
-    }
-
-    protected function _beforeToHtml()
-    {
-        $this->getProductCollection()->setOrder('news_from_date')->setPageSize($this->getProductsCount())->setCurPage(1);
         return parent::_beforeToHtml();
     }
 
diff --git a/app/code/core/Mage/Catalog/Block/Product/View/Attributes.php b/app/code/core/Mage/Catalog/Block/Product/View/Attributes.php
index e6a97215..cdc0b5a2 100644
--- a/app/code/core/Mage/Catalog/Block/Product/View/Attributes.php
+++ b/app/code/core/Mage/Catalog/Block/Product/View/Attributes.php
@@ -57,13 +57,15 @@ public function getAdditionalData(array $excludeAttr = array())
         $product = $this->getProduct();
         $attributes = $product->getAttributes();
         foreach ($attributes as $attribute) {
-            if ($attribute->getIsVisibleOnFront() && $attribute->getIsUserDefined() && !in_array($attribute->getAttributeCode(), $excludeAttr)) {
+//            if ($attribute->getIsVisibleOnFront() && $attribute->getIsUserDefined() && !in_array($attribute->getAttributeCode(), $excludeAttr)) {
+            if ($attribute->getIsVisibleOnFront() && !in_array($attribute->getAttributeCode(), $excludeAttr)) {
 
                 $value = $attribute->getFrontend()->getValue($product);
                 if (strlen($value) && $product->hasData($attribute->getAttributeCode())) {
                     $data[$attribute->getAttributeCode()] = array(
                        'label' => $attribute->getFrontend()->getLabel(),
-                       'value' => $value//$product->getData($attribute->getAttributeCode())
+                       'value' => $value,
+                       'code'  => $attribute->getAttributeCode()
                     );
                 }
             }
diff --git a/app/code/core/Mage/Catalog/Helper/Category.php b/app/code/core/Mage/Catalog/Helper/Category.php
index bec8bf18..41de2af4 100644
--- a/app/code/core/Mage/Catalog/Helper/Category.php
+++ b/app/code/core/Mage/Catalog/Helper/Category.php
@@ -33,6 +33,14 @@
  */
 class Mage_Catalog_Helper_Category extends Mage_Core_Helper_Abstract
 {
+    const XML_PATH_CATEGORY_URL_SUFFIX  = 'catalog/seo/category_url_suffix';
+
+    /**
+     * Cache for category rewrite suffix
+     *
+     * @var array
+     */
+    protected $_categoryUrlSuffix = array();
 
     /**
      * Retrieve current store categories
@@ -82,6 +90,9 @@ public function getStoreCategories($sorted=false, $asCollection=false, $toLoad=t
      */
     public function getCategoryUrl($category)
     {
+        if ($category instanceof Mage_Catalog_Model_Category) {
+            return $category->getUrl();
+        }
         return Mage::getModel('catalog/category')
             ->setData($category->getData())
             ->getUrl();
@@ -119,4 +130,48 @@ public function canShow($category)
         return true;
     }
 
+/**
+     * Retrieve category rewrite sufix for store
+     *
+     * @param int $storeId
+     * @return string
+     */
+    public function getCategoryUrlSuffix($storeId = null)
+    {
+        if (is_null($storeId)) {
+            $storeId = Mage::app()->getStore()->getId();
+        }
+
+        if (!isset($this->_categoryUrlSuffix[$storeId])) {
+            $this->_categoryUrlSuffix[$storeId] = Mage::getStoreConfig(self::XML_PATH_CATEGORY_URL_SUFFIX, $storeId);
+        }
+        return $this->_categoryUrlSuffix[$storeId];
+    }
+
+    /**
+     * Retrieve clear url for category as parrent
+     *
+     * @param string $url
+     * @param bool $slash
+     * @param int $storeId
+     *
+     * @return string
+     */
+    public function getCategoryUrlPath($urlPath, $slash = false, $storeId = null)
+    {
+        if (!$this->getCategoryUrlSuffix($storeId)) {
+            return $urlPath;
+        }
+
+        if ($slash) {
+            $regexp     = '#('.preg_quote($this->getCategoryUrlSuffix($storeId), '#').')/$#i';
+            $replace    = '/';
+        }
+        else {
+            $regexp     = '#('.preg_quote($this->getCategoryUrlSuffix($storeId), '#').')$#i';
+            $replace    = '';
+        }
+
+        return preg_replace($regexp, $replace, $urlPath);
+    }
 }
diff --git a/app/code/core/Mage/Catalog/Helper/Data.php b/app/code/core/Mage/Catalog/Helper/Data.php
index 1862a6f9..9678e660 100644
--- a/app/code/core/Mage/Catalog/Helper/Data.php
+++ b/app/code/core/Mage/Catalog/Helper/Data.php
@@ -112,4 +112,16 @@ public function getLastViewedUrl()
         return '';
     }
 
+    /**
+     * Split SKU of an item by dashes and spaces
+     * Words will not be broken, unless thir length is greater than $length
+     *
+     * @param string $sku
+     * @param int $length
+     * @return array
+     */
+    public function splitSku($sku, $length = 30)
+    {
+        return Mage::helper('core/string')->str_split($sku, $length, true, false, '[\-\s]');
+    }
 }
diff --git a/app/code/core/Mage/Catalog/Helper/Output.php b/app/code/core/Mage/Catalog/Helper/Output.php
new file mode 100644
index 00000000..8731603b
--- /dev/null
+++ b/app/code/core/Mage/Catalog/Helper/Output.php
@@ -0,0 +1,126 @@
+$this));
+    }
+
+    /**
+     * Adding method handler
+     *
+     * @param   string $method
+     * @param   object $handler
+     * @return  Mage_Catalog_Helper_Output
+     */
+    public function addHandler($method, $handler)
+    {
+        if (!is_object($handler)) {
+            return $this;
+        }
+        $method = strtolower($method);
+
+        if (!isset($this->_handlers[$method])) {
+            $this->_handlers[$method] = array();
+        }
+
+        $this->_handlers[$method][] = $handler;
+        return $this;
+    }
+
+    /**
+     * Get all handlers for some method
+     *
+     * @param   string $method
+     * @return  array
+     */
+    public function getHandlers($method)
+    {
+        $method = strtolower($method);
+        return isset($this->_handlers[$method]) ? $this->_handlers[$method] : array();
+    }
+
+    /**
+     * Process all method handlers
+     *
+     * @param   string $method
+     * @param   mixed $result
+     * @param   array $params
+     * @return unknown
+     */
+    public function process($method, $result, $params)
+    {
+        foreach ($this->getHandlers($method) as $handler) {
+        	if (method_exists($handler, $method)) {
+                $result = $handler->$method($this, $result, $params);
+        	}
+        }
+        return $result;
+    }
+
+    /**
+     * Prepare product attribute html output
+     *
+     * @param   Mage_Catalog_Model_Product $product
+     * @param   string $attributeHtml
+     * @param   string $attributeName
+     * @return  string
+     */
+    public function productAttribute($product, $attributeHtml, $attributeName)
+    {
+        $attributeHtml = $this->process('productAttribute', $attributeHtml, array(
+            'product'   => $product,
+            'attribute' => $attributeName
+        ));
+        return $attributeHtml;
+    }
+
+    /**
+     * Prepare category attribute html output
+     *
+     * @param   Mage_Catalog_Model_Category $category
+     * @param   string $attributeHtml
+     * @param   string $attributeName
+     * @return  string
+     */
+    public function categoryAttribute($category, $attributeHtml, $attributeName)
+    {
+        $attributeHtml = $this->process('categoryAttribute', $attributeHtml, array(
+            'category'  => $category,
+            'attribute' => $attributeName
+        ));
+        return $attributeHtml;
+    }
+}
\ No newline at end of file
diff --git a/app/code/core/Mage/Catalog/Helper/Product.php b/app/code/core/Mage/Catalog/Helper/Product.php
index 45e13cef..bc855bab 100644
--- a/app/code/core/Mage/Catalog/Helper/Product.php
+++ b/app/code/core/Mage/Catalog/Helper/Product.php
@@ -31,6 +31,15 @@
  */
 class Mage_Catalog_Helper_Product extends Mage_Core_Helper_Url
 {
+    const XML_PATH_PRODUCT_URL_SUFFIX   = 'catalog/seo/product_url_suffix';
+
+    /**
+     * Cache for product rewrite suffix
+     *
+     * @var array
+     */
+    protected $_productUrlSuffix = array();
+
     protected $_statuses;
 
     protected $_priceBlock;
@@ -44,16 +53,10 @@ class Mage_Catalog_Helper_Product extends Mage_Core_Helper_Url
     public function getProductUrl($product)
     {
         if ($product instanceof Mage_Catalog_Model_Product) {
-            $urlKey = $product->getUrlKey() ? $product->getUrlKey() : $product->getName();
-            $params = array(
-                's'         => $this->_prepareString($urlKey),
-                'id'        => $product->getId(),
-                'category'  => $product->getCategoryId()
-            );
-            return $this->_getUrl('catalog/product/view', $params);
+            return $product->getProductUrl();
         }
-        if ((int) $product) {
-            return $this->_getUrl('catalog/product/view', array('id'=>$product));
+        elseif (is_numeric($product)) {
+            return Mage::getModel('catalog/product')->load($product)->getProductUrl();
         }
         return false;
     }
@@ -164,10 +167,23 @@ public function canShow($product, $where = 'catalog')
         }
 
         return $product->isVisibleInCatalog() && $product->isVisibleInSiteVisibility();
-        // TODO shold be check both status and visibility
-        //if ('catalog' == $where) {
-        //}
+    }
 
-        return false;
+    /**
+     * Retrieve product rewrite sufix for store
+     *
+     * @param int $storeId
+     * @return string
+     */
+    public function getProductUrlSuffix($storeId = null)
+    {
+        if (is_null($storeId)) {
+            $storeId = Mage::app()->getStore()->getId();
+        }
+
+        if (!isset($this->_productUrlSuffix[$storeId])) {
+            $this->_productUrlSuffix[$storeId] = Mage::getStoreConfig(self::XML_PATH_PRODUCT_URL_SUFFIX, $storeId);
+        }
+        return $this->_productUrlSuffix[$storeId];
     }
-}
+}
\ No newline at end of file
diff --git a/app/code/core/Mage/Catalog/Model/Category.php b/app/code/core/Mage/Catalog/Model/Category.php
index a7f1d60e..daea5189 100644
--- a/app/code/core/Mage/Catalog/Model/Category.php
+++ b/app/code/core/Mage/Catalog/Model/Category.php
@@ -71,6 +71,11 @@ protected function _construct()
         $this->_init('catalog/category');
     }
 
+    /**
+     * Retrieve URL instance
+     *
+     * @return Mage_Core_Model_Url
+     */
     public function getUrlInstance()
     {
         if (!self::$_url) {
@@ -237,38 +242,32 @@ public function getUrl()
     {
         $url = $this->_getData('url');
         if (is_null($url)) {
-            $queryParams = '';
-//            $store = Mage::app()->getStore();
-//            if ($store->getId() && Mage::getStoreConfig(Mage_Core_Model_Url::XML_PATH_STORE_IN_URL)) {
-//                $queryParams = '?store='.$store->getCode();
-//            }
-
-	        if ($this->hasData('request_path') && $this->getRequestPath() != '') {
-	            $url = $this->getUrlInstance()->getBaseUrl().$this->getRequestPath().$queryParams;
-	            $this->setUrl($url);
-	            return $url;
-	        }
-
-	        Varien_Profiler::start('REWRITE: '.__METHOD__);
-	        $rewrite = $this->getUrlRewrite();
-	        if ($this->getStoreId()) {
-	            $rewrite->setStoreId($this->getStoreId());
-	        }
-	        $idPath = 'category/'.$this->getId();
-
-	        $rewrite->loadByIdPath($idPath);
-
-	        if ($rewrite->getId()) {
-	            $url = $this->getUrlInstance()->getBaseUrl().$rewrite->getRequestPath().$queryParams;
-	        Varien_Profiler::stop('REWRITE: '.__METHOD__);
-	            $this->setUrl($url);
-	            return $url;
-	        }
-	        Varien_Profiler::stop('REWRITE: '.__METHOD__);
-
-	        $url = $this->getCategoryIdUrl().$queryParams;
-	        $this->setUrl($url);
-	        return $url;
+            Varien_Profiler::start('REWRITE: '.__METHOD__);
+
+            if ($this->hasData('request_path') && $this->getRequestPath() != '') {
+                $this->setData('url', $this->getUrlInstance()->getDirectUrl($this->getRequestPath()));
+                return $this->getData('url');
+            }
+
+            Varien_Profiler::stop('REWRITE: '.__METHOD__);
+
+            $rewrite = $this->getUrlRewrite();
+            if ($this->getStoreId()) {
+                $rewrite->setStoreId($this->getStoreId());
+            }
+            $idPath = 'category/' . $this->getId();
+            $rewrite->loadByIdPath($idPath);
+
+            if ($rewrite->getId()) {
+                $this->setData('url', $this->getUrlInstance()->getDirectUrl($rewrite->getRequestPath()));
+                Varien_Profiler::stop('REWRITE: '.__METHOD__);
+                return $this->getData('url');
+            }
+
+            Varien_Profiler::stop('REWRITE: '.__METHOD__);
+
+            $this->setData('url', $this->getCategoryIdUrl());
+            return $this->getData('url');
         }
         return $url;
     }
diff --git a/app/code/core/Mage/Catalog/Model/Layer.php b/app/code/core/Mage/Catalog/Model/Layer.php
index 1e66289d..175839aa 100644
--- a/app/code/core/Mage/Catalog/Model/Layer.php
+++ b/app/code/core/Mage/Catalog/Model/Layer.php
@@ -34,6 +34,7 @@
  */
 class Mage_Catalog_Model_Layer extends Varien_Object
 {
+    protected $_productCollections = array();
 
     /**
      * Retrieve current layer product collection
@@ -42,11 +43,13 @@ class Mage_Catalog_Model_Layer extends Varien_Object
      */
     public function getProductCollection()
     {
-        $collection = $this->getData('product_collection');
-        if (is_null($collection)) {
+        if (isset($this->_productCollections[$this->getCurrentCategory()->getId()])) {
+            $collection = $this->_productCollections[$this->getCurrentCategory()->getId()];
+        }
+        else {
             $collection = $this->getCurrentCategory()->getProductCollection();
             $this->prepareProductCollection($collection);
-            $this->setData('product_collection', $collection);
+            $this->_productCollections[$this->getCurrentCategory()->getId()] = $collection;
         }
 
         return $collection;
@@ -88,6 +91,7 @@ public function apply()
 
     /**
      * Retrieve current category model
+     * If no category found in registry, the root will be taken
      *
      * @return Mage_Catalog_Model_Category
      */
@@ -99,13 +103,38 @@ public function getCurrentCategory()
                 $this->setData('current_category', $category);
             }
             else {
-                $category = false;
+                $category = Mage::getModel('catalog/category')->load($this->getCurrentStore()->getRootCategoryId());
                 $this->setData('current_category', $category);
             }
         }
         return $category;
     }
 
+    /**
+     * Change current category object
+     *
+     * @param mixed $category
+     * @return Mage_Catalog_Model_Layer
+     */
+    public function setCurrentCategory($category)
+    {
+        if (is_numeric($category)) {
+            $category = Mage::getModel('catalog/category')->load($category);
+        }
+        if (!$category instanceof Mage_Catalog_Model_Category) {
+            Mage::throwException(Mage::helper('catalog')->__('Category must be instance of Mage_Catalog_Model_Category'));
+        }
+        if (!$category->getId()) {
+            Mage::throwException(Mage::helper('catalog')->__('Invalid category'));
+        }
+
+        if ($category->getId() != $this->getCurrentCategory()->getId()) {
+            $this->setData('current_category', $category);
+        }
+
+        return $this;
+    }
+
     /**
      * Retrieve current store model
      *
diff --git a/app/code/core/Mage/Catalog/Model/Layer/Filter/Attribute.php b/app/code/core/Mage/Catalog/Model/Layer/Filter/Attribute.php
index 06c38991..7d18bf76 100644
--- a/app/code/core/Mage/Catalog/Model/Layer/Filter/Attribute.php
+++ b/app/code/core/Mage/Catalog/Model/Layer/Filter/Attribute.php
@@ -49,6 +49,9 @@ protected  function _getOptionText($optionId)
     public function apply(Zend_Controller_Request_Abstract $request, $filterBlock)
     {
         $filter = $request->getParam($this->_requestVar);
+        if (is_array($filter)) {
+            return $this;
+        }
         $text = $this->_getOptionText($filter);
         if ($filter && $text) {
             /*$entityIds = Mage::getSingleton('catalogindex/attribute')->getFilteredEntities($this->getAttributeModel(), $filter, $this->_getFilterEntityIds());
diff --git a/app/code/core/Mage/Catalog/Model/Observer.php b/app/code/core/Mage/Catalog/Model/Observer.php
index 29ee6dc4..9b3dc019 100644
--- a/app/code/core/Mage/Catalog/Model/Observer.php
+++ b/app/code/core/Mage/Catalog/Model/Observer.php
@@ -79,4 +79,16 @@ public function catalogProductImportAfter($observer)
         Mage::getModel('catalog/url')->refreshRewrites();
         return $this;
     }
+
+    /**
+     * Catalog Product Compare Items Clean
+     *
+     * @param Varien_Event_Observer $observer
+     * @return Mage_Catalog_Model_Observer
+     */
+    public function catalogProductCompareClean(Varien_Event_Observer $observer)
+    {
+        Mage::getModel('catalog/product_compare_item')->clean();
+        return $this;
+    }
 }
diff --git a/app/code/core/Mage/Catalog/Model/Product.php b/app/code/core/Mage/Catalog/Model/Product.php
index 57210aa9..d3ece78f 100644
--- a/app/code/core/Mage/Catalog/Model/Product.php
+++ b/app/code/core/Mage/Catalog/Model/Product.php
@@ -60,6 +60,11 @@ class Mage_Catalog_Model_Product extends Mage_Catalog_Model_Abstract
      */
     protected $_customOptions = array();
 
+    /**
+     * Product Url Instance
+     *
+     * @var Mage_Catalog_Model_Product_Url
+     */
     protected $_urlModel = null;
 
     protected static $_url;
@@ -71,6 +76,11 @@ class Mage_Catalog_Model_Product extends Mage_Catalog_Model_Abstract
 
     protected $_options = array();
 
+    /**
+     * Product reserved attribute codes
+     */
+    protected $_reservedAttributes;
+
     /**
      * Initialize resources
      */
@@ -305,8 +315,8 @@ protected function _beforeSave()
                     }
                 }
                 foreach ($this->getOptionInstance()->getOptions() as $option) {
-                    if ($option['is_require'] == '1') {
-                        $hasRequiredOptions = true;
+                        if ($option['is_require'] == '1') {
+                            $hasRequiredOptions = true;
                         break;
                     }
                 }
@@ -651,6 +661,8 @@ public function getCrossSellProductIds()
 
     /**
      * Retrieve collection cross sell product
+     *
+     * @return Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Link_Product_Collection
      */
     public function getCrossSellProductCollection()
     {
@@ -725,7 +737,7 @@ public function getMediaGalleryImages()
                     continue;
                 }
                 $image['url'] = $this->getMediaConfig()->getMediaUrl($image['file']);
-                $image['id'] = $image['value_id'];
+                $image['id'] = isset($image['value_id']) ? $image['value_id'] : null;
                 $image['path'] = $this->getMediaConfig()->getMediaPath($image['file']);
                 $images->addItem(new Varien_Object($image));
             }
@@ -776,23 +788,27 @@ public function duplicate()
         $this->getWebsiteIds();
         $this->getCategoryIds();
 
-        Mage::dispatchEvent('catalog_model_product_duplicate', array($this->_eventObject=>$this));
-        $newProduct = Mage::getModel('catalog/product')
-            ->setData($this->getData())
+        $newProduct = Mage::getModel('catalog/product')->setData($this->getData())
             ->setIsDuplicate(true)
             ->setOriginalId($this->getId())
             ->setSku(null)
             ->setStatus(Mage_Catalog_Model_Product_Status::STATUS_DISABLED)
-            ->setId(null);
+            ->setCreatedAt(null)
+            ->setUpdatedAt(null)
+            ->setId(null)
+            ->setStoreId(Mage::app()->getStore()->getId());
+
+        Mage::dispatchEvent('catalog_model_product_duplicate', array('current_product'=>$this, 'new_product'=>$newProduct));
+
         /* @var $newProduct Mage_Catalog_Model_Product */
 
-        $newOptionsArray = array();
-        $newProduct->setCanSaveCustomOptions(true);
-        foreach ($this->getOptions() as $_option) {
-            /* @var $_option Mage_Catalog_Model_Product_Option */
-            $newOptionsArray[] = $_option->prepareOptionForDuplicate();
-        }
-        $newProduct->setProductOptions($newOptionsArray);
+//        $newOptionsArray = array();
+//        $newProduct->setCanSaveCustomOptions(true);
+//        foreach ($this->getOptions() as $_option) {
+//            /* @var $_option Mage_Catalog_Model_Product_Option */
+//            $newOptionsArray[] = $_option->prepareOptionForDuplicate();
+//        }
+//        $newProduct->setProductOptions($newOptionsArray);
 
         /* Prepare Related*/
         $data = array();
@@ -850,10 +866,11 @@ public function duplicate()
         }
         $newProduct->setGroupedLinkData($data);
 
-        $newId = $newProduct->getId();
-
         $newProduct->save();
 
+        $this->getOptionInstance()->duplicate($this->getId(), $newProduct->getId());
+        $this->getResource()->duplicate($this->getId(), $newProduct->getId());
+
         /*if ($storeIds = $this->getWebsiteIds()) {
             foreach ($storeIds as $storeId) {
                 $this->setStoreId($storeId)
@@ -975,6 +992,12 @@ public function formatUrlKey($str)
         return $this->_urlModel->formatUrlKey($str);
     }
 
+    /**
+     * Retrieve Product Url Path (include category)
+     *
+     * @param Mage_Catalog_Model_Category $category
+     * @return string
+     */
     public function getUrlPath($category=null)
     {
         return $this->_urlModel->getUrlPath($this, $category);
@@ -1234,7 +1257,7 @@ public function getAvailableInCategories()
                 $allCategories[] = $one;
                 $anchors = Mage::getModel('catalog/category')->load($one)->getAnchorsAbove();
                 foreach ($anchors as $anchor) {
-                	$allCategories[] = $anchor;
+                    $allCategories[] = $anchor;
                 }
             }
 
@@ -1279,4 +1302,41 @@ public function getThumbnailUrl($width = 75, $height = 75)
         return (string)Mage::helper('catalog/image')->init($this, 'thumbnail')->resize($width, $height);
     }
 
+    /**
+     *  Returns system reserved attribute codes
+     *
+     *  @param    none
+     *  @return array Reserved attribute names
+     */
+    public function getReservedAttributes()
+    {
+        if ($this->_reservedAttributes === null) {
+            $_reserved = array();
+            $methods = get_class_methods(__CLASS__);
+            foreach ($methods as $method) {
+                if (preg_match('/^get([A-Z]{1}.+)/', $method, $matches)) {
+                    $method = $matches[1];
+                    $tmp = strtolower(preg_replace('/(.)([A-Z])/', "$1_$2", $method));
+                    $_reserved[] = $tmp;
+                }
+            }
+            $_allowed = array(
+                'type_id','calculated_final_price','request_path','rating_summary'
+            );
+            $this->_reservedAttributes = array_diff($_reserved, $_allowed);
+        }
+        return $this->_reservedAttributes;
+    }
+
+    /**
+     *  Check whether attribute reserved or not
+     *
+     *  @param    Mage_Eav_Model_Entity_Attribute $attribute Attribute model object
+     *  @return boolean
+     */
+    public function isReservedAttribute ($attribute)
+    {
+        return $attribute->getIsUserDefined()
+            && in_array($attribute->getAttributeCode(), $this->getReservedAttributes());
+    }
 }
\ No newline at end of file
diff --git a/app/code/core/Mage/Catalog/Model/Product/Api.php b/app/code/core/Mage/Catalog/Model/Product/Api.php
index 98c7a0af..d1e6e7dd 100644
--- a/app/code/core/Mage/Catalog/Model/Product/Api.php
+++ b/app/code/core/Mage/Catalog/Model/Product/Api.php
@@ -76,12 +76,14 @@ public function items($filters = null, $store = null)
         $result = array();
 
         foreach ($collection as $product) {
+//            $result[] = $product->getData();
             $result[] = array( // Basic product data
                 'product_id' => $product->getId(),
                 'sku'        => $product->getSku(),
                 'name'       => $product->getName(),
                 'set'        => $product->getAttributeSetId(),
-                'type'       => $product->getTypeId()
+                'type'       => $product->getTypeId(),
+                'category_ids'       => $product->getCategoryIds()
             );
         }
 
@@ -154,13 +156,7 @@ public function create($type, $set, $sku, $productData)
             }
         }
 
-        if (isset($productData['categories']) && is_array($productData['categories'])) {
-            $product->setCategoryIds($productData['categories']);
-        }
-
-        if (isset($productData['websites']) && is_array($productData['websites'])) {
-            $product->setWebsiteIds($productData['websites']);
-        }
+        $this->_prepareDataForSave($product, $productData);
 
         if (is_array($errors = $product->validate())) {
             $this->_fault('data_invalid', implode("\n", $errors));
@@ -201,20 +197,7 @@ public function update($productId, $productData = array(), $store = null)
             }
         }
 
-        if (isset($productData['categories']) && is_array($productData['categories'])) {
-            $product->setCategoryIds($productData['categories']);
-        }
-
-        if (isset($productData['websites']) && is_array($productData['websites'])) {
-            foreach ($productData['websites'] as &$website) {
-                if (is_string($website)) {
-                    try {
-                        $website = Mage::app()->getWebsite($website)->getId();
-                    } catch (Exception $e) { }
-                }
-            }
-            $product->setWebsiteIds($productData['websites']);
-        }
+        $this->_prepareDataForSave($product, $productData);
 
         try {
             if (is_array($errors = $product->validate())) {
@@ -233,6 +216,35 @@ public function update($productId, $productData = array(), $store = null)
         return true;
     }
 
+    /**
+     *  Set additional data before product saved
+     *
+     *  @param    Mage_Catalog_Model_Product $product
+     *  @param    array $productData
+     *  @return	  object
+     */
+    protected function _prepareDataForSave ($product, $productData)
+    {
+        if (isset($productData['categories']) && is_array($productData['categories'])) {
+            $product->setCategoryIds($productData['categories']);
+        }
+
+        if (isset($productData['websites']) && is_array($productData['websites'])) {
+            foreach ($productData['websites'] as &$website) {
+                if (is_string($website)) {
+                    try {
+                        $website = Mage::app()->getWebsite($website)->getId();
+                    } catch (Exception $e) { }
+                }
+            }
+            $product->setWebsiteIds($productData['websites']);
+        }
+
+        if (isset($productData['stock_data']) && is_array($productData['stock_data'])) {
+            $product->setStockData($productData['stock_data']);
+        }
+    }
+
     /**
      * Update product special price
      *
diff --git a/app/code/core/Mage/Catalog/Model/Product/Compare/Item.php b/app/code/core/Mage/Catalog/Model/Product/Compare/Item.php
index 68534762..c9a99d1c 100644
--- a/app/code/core/Mage/Catalog/Model/Product/Compare/Item.php
+++ b/app/code/core/Mage/Catalog/Model/Product/Compare/Item.php
@@ -109,4 +109,14 @@ public function bindCustomerLogin()
         return $this;
     }
 
+    /**
+     * Clean compare items
+     *
+     * @return Mage_Catalog_Model_Product_Compare_Item
+     */
+    public function clean()
+    {
+        $this->getResource()->clean($this);
+        return $this;
+    }
 }
diff --git a/app/code/core/Mage/Catalog/Model/Product/Condition.php b/app/code/core/Mage/Catalog/Model/Product/Condition.php
new file mode 100644
index 00000000..2dea33be
--- /dev/null
+++ b/app/code/core/Mage/Catalog/Model/Product/Condition.php
@@ -0,0 +1,50 @@
+getTable() && $this->getPkFieldName()) {
+            $collection->joinTable(
+                $this->getTable(),
+                $this->getPkFieldName().'=entity_id',
+                array('affected_product_id'=>$this->getPkFieldName())
+            );
+        }
+        return $this;
+    }
+
+    public function getIdsSelect($dbAdapter)
+    {
+        if ($this->getTable() && $this->getPkFieldName()) {
+            $select = $dbAdapter->select()
+                ->from($this->getTable(), $this->getPkFieldName());
+            return $select;
+        }
+        return '';
+    }
+}
\ No newline at end of file
diff --git a/skin/install/default/default/css/custom.css b/app/code/core/Mage/Catalog/Model/Product/Condition/Interface.php
similarity index 81%
rename from skin/install/default/default/css/custom.css
rename to app/code/core/Mage/Catalog/Model/Product/Condition/Interface.php
index 5178b509..eb26468b 100644
--- a/skin/install/default/default/css/custom.css
+++ b/app/code/core/Mage/Catalog/Model/Product/Condition/Interface.php
@@ -1,3 +1,4 @@
+ Mage_Catalog_Model_Product_Link::LINK_TYPE_RELATED,
         'up_sell'       => Mage_Catalog_Model_Product_Link::LINK_TYPE_UPSELL,
-        'cross_sell'    => Mage_Catalog_Model_Product_Link::LINK_TYPE_CROSSSELL
+        'cross_sell'    => Mage_Catalog_Model_Product_Link::LINK_TYPE_CROSSSELL,
+        'grouped'       => Mage_Catalog_Model_Product_Link::LINK_TYPE_GROUPED
     );
 
     public function __construct()
diff --git a/app/code/core/Mage/Catalog/Model/Product/Option.php b/app/code/core/Mage/Catalog/Model/Product/Option.php
index ee4a811e..d780df37 100644
--- a/app/code/core/Mage/Catalog/Model/Product/Option.php
+++ b/app/code/core/Mage/Catalog/Model/Product/Option.php
@@ -220,7 +220,7 @@ public function saveOptions()
             }
             $isEdit = (bool)$this->getId()? true:false;
 
-            if ($this->getData('is_delete') == '1') {// better strlen()
+            if ($this->getData('is_delete') == '1') {
                 if ($isEdit) {
                     $this->getValueInstance()->deleteValue($this->getId());
                     $this->deletePrices($this->getId());
@@ -228,7 +228,7 @@ public function saveOptions()
                     $this->delete();
                 }
             } else {
-                if ($this->getData('previous_type') != '') {//better strlen()
+                if ($this->getData('previous_type') != '') {
                     $previousType = $this->getData('previous_type');
                     //if previous option has dfferent group from one is came now need to remove all data of previous group
                     if ($this->getGroupByType($previousType) != $this->getGroupByType($this->getData('type'))) {
@@ -274,6 +274,8 @@ protected function _afterSave()
 
             $this->getValueInstance()->setOption($this)
                 ->saveValues();
+        } elseif ($this->getGroupByType($this->getType()) == self::OPTION_GROUP_SELECT) {
+            Mage::throwException(Mage::helper('catalog')->__('Select type options required values rows.'));
         }
 
         return parent::_afterSave();
@@ -388,4 +390,17 @@ public function prepareOptionForDuplicate()
         return $newOption;
     }
 
+    /**
+     * Duplicate options for product
+     *
+     * @param int $oldProductId
+     * @param int $newProductId
+     * @return Mage_Catalog_Model_Product_Option
+     */
+    public function duplicate($oldProductId, $newProductId)
+    {
+        $this->getResource()->duplicate($this, $oldProductId, $newProductId);
+
+        return $this;
+    }
 }
\ No newline at end of file
diff --git a/app/code/core/Mage/Catalog/Model/Product/Option/Value.php b/app/code/core/Mage/Catalog/Model/Product/Option/Value.php
index ec3a9b15..1acf26ab 100644
--- a/app/code/core/Mage/Catalog/Model/Product/Option/Value.php
+++ b/app/code/core/Mage/Catalog/Model/Product/Option/Value.php
@@ -119,6 +119,7 @@ public function saveValues()
                 $this->save();
             }
         }//eof foreach()
+        return $this;
     }
 
     /**
@@ -187,4 +188,16 @@ public function prepareValueForDuplicate()
         return $this->__toArray();
     }
 
+    /**
+     * Duplicate product options value
+     *
+     * @param int $oldOptionId
+     * @param int $newOptionId
+     * @return Mage_Catalog_Model_Product_Option_Value
+     */
+    public function duplicate($oldOptionId, $newOptionId)
+    {
+        $this->getResource()->duplicate($this, $oldOptionId, $newOptionId);
+        return $this;
+    }
 }
\ No newline at end of file
diff --git a/app/code/core/Mage/Catalog/Model/Product/Type/Abstract.php b/app/code/core/Mage/Catalog/Model/Product/Type/Abstract.php
index 2848f39c..a4f5f25a 100644
--- a/app/code/core/Mage/Catalog/Model/Product/Type/Abstract.php
+++ b/app/code/core/Mage/Catalog/Model/Product/Type/Abstract.php
@@ -94,7 +94,7 @@ public function getSetAttributes()
     {
         if (is_null($this->_setAttributes)) {
             $attributes = $this->getProduct()->getResource()
-                ->loadAllAttributes()
+                ->loadAllAttributes($this->getProduct())
                 ->getAttributesByCode();
             $this->_setAttributes = array();
             foreach ($attributes as $attribute) {
diff --git a/app/code/core/Mage/Catalog/Model/Product/Type/Grouped.php b/app/code/core/Mage/Catalog/Model/Product/Type/Grouped.php
index 1c8be8f2..6199062a 100644
--- a/app/code/core/Mage/Catalog/Model/Product/Type/Grouped.php
+++ b/app/code/core/Mage/Catalog/Model/Product/Type/Grouped.php
@@ -36,6 +36,7 @@ class Mage_Catalog_Model_Product_Type_Grouped extends Mage_Catalog_Model_Product
     const TYPE_CODE = 'grouped';
     protected $_associatedProducts  = null;
     protected $_associatedProductIds= null;
+    protected $_statusFilters = null;
     protected $_isComposite = true;
 
     /**
@@ -47,11 +48,17 @@ public function getAssociatedProducts()
     {
         if (is_null($this->_associatedProducts)) {
             $this->_associatedProducts = array();
+
+            if (!Mage::app()->getStore()->isAdmin()) {
+                $this->setSaleableStatus();
+            }
+
             $collection = $this->getAssociatedProductCollection()
                 ->addAttributeToSelect('*')
                 ->addFilterByRequiredOptions()
                 ->setPositionOrder()
-                ->addStoreFilter($this->getStoreFilter());
+                ->addStoreFilter($this->getStoreFilter())
+                ->addAttributeToFilter('status', array('in' => $this->getStatusFilters()));
 
             foreach ($collection as $product) {
                 $this->_associatedProducts[] = $product;
@@ -60,6 +67,47 @@ public function getAssociatedProducts()
         return $this->_associatedProducts;
     }
 
+    /**
+     *  Add status filter to collection
+     *
+     *  @param    int $status
+     *  @return	  void
+     */
+    public function addStatusFilter ($status)
+    {
+        $this->_statusFilters[] = $status;
+        return $this;
+    }
+
+    /**
+     *  Set only saleable filter
+     *
+     *  @param    none
+     *  @return	  void
+     */
+    public function setSaleableStatus ()
+    {
+        $this->_statusFilters = Mage::getSingleton('catalog/product_status')->getSaleableStatusIds();
+        return $this;
+    }
+
+    /**
+     *  Return all assigned status filters
+     *
+     *  @param    none
+     *  @return	  void
+     */
+    public function getStatusFilters ()
+    {
+        if ($this->_statusFilters === null) {
+            return array(
+                Mage_Catalog_Model_Product_Status::STATUS_ENABLED,
+                Mage_Catalog_Model_Product_Status::STATUS_DISABLED
+            );
+        }
+        return $this->_statusFilters;
+    }
+
     /**
      * Retrieve related products identifiers
      *
diff --git a/app/code/core/Mage/Catalog/Model/Product/Type/Price.php b/app/code/core/Mage/Catalog/Model/Product/Type/Price.php
index 26f00626..e0e3e116 100644
--- a/app/code/core/Mage/Catalog/Model/Product/Type/Price.php
+++ b/app/code/core/Mage/Catalog/Model/Product/Type/Price.php
@@ -187,12 +187,12 @@ protected function _applySpecialPrice($product, $finalPrice)
     {
         $specialPrice = $product->getSpecialPrice();
         if (is_numeric($specialPrice)) {
-            $today = floor(time()/86400)*86400;
-            $from = floor(strtotime($product->getSpecialFromDate())/86400)*86400;
-            $to = floor(strtotime($product->getSpecialToDate())/86400)*86400;
+            $storeDate  = Mage::app()->getLocale()->storeDate($product->getStore());
+            $fromDate   = Mage::app()->getLocale()->date($product->getSpecialFromDate(), null, null, false);
+            $toDate     = Mage::app()->getLocale()->date($product->getSpecialToDate(), null, null, false);
 
-            if ($product->getSpecialFromDate() && $today < $from) {
-            } elseif ($product->getSpecialToDate() && $today > $to) {
+            if ($product->getSpecialFromDate() && $storeDate->compare($fromDate)<0) {
+            } elseif ($product->getSpecialToDate() && $storeDate->compare($toDate)>0) {
             } else {
                $finalPrice = min($finalPrice, $specialPrice);
             }
@@ -310,31 +310,29 @@ public static function calculatePrice($basePrice, $specialPrice, $specialPriceFr
         if ($wId instanceof Mage_Core_Model_Store) {
             $sId = $wId->getId();
             $wId = $wId->getWebsiteId();
+        } else {
+            $sId = Mage::app()->getWebsite($wId)->getDefaultGroup()->getDefaultStoreId();
         }
+        $storeDate = Mage::app()->getLocale()->storeDate($sId);
+
         if ($gId instanceof Mage_Customer_Model_Group) {
             $gId = $gId->getId();
         }
         $finalPrice = $basePrice;
 
-        $today = floor(time()/86400)*86400;
-        $from = floor(strtotime($specialPriceFrom)/86400)*86400;
-        $to = floor(strtotime($specialPriceTo)/86400)*86400;
+        $fromDate   = Mage::app()->getLocale()->date($specialPriceFrom, null, null, false);
+        $toDate     = Mage::app()->getLocale()->date($specialPriceTo, null, null, false);
 
         if ($specialPrice !== null && $specialPrice !== false) {
-            if ($specialPriceFrom && $today < $from) {
-            } elseif ($specialPriceTo && $today > $to) {
+            if ($specialPriceFrom && $storeDate->compare($fromDate)<0) {
+            } elseif ($specialPriceTo && $storeDate->compare($toDate)>0) {
             } else {
                $finalPrice = min($finalPrice, $specialPrice);
             }
         }
 
-        if(!isset($sId)) {
-            $sId = 0;
-        }
-
         if ($rulePrice === false) {
-            $date = mktime(0,0,0);
-            $rulePrice = Mage::getResourceModel('catalogrule/rule')->getRulePrice($date, $wId, $gId, $productId);
+            $rulePrice = Mage::getResourceModel('catalogrule/rule')->getRulePrice($storeDate, $wId, $gId, $productId);
         }
         if ($rulePrice !== null && $rulePrice !== false) {
             $finalPrice = min($finalPrice, $rulePrice);
diff --git a/app/code/core/Mage/Catalog/Model/Product/Url.php b/app/code/core/Mage/Catalog/Model/Product/Url.php
index 026d89c7..9759bf9e 100644
--- a/app/code/core/Mage/Catalog/Model/Product/Url.php
+++ b/app/code/core/Mage/Catalog/Model/Product/Url.php
@@ -80,56 +80,46 @@ protected function _validImage($image)
      */
     public function getProductUrl($product)
     {
-        $queryParams = '';
-//        $store = Mage::app()->getStore();
-//        if ($store->getId() && Mage::getStoreConfig(Mage_Core_Model_Url::XML_PATH_STORE_IN_URL)) {
-//            $queryParams = '?store='.$store->getCode();
-//        }
-
-        if ($product->hasData('request_path') && $product->getRequestPath() != '') {
-            $url = $this->getUrlInstance()->getBaseUrl().$product->getRequestPath().$queryParams;
-            return $url;
-        }
+        $cacheUrlKey = 'url_' . ($product->getCategoryId() && !$product->getDoNotUseCategoryId() ? $product->getCategoryId() : 'NONE');
+        $url = $product->getData($cacheUrlKey);
 
-        Varien_Profiler::start('REWRITE: '.__METHOD__);
-        $rewrite = $this->getUrlRewrite();
-        if ($product->getStoreId()) {
-            $rewrite->setStoreId($product->getStoreId());
-        }
+        if (is_null($url)) {
+            if ($product->hasData('request_path') && $product->getRequestPath() != '') {
+                $this->setData($cacheUrlKey, $this->getUrlInstance()->getDirectUrl($product->getRequestPath()));
+                return $this->getData($cacheUrlKey);
+            }
 
-        $idPath = $idPathProduct = 'product/'.$product->getId();
-        if ($product->getCategoryId() && !$product->getDoNotUseCategoryId() && Mage::getStoreConfig('catalog/seo/product_use_categories')) {
-            $idPath .= '/'.$product->getCategoryId();
-        }
+            Varien_Profiler::start('REWRITE: '.__METHOD__);
+
+            $rewrite = $this->getUrlRewrite();
+            if ($product->getStoreId()) {
+                $rewrite->setStoreId($product->getStoreId());
+            }
 
-        $rewrite->loadByIdPath($idPath);
+            $idPath = 'product/'.$product->getId();
+            if ($product->getCategoryId() && !$product->getDoNotUseCategoryId() && Mage::getStoreConfig('catalog/seo/product_use_categories')) {
+                $idPath .= '/'.$product->getCategoryId();
+            }
 
-        if ($rewrite->getId()) {
-            $url = $this->getUrlInstance()->getBaseUrl().$rewrite->getRequestPath().$queryParams;
+            $rewrite->loadByIdPath($idPath);
+
+            if ($rewrite->getId()) {
+                $this->setData($cacheUrlKey, $this->getUrlInstance()->getDirectUrl($rewrite->getRequestPath()));
+                Varien_Profiler::stop('REWRITE: '.__METHOD__);
+                return $this->getData($cacheUrlKey);
+            }
 
             Varien_Profiler::stop('REWRITE: '.__METHOD__);
-            return $url;
-        }
-//        else {
-//            print $idPathProduct;
-//            $rewrite->loadByIdPath($idPathProduct);
-//            if ($rewrite->getId()) {
-//                $url = $this->getUrlInstance()->getBaseUrl().$rewrite->getRequestPath().$queryParams;
-//                Varien_Profiler::stop('REWRITE: '.__METHOD__);
-//                return $url;
-//            }
-//        }
-        Varien_Profiler::stop('REWRITE: '.__METHOD__);
-        Varien_Profiler::start('REGULAR: '.__METHOD__);
-
-        $url = $this->getUrlInstance()->getUrl('catalog/product/view',
-            array(
-                'id'=>$product->getId(),
-                's'=>$product->getUrlKey(),
-                'category'=>$product->getCategoryId()
-            )).$queryParams;
-        Varien_Profiler::stop('REGULAR: '.__METHOD__);
+            Varien_Profiler::start('REGULAR: '.__METHOD__);
+
+            $url = $this->getUrlInstance()->getUrl('catalog/product/view', array(
+                'id'        => $product->getId(),
+                's'         => $product->getUrlKey(),
+                'category'  => $product->getCategoryId()
+            ));
 
+            Varien_Profiler::stop('REGULAR: '.__METHOD__);
+        }
         return $url;
     }
 
@@ -142,9 +132,17 @@ public function formatUrlKey($str)
         return $urlKey;
     }
 
+    /**
+     * Retrieve Product Url path (with category if exists)
+     *
+     * @param Mage_Catalog_Model_Product $product
+     * @param Mage_Catalog_Model_Category $category
+     *
+     * @return string
+     */
     public function getUrlPath($product, $category=null)
     {
-        $path = $product->getUrlKey();
+        $path = $product->getData('url_path');
 
         if (is_null($category)) {
             /** @todo get default category */
@@ -153,8 +151,7 @@ public function getUrlPath($product, $category=null)
             Mage::throwException('Invalid category object supplied');
         }
 
-        $path = $category->getUrlPath().'/'.$path;
-
-        return $path;
+        return Mage::helper('catalog/category')->getCategoryUrlPath($category->getUrlPath())
+            . '/' . $path;
     }
 }
\ No newline at end of file
diff --git a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Abstract.php b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Abstract.php
index ffec9ba4..ad8214d7 100644
--- a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Abstract.php
+++ b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Abstract.php
@@ -130,6 +130,9 @@ protected function _insertAttribute($object, $attribute, $value)
             'store_id'      => $this->getDefaultStoreId()
         );
         $this->_getWriteAdapter()->insert($attribute->getBackend()->getTable(), $row);
+        if ($object->getStoreId() != $this->getDefaultStoreId()) {
+            $this->_updateAttribute($object, $attribute, $this->_getWriteAdapter()->lastInsertId(), $value);
+        }
         return $this;
     }
 
diff --git a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Category.php b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Category.php
index 2fc62d3a..00c50657 100644
--- a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Category.php
+++ b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Category.php
@@ -85,13 +85,13 @@ protected function _beforeDelete(Varien_Object $object){
 
         $toUpdateChild = explode('/',substr($object->getPath(),0,strrpos($object->getPath(),'/')));
          $child = $this->getChildrenCount($object->getId());
-         $child+=1; 
+         $child+=1;
         // BUG here
         $this->_getWriteAdapter()->update(
-		        $this->getEntityTable(),
-		        array('children_count'=>new Zend_Db_Expr('`children_count`-'.$child)),
-		        $this->_getWriteAdapter()->quoteInto('entity_id IN(?)', $toUpdateChild))
-      		  ;
+                $this->getEntityTable(),
+                array('children_count'=>new Zend_Db_Expr('`children_count`-'.$child)),
+                $this->_getWriteAdapter()->quoteInto('entity_id IN(?)', $toUpdateChild))
+                ;
 
         if ($child = $this->_getTree()->getNodeById($object->getId())) {
             $children = $child->getChildren();
@@ -120,10 +120,10 @@ protected function _beforeSave(Varien_Object $object)
            $toUpdateChild = explode('/',$object->getPath());
 
             $this->_getWriteAdapter()->update(
-		        $this->getEntityTable(),
-		        array('children_count'=>new Zend_Db_Expr('`children_count`+1')),
-		        $this->_getWriteAdapter()->quoteInto('entity_id IN(?)', $toUpdateChild))
-      		  ;
+                $this->getEntityTable(),
+                array('children_count'=>new Zend_Db_Expr('`children_count`+1')),
+                $this->_getWriteAdapter()->quoteInto('entity_id IN(?)', $toUpdateChild))
+                ;
 
         }
         return $this;
@@ -143,14 +143,16 @@ protected function _afterSave(Varien_Object $object)
         }
         $categoryIds = explode('/', $object->getPath());
 
-
-
-
         $this->refreshProductIndex($categoryIds);
-        //$this->_saveCountChidren($object);
         return parent::_afterSave($object);
     }
 
+    /**
+     * Deprecated since 1.1.7
+     *
+     * @param Varien_Object $object
+     * @return Mage_Catalog_Model_Resource_Eav_Mysql4_Category
+     */
     protected function _saveCountChidren($object)
     {
         $chidren = $object->getChildren();
@@ -370,7 +372,7 @@ public function getProductsPosition($category)
         $positions = $this->_getWriteAdapter()->fetchPairs($select);
         return $positions;
     }
-    
+
     public function getChildrenCount($categoryId)
     {
         $select = $this->_getReadAdapter()->select()
@@ -378,76 +380,38 @@ public function getChildrenCount($categoryId)
             ->where('entity_id=?', $categoryId);
 
         $child = $this->_getReadAdapter()->fetchOne($select);
-        
+
         return $child;
     }
 
-   // public function move(Mage_Catalog_Model_Category $category, $newParentId)
     public function move($categoryId, $newParentId)
     {
-        $category   = Mage::getModel('catalog/category')->load($categoryId);
-        $oldParent  = $category->getParentCategory();
-        $newParent  = Mage::getModel('catalog/category')->load($newParentId);
-        
-        $child = $this->getChildrenCount($category->getId());
-        $child+=1;
+        $category  = Mage::getModel('catalog/category')->load($categoryId);
+        $oldParent = $category->getParentCategory();
+        $newParent = Mage::getModel('catalog/category')->load($newParentId);
 
+        $childrenCount = $this->getChildrenCount($category->getId()) + 1;
 
-        $toUpdateChild = explode('/',$newParent->getPath());
+        // update children count of new parents
+        $parentIds = explode('/', $newParent->getPath());
         $this->_getWriteAdapter()->update(
-		        $this->getEntityTable(),
-		        array('children_count'=>new Zend_Db_Expr('`children_count`+' . $child)),
-		        $this->_getWriteAdapter()->quoteInto('entity_id IN(?)', $toUpdateChild))
-      		  ;
-
-      	$toUpdateChild = explode('/', $oldParent->getPath());
-      	$this->_getWriteAdapter()->update(
-		        $this->getEntityTable(),
-		        array('children_count'=>new Zend_Db_Expr('`children_count`-' . $child)),
-		        $this->_getWriteAdapter()->quoteInto('entity_id IN(?)', $toUpdateChild))
-      		  ;
-        return ;
-
-
-        $oldStoreId = $category->getStoreId();
-        $parent = Mage::getModel('catalog/category')
-            ->setStoreId($category->getStoreId())
-            ->load($category->getParentId());
-
-        $newParent = Mage::getModel('catalog/category')
-            ->setStoreId($category->getStoreId())
-            ->load($newParentId);
-        $oldParentStores = $parent->getStoreIds();
-        $newParentStores = $newParent->getStoreIds();
-
-        $category->setParentId($newParentId)
-            ->save();
-        $parent->save();
-        $newParent->save();
-
-        // Add to new stores
-        $addToStores = array_diff($newParentStores, $oldParentStores);
-        foreach ($addToStores as $storeId) {
-            $newCategory = clone $category;
-            $newCategory->setStoreId($storeId)
-               ->save();
-            $children = $category->getAllChildren();
-
-            if ($children && $arrChildren = explode(',', $children)) {
-                foreach ($arrChildren as $childId) {
-                    if ($childId == $category->getId()) {
-                        continue;
-                    }
-
-                    $child = Mage::getModel('catalog/category')
-                       ->setStoreId($oldStoreId)
-                       ->load($childId)
-                       ->setStoreId($storeId)
-                       ->save();
-                }
-            }
-        }
-        return $this;
+            $this->getEntityTable(),
+            array('children_count' => new Zend_Db_Expr("`children_count` + {$childrenCount}")),
+            $this->_getWriteAdapter()->quoteInto('entity_id IN (?)', $parentIds)
+        );
+
+        // update children count of old parents
+          $parentIds = explode('/', $oldParent->getPath());
+          $this->_getWriteAdapter()->update(
+            $this->getEntityTable(),
+            array('children_count' => new Zend_Db_Expr("`children_count` - {$childrenCount}")),
+            $this->_getWriteAdapter()->quoteInto('entity_id IN (?)', $parentIds)
+        );
+
+        // update parent id
+        $this->_getWriteAdapter()->query("UPDATE {$this->getEntityTable()} SET parent_id = {$newParent->getId()} WHERE entity_id = {$categoryId}");
+
+        return;
     }
 
     public function checkId($id)
diff --git a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Category/Tree.php b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Category/Tree.php
index 460a4a27..6200db8d 100644
--- a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Category/Tree.php
+++ b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Category/Tree.php
@@ -392,14 +392,17 @@ protected function _createCollectionDataSelect($sorted = true, $optionalAttribut
         }
         foreach ($attributes as $attributeCode) {
             $attribute = Mage::getResourceSingleton('catalog/category')->getAttribute($attributeCode);
-            $tableAs   = "_$attributeCode";
-            $select->joinLeft(
-                array($tableAs => $attribute->getBackend()->getTable()),
-                sprintf('`%1$s`.entity_id=e.entity_id AND `%1$s`.attribute_id=%2$d AND `%1$s`.entity_type_id=e.entity_type_id AND `%1$s`.store_id=%3$d',
-                    $tableAs, $attribute->getData('attribute_id'), Mage_Core_Model_App::ADMIN_STORE_ID
-                ),
-                array($attributeCode => 'value')
-            );
+            // join non-static attribute table
+            if (!$attribute->getBackend()->isStatic()) {
+                $tableAs   = "_$attributeCode";
+                $select->joinLeft(
+                    array($tableAs => $attribute->getBackend()->getTable()),
+                    sprintf('`%1$s`.entity_id=e.entity_id AND `%1$s`.attribute_id=%2$d AND `%1$s`.entity_type_id=e.entity_type_id AND `%1$s`.store_id=%3$d',
+                        $tableAs, $attribute->getData('attribute_id'), Mage_Core_Model_App::ADMIN_STORE_ID
+                    ),
+                    array($attributeCode => 'value')
+                );
+            }
         }
 
         // count children products qty plus self products qty
diff --git a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Collection/Abstract.php b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Collection/Abstract.php
index ae93f0aa..17f8b454 100644
--- a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Collection/Abstract.php
+++ b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Collection/Abstract.php
@@ -45,6 +45,9 @@ public function setStore($store)
 
     public function setStoreId($storeId)
     {
+        if ($storeId instanceof Mage_Core_Model_Store) {
+            $storeId = $storeId->getId();
+        }
         $this->_storeId = $storeId;
         return $this;
     }
diff --git a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product.php b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product.php
index 0ae14b22..40b2b0e8 100644
--- a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product.php
+++ b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product.php
@@ -41,6 +41,8 @@ class Mage_Catalog_Model_Resource_Eav_Mysql4_Product extends Mage_Catalog_Model_
      */
     public function __construct()
     {
+        parent::__construct();
+        Mage::getSingleton('eav/config')->preloadAttributes('catalog_product', $this->_getDefaultAttributes());
         $resource = Mage::getSingleton('core/resource');
         $this->setType('catalog_product')
             ->setConnection(
@@ -59,7 +61,7 @@ public function __construct()
      */
     protected function _getDefaultAttributes()
     {
-        return array('entity_type_id', 'attribute_set_id', 'type_id', 'created_at', 'updated_at');
+        return array('entity_id', 'entity_type_id', 'attribute_set_id', 'type_id', 'created_at', 'updated_at');
     }
 
     /**
@@ -392,16 +394,14 @@ public function getParentProductIds($object)
             ->where("g.linked_product_id = ?", $childId)
             ->where("link_type_id = ?", $groupedLinkTypeId);
 
+        $groupedIds = $this->_getReadAdapter()->fetchCol($groupedSelect);
+
         $configurableSelect = $this->_getReadAdapter()->select()
             ->from(array('c'=>$configurableProductsTable), 'c.parent_id')
             ->where("c.product_id = ?", $childId);
 
-        $select = $this->_getReadAdapter()->select();
-        $select
-            ->from(array('e'=>$this->getTable('catalog/product')), 'DISTINCT(e.entity_id)')
-            ->where('e.entity_id in ('.new Zend_Db_Expr($groupedSelect).' UNION '.new Zend_Db_Expr($configurableSelect).')');
-
-        return $this->_getReadAdapter()->fetchCol($select);
+        $configurableIds = $this->_getReadAdapter()->fetchCol($configurableSelect);
+        return array_merge($groupedIds, $configurableIds);
     }
 
     /**
@@ -418,4 +418,27 @@ public function canBeShowInCategory($product, $categoryId)
             ->where('category_id=?', $categoryId);
         return $this->_getReadAdapter()->fetchOne($select);
     }
-}
\ No newline at end of file
+
+    /**
+     * Duplicate product store values
+     *
+     * @param int $oldId
+     * @param int $newId
+     * @return Mage_Catalog_Model_Resource_Eav_Mysql4_Product
+     */
+    public function duplicate($oldId, $newId)
+    {
+        $eavTables = array('datetime', 'decimal', 'int', 'text', 'varchar');
+
+        // duplicate EAV store values
+        foreach ($eavTables as $suffix) {
+            $tableName = $this->getTable('catalog_product_entity_' . $suffix);
+            $sql = 'REPLACE INTO `' . $tableName . '` '
+                . 'SELECT NULL, `entity_type_id`, `attribute_id`, `store_id`, ' . $newId . ', `value`'
+                . 'FROM `' . $tableName . '` WHERE `entity_id`=' . $oldId . ' AND `store_id`>0';
+            $this->_getWriteAdapter()->query($sql);
+        }
+
+        return $this;
+    }
+}
diff --git a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Collection.php b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Collection.php
index 51f2e5cc..d946d32b 100644
--- a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Collection.php
+++ b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Collection.php
@@ -45,6 +45,20 @@ class Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection
     protected $_allIdsCache = null;
     protected $_addTaxPercents = false;
 
+    public function __construct($resource=null)
+    {
+        /**
+         * Preload attributes for EAV optimization
+         */
+        $attributes = Mage::getSingleton('catalog/config')->getProductAttributes();
+        $attributes = array_merge($attributes, array(
+            'tax_class_id', 'tier_price'
+        ));
+
+        Mage::getSingleton('eav/config')->preloadAttributes('catalog_product', $attributes);
+        parent::__construct($resource);
+    }
+
     /**
      * Initialize resources
      */
@@ -55,6 +69,23 @@ protected function _construct()
         $this->_productCategoryTable= $this->getResource()->getTable('catalog/category_product');
     }
 
+    /**
+     * Add attribute to entities in collection
+     *
+     * If $attribute=='*' select all attributes
+     *
+     * @param array|string|integer|Mage_Core_Model_Config_Element $attribute
+     * @return Mage_Eav_Model_Entity_Collection_Abstract
+     */
+    public function addAttributeToSelect($attribute, $joinType=false)
+    {
+        if (is_array($attribute)) {
+            Mage::getSingleton('eav/config')->preloadAttributes('catalog_product', $attribute);
+        }
+        return parent::addAttributeToSelect($attribute, $joinType);
+    }
+
+
     protected function _beforeLoad()
     {
         if ($this->_addFinalPrice) {
@@ -496,9 +527,11 @@ protected function _joinPriceRules()
     {
         $wId = Mage::app()->getWebsite()->getId();
         $gId = Mage::getSingleton('customer/session')->getCustomerGroupId();
+        $storeDate = Mage::app()->getLocale()->storeDate($this->getStoreId());
 
         $conditions  = "_price_rule.product_id = e.entity_id AND ";
-        $conditions .= "_price_rule.rule_date = '".date('Y-m-d H:i:s', mktime(0, 0, 0))."' AND ";
+
+        $conditions .= "_price_rule.rule_date = '".$this->getResource()->formatDate($storeDate, false)."' AND ";
         $conditions .= "_price_rule.website_id = '{$wId}' AND ";
         $conditions .= "_price_rule.customer_group_id = '{$gId}'";
 
@@ -553,7 +586,11 @@ public function setAllIdsCache($value){
 
     public function addAttributeToFilter($attribute, $condition=null, $joinType='inner'){
         $this->_allIdsCache = null;
-        return parent::addAttributeToFilter($attribute, $condition, $joinType);
+        if (is_string($attribute) && $attribute == 'is_saleable') {
+            return $this->getSelect()->where($this->_getConditionSql('(IF(manage_stock, is_in_stock, 1))', $condition));
+        } else {
+            return parent::addAttributeToFilter($attribute, $condition, $joinType);
+        }
     }
 
     public function addTaxPercents(){
@@ -640,7 +677,7 @@ public function setOrder($attribute, $dir='desc')
     {
         $storeId = Mage::app()->getStore()->getId();
         if ($attribute == 'price' && $storeId != 0) {
-            $customerGroup = Mage::getSingleton('customer/session')->getCustomer()->getCustomerGroupId();
+            $customerGroup = Mage::getSingleton('customer/session')->getCustomerGroupId();
 
             $priceAttributeId = $this->getAttribute('price')->getId();
 
diff --git a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Compare/Item.php b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Compare/Item.php
index db31b69d..b69b6de2 100644
--- a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Compare/Item.php
+++ b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Compare/Item.php
@@ -78,4 +78,37 @@ public function getCount($customerId, $visitorId)
         }
         return $this->_getReadAdapter()->fetchOne($select);
     }
+
+    /**
+     * Clean compare table
+     *
+     * @param Mage_Catalog_Model_Product_Compare_Item $object
+     * @return Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Compare_Item
+     */
+    public function clean(Mage_Catalog_Model_Product_Compare_Item $object)
+    {
+        while (true) {
+            $select = $this->_getReadAdapter()->select()
+                ->from(array('compare_table' => $this->getMainTable()), array('catalog_compare_item_id'))
+                ->joinLeft(
+                    array('visitor_table' => $this->getTable('log/visitor')),
+                    'compare_table.visitor_id = visitor_table.visitor_id',
+                    array())
+                ->where('compare_table.visitor_id NOT IS NULL')
+                ->where('visitor_table.visitor_id IS NULL')
+                ->limit(1000);
+            $itemIds = $this->_getReadAdapter()->fetchCol($select);
+
+            if (!$itemIds) {
+                break;
+            }
+
+            $this->_getWriteAdapter()->delete(
+                $this->getMainTable(),
+                $this->_getWriteAdapter()->quoteInto('catalog_compare_item_id IN(?)', $eventIds)
+            );
+        }
+
+        return $this;
+    }
 }
diff --git a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Link/Product/Collection.php b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Link/Product/Collection.php
index 1783a76e..60a781cc 100644
--- a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Link/Product/Collection.php
+++ b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Link/Product/Collection.php
@@ -149,23 +149,26 @@ public function addProductFilter($products)
     public function setRandomOrder()
     {
         $this->getSelect()->order(new Zend_Db_Expr('RAND()'));
-        $this->_setIdFieldName('link_id');
         return $this;
     }
 
+    /**
+     * Deprecated since 1.1.7
+     *
+     * @param mixed $groupBy
+     * @return Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Link_Product_Collection
+     */
     public function setGroupBy($groupBy)
     {
-        $this->getSelect()->group($groupBy);
         return $this;
     }
 
     protected function _beforeLoad()
     {
-        parent::_beforeLoad();
         if ($this->getLinkModel()) {
             $this->_joinLinks();
         }
-        return $this;
+        return parent::_beforeLoad();
     }
 
     protected function _joinLinks()
@@ -214,6 +217,11 @@ protected function _joinLinks()
             }
         }
 
+        /**
+         * same products must not repeat in collection (see #4835)
+         */
+        $this->getSelect()->group('e.entity_id');
+
         return $this;
     }
 
@@ -224,4 +232,4 @@ public function setPositionOrder($dir='asc')
         }
         return $this;
     }
-}
\ No newline at end of file
+}
diff --git a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Option.php b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Option.php
index 40184f50..46a51a0a 100644
--- a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Option.php
+++ b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Option.php
@@ -212,4 +212,59 @@ public function deleteTitles($option_id)
 
         return $this;
     }
+
+    /**
+     * Duplicate custom options for product
+     *
+     * @param Mage_Catalog_Model_Product_Option $object
+     * @param int $oldProductId
+     * @param int $newProductId
+     * @return Mage_Catalog_Model_Product_Option
+     */
+    public function duplicate(Mage_Catalog_Model_Product_Option $object, $oldProductId, $newProductId)
+    {
+        $write  = $this->_getWriteAdapter();
+        $read   = $this->_getReadAdapter();
+
+        $optionsCond = array();
+        $optionsData = array();
+
+        // read and prepare original product options
+        $select = $read->select()
+            ->from($this->getTable('catalog/product_option'))
+            ->where('product_id=?', $oldProductId);
+        $query = $read->query($select);
+        while ($row = $query->fetch()) {
+            $optionsData[$row['option_id']] = $row;
+            $optionsData[$row['option_id']]['product_id'] = $newProductId;
+            unset($optionsData[$row['option_id']]['option_id']);
+        }
+
+        // insert options to duplicated product
+        foreach ($optionsData as $oId => $data) {
+            $write->insert($this->getMainTable(), $data);
+            $optionsCond[$oId] = $write->lastInsertId();
+        }
+
+        // copy options prefs
+        foreach ($optionsCond as $oldOptionId => $newOptionId) {
+            // title
+            $table = $this->getTable('catalog/product_option_title');
+            $sql = 'REPLACE INTO `' . $table . '` '
+                . 'SELECT NULL, ' . $newOptionId . ', `store_id`, `title`'
+                . 'FROM `' . $table . '` WHERE `option_id`=' . $oldOptionId;
+            $this->_getWriteAdapter()->query($sql);
+
+            // price
+            $table = $this->getTable('catalog/product_option_price');
+            $sql = 'REPLACE INTO `' . $table . '` '
+                . 'SELECT NULL, ' . $newOptionId . ', `store_id`, `price`, `price_type`'
+                . 'FROM `' . $table . '` WHERE `option_id`=' . $oldOptionId;
+            $this->_getWriteAdapter()->query($sql);
+
+            $object->getValueInstance()->duplicate($oldOptionId, $newOptionId);
+        }
+
+        return $object;
+    }
 }
\ No newline at end of file
diff --git a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Option/Value.php b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Option/Value.php
index 450de4c9..66ecca02 100644
--- a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Option/Value.php
+++ b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Option/Value.php
@@ -213,4 +213,51 @@ public function deleteValues($option_type_id)
             $childCondition
         );
     }
+
+    /**
+     * Duplicate product options value
+     *
+     * @param Mage_Catalog_Model_Product_Option_Value $object
+     * @param int $oldOptionId
+     * @param int $newOptionId
+     * @return Mage_Catalog_Model_Product_Option_Value
+     */
+    public function duplicate(Mage_Catalog_Model_Product_Option_Value $object, $oldOptionId, $newOptionId)
+    {
+        $select = $this->_getReadAdapter()->select()
+            ->from($this->getMainTable())
+            ->where('option_id=?', $oldOptionId);
+        $valueData = $this->_getReadAdapter()->fetchAll($select);
+
+        $valueCond = array();
+
+        foreach ($valueData as $data) {
+            $optionTypeId = $data[$this->getIdFieldName()];
+            unset($data[$this->getIdFieldName()]);
+            $data['option_id'] = $newOptionId;
+
+            $this->_getWriteAdapter()->insert($this->getMainTable(), $data);
+            $valueCond[$optionTypeId] = $this->_getWriteAdapter()->lastInsertId();
+        }
+
+        unset($valueData);
+
+        foreach ($valueCond as $oldTypeId => $newTypeId) {
+            // price
+            $table = $this->getTable('catalog/product_option_type_price');
+            $sql = 'REPLACE INTO `' . $table . '` '
+                . 'SELECT NULL, ' . $newTypeId . ', `store_id`, `price`, `price_type`'
+                . 'FROM `' . $table . '` WHERE `option_type_id`=' . $oldTypeId;
+            $this->_getWriteAdapter()->query($sql);
+
+            // title
+            $table = $this->getTable('catalog/product_option_type_title');
+            $sql = 'REPLACE INTO `' . $table . '` '
+                . 'SELECT NULL, ' . $newTypeId . ', `store_id`, `title`'
+                . 'FROM `' . $table . '` WHERE `option_type_id`=' . $oldTypeId;
+            $this->_getWriteAdapter()->query($sql);
+        }
+
+        return $object;
+    }
 }
\ No newline at end of file
diff --git a/app/code/core/Mage/Catalog/Model/Url.php b/app/code/core/Mage/Catalog/Model/Url.php
index 1baf1765..6a26e2ea 100644
--- a/app/code/core/Mage/Catalog/Model/Url.php
+++ b/app/code/core/Mage/Catalog/Model/Url.php
@@ -152,6 +152,8 @@ public function refreshRewrites($storeId = null)
         $this->refreshCategoryRewrite($this->getStores($storeId)->getRootCategoryId(), $storeId, false);
         $this->refreshProductRewrites($storeId);
         $this->getResource()->clearCategoryProduct($storeId);
+
+        return $this;
     }
 
     /**
@@ -182,9 +184,7 @@ protected function _refreshCategoryRewrites(Varien_Object $category, $parentPath
                 $parentPath = '';
             }
 
-            if ($categoryUrlSuffix) {
-                $parentPath = preg_replace('#('.preg_quote($categoryUrlSuffix, '#').')/$#i', '/', $parentPath);
-            }
+            $parentPath = Mage::helper('catalog/category')->getCategoryUrlPath($parentPath, true, $category->getStoreId());
 
             $idPath      = 'category/' . $category->getId();
             $targetPath  = 'catalog/category/view/id/'.$category->getId();
@@ -251,12 +251,9 @@ protected function _refreshProductRewrite(Varien_Object $product, Varien_Object
         $productUrlSuffix  = $this->getProductUrlSuffix($category->getStoreId());
         $categoryUrlSuffix = $this->getCategoryUrlSuffix($category->getStoreId());
         if ($category->getUrlPath()) {
-            if ($categoryUrlSuffix) {
-                $categoryUrl = preg_replace('#('.preg_quote($categoryUrlSuffix, '#').')$#i', '', $category->getUrlPath());
-            }
-            else {
-                $categoryUrl = $category->getUrlPath();
-            }
+
+            $categoryUrl = Mage::helper('catalog/category')->getCategoryUrlPath($category->getUrlPath(), false, $category->getStoreId());
+
             $idPath = 'product/'.$product->getId().'/'.$category->getId();
             $targetPath = 'catalog/product/view/id/'.$product->getId().'/category/'.$category->getId();
             $requestPath = $categoryUrl . '/' . $urlKey . $productUrlSuffix;
@@ -512,10 +509,7 @@ public function getUnusedPath($storeId, $requestPath, $idPath)
      */
     public function getProductUrlSuffix($storeId)
     {
-        if (!isset($this->_productUrlSuffix[$storeId])) {
-            $this->_productUrlSuffix[$storeId] = (string)Mage::app()->getStore($storeId)->getConfig('catalog/seo/product_url_suffix');
-        }
-        return $this->_productUrlSuffix[$storeId];
+        return Mage::helper('catalog/product')->getProductUrlSuffix($storeId);
     }
 
     /**
@@ -526,9 +520,6 @@ public function getProductUrlSuffix($storeId)
      */
     public function getCategoryUrlSuffix($storeId)
     {
-        if (!isset($this->_categoryUrlSuffix[$storeId])) {
-            $this->_categoryUrlSuffix[$storeId] = (string)Mage::app()->getStore($storeId)->getConfig('catalog/seo/category_url_suffix');
-        }
-        return $this->_categoryUrlSuffix[$storeId];
+        return Mage::helper('catalog/category')->getCategoryUrlSuffix($storeId);
     }
 }
\ No newline at end of file
diff --git a/app/code/core/Mage/Catalog/etc/api.xml b/app/code/core/Mage/Catalog/etc/api.xml
index 1b9f2c61..da70666f 100644
--- a/app/code/core/Mage/Catalog/etc/api.xml
+++ b/app/code/core/Mage/Catalog/etc/api.xml
@@ -5,10 +5,10 @@
  *
  * 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.
+ * 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/osl-3.0.php
+ * 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.
diff --git a/app/code/core/Mage/Catalog/etc/config.xml b/app/code/core/Mage/Catalog/etc/config.xml
index 31a18b20..f8da6af7 100644
--- a/app/code/core/Mage/Catalog/etc/config.xml
+++ b/app/code/core/Mage/Catalog/etc/config.xml
@@ -5,10 +5,10 @@
  *
  * 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.
+ * 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/osl-3.0.php
+ * 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.
@@ -22,13 +22,13 @@
  * @category   Mage
  * @package    Mage_Catalog
  * @copyright  Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
- * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ * @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
  */
 -->
 
     
         
-            0.7.52
+            0.7.53
         
     
 
@@ -251,30 +251,32 @@
                 
                     
                         
-                            
+                            
                                 
+                                adminhtml/catalog_product_edit_tab_options_type_text
                                 
-                                    
+                                    
                                         
                                     
-                                    
+                                    
                                         
                                     
                                 
                             
-                            
                                 
+                                adminhtml/catalog_product_edit_tab_options_type_select
                                 
-                                    
+                                    
                                         
                                     
-                                    
+                                    
                                         
                                     
-                                    
+                                    
                                         
                                     
-                                    
+                                    
                                         
                                     
                                 
@@ -447,6 +449,15 @@
                     
                 
             
+            
+                
+                    
+                        singleton
+                        catalog/observer
+                        catalogProductCompareClean
+                    
+                
+            
         
         
             
diff --git a/app/code/core/Mage/Catalog/etc/convert.xml b/app/code/core/Mage/Catalog/etc/convert.xml
index ef616f82..04040a6c 100644
--- a/app/code/core/Mage/Catalog/etc/convert.xml
+++ b/app/code/core/Mage/Catalog/etc/convert.xml
@@ -5,10 +5,10 @@
  *
  * 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.
+ * 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/osl-3.0.php
+ * 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.
@@ -22,7 +22,7 @@
  * @category   Mage
  * @package    Mage_Catalog
  * @copyright  Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
- * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ * @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
  */
 -->
 
diff --git a/app/code/core/Mage/Catalog/etc/system.xml b/app/code/core/Mage/Catalog/etc/system.xml
index b35b17db..c6f03d5b 100644
--- a/app/code/core/Mage/Catalog/etc/system.xml
+++ b/app/code/core/Mage/Catalog/etc/system.xml
@@ -5,10 +5,10 @@
  *
  * 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.
+ * 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/osl-3.0.php
+ * 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.
@@ -22,7 +22,7 @@
  * @category   Mage
  * @package    Mage_Catalog
  * @copyright  Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
- * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ * @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
  */
 -->
 
@@ -60,8 +60,8 @@
                             1
                             1
                         
-                        
-                            
+                        
+                            
                             comma separated
                             text
                             
@@ -70,12 +70,9 @@
                             1
                             1
                         
-
-
-
                         
                             
-                            must be accessibility in values list
+                            must be in the allowed values list
                             text
                             
                             3
@@ -83,9 +80,8 @@
                             1
                             1
                         
-
                         
-                            
+                            
                             comma separated
                             text
                             
@@ -94,10 +90,9 @@
                             1
                             1
                         
-
                         
                             
-                            must be accessibility in values list
+                            must be in the allowed values list
                             text
                             
                             5
@@ -130,6 +125,7 @@
                         
                     
                 
+                
                 
                     
                     text
@@ -176,6 +172,7 @@
                         
                     
                 
+                
                 
                     
                     text
@@ -196,6 +193,7 @@
                         
                     
                 
+                
                 
                     
                     text
diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.52-0.7.53.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.52-0.7.53.php
new file mode 100644
index 00000000..3b9ee793
--- /dev/null
+++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.52-0.7.53.php
@@ -0,0 +1,35 @@
+startSetup();
+
+$installer->getConnection()->changeColumn($installer->getTable('catalog/product_option_title'), 'title', 'title', 'VARCHAR(255) NOT NULL default \'\'');
+$installer->getConnection()->changeColumn($installer->getTable('catalog/product_option_type_title'), 'title', 'title', 'VARCHAR(255) NOT NULL default \'\'');
+
+$installer->endSetup();
\ No newline at end of file
diff --git a/app/code/core/Mage/CatalogIndex/Model/Indexer.php b/app/code/core/Mage/CatalogIndex/Model/Indexer.php
index badb0e50..b42d9a23 100644
--- a/app/code/core/Mage/CatalogIndex/Model/Indexer.php
+++ b/app/code/core/Mage/CatalogIndex/Model/Indexer.php
@@ -115,17 +115,84 @@ protected function _getBaseToSpecifiedCurrencyRate($code)
         return Mage::app()->getStore()->getBaseCurrency()->getRate($code);;
     }
 
-    public function buildEntityFilter($attributes, $values, &$filteredAttributes, $productCollection)
+    public function buildEntityPriceFilter($attributes, $values, &$filteredAttributes, $productCollection)
     {
         $filter = array();
         $store = Mage::app()->getStore()->getId();
-        $taxClassJoined = false;
         $currentStoreCurrency = Mage::app()->getStore()->getCurrentCurrencyCode();
 
         foreach ($attributes as $attribute) {
             $code = $attribute->getAttributeCode();
             if (isset($values[$code])) {
-                foreach ($this->_indexers as $indexer) {
+                foreach ($this->_priceIndexers as $indexerName) {
+                    $indexer = $this->_indexers[$indexerName];
+                    /* @var $indexer Mage_CatalogIndex_Model_Indexer_Abstract */
+                    if ($indexer->isAttributeIndexable($attribute)) {
+                        if ($values[$code]) {
+                            if (isset($values[$code]['from']) && isset($values[$code]['to']) && (!$values[$code]['from'] && !$values[$code]['to'])){
+                                continue;
+                            }
+                            $table = $indexer->getResource()->getMainTable();
+                            if (!isset($filter[$code])) {
+                                $filter[$code] = $this->_getSelect();
+                                $filter[$code]->from($table, array('entity_id'));
+                                $filter[$code]->distinct(true);
+
+                                Mage::helper('tax')->joinTaxClass($filter[$code], $store, $table);
+
+                                if ($indexer->isAttributeIdUsed()) {
+                                    $filter[$code]->where("$table.attribute_id = ?", $attribute->getId());
+                                }
+                            }
+                            if (is_array($values[$code])) {
+                                $additionalCalculations = '';
+                                $rateConversion = 1;
+                                $filter[$code]->distinct(true);
+
+                                $additionalCalculations = Mage::helper('tax')
+                                    ->getPriceTaxSql("$table.value", 'IFNULL(tax_class_c.value, tax_class_d.value)');
+                                if (isset($values[$code]['from']) && isset($values[$code]['to'])) {
+
+                                    if ($values[$code]['from']) {
+                                        if (isset($values[$code]['currency'])) {
+                                            $rateConversion = $this->_getBaseToSpecifiedCurrencyRate($values[$code]['currency']);
+                                        } else {
+                                            $rateConversion = $this->_getBaseToSpecifiedCurrencyRate($currentStoreCurrency);
+                                        }
+                                        $filter[$code]->where("($table.value{$additionalCalculations})*{$rateConversion} >= ?", $values[$code]['from']);
+                                    }
+
+
+                                    if ($values[$code]['to']) {
+                                        if (isset($values[$code]['currency'])) {
+                                            $rateConversion = $this->_getBaseToSpecifiedCurrencyRate($values[$code]['currency']);
+                                        } else {
+                                            $rateConversion = $this->_getBaseToSpecifiedCurrencyRate($currentStoreCurrency);
+                                        }
+                                        $filter[$code]->where("($table.value{$additionalCalculations})*{$rateConversion} <= ?", $values[$code]['to']);
+                                    }
+                                }
+                            }
+                            $filter[$code]->where("$table.store_id = ?", $store);
+                            $filteredAttributes[]=$code;
+                        }
+                    }
+                }
+            }
+        }
+        return $filter;
+    }
+
+    public function buildEntityFilter($attributes, $values, &$filteredAttributes, $productCollection)
+    {
+        $filter = array();
+        $store = Mage::app()->getStore()->getId();
+
+        foreach ($attributes as $attribute) {
+            $code = $attribute->getAttributeCode();
+            if (isset($values[$code])) {
+                foreach ($this->_attributeIndexers as $indexerName) {
+                    $indexer = $this->_indexers[$indexerName];
                     /* @var $indexer Mage_CatalogIndex_Model_Indexer_Abstract */
                     if ($indexer->isAttributeIndexable($attribute)) {
                         if ($values[$code]) {
@@ -140,8 +207,6 @@ public function buildEntityFilter($attributes, $values, &$filteredAttributes, $p
                                 $filter[$code]->where('attribute_id = ?', $attribute->getId());
                             }
                             if (is_array($values[$code])) {
-                                $additionalCalculations = '';
-                                $rateConversion = 1;
                                 if (isset($values[$code]['from']) && isset($values[$code]['to'])) {
 
                                     if ($values[$code]['from']) {
@@ -149,21 +214,7 @@ public function buildEntityFilter($attributes, $values, &$filteredAttributes, $p
                                             $values[$code]['from'] = date("Y-m-d H:i:s", strtotime($values[$code]['from']));
                                         }
 
-                                        if ($attribute->getFrontendInput() == 'price') {
-                                            if (isset($values[$code]['currency'])) {
-                                                $rateConversion = $this->_getBaseToSpecifiedCurrencyRate($values[$code]['currency']);
-                                            } else {
-                                                $rateConversion = $this->_getBaseToSpecifiedCurrencyRate($currentStoreCurrency);
-                                            }
-
-                                            if (!$taxClassJoined) {
-                                                Mage::helper('tax')->joinTaxClass($productCollection->getSelect(), $store, 'e');
-                                                $taxClassJoined = true;
-                                                $additionalCalculations = Mage::helper('tax')
-                                                    ->getPriceTaxSql('value', 'IFNULL(tax_class_c.value, tax_class_d.value)');
-                                            }
-                                        }
-                                        $filter[$code]->where("(value{$additionalCalculations})*{$rateConversion} >= ?", $values[$code]['from']);
+                                        $filter[$code]->where("value >= ?", $values[$code]['from']);
                                     }
 
 
@@ -171,21 +222,7 @@ public function buildEntityFilter($attributes, $values, &$filteredAttributes, $p
                                         if (!is_numeric($values[$code]['to'])) {
                                             $values[$code]['to'] = date("Y-m-d H:i:s", strtotime($values[$code]['to']));
                                         }
-                                        if ($attribute->getFrontendInput() == 'price') {
-                                            if (isset($values[$code]['currency'])) {
-                                                $rateConversion = $this->_getBaseToSpecifiedCurrencyRate($values[$code]['currency']);
-                                            } else {
-                                                $rateConversion = $this->_getBaseToSpecifiedCurrencyRate($currentStoreCurrency);
-                                            }
-
-                                            if (!$taxClassJoined) {
-                                                Mage::helper('tax')->joinTaxClass($productCollection->getSelect(), $store, 'e');
-                                                $taxClassJoined = true;
-                                                $additionalCalculations = Mage::helper('tax')
-                                                    ->getPriceTaxSql('value', 'IFNULL(tax_class_c.value, tax_class_d.value)');
-                                            }
-                                        }
-                                        $filter[$code]->where("(value{$additionalCalculations})*{$rateConversion} <= ?", $values[$code]['to']);
+                                        $filter[$code]->where("value <= ?", $values[$code]['to']);
                                     }
                                 } else {
                                     $filter[$code]->where('value in (?)', $values[$code]);
@@ -344,12 +381,8 @@ public function plainReindex($products = null, $attributes = null, $stores = nul
     {
         $flag = Mage::getModel('catalogindex/catalog_index_flag')->loadSelf();
         if ($flag->getState() == Mage_CatalogIndex_Model_Catalog_Index_Flag::STATE_RUNNING) {
-            $kill = Mage::getModel('catalogindex/catalog_index_kill_flag')->loadSelf();
-            if ($kill->checkIsThisProcess()) {
-                $kill->delete();
-                return $this;
-            }
-        } else if ($flag->getState() == Mage_CatalogIndex_Model_Catalog_Index_Flag::STATE_QUEUED) {
+            return $this;
+        } else /*if ($flag->getState() == Mage_CatalogIndex_Model_Catalog_Index_Flag::STATE_QUEUED)*/ {
             $flag->setState(Mage_CatalogIndex_Model_Catalog_Index_Flag::STATE_RUNNING)->save();
         }
 
@@ -388,31 +421,43 @@ public function plainReindex($products = null, $attributes = null, $stores = nul
                 Mage::throwException('Invalid attributes supplied for indexing');
             }
 
-            $this->_getResource()->clear($attributeCodes, $priceAttributeCodes, count($priceAttributeCodes)>0, count($priceAttributeCodes)>0, count($priceAttributeCodes)>0, $products, $stores);
+            $this->_getResource()->clear(
+                $attributeCodes,
+                $priceAttributeCodes,
+                count($priceAttributeCodes)>0,
+                count($priceAttributeCodes)>0,
+                count($priceAttributeCodes)>0,
+                $products,
+                $stores
+            );
             foreach ($stores as $store) {
                 $collection = Mage::getModel('catalog/product')
                     ->getCollection()
-                    ->addAttributeToFilter('status', $status)
-                    ->addAttributeToFilter('visibility', $visibility)
+                    ->setStoreId($store)
                     ->addStoreFilter($store);
+                Mage::getSingleton('catalog/product_visibility')->addVisibleInSiteFilterToCollection($collection);
+
                 /* @var $collection Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection */
 
                 if ($products instanceof Mage_Catalog_Model_Product) {
                     $collection->addIdFilter($products->getId());
                 } else if (is_array($products) || is_numeric($products)) {
                     $collection->addIdFilter($products);
+                } elseif ($products instanceof Mage_Catalog_Model_Product_Condition_Interface) {
+                	$products->applyToCollection($collection);
                 }
-                $productIds = $collection->getAllIds();
 
-                if (!$productIds)
+                $productCount = $collection->getSize();
+
+                if (!$productCount) {
                     continue;
+                }
 
                 $step = 1000;
-                $productCount = count($productIds);
                 for ($i=0;$i<$productCount/$step;$i++) {
                     $this->_getResource()->beginTransaction();
 
-                    $stepData = array_slice($productIds, $i*$step, $step);
+                    $stepData = $collection->getAllIds($step, $i*$step);
 
                     if (count($attributeCodes)) {
                         $this->_getResource()->reindexAttributes($stepData, $attributeCodes, $store);
@@ -446,4 +491,14 @@ public function plainReindex($products = null, $attributes = null, $stores = nul
 
         return $this;
     }
+
+    public function queueIndexing()
+    {
+        $flag = Mage::getModel('catalogindex/catalog_index_flag')
+            ->loadSelf()
+            ->setState(Mage_CatalogIndex_Model_Catalog_Index_Flag::STATE_QUEUED)
+            ->save();
+
+        return $this;
+    }
 }
\ No newline at end of file
diff --git a/app/code/core/Mage/CatalogIndex/Model/Mysql4/Attribute.php b/app/code/core/Mage/CatalogIndex/Model/Mysql4/Attribute.php
index cd862300..75db2db1 100644
--- a/app/code/core/Mage/CatalogIndex/Model/Mysql4/Attribute.php
+++ b/app/code/core/Mage/CatalogIndex/Model/Mysql4/Attribute.php
@@ -56,6 +56,10 @@ public function getCount($attribute, $entitySelect)
     {
         $select = clone $entitySelect;
         $select->reset(Zend_Db_Select::COLUMNS);
+        $select->reset(Zend_Db_Select::ORDER);
+        $select->reset(Zend_Db_Select::LIMIT_COUNT);
+        $select->reset(Zend_Db_Select::LIMIT_OFFSET);
+
         $fields = array('count'=>'COUNT(DISTINCT index.entity_id)', 'index.value');
 
         $select->from('', $fields)
@@ -65,7 +69,7 @@ public function getCount($attribute, $entitySelect)
             ->group('index.value');
 
         $select = $select->__toString();
-        $alias = $this->_getReadAdapter()->quoteTableAs($this->getMainTable(), 'index');
+//        $alias = $this->_getReadAdapter()->quoteTableAs($this->getMainTable(), 'index');
         $result = $this->_getReadAdapter()->fetchAll($select);
 
         $counts = array();
diff --git a/app/code/core/Mage/CatalogIndex/Model/Mysql4/Indexer.php b/app/code/core/Mage/CatalogIndex/Model/Mysql4/Indexer.php
index 6af809eb..4948fb29 100644
--- a/app/code/core/Mage/CatalogIndex/Model/Mysql4/Indexer.php
+++ b/app/code/core/Mage/CatalogIndex/Model/Mysql4/Indexer.php
@@ -57,10 +57,15 @@ public function clear($eav = true, $price = true, $minimal = true, $finalPrice =
         if (!is_null($products)) {
             if ($products instanceof Mage_Catalog_Model_Product) {
                 $products = $products->getId();
-            } else if (!is_numeric($products) && !is_array($products)) {
+            } elseif ($products instanceof Mage_Catalog_Model_Product_Condition_Interface) {
+            	$suffix = 'entity_id IN ('.$products->getIdsSelect($this->_getWriteAdapter())->__toString().')';
+            }
+            else if (!is_numeric($products) && !is_array($products)) {
                 Mage::throwException('Invalid products supplied for indexing');
             }
-            $suffix = $this->_getWriteAdapter()->quoteInto('entity_id in (?)', $products);
+            if (empty($suffix)) {
+                $suffix = $this->_getWriteAdapter()->quoteInto('entity_id in (?)', $products);
+            }
         }
         if (!is_null($store)) {
             if ($store instanceof Mage_Core_Model_Store) {
@@ -255,7 +260,7 @@ public function reindexAttributes($products, $attributeIds, $store, $forcedId =
             $type = $index['type_id'];
             $id = (is_null($forcedId) ? $index['entity_id'] : $forcedId);
 
-            if ($id && $index['attribute_id'] && $index['value']) {
+            if ($id && $index['attribute_id'] && isset($index['value'])) {
                 $attribute = $this->_loadAttribute($index['attribute_id']);
                 if ($attribute->getFrontendInput() == 'multiselect') {
                     $index['value'] = explode(',', $index['value']);
diff --git a/app/code/core/Mage/CatalogIndex/Model/Mysql4/Price.php b/app/code/core/Mage/CatalogIndex/Model/Mysql4/Price.php
index 144d6586..d5af377e 100644
--- a/app/code/core/Mage/CatalogIndex/Model/Mysql4/Price.php
+++ b/app/code/core/Mage/CatalogIndex/Model/Mysql4/Price.php
@@ -65,14 +65,16 @@ public function getCustomerGroupId()
 
     protected function _getTaxRateConditions($tableName = 'main_table')
     {
-        return Mage::helper('tax')->getPriceTaxSql($tableName . '.value', $this->getStoreId(), 'IFNULL(tax_class_c.value, tax_class_d.value)');
+        return Mage::helper('tax')->getPriceTaxSql($tableName . '.value', 'IFNULL(tax_class_c.value, tax_class_d.value)');
     }
 
     public function getMaxValue($attribute = null, $entitySelect)
     {
-
         $select = clone $entitySelect;
         $select->reset(Zend_Db_Select::COLUMNS);
+        $select->reset(Zend_Db_Select::ORDER);
+        $select->reset(Zend_Db_Select::LIMIT_COUNT);
+        $select->reset(Zend_Db_Select::LIMIT_OFFSET);
 
         $select->from('', "MAX(price_table.value{$this->_getTaxRateConditions('price_table')})")
             ->join(array('price_table'=>$this->getMainTable()), 'price_table.entity_id=e.entity_id', array())
@@ -80,8 +82,10 @@ public function getMaxValue($attribute = null, $entitySelect)
             ->where('price_table.attribute_id = ?', $attribute->getId());
         Mage::helper('tax')->joinTaxClass($select, $this->getStoreId(), 'price_table');
 
-        if ($attribute->getAttributeCode() == 'price')
+        if ($attribute->getAttributeCode() == 'price') {
             $select->where('price_table.customer_group_id = ?', $this->getCustomerGroupId());
+        }
+
         return $this->_getReadAdapter()->fetchOne($select)*$this->getRate();
     }
 
@@ -115,6 +119,9 @@ public function getCount($range, $attribute, $entitySelect)
     {
         $select = clone $entitySelect;
         $select->reset(Zend_Db_Select::COLUMNS);
+        $select->reset(Zend_Db_Select::ORDER);
+        $select->reset(Zend_Db_Select::LIMIT_COUNT);
+        $select->reset(Zend_Db_Select::LIMIT_OFFSET);
 
         $fields = array('count'=>'COUNT(DISTINCT price_table.entity_id)', 'range'=>"FLOOR(((price_table.value{$this->_getTaxRateConditions('price_table')})*{$this->getRate()})/{$range})+1");
 
diff --git a/app/code/core/Mage/CatalogIndex/Model/Observer.php b/app/code/core/Mage/CatalogIndex/Model/Observer.php
index ed03275f..49643253 100644
--- a/app/code/core/Mage/CatalogIndex/Model/Observer.php
+++ b/app/code/core/Mage/CatalogIndex/Model/Observer.php
@@ -70,10 +70,24 @@ public function processPriceScopeChange(Varien_Event_Observer $observer)
         Mage::getSingleton('catalogindex/indexer')->plainReindex(null, Mage_CatalogIndex_Model_Indexer::REINDEX_TYPE_PRICE);
     }
 
+    /**
+     * Process catalog index after price rules were applied
+     *
+     * @param   Varien_Event_Observer $observer
+     * @return  Mage_CatalogIndex_Model_Observer
+     */
     public function processPriceRuleApplication(Varien_Event_Observer $observer)
     {
         $eventProduct = $observer->getEvent()->getProduct();
-        Mage::getSingleton('catalogindex/indexer')->plainReindex($eventProduct, Mage_CatalogIndex_Model_Indexer::REINDEX_TYPE_PRICE);
+        $productCondition = $observer->getEvent()->getProductCondition();
+        if ($productCondition) {
+            $eventProduct = $productCondition;
+        }
+        Mage::getSingleton('catalogindex/indexer')->plainReindex(
+            $eventProduct,
+            Mage_CatalogIndex_Model_Indexer::REINDEX_TYPE_PRICE
+        );
+        return $this;
     }
 
     public function registerParentIds(Varien_Event_Observer $observer)
diff --git a/app/code/core/Mage/CatalogIndex/etc/config.xml b/app/code/core/Mage/CatalogIndex/etc/config.xml
index 79497428..8bf4a0fe 100644
--- a/app/code/core/Mage/CatalogIndex/etc/config.xml
+++ b/app/code/core/Mage/CatalogIndex/etc/config.xml
@@ -5,10 +5,10 @@
  *
  * 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.
+ * 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/osl-3.0.php
+ * 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.
@@ -22,7 +22,7 @@
  * @category   Mage
  * @package    Mage_CatalogIndex
  * @copyright  Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
- * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ * @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
  */
 -->
 
diff --git a/app/code/core/Mage/CatalogInventory/Helper/Data.php b/app/code/core/Mage/CatalogInventory/Helper/Data.php
index 4447ac46..37613b8d 100644
--- a/app/code/core/Mage/CatalogInventory/Helper/Data.php
+++ b/app/code/core/Mage/CatalogInventory/Helper/Data.php
@@ -29,5 +29,52 @@
  */
 class Mage_CatalogInventory_Helper_Data extends Mage_Core_Helper_Abstract
 {
+    /**
+     * All product types registry in scope of quantity availability
+     *
+     * @var array
+     */
+    protected static $_isQtyTypeIds;
 
+    /**
+     * Check if quantity defined for specified product type
+     *
+     * @param string $productTypeId
+     * @return bool
+     */
+    public function isQty($productTypeId)
+    {
+        $this->getIsQtyTypeIds();
+        if (!isset(self::$_isQtyTypeIds[$productTypeId])) {
+            return false;
+        }
+        return self::$_isQtyTypeIds[$productTypeId];
+    }
+
+    /**
+     * Get all registered product type ids and if quantity is defined for them
+     *
+     * @param bool $filter
+     * @return array
+     */
+    public function getIsQtyTypeIds($filter = null)
+    {
+        if (null === self::$_isQtyTypeIds) {
+            self::$_isQtyTypeIds = array();
+            $productTypesXml = Mage::getConfig()->getNode('global/catalog/product/type');
+            foreach ($productTypesXml->children() as $typeId => $configXml) {
+                self::$_isQtyTypeIds[$typeId] = (bool)$configXml->is_qty;
+            }
+        }
+        if (null === $filter) {
+            return self::$_isQtyTypeIds;
+        }
+        $result = self::$_isQtyTypeIds;
+        foreach ($result as $key => $value) {
+            if ($value !== $filter) {
+                unset($result[$key]);
+            }
+        }
+        return $result;
+    }
 }
diff --git a/app/code/core/Mage/CatalogInventory/Model/Mysql4/Stock.php b/app/code/core/Mage/CatalogInventory/Model/Mysql4/Stock.php
index 689ba1fc..9cc3485e 100644
--- a/app/code/core/Mage/CatalogInventory/Model/Mysql4/Stock.php
+++ b/app/code/core/Mage/CatalogInventory/Model/Mysql4/Stock.php
@@ -33,6 +33,14 @@
  */
 class Mage_CatalogInventory_Model_Mysql4_Stock extends Mage_Core_Model_Mysql4_Abstract
 {
+    protected $_isConfig;
+    protected $_isConfigManageStock;
+    protected $_isConfigBackorders;
+    protected $_configMinQty;
+    protected $_configTypeIds;
+    protected $_configNotifyStockQty;
+    protected $_stock;
+
     protected function  _construct()
     {
         $this->_init('cataloginventory/stock', 'stock_id');
@@ -52,7 +60,7 @@ public function lockProductItems($stock, $productIds)
         $this->_getWriteAdapter()->query($select);
         return $this;
     }
-    
+
     /**
      * add join to select only in stock products
      *
@@ -61,8 +69,112 @@ public function lockProductItems($stock, $productIds)
      */
     public function setInStockFilterToCollection( $collection)
     {
-    	$collection->joinField('inventory_in_stock', 'cataloginventory/stock_item',
-    							'is_in_stock', 'product_id=entity_id', '{{table}}.is_in_stock=1');
-    	return $this;
+        $manageStock = Mage::getStoreConfig(Mage_CatalogInventory_Model_Stock_Item::XML_PATH_MANAGE_STOCK);
+        $cond = array(
+            '{{table}}.use_config_manage_stock = 0 AND {{table}}.manage_stock=1 AND {{table}}.is_in_stock=1',
+            '{{table}}.use_config_manage_stock = 0 AND {{table}}.manage_stock=0',
+        );
+
+        if ($manageStock) {
+            $cond[] = '{{table}}.use_config_manage_stock = 1 AND {{table}}.is_in_stock=1';
+        }
+        else {
+            $cond[] = '{{table}}.use_config_manage_stock = 1';
+        }
+
+        $collection->joinField(
+            'inventory_in_stock',
+            'cataloginventory/stock_item',
+            'is_in_stock',
+            'product_id=entity_id',
+            '('.join(') OR (', $cond) . ')'
+        );
+        return $this;
+    }
+
+    /**
+     * Load some inventory configuration settings
+     *
+     */
+    protected function _initConfig()
+    {
+        if (!$this->_isConfig) {
+            $this->_isConfig = true;
+            $this->_isConfigManageStock  = (int)Mage::getStoreConfigFlag(Mage_CatalogInventory_Model_Stock_Item::XML_PATH_MANAGE_STOCK);
+            $this->_isConfigBackorders   = (int)Mage::getStoreConfig(Mage_CatalogInventory_Model_Stock_Item::XML_PATH_BACKORDERS);
+            $this->_configMinQty         = (int)Mage::getStoreConfig(Mage_CatalogInventory_Model_Stock_Item::XML_PATH_MIN_QTY);
+            $this->_configNotifyStockQty = (int)Mage::getStoreConfig(Mage_CatalogInventory_Model_Stock_Item::XML_PATH_NOTIFY_STOCK_QTY);
+            $this->_configTypeIds        = array_keys(Mage::helper('catalogInventory')->getIsQtyTypeIds(true));
+            $this->_stock                = Mage::getModel('cataloginventory/stock');
+        }
+    }
+
+    /**
+     * Set items out of stock basing on their quantities and config settings
+     *
+     */
+    public function updateSetOutOfStock()
+    {
+        $this->_initConfig();
+        $this->_getWriteAdapter()->update($this->getTable('cataloginventory/stock_item'),
+            array('is_in_stock' => 0, 'stock_status_changed_automatically' => 1),
+            sprintf('stock_id = %d
+                AND is_in_stock = 1
+                AND (use_config_manage_stock = 1 AND 1 = %d OR use_config_manage_stock = 0 AND manage_stock = 1)
+                AND (use_config_backorders = 1 AND %d = %d OR use_config_backorders = 0 AND backorders = %d)
+                AND (use_config_min_qty = 1 AND qty <= %d OR use_config_min_qty = 0 AND qty <= min_qty)
+                AND product_id IN (SELECT entity_id FROM %s WHERE type_id IN (%s))',
+                $this->_stock->getId(),
+                $this->_isConfigManageStock,
+                Mage_CatalogInventory_Model_Stock::BACKORDERS_NO, $this->_isConfigBackorders, Mage_CatalogInventory_Model_Stock::BACKORDERS_NO,
+                $this->_configMinQty,
+                $this->getTable('catalog/product'), $this->_getWriteAdapter()->quote($this->_configTypeIds)
+        ));
+    }
+
+    /**
+     * Set items in stock basing on their quantities and config settings
+     *
+     */
+    public function updateSetInStock()
+    {
+        $this->_initConfig();
+        $this->_getWriteAdapter()->update($this->getTable('cataloginventory/stock_item'),
+            array('is_in_stock' => 1),
+            sprintf('stock_id = %d
+                AND is_in_stock = 0
+                AND stock_status_changed_automatically = 1
+                AND (use_config_manage_stock = 1 AND 1 = %d OR use_config_manage_stock = 0 AND manage_stock = 1)
+                AND (use_config_min_qty = 1 AND qty > %d OR use_config_min_qty = 0 AND qty > min_qty)
+                AND product_id IN (SELECT entity_id FROM %s WHERE type_id IN (%s))',
+                $this->_stock->getId(),
+                $this->_isConfigManageStock,
+                $this->_configMinQty,
+                $this->getTable('catalog/product'), $this->_getWriteAdapter()->quote($this->_configTypeIds)
+        ));
+    }
+
+    /**
+     * Update items low stock date basing on their quantities and config settings
+     *
+     */
+    public function updateLowStockDate()
+    {
+        $nowUTC = Mage::app()->getLocale()->date(null, null, null, false)->toString(Varien_Date::DATETIME_INTERNAL_FORMAT);
+        $this->_initConfig();
+        $this->_getWriteAdapter()->update($this->getTable('cataloginventory/stock_item'),
+            array('low_stock_date' => new Zend_Db_Expr(sprintf('CASE
+                WHEN (use_config_notify_stock_qty = 1 AND qty < %d) OR (use_config_notify_stock_qty = 0 AND qty < notify_stock_qty)
+                THEN %s ELSE NULL
+                END
+                ', $this->_configNotifyStockQty, $this->_getWriteAdapter()->quote($nowUTC)
+            ))),
+            sprintf('stock_id = %d
+                AND (use_config_manage_stock = 1 AND 1 = %d OR use_config_manage_stock = 0 AND manage_stock = 1)
+                AND product_id IN (SELECT entity_id FROM %s WHERE type_id IN (%s))',
+                $this->_stock->getId(),
+                $this->_isConfigManageStock,
+                $this->getTable('catalog/product'), $this->_getWriteAdapter()->quote($this->_configTypeIds)
+        ));
     }
 }
\ No newline at end of file
diff --git a/app/code/core/Mage/CatalogInventory/Model/Mysql4/Stock/Item.php b/app/code/core/Mage/CatalogInventory/Model/Mysql4/Stock/Item.php
index 92b17369..4e336148 100644
--- a/app/code/core/Mage/CatalogInventory/Model/Mysql4/Stock/Item.php
+++ b/app/code/core/Mage/CatalogInventory/Model/Mysql4/Stock/Item.php
@@ -55,6 +55,21 @@ public function loadByProductId(Mage_CatalogInventory_Model_Stock_Item $item, $p
         return $this;
     }
 
+    /**
+     * Retrieve select object and join it to product entity table to get type ids
+     *
+     * @param  string $field
+     * @param  mixed $value
+     * @param  object $object
+     * @return Zend_Db_Select
+     */
+    protected function _getLoadSelect($field, $value, $object)
+    {
+        return parent::_getLoadSelect($field, $value, $object)
+            ->joinInner(array('p' => $this->getTable('catalog/product')), 'product_id=p.entity_id', 'type_id')
+        ;
+    }
+
     /**
      * Add join for catalog in stock field to product collection
      *
@@ -63,8 +78,15 @@ public function loadByProductId(Mage_CatalogInventory_Model_Stock_Item $item, $p
      */
     public function addCatalogInventoryToProductCollection($productCollection)
     {
-        $productCollection->joinField('inventory_in_stock', 'cataloginventory/stock_item',
-                                      'is_in_stock', 'product_id=entity_id', null, 'left');
+        $isStockManagedInConfig = Mage::getStoreConfig(Mage_CatalogInventory_Model_Stock_Item::XML_PATH_MANAGE_STOCK);
+        $productCollection->joinTable('cataloginventory/stock_item',
+            'product_id=entity_id',
+            array(
+                'is_saleable' => new Zend_Db_Expr('(IF(IF(use_config_manage_stock, ' . $isStockManagedInConfig . ', manage_stock), is_in_stock, 1))'),
+                'inventory_in_stock' => 'is_in_stock'
+            ),
+            null, 'left');
+
         return $this;
     }
 }
\ No newline at end of file
diff --git a/app/code/core/Mage/CatalogInventory/Model/Mysql4/Stock/Item/Collection.php b/app/code/core/Mage/CatalogInventory/Model/Mysql4/Stock/Item/Collection.php
index 6057fd57..c6f20e4e 100644
--- a/app/code/core/Mage/CatalogInventory/Model/Mysql4/Stock/Item/Collection.php
+++ b/app/code/core/Mage/CatalogInventory/Model/Mysql4/Stock/Item/Collection.php
@@ -79,4 +79,40 @@ public function addProductsFilter($products)
         $this->addFieldToFilter('product_id', array('in'=>$productIds));
         return $this;
     }
+
+    public function addManagedFilter($isStockManagedInConfig)
+    {
+        if ($isStockManagedInConfig) {
+            $this->getSelect()->where('(manage_stock = 1 OR use_config_manage_stock = 1)');
+        } else {
+            $this->addFieldToFilter('manage_stock', 1);
+        }
+
+        return $this;
+    }
+
+    public function addQtyFilter($comparsionMethod, $qty)
+    {
+        $allowedMethods = array('<', '>', '=', '<=', '>=', '<>');
+        if (!in_array($comparsionMethod, $allowedMethods)) {
+            Mage::throwException(Mage::helper('cataloginventory')->__('%s is not correct comparsion method.', $comparsionMethod));
+        }
+		$this->getSelect()->where("qty {$comparsionMethod} ?", $qty);
+        return $this;
+    }
+
+    /**
+     * Load data
+     *
+     * @return  Varien_Data_Collection_Db
+     */
+    public function load($printQuery = false, $logQuery = false)
+    {
+        if (!$this->isLoaded()) {
+            $this->getSelect()->joinInner(array('_products_table' => $this->getTable('catalog/product')),
+                'main_table.product_id=_products_table.entity_id', 'type_id'
+            );
+        }
+        return parent::load($printQuery, $logQuery);
+    }
 }
diff --git a/app/code/core/Mage/CatalogInventory/Model/Observer.php b/app/code/core/Mage/CatalogInventory/Model/Observer.php
index 4df3df7a..d6f1addc 100644
--- a/app/code/core/Mage/CatalogInventory/Model/Observer.php
+++ b/app/code/core/Mage/CatalogInventory/Model/Observer.php
@@ -94,7 +94,8 @@ public function saveInventoryData($observer)
      */
     public function copyInventoryData($observer)
     {
-        $newProduct = $observer->getEvent()->getProduct();
+        $newProduct = $observer->getEvent()->getNewProduct();
+
         $newProduct->unsStockItem();
         $newProduct->setStockData(array(
             'use_config_min_qty'        => 1,
@@ -145,25 +146,25 @@ protected function _prepareItemForSave($item, $product)
      */
     public function checkQuoteItemQty($observer)
     {
-        $item = $observer->getEvent()->getItem();
-        /* @var $item Mage_Sales_Model_Quote_Item */
-        if (!$item || !$item->getProductId() || $item->getQuote()->getIsSuperMode()) {
+        $quoteItem = $observer->getEvent()->getItem();
+        /* @var $quoteItem Mage_Sales_Model_Quote_Item */
+        if (!$quoteItem || !$quoteItem->getProductId() || $quoteItem->getQuote()->getIsSuperMode()) {
             return $this;
         }
 
         /**
          * Get Qty
          */
-        $qty = $item->getQty();
+        $qty = $quoteItem->getQty();
 
         /**
          * Check item for options
          */
-        if (($options = $item->getQtyOptions()) && $qty > 0) {
+        if (($options = $quoteItem->getQtyOptions()) && $qty > 0) {
             foreach ($options as $option) {
                 /* @var $option Mage_Sales_Model_Quote_Item_Option */
                 $optionQty = $qty * $option->getValue();
-                $increaseOptionQty = ($item->getQtyToAdd() ? $item->getQtyToAdd() : $qty) * $option->getValue();
+                $increaseOptionQty = ($quoteItem->getQtyToAdd() ? $quoteItem->getQtyToAdd() : $qty) * $option->getValue();
 
                 $stockItem = $option->getProduct()->getStockItem();
                 /* @var $stockItem Mage_CatalogInventory_Model_Stock_Item */
@@ -188,48 +189,69 @@ public function checkQuoteItemQty($observer)
 
                 if ($result->getHasError()) {
                     $option->setHasError(true);
-                    $item->setHasError(true)
+                    $quoteItem->setHasError(true)
                         ->setMessage($result->getQuoteMessage());
-                    $item->getQuote()->setHasError(true)
+                    $quoteItem->getQuote()->setHasError(true)
                         ->addMessage($result->getQuoteMessage(), $result->getQuoteMessageIndex());
                 }
             }
         }
         else {
-            $stockItem = $item->getProduct()->getStockItem();
+            $stockItem = $quoteItem->getProduct()->getStockItem();
             /* @var $stockItem Mage_CatalogInventory_Model_Stock_Item */
             if (!$stockItem instanceof Mage_CatalogInventory_Model_Stock_Item) {
                 Mage::throwException(Mage::helper('cataloginventory')->__('Stock item for Product is not valid'));
             }
 
-            if ($item->getParentItem()) {
-                $qtyForCheck = $item->getParentItem()->getQty()*$qty;
+
+            /**
+             * When we work with subitem (as subproduct of bundle or configurable product)
+             */
+            if ($quoteItem->getParentItem()) {
+                $qty = $quoteItem->getParentItem()->getQty()*$qty;
+                /**
+                 * we are using 0 becose original qty was processed
+                 */
+                $qtyForCheck = $this->_getProductQtyForCheck($quoteItem->getProduct()->getId(), 0);
             }
             else {
-                $increaseQty = $item->getQtyToAdd() ? $item->getQtyToAdd() : $qty;
-                $qtyForCheck = $this->_getProductQtyForCheck($item->getProduct()->getId(), $increaseQty);
+                $increaseQty = $quoteItem->getQtyToAdd() ? $quoteItem->getQtyToAdd() : $qty;
+                $qtyForCheck = $this->_getProductQtyForCheck($quoteItem->getProduct()->getId(), $increaseQty);
             }
 
             $result = $stockItem->checkQuoteItemQty($qty, $qtyForCheck);
+
             if (!is_null($result->getItemIsQtyDecimal())) {
-                $item->setIsQtyDecimal($result->getItemIsQtyDecimal());
+                $quoteItem->setIsQtyDecimal($result->getItemIsQtyDecimal());
+                if ($quoteItem->getParentItem()) {
+                    $quoteItem->getParentItem()->setIsQtyDecimal($result->getItemIsQtyDecimal());
+                }
             }
-            if (!is_null($result->getItemQty())) {
-                $item->setData('qty', $result->getItemQty());
+
+            /**
+             * Just base (parent) item qty can be changed
+             * qty of child products are declared just duering add process
+             */
+            if (!is_null($result->getItemQty()) && !$quoteItem->getParentItem()) {
+                $quoteItem->setData('qty', $result->getItemQty());
             }
+
             if (!is_null($result->getItemUseOldQty())) {
-                $item->setUseOldQty($result->getItemUseOldQty());
+                $quoteItem->setUseOldQty($result->getItemUseOldQty());
             }
             if (!is_null($result->getMessage())) {
-                $item->setMessage($result->getMessage());
+                $quoteItem->setMessage($result->getMessage());
+                if ($quoteItem->getParentItem()) {
+                    $quoteItem->getParentItem()->setMessage($result->getMessage());
+                }
             }
             if (!is_null($result->getItemBackorders())) {
-                $item->setBackorders($result->getItemBackorders());
+                $quoteItem->setBackorders($result->getItemBackorders());
             }
 
             if ($result->getHasError()) {
-                $item->setHasError(true);
-                $item->getQuote()->setHasError(true)
+                $quoteItem->setHasError(true);
+                $quoteItem->getQuote()->setHasError(true)
                     ->addMessage($result->getQuoteMessage(), $result->getQuoteMessageIndex());
             }
         }
@@ -344,4 +366,18 @@ public function refundOrderItem($observer)
         }
         return $this;
     }
+
+    /**
+     * Update items stock status and low stock date.
+     *
+     * @param Varien_Event_Observer $observer
+     * @return  Mage_CatalogInventory_Model_Observer
+     */
+    public function updateItemsStockUponConfigChange($observer)
+    {
+        Mage::getResourceSingleton('cataloginventory/stock')->updateSetOutOfStock();
+        Mage::getResourceSingleton('cataloginventory/stock')->updateSetInStock();
+        Mage::getResourceSingleton('cataloginventory/stock')->updateLowStockDate();
+        return $this;
+    }
 }
diff --git a/app/code/core/Mage/CatalogInventory/Model/Source/Backorders.php b/app/code/core/Mage/CatalogInventory/Model/Source/Backorders.php
index d6c745eb..15c037e6 100644
--- a/app/code/core/Mage/CatalogInventory/Model/Source/Backorders.php
+++ b/app/code/core/Mage/CatalogInventory/Model/Source/Backorders.php
@@ -30,8 +30,8 @@ public function toOptionArray()
     {
         return array(
             array('value' => Mage_CatalogInventory_Model_Stock::BACKORDERS_NO, 'label'=>Mage::helper('cataloginventory')->__('No Backorders')),
-            array('value' => Mage_CatalogInventory_Model_Stock::BACKORDERS_BELOW, 'label'=>Mage::helper('cataloginventory')->__('Allow Qty Below 0')),
-            array('value' => Mage_CatalogInventory_Model_Stock::BACKORDERS_YES , 'label'=>Mage::helper('cataloginventory')->__('Allow Qty Below 0 and Notify Customer')),
+            array('value' => Mage_CatalogInventory_Model_Stock::BACKORDERS_YES_NONOTIFY, 'label'=>Mage::helper('cataloginventory')->__('Allow Qty Below 0')),
+            array('value' => Mage_CatalogInventory_Model_Stock::BACKORDERS_YES_NOTIFY , 'label'=>Mage::helper('cataloginventory')->__('Allow Qty Below 0 and Notify Customer')),
         );
     }
 }
\ No newline at end of file
diff --git a/app/code/core/Mage/CatalogInventory/Model/Stock.php b/app/code/core/Mage/CatalogInventory/Model/Stock.php
index c6303971..f5d0e00b 100644
--- a/app/code/core/Mage/CatalogInventory/Model/Stock.php
+++ b/app/code/core/Mage/CatalogInventory/Model/Stock.php
@@ -32,6 +32,10 @@
 class Mage_CatalogInventory_Model_Stock extends Mage_Core_Model_Abstract
 {
     const BACKORDERS_NO     = 0;
+    const BACKORDERS_YES_NONOTIFY = 1;
+    const BACKORDERS_YES_NOTIFY   = 2;
+
+    /* deprecated */
     const BACKORDERS_BELOW  = 1;
     const BACKORDERS_YES    = 2;
 
@@ -94,15 +98,14 @@ public function registerItemSale(Varien_Object $item)
     {
         if ($productId = $item->getProductId()) {
             $stockItem = Mage::getModel('cataloginventory/stock_item')->loadByProduct($productId);
-            if ($item->getStoreId()) {
-                $stockItem->setStoreId($item->getStoreId());
-            }
-            if ($stockItem->checkQty($item->getQtyOrdered())) {
-                $stockItem->subtractQty($item->getQtyOrdered());
-                if ($this->getBackorders() == self::BACKORDERS_NO && $stockItem->getQty() <= $stockItem->getMinQty()) {
-                    $this->setIsInStock(false);
+            if (Mage::helper('catalogInventory')->isQty($stockItem->getTypeId())) {
+                if ($item->getStoreId()) {
+                    $stockItem->setStoreId($item->getStoreId());
+                }
+                if ($stockItem->checkQty($item->getQtyOrdered()) || Mage::app()->getStore()->isAdmin()) {
+                    $stockItem->subtractQty($item->getQtyOrdered());
+                    $stockItem->save();
                 }
-                $stockItem->save();
             }
         }
         else {
@@ -111,17 +114,21 @@ public function registerItemSale(Varien_Object $item)
         return $this;
     }
 
-
+    /**
+     * Get back to stock (when order is canceled or whatever else)
+     *
+     * @param int $productId
+     * @param numeric $qty
+     * @return Mage_CatalogInventory_Model_Stock
+     */
     public function backItemQty($productId, $qty)
     {
         $stockItem = Mage::getModel('cataloginventory/stock_item')->loadByProduct($productId);
-        if ($stockItem->getId()) {
+        if ($stockItem->getId() && Mage::helper('catalogInventory')->isQty($stockItem->getTypeId())) {
             $stockItem->addQty($qty);
-            /**
-             * get back in stock (when order is canceled or whatever else)
-             */
             if ($stockItem->getCanBackInStock() && $stockItem->getQty() > $stockItem->getMinQty()) {
-                $stockItem->setIsInStock(true);
+                $stockItem->setIsInStock(true)
+                    ->setStockStatusChangedAutomaticallyFlag(true);
             }
             $stockItem->save();
         }
diff --git a/app/code/core/Mage/CatalogInventory/Model/Stock/Item.php b/app/code/core/Mage/CatalogInventory/Model/Stock/Item.php
index e5fafc26..a73e3861 100644
--- a/app/code/core/Mage/CatalogInventory/Model/Stock/Item.php
+++ b/app/code/core/Mage/CatalogInventory/Model/Stock/Item.php
@@ -33,14 +33,19 @@
  */
 class Mage_CatalogInventory_Model_Stock_Item extends Mage_Core_Model_Abstract
 {
-    const XML_PATH_MIN_QTY              = 'cataloginventory/options/min_qty';
-    const XML_PATH_MIN_SALE_QTY         = 'cataloginventory/options/min_sale_qty';
-    const XML_PATH_MAX_SALE_QTY         = 'cataloginventory/options/max_sale_qty';
-    const XML_PATH_BACKORDERS           = 'cataloginventory/options/backorders';
-    const XML_PATH_CAN_SUBTRACT         = 'cataloginventory/options/can_subtract';
-    const XML_PATH_CAN_BACK_IN_STOCK    = 'cataloginventory/options/can_back_in_stock';
-    const XML_PATH_NOTIFY_STOCK_QTY     = 'cataloginventory/options/notify_stock_qty';
-    const XML_PATH_MANAGE_STOCK         = 'cataloginventory/options/manage_stock';
+    const XML_PATH_GLOBAL            = 'cataloginventory/options/';
+    const XML_PATH_CAN_SUBTRACT      = 'cataloginventory/options/can_subtract';
+    const XML_PATH_CAN_BACK_IN_STOCK = 'cataloginventory/options/can_back_in_stock';
+
+    const XML_PATH_ITEM             = 'cataloginventory/item_options/';
+    const XML_PATH_MIN_QTY          = 'cataloginventory/item_options/min_qty';
+    const XML_PATH_MIN_SALE_QTY     = 'cataloginventory/item_options/min_sale_qty';
+    const XML_PATH_MAX_SALE_QTY     = 'cataloginventory/item_options/max_sale_qty';
+    const XML_PATH_BACKORDERS       = 'cataloginventory/item_options/backorders';
+    const XML_PATH_NOTIFY_STOCK_QTY = 'cataloginventory/item_options/notify_stock_qty';
+    const XML_PATH_MANAGE_STOCK     = 'cataloginventory/item_options/manage_stock';
+
+    // cataloginventory/cart_options/...
 
     protected function _construct()
     {
@@ -174,12 +179,16 @@ public function getMaxSaleQty()
         return $this->getData('max_sale_qty');
     }
 
+    /**
+     *
+     * @return float
+     */
     public function getNotifyStockQty()
     {
         if ($this->getUseConfigNotifyStockQty()) {
             return (float) Mage::getStoreConfig(self::XML_PATH_NOTIFY_STOCK_QTY);
         }
-        return $this->getData('notify_stock_qty');
+        return (float)$this->getData('notify_stock_qty');
     }
 
     /**
@@ -219,8 +228,8 @@ public function checkQty($qty)
     {
         if ($this->getQty() - $qty < 0) {
             switch ($this->getBackorders()) {
-                case Mage_CatalogInventory_Model_Stock::BACKORDERS_BELOW:
-                case Mage_CatalogInventory_Model_Stock::BACKORDERS_YES:
+                case Mage_CatalogInventory_Model_Stock::BACKORDERS_YES_NONOTIFY:
+                case Mage_CatalogInventory_Model_Stock::BACKORDERS_YES_NOTIFY:
                     break;
                 default:
                     /*if ($this->getProduct()) {
@@ -241,8 +250,8 @@ public function checkQty($qty)
     /**
      * Checking quote item quantity
      *
-     * @param   mixed $qty
-     * @param   mixed $summaryQty
+     * @param   mixed $qty - quantity of this item
+     * @param   mixed $summaryQty - a compounded summary quantity of items
      * @return  Varien_Object
      */
     public function checkQuoteItemQty($qty, $summaryQty)
@@ -281,7 +290,7 @@ public function checkQuoteItemQty($qty, $summaryQty)
             return $result;
         }
 
-        if ($this->getMinSaleQty() && $summaryQty < $this->getMinSaleQty()) {
+        if ($this->getMinSaleQty() && ($qty) < $this->getMinSaleQty()) {
             $result->setHasError(true)
                 ->setMessage(Mage::helper('cataloginventory')->__('The minimum quantity allowed for purchase is %s.', $this->getMinSaleQty() * 1))
                 ->setQuoteMessage(Mage::helper('cataloginventory')->__('Some of the products cannot be ordered in the requested quantity'))
@@ -289,7 +298,7 @@ public function checkQuoteItemQty($qty, $summaryQty)
             return $result;
         }
 
-        if ($this->getMaxSaleQty() && $summaryQty>$this->getMaxSaleQty()) {
+        if ($this->getMaxSaleQty() && ($qty) > $this->getMaxSaleQty()) {
             $result->setHasError(true)
                 ->setMessage(Mage::helper('cataloginventory')->__('The maximum quantity allowed for purchase is %s.', $this->getMaxSaleQty() * 1))
                 ->setQuoteMessage(Mage::helper('cataloginventory')->__('Some of the products can not be ordered in requested quantity'))
@@ -308,9 +317,12 @@ public function checkQuoteItemQty($qty, $summaryQty)
         else {
             if (($this->getQty() - $summaryQty) < 0) {
                 if ($this->getProduct()) {
-                    $backorderQty = ($this->getQty() > 0) ? ($qty - $this->getQty()) * 1 : $qty * 1;
+                    $backorderQty = ($this->getQty() > 0) ? ($summaryQty - $this->getQty()) * 1 : $qty * 1;
+                    if ($backorderQty>$qty) {
+                        $backorderQty = $qty;
+                    }
                     $result->setItemBackorders($backorderQty);
-                    if ($this->getBackorders() == Mage_CatalogInventory_Model_Stock::BACKORDERS_YES) {
+                    if ($this->getBackorders() == Mage_CatalogInventory_Model_Stock::BACKORDERS_YES_NOTIFY) {
                         $result->setMessage(Mage::helper('cataloginventory')->__('This product is not available in the requested quantity. %d of the items will be backordered.',
                             $backorderQty,
                             $this->getProduct()->getName())
@@ -363,24 +375,38 @@ protected function _addQuoteItemError(Mage_Sales_Model_Quote_Item $item, $itemEr
 
     protected function _beforeSave()
     {
-        if ($this->getBackorders() == Mage_CatalogInventory_Model_Stock::BACKORDERS_NO
-            && $this->getQty() <= $this->getMinQty()) {
-            if(!$this->getProduct() || !$this->getProduct()->isComposite()) {
-                $this->setIsInStock(false);
-            }
+        // see if quantity is defined for this item type
+        $typeId = $this->getTypeId();
+        if ($product = $this->getProduct()) {
+            $typeId = $product->getTypeId();
         }
+        $isQty = Mage::helper('catalogInventory')->isQty($typeId);
 
-        /**
-         * if qty is below notify qty, update the low stock date to today date otherwise set null
-         */
-        if ($this->getNotifyStockQty() && $this->getQty()<$this->getNotifyStockQty()
-            && (!$this->getProduct() || !$this->getProduct()->isSuper())) {
-            $this->setLowStockDate($this->_getResource()->formatDate(time()));
-        } else {
-            $this->setLowStockDate(false);
+        if ($isQty) {
+            if ($this->getBackorders() == Mage_CatalogInventory_Model_Stock::BACKORDERS_NO
+                && $this->getQty() <= $this->getMinQty()) {
+                $this->setIsInStock(false)
+                    ->setStockStatusChangedAutomaticallyFlag(true);
+            }
+
+            // if qty is below notify qty, update the low stock date to today date otherwise set null
+            $this->setLowStockDate(null);
+            if ((float)$this->getQty() < $this->getNotifyStockQty()) {
+                $this->setLowStockDate(Mage::app()->getLocale()->date(null, null, null, false)
+                    ->toString(Varien_Date::DATETIME_INTERNAL_FORMAT)
+                );
+            }
+
+            $this->setStockStatusChangedAutomatically(0);
+            if ($this->hasStockStatusChangedAutomaticallyFlag()) {
+                $this->setStockStatusChangedAutomatically((int)$this->getStockStatusChangedAutomaticallyFlag());
+            }
+        }
+        else {
+            $this->setQty(0);
         }
 
-        Mage::dispatchEvent('cataloginventory_stock_item_save_before', array('item'=>$this));
+        Mage::dispatchEvent('cataloginventory_stock_item_save_before', array('item' => $this));
         return $this;
     }
 
@@ -391,5 +417,4 @@ public function getIsInStock()
         }
         return $this->_getData('is_in_stock');
     }
-
 }
diff --git a/app/code/core/Mage/CatalogInventory/Model/Stock/Item/Api.php b/app/code/core/Mage/CatalogInventory/Model/Stock/Item/Api.php
index d81903ba..188c56f5 100644
--- a/app/code/core/Mage/CatalogInventory/Model/Stock/Item/Api.php
+++ b/app/code/core/Mage/CatalogInventory/Model/Stock/Item/Api.php
@@ -99,6 +99,14 @@ public function update($productId, $data)
             $stockData['is_in_stock'] = $data['is_in_stock'];
         }
 
+        if (isset($data['manage_stock'])) {
+            $stockData['manage_stock'] = $data['manage_stock'];
+        }
+
+        if (isset($data['use_config_manage_stock'])) {
+            $stockData['use_config_manage_stock'] = $data['use_config_manage_stock'];
+        }
+
         $product->setStockData($stockData);
 
         try {
diff --git a/app/code/core/Mage/CatalogInventory/etc/api.xml b/app/code/core/Mage/CatalogInventory/etc/api.xml
index 00c314d7..8f5edc2e 100644
--- a/app/code/core/Mage/CatalogInventory/etc/api.xml
+++ b/app/code/core/Mage/CatalogInventory/etc/api.xml
@@ -5,10 +5,10 @@
  *
  * 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.
+ * 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/osl-3.0.php
+ * 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.
diff --git a/app/code/core/Mage/CatalogInventory/etc/config.xml b/app/code/core/Mage/CatalogInventory/etc/config.xml
index 64fedb4f..876ce81f 100644
--- a/app/code/core/Mage/CatalogInventory/etc/config.xml
+++ b/app/code/core/Mage/CatalogInventory/etc/config.xml
@@ -5,10 +5,10 @@
  *
  * 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.
+ * 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/osl-3.0.php
+ * 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.
@@ -22,13 +22,13 @@
  * @category   Mage
  * @package    Mage_CatalogRule
  * @copyright  Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
- * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ * @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
  */
 -->
 
     
         
-            0.7.2
+            0.7.4
         
     
     
@@ -158,8 +158,29 @@
                     
                 
             
+            
+                
+                    
+                        singleton
+                        cataloginventory/observer
+                        updateItemsStockUponConfigChange
+                    
+                
+            
         
 
+        
+            
+                
+                    
+                        1
+                    
+                    
+                        1
+                    
+                
+            
+        
     
 
     
@@ -208,15 +229,17 @@
     
         
             
-                1
-                0
                 1
                 1
+            
+            
+                1
+                0
                 10000
                 1
                 0
                 1
-            
+            
         
     
 
diff --git a/app/code/core/Mage/CatalogInventory/etc/system.xml b/app/code/core/Mage/CatalogInventory/etc/system.xml
index 2c7d4c25..e6dcb573 100644
--- a/app/code/core/Mage/CatalogInventory/etc/system.xml
+++ b/app/code/core/Mage/CatalogInventory/etc/system.xml
@@ -5,10 +5,10 @@
  *
  * 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.
+ * 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/osl-3.0.php
+ * 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.
@@ -22,7 +22,7 @@
  * @category   Mage
  * @package    Mage_CatalogRule
  * @copyright  Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
- * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ * @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
  */
 -->
 
@@ -37,23 +37,13 @@
             0
             
                 
-                    <strong>Please note</strong>, that these Settings are applicable to cart line Items, not the whole Cart.
-                    
+                    
                     text
                     1
                     1
                     1
                     1
                     
-                        
-                            
-                            select
-                            adminhtml/system_config_source_yesno
-                            1
-                            1
-                            0
-                            0
-                        
                         
                             
                             select
@@ -72,6 +62,26 @@
                             1
                             1
                         
+                    
+                
+                
+                    <strong>Please note</strong>, that these Settings are applicable to cart line Items, not the whole Cart.
+                    
+                    text
+                    10
+                    1
+                    1
+                    1
+                    
+                        
+                            
+                            select
+                            adminhtml/system_config_source_yesno
+                            1
+                            1
+                            0
+                            0
+                        
                         
                             
                             select
@@ -114,7 +124,7 @@
                             0
                        
                     
-                
+                
             
         
     
diff --git a/app/code/core/Mage/CatalogInventory/sql/cataloginventory_setup/mysql4-upgrade-0.7.2-0.7.3.php b/app/code/core/Mage/CatalogInventory/sql/cataloginventory_setup/mysql4-upgrade-0.7.2-0.7.3.php
new file mode 100644
index 00000000..26bd5a4a
--- /dev/null
+++ b/app/code/core/Mage/CatalogInventory/sql/cataloginventory_setup/mysql4-upgrade-0.7.2-0.7.3.php
@@ -0,0 +1,33 @@
+startSetup();
+$installer->getConnection()->addColumn($this->getTable('cataloginventory_stock_item'), 'stock_status_changed_automatically', 'tinyint(1) unsigned NOT NULL DEFAULT 0');
+$installer->endSetup();
\ No newline at end of file
diff --git a/app/code/core/Mage/CatalogInventory/sql/cataloginventory_setup/mysql4-upgrade-0.7.3-0.7.4.php b/app/code/core/Mage/CatalogInventory/sql/cataloginventory_setup/mysql4-upgrade-0.7.3-0.7.4.php
new file mode 100644
index 00000000..715cb706
--- /dev/null
+++ b/app/code/core/Mage/CatalogInventory/sql/cataloginventory_setup/mysql4-upgrade-0.7.3-0.7.4.php
@@ -0,0 +1,45 @@
+startSetup();
+foreach (array(
+    'cataloginventory/options/min_qty'          => 'cataloginventory/item_options/min_qty',
+    'cataloginventory/options/min_sale_qty'     => 'cataloginventory/item_options/min_sale_qty',
+    'cataloginventory/options/max_sale_qty'     => 'cataloginventory/item_options/max_sale_qty',
+    'cataloginventory/options/backorders'       => 'cataloginventory/item_options/backorders',
+    'cataloginventory/options/notify_stock_qty' => 'cataloginventory/item_options/notify_stock_qty',
+    'cataloginventory/options/manage_stock'     => 'cataloginventory/item_options/manage_stock',
+    ) as $was => $become) {
+    $installer->run(sprintf("UPDATE `%s` SET `path` = '%s' WHERE `path` = '%s'",
+        $this->getTable('core/config_data'), $become, $was
+    ));
+}
+
+$installer->endSetup();
\ No newline at end of file
diff --git a/app/code/core/Mage/CatalogRule/Model/Mysql4/Rule.php b/app/code/core/Mage/CatalogRule/Model/Mysql4/Rule.php
index 28eb1baf..b857ab36 100644
--- a/app/code/core/Mage/CatalogRule/Model/Mysql4/Rule.php
+++ b/app/code/core/Mage/CatalogRule/Model/Mysql4/Rule.php
@@ -24,34 +24,58 @@
  * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-
+/**
+ * Catalog rules resource model
+ */
 class Mage_CatalogRule_Model_Mysql4_Rule extends Mage_Core_Model_Mysql4_Abstract
 {
+    const SECONDS_IN_DAY = 86400;
+
+    /**
+     * Initialize main table and table id field
+     */
     protected function _construct()
     {
         $this->_init('catalogrule/rule', 'rule_id');
     }
 
+    /**
+     * Prepare object data for saving
+     *
+     * @param Mage_Core_Model_Abstract $object
+     */
     public function _beforeSave(Mage_Core_Model_Abstract $object)
     {
-        $startDate = $object->getFromDate();
-        if ($startDate=='') {
-            //$startDate = Mage::app()->getLocale()->date();
-            $startDate = Mage::getModel('core/date')->gmtDate('Y-m-d');
+        if (!$object->getFromDate()) {
+            $object->setFromDate(new Zend_Date(Mage::getModel('core/date')->gmtTimestamp()));
+        }
+        $object->setFromDate($object->getFromDate()->toString(Varien_Date::DATETIME_INTERNAL_FORMAT));
+
+        if (!$object->getToDate()) {
+            $object->setToDate(new Zend_Db_Expr('NULL'));
+        }
+        else {
+            $object->setToDate($object->getToDate()->toString(Varien_Date::DATETIME_INTERNAL_FORMAT));
         }
-        $object->setFromDate($this->formatDate($startDate));
-        $object->setToDate($this->formatDate($object->getToDate()));
         parent::_beforeSave($object);
     }
 
+    /**
+     * Update products which are matched for rule
+     *
+     * @param   Mage_CatalogRule_Model_Rule $rule
+     * @return  Mage_CatalogRule_Model_Mysql4_Rule
+     */
     public function updateRuleProductData(Mage_CatalogRule_Model_Rule $rule)
     {
         $ruleId = $rule->getId();
-
         $write = $this->_getWriteAdapter();
+        $write->beginTransaction();
+
         $write->delete($this->getTable('catalogrule/rule_product'), $write->quoteInto('rule_id=?', $ruleId));
 
         if (!$rule->getIsActive()) {
+            $write->commit();
             return $this;
         }
 
@@ -61,7 +85,7 @@ public function updateRuleProductData(Mage_CatalogRule_Model_Rule $rule)
 
         $fromTime = strtotime($rule->getFromDate());
         $toTime = strtotime($rule->getToDate());
-        $toTime = $toTime ? $toTime+86400 : 0;
+        $toTime = $toTime ? ($toTime + self::SECONDS_IN_DAY - 1) : 0;
 
         $sortOrder = (int)$rule->getSortOrder();
         $actionOperator = $rule->getSimpleAction();
@@ -69,14 +93,34 @@ public function updateRuleProductData(Mage_CatalogRule_Model_Rule $rule)
         $actionStop = $rule->getStopRulesProcessing();
 
         $rows = array();
-        $header = 'replace into '.$this->getTable('catalogrule/rule_product').' (rule_id, from_time, to_time, website_id, customer_group_id, product_id, action_operator, action_amount, action_stop, sort_order) values ';
-        try {
-            $write->beginTransaction();
+        $header = 'replace into '.$this->getTable('catalogrule/rule_product').' (
+                rule_id,
+                from_time,
+                to_time,
+                website_id,
+                customer_group_id,
+                product_id,
+                action_operator,
+                action_amount,
+                action_stop,
+                sort_order
+            ) values ';
 
+        try {
             foreach ($productIds as $productId) {
                 foreach ($websiteIds as $websiteId) {
                     foreach ($customerGroupIds as $customerGroupId) {
-                        $rows[] = "('$ruleId', '$fromTime', '$toTime', '$websiteId', '$customerGroupId', '$productId', '$actionOperator', '$actionAmount', '$actionStop', '$sortOrder')";
+                        $rows[] = "(
+                            '$ruleId',
+                            '$fromTime',
+                            '$toTime',
+                            '$websiteId',
+                            '$customerGroupId',
+                            '$productId',
+                            '$actionOperator',
+                            '$actionAmount',
+                            '$actionStop',
+                            '$sortOrder')";
                         if (sizeof($rows)==100) {
                             $sql = $header.join(',', $rows);
                             $write->query($sql);
@@ -92,15 +136,19 @@ public function updateRuleProductData(Mage_CatalogRule_Model_Rule $rule)
 
             $write->commit();
         } catch (Exception $e) {
-
             $write->rollback();
             throw $e;
-
         }
 
         return $this;
     }
 
+    /**
+     * Get all product ids matched for rule
+     *
+     * @param   int $ruleId
+     * @return  array
+     */
     public function getRuleProductIds($ruleId)
     {
         $read = $this->_getReadAdapter();
@@ -109,6 +157,14 @@ public function getRuleProductIds($ruleId)
         return $read->fetchCol($select);
     }
 
+    /**
+     * Remove catalog rules product prices for specified date range and product
+     *
+     * @param   int|string $fromDate
+     * @param   int|string $toDate
+     * @param   int|null $productId
+     * @return  Mage_CatalogRule_Model_Mysql4_Rule
+     */
     public function removeCatalogPricesForDateRange($fromDate, $toDate, $productId=null)
     {
         $write = $this->_getWriteAdapter();
@@ -119,16 +175,32 @@ public function removeCatalogPricesForDateRange($fromDate, $toDate, $productId=n
         if (!is_null($productId)) {
             $conds[] = $write->quoteInto('product_id=?', $productId);
         }
+
+        /**
+         * Add product ids to affected products
+         */
+        $query = 'REPLACE INTO ' . $this->getTable('catalogrule/affected_product') . ' FROM
+            SELECT DISTINCT product_id FROM ' . $this->getTable('catalogrule/rule_product_price') . ' WHERE ' .
+            join(' AND ', $conds);
+
         $write->delete($this->getTable('catalogrule/rule_product_price'), $conds);
         return $this;
     }
 
+    /**
+     * Get rules data for all products in specified date range
+     *
+     * deprecated
+     *
+     * @param   int|string $fromDate
+     * @param   int|string $toDate
+     * @param   int|null $productId
+     * @return  false|array
+     */
     public function getRuleProductsForDateRange($fromDate, $toDate, $productId=null)
     {
         $read = $this->_getReadAdapter();
-        if (is_null($toDate)) {
-            $toDate = $fromDate;
-        }
+
         $select = $read->select()
             ->from($this->getTable('catalogrule/rule_product'))
             ->where($read->quoteInto('from_time=0 or from_time<=?', strtotime($toDate))
@@ -139,7 +211,7 @@ public function getRuleProductsForDateRange($fromDate, $toDate, $productId=null)
         if (!is_null($productId)) {
             $select->where('product_id=?', $productId);
         }
-//echo (string)$select; exit;
+
         if (!$ruleProducts = $read->fetchAll($select)) {
             return false;
         }
@@ -188,13 +260,98 @@ public function getRuleProductsForDateRange($fromDate, $toDate, $productId=null)
         return $ruleProducts;
     }
 
-    public function applyAllRulesForDateRange($fromDate, $toDate=null, $productId=null)
+    /**
+     * Get DB resource statment for processing query result
+     *
+     * @param   int $fromDate
+     * @param   int $toDate
+     * @param   int|null $productId
+     * @return  Zend_Db_Statement_Interface
+     */
+    protected function _getRuleProductsStmt($fromDate, $toDate, $productId=null)
     {
-        $product = null;
-        if (is_null($toDate)) {
-            $toDate = $fromDate;
+        $read = $this->_getReadAdapter();
+        /**
+         * Sort order is important
+         * It used for check stop price rule condition.
+         * website_id   customer_group_id   product_id  sort_order
+         *  1           1                   1           0
+         *  1           1                   1           1
+         *  1           1                   1           2
+         * if row with sort order 1 will have stop flag we should exclude
+         * all next rows for same product id from price calculation
+         */
+        $select = $read->select()
+            ->from(array('rp'=>$this->getTable('catalogrule/rule_product')))
+            ->where($read->quoteInto('rp.from_time=0 or rp.from_time<=?', $toDate)
+            ." or ".$read->quoteInto('rp.to_time=0 or rp.to_time>=?', $fromDate))
+            ->order(array('rp.website_id', 'rp.customer_group_id', 'rp.product_id', 'rp.sort_order'));
+
+        if (!is_null($productId)) {
+            $select->where('rp.product_id=?', $productId);
+        }
+
+        /**
+         * Join default price and websites prices to result
+         */
+        $priceAttr  = Mage::getSingleton('eav/config')->getAttribute('catalog_product', 'price');
+        $priceTable = $priceAttr->getBackend()->getTable();
+        $attributeId= $priceAttr->getId();
+
+        $joinCondition = '%1$s.entity_id=rp.product_id AND (%1$s.attribute_id='.$attributeId.') and %1$s.store_id=%2$s';
+
+        $select->join(
+            array('pp_default'=>$priceTable),
+            sprintf($joinCondition, 'pp_default', Mage_Core_Model_App::ADMIN_STORE_ID),
+            array('default_price'=>'pp_default.value')
+        );
+
+        foreach (Mage::app()->getWebsites() as $website) {
+            $websiteId  = $website->getId();
+            $storeId    = $website->getDefaultGroup()->getDefaultStoreId();
+            $tableAlias = 'pp'.$websiteId;
+            $fieldAlias = 'website_'.$websiteId.'_price';
+            $select->joinLeft(
+                array($tableAlias=>$priceTable),
+                sprintf($joinCondition, $tableAlias, $storeId),
+                array($fieldAlias=>$tableAlias.'.value')
+            );
         }
 
+        return $read->query($select);
+    }
+
+    /**
+     * Generate catalog price rules prices for specified date range
+     * If from date is not defined - will be used previous day by UTC
+     * If to date is not defined - will be used next day by UTC
+     *
+     * @param   int|string|null $fromDate
+     * @param   int|string|null $toDate
+     * @param   int $productId
+     * @return  Mage_CatalogRule_Model_Mysql4_Rule
+     */
+    public function applyAllRulesForDateRange($fromDate=null, $toDate=null, $productId=null)
+    {
+        $write = $this->_getWriteAdapter();
+        $write->beginTransaction();
+
+        Mage::dispatchEvent('catalogrule_before_apply', array('resource'=>$this));
+
+        if ($fromDate === null) {
+            $fromDate = mktime(0,0,0,date('m'),date('d')-1);
+        }
+        if (is_string($fromDate)) {
+            $fromDate = strtotime($fromDate);
+        }
+        if ($toDate === null) {
+            $toDate = mktime(0,0,0,date('m'),date('d')+1);
+        }
+        if (is_string($toDate)) {
+            $toDate = strtotime($toDate);
+        }
+
+        $product = null;
         if ($productId instanceof Mage_Catalog_Model_Product) {
             $product = $productId;
             $productId = $productId->getId();
@@ -202,142 +359,219 @@ public function applyAllRulesForDateRange($fromDate, $toDate=null, $productId=nu
 
         $this->removeCatalogPricesForDateRange($fromDate, $toDate, $productId);
 
-        $productIdTags = array('catalogrule_product_price'=>true);
-        $ruleProducts = $this->getRuleProductsForDateRange($fromDate, $toDate, $productId);
-        if (empty($ruleProducts)) {
-            Mage::app()->cleanCache(array_keys($productIdTags));
-        }
-        else {
-            $prices = array();
-            $stop = array();
-            $fromTime = strtotime($fromDate);
-            $toTime = strtotime($toDate);
+        $productsStmt = $this->_getRuleProductsStmt($fromDate, $toDate, $productId);
 
-            $rulePrice = null;
-            $rows = array();
-
-            $write = $this->_getWriteAdapter();
-            $header = 'replace into '.$this->getTable('catalogrule/rule_product_price').' (rule_date, website_id, customer_group_id, product_id, rule_price, latest_start_date, earliest_end_date) values ';
+        try {
+            $dayPrices  = array();
+            $stopFlags  = array();
+            $prevKey    = null;
+            while ($ruleData = $productsStmt->fetch()) {
+                $productId = $ruleData['product_id'];
+                $productKey= $productId . '_' . $ruleData['website_id'] . '_' . $ruleData['customer_group_id'];
+
+                if ($prevKey && ($prevKey != $productKey)) {
+                    $stopFlags = array();
+                }
 
-            try {
-                $write->beginTransaction();
+                /**
+                 * Build prices for each day
+                 */
+                for ($time=$fromDate; $time<=$toDate; $time+=self::SECONDS_IN_DAY) {
 
-                $ruleProductCount = count($ruleProducts);
-                for ($time=$fromTime; $time<=$toTime; $time+=86400) {
-                    $rulePrice = null;
+                    if (($ruleData['from_time']==0 || $time >= $ruleData['from_time'])
+                        && ($ruleData['to_time']==0 || $time <=$ruleData['to_time'])) {
 
-                    for ($i=0, $l=count($ruleProducts); $i<$l; $i++) {
-                        $r = $ruleProducts[$i];
+                        $priceKey = $time . '_' . $productKey;
 
-                        if (!(($r['from_time']==0 || $r['from_time']<=$time) && ($r['to_time']==0 || $r['to_time']>=$time))) {
+                        if (isset($stopFlags[$priceKey])) {
                             continue;
                         }
 
-                        if (isset($r['price'])) {
-                            if (is_null($rulePrice)) {
-                                $rulePrice = $r['price'];
-                                $latestFromTime = $r['from_time'];
-                                $earliestToTime = $r['to_time'];
-                            }
-
-                            $amount = $r['action_amount'];
-                            switch ($r['action_operator']) {
-                                case 'to_fixed':
-                                    $rulePrice = $amount;
-                                    break;
-
-                                case 'to_percent':
-                                    $rulePrice = $rulePrice*$amount/100;
-                                    break;
-
-                                case 'by_fixed':
-                                    $rulePrice -= $amount;
-                                    break;
-
-                                case 'by_percent':
-                                    $rulePrice = $rulePrice*(1-$amount/100);
-                                    break;
-                            }
-
-                            $latestFromTime = max($latestFromTime, $r['from_time']);
-                            $earliestToTime = min($earliestToTime, $r['to_time']);
-                            $rulePrice = max($rulePrice, 0);
+                        if (!isset($dayPrices[$priceKey])) {
+                            $dayPrices[$priceKey] = array(
+                                'rule_date'         => $time,
+                                'website_id'        => $ruleData['website_id'],
+                                'customer_group_id' => $ruleData['customer_group_id'],
+                                'product_id'        => $productId,
+                                'rule_price'        => $this->_calcRuleProductPrice($ruleData),
+                                'latest_start_date' => $ruleData['from_time'],
+                                'earliest_end_date' => $ruleData['to_time'],
+                            );
                         }
-
-                        if ($r['action_stop']) {
-                            while (($i+1 < $l) && isset($ruleProducts[$i+1]) && !$this->_isDifferent($ruleProducts[$i+1], $r)) {
-                                $i++;
-                            }
+                        else {
+                            $dayPrices[$priceKey]['rule_price'] = $this->_calcRuleProductPrice(
+                                $ruleData,
+                                $dayPrices[$priceKey]
+                            );
+                            $dayPrices[$priceKey]['latest_start_date'] = max(
+                                $dayPrices[$priceKey]['latest_start_date'],
+                                $ruleData['from_time']
+                            );
+                            $dayPrices[$priceKey]['earliest_end_date'] = min(
+                                $dayPrices[$priceKey]['earliest_end_date'],
+                                $ruleData['to_time']
+                            );
                         }
 
-                        if (($i+1 == $l) || !isset($ruleProducts[$i+1]) ||  $this->_isDifferent($ruleProducts[$i+1], $r)) {
-                            if (!is_null($rulePrice)) {
-                                $rows[] = "('{$this->formatDate($time)}', '{$r['website_id']}', '{$r['customer_group_id']}', '{$r['product_id']}', '$rulePrice', '{$this->formatDate($latestFromTime)}', '{$this->formatDate($earliestToTime)}')";
-                            }
-                            if ($i+1==$l || count($rows)===100) {
-                                if (!empty($rows)) {
-                                    $sql = $header.join(',', $rows);
-                                    $write->query($sql);
-                                }
-                                $rows = array();
-                            }
-                            $rulePrice = null;
+                        if ($ruleData['action_stop']) {
+                            $stopFlags[$priceKey] = true;
                         }
-                        $productIdTags['catalog_product_'.$r['product_id']] = true;
                     }
                 }
-                Mage::app()->cleanCache(array_keys($productIdTags));
-
-                $write->commit();
 
-            } catch (Exception $e) {
-
-                $write->rollback();
-                throw $e;
+                $prevKey = $productKey;
 
+                if (count($dayPrices)>100) {
+                    $this->_saveRuleProductPrices($dayPrices);
+                    $dayPrices = array();
+                }
             }
+            $this->_saveRuleProductPrices($dayPrices);
+            $write->commit();
+        } catch (Exception $e) {
+            $write->rollback();
+            throw $e;
         }
 
-        Mage::dispatchEvent('catalogrule_after_apply', array('product'=>$product));
+        $productCondition = Mage::getModel('catalog/product_condition')
+            ->setTable($this->getTable('catalogrule/affected_product'))
+            ->setPkFieldName('product_id');
+        Mage::dispatchEvent('catalogrule_after_apply', array(
+            'product'=>$product,
+            'product_condition' => $productCondition
+        ));
+        $write->delete($this->getTable('catalogrule/affected_product'));
         return $this;
     }
 
-    protected function _isDifferent($first, $second)
+    /**
+     * Calculate product price based on price rule data and previous information
+     *
+     * @param   array $ruleData
+     * @param   null|array $productData
+     * @return  float
+     */
+    protected function _calcRuleProductPrice($ruleData, $productData=null)
     {
-        return
-            $first['product_id']!=$second['product_id'] ||
-            $first['website_id']!=$second['website_id'] ||
-            $first['customer_group_id']!=$second['customer_group_id'];
+        if ($productData !== null && isset($productData['rule_price'])) {
+            $productPrice = $productData['rule_price'];
+        }
+        else {
+            $websiteId = $ruleData['website_id'];
+            if (isset($ruleData['website_'.$websiteId.'_price'])) {
+                $productPrice = $ruleData['website_'.$websiteId.'_price'];
+            }
+            else {
+                $productPrice = $ruleData['default_price'];
+            }
+        }
+
+        $amount = $ruleData['action_amount'];
+        switch ($ruleData['action_operator']) {
+            case 'to_fixed':
+                $productPrice = $amount;
+                break;
+            case 'to_percent':
+                $productPrice= $productPrice*$amount/100;
+                break;
+            case 'by_fixed':
+                $productPrice -= $amount;
+                break;
+            case 'by_percent':
+                $productPrice = $productPrice*(1-$amount/100);
+                break;
+        }
+
+        $productPrice = max($productPrice, 0);
+        return Mage::app()->getStore()->roundPrice($productPrice);
     }
 
-    public function applyRulesCollectProductPrices($args)
+    /**
+     * Save rule prices for products to DB
+     *
+     * @param   array $arrData
+     * @return  Mage_CatalogRule_Model_Mysql4_Rule
+     */
+    protected function _saveRuleProductPrices($arrData)
     {
-
+        if (empty($arrData)) {
+            return $this;
+        }
+        $header = 'replace into '.$this->getTable('catalogrule/rule_product_price').' (
+                rule_date,
+                website_id,
+                customer_group_id,
+                product_id,
+                rule_price,
+                latest_start_date,
+                earliest_end_date
+            ) values ';
+        $rows = array();
+        $productIds = array();
+        foreach ($arrData as $data) {
+            $productIds[$data['product_id']] = true;
+            $data['rule_date']          = $this->formatDate($data['rule_date'], false);
+            $data['latest_start_date']  = $this->formatDate($data['latest_start_date'], false);
+            $data['earliest_end_date']  = $this->formatDate($data['earliest_end_date'], false);
+        	$rows[] = '(' . $this->_getWriteAdapter()->quote($data) . ')';
+        }
+        $query = $header.join(',', $rows);
+        $insertQuery = 'REPLACE INTO ' . $this->getTable('catalogrule/affected_product') . ' (product_id)  VALUES ' .
+            '(' . join('),(', array_keys($productIds)) . ')';
+        $this->_getWriteAdapter()->query($insertQuery);
+        $this->_getWriteAdapter()->query($query);
+        return $this;
     }
 
+    /**
+     * Get catalog rules product price for specific date, website and
+     * customer group
+     *
+     * @param   int|string $date
+     * @param   int $wId
+     * @param   int $gId
+     * @param   int $pId
+     * @return  float | false
+     */
     public function getRulePrice($date, $wId, $gId, $pId)
     {
         $read = $this->_getReadAdapter();
         $select = $read->select()
             ->from($this->getTable('catalogrule/rule_product_price'), 'rule_price')
-            ->where('rule_date=?', $this->formatDate($date))
+            ->where('rule_date=?', $this->formatDate($date, false))
             ->where('website_id=?', $wId)
             ->where('customer_group_id=?', $gId)
             ->where('product_id=?', $pId);
         return $read->fetchOne($select);
     }
 
+    /**
+     * Get data about product prices for all customer groups
+     *
+     * @param   int|string $date
+     * @param   int $wId
+     * @param   int $pId
+     * @return  array
+     */
     public function getRulesForProduct($date, $wId, $pId)
     {
         $read = $this->_getReadAdapter();
         $select = $read->select()
             ->from($this->getTable('catalogrule/rule_product_price'), '*')
-            ->where('rule_date=?', $this->formatDate($date))
+            ->where('rule_date=?', $this->formatDate($date, false))
             ->where('website_id=?', $wId)
             ->where('product_id=?', $pId);
         return $read->fetchAll($select);
     }
 
+    /**
+     * Apply catalog rule to product
+     *
+     * @param   Mage_CatalogRule_Model_Rule $rule
+     * @param   Mage_Catalog_Model_Product $product
+     * @param   array $websiteIds
+     * @return  Mage_CatalogRule_Model_Mysql4_Rule
+     */
     public function applyToProduct($rule, $product, $websiteIds)
     {
         if (!$rule->getIsActive()) {
@@ -351,6 +585,8 @@ public function applyToProduct($rule, $product, $websiteIds)
         $productId = $product->getId();
 
         $write = $this->_getWriteAdapter();
+        $write->beginTransaction();
+
         $write->delete($this->getTable('catalogrule/rule_product'), array(
             $write->quoteInto('rule_id=?', $ruleId),
             $write->quoteInto('product_id=?', $productId),
@@ -358,23 +594,43 @@ public function applyToProduct($rule, $product, $websiteIds)
 
         $customerGroupIds = $rule->getCustomerGroupIds();
 
-        $fromTime = strtotime($rule->getFromDate());
-        $toTime = strtotime($rule->getToDate());
-        $toTime = $toTime ? $toTime+86400 : 0;
+        $fromTime   = strtotime($rule->getFromDate());
+        $toTime     = strtotime($rule->getToDate());
+        $toTime     = $toTime ? $toTime+self::SECONDS_IN_DAY-1 : 0;
 
-        $sortOrder = (int)$rule->getSortOrder();
+        $sortOrder      = (int)$rule->getSortOrder();
         $actionOperator = $rule->getSimpleAction();
-        $actionAmount = $rule->getDiscountAmount();
-        $actionStop = $rule->getStopRulesProcessing();
+        $actionAmount   = $rule->getDiscountAmount();
+        $actionStop     = $rule->getStopRulesProcessing();
 
         $rows = array();
-        $header = 'replace into '.$this->getTable('catalogrule/rule_product').' (rule_id, from_time, to_time, website_id, customer_group_id, product_id, action_operator, action_amount, action_stop, sort_order) values ';
+        $header = 'replace into '.$this->getTable('catalogrule/rule_product').' (
+                rule_id,
+                from_time,
+                to_time,
+                website_id,
+                customer_group_id,
+                product_id,
+                action_operator,
+                action_amount,
+                action_stop,
+                sort_order
+            ) values ';
         try {
-            $write->beginTransaction();
-
             foreach ($websiteIds as $websiteId) {
                 foreach ($customerGroupIds as $customerGroupId) {
-                    $rows[] = "('$ruleId', '$fromTime', '$toTime', '$websiteId', '$customerGroupId', '$productId', '$actionOperator', '$actionAmount', '$actionStop', '$sortOrder')";
+                    $rows[] = "(
+                        '$ruleId',
+                        '$fromTime',
+                        '$toTime',
+                        '$websiteId',
+                        '$customerGroupId',
+                        '$productId',
+                        '$actionOperator',
+                        '$actionAmount',
+                        '$actionStop',
+                        '$sortOrder'
+                    )";
                     if (sizeof($rows)==100) {
                         $sql = $header.join(',', $rows);
                         $write->query($sql);
@@ -387,19 +643,13 @@ public function applyToProduct($rule, $product, $websiteIds)
                 $sql = $header.join(',', $rows);
                 $write->query($sql);
             }
-
-            $write->commit();
         } catch (Exception $e) {
-
             $write->rollback();
             throw $e;
 
         }
-        $this->applyAllRulesForDateRange(
-            $this->formatDate(mktime(0,0,0)),
-            $this->formatDate(mktime(0,0,0,date('m'),date('d')+1)),
-            $product
-        );
+        $this->applyAllRulesForDateRange(null, null, $product);
+        $write->commit();
         return $this;
     }
-}
+}
\ No newline at end of file
diff --git a/app/code/core/Mage/CatalogRule/Model/Observer.php b/app/code/core/Mage/CatalogRule/Model/Observer.php
index d00faf8c..d4758087 100644
--- a/app/code/core/Mage/CatalogRule/Model/Observer.php
+++ b/app/code/core/Mage/CatalogRule/Model/Observer.php
@@ -24,11 +24,19 @@
  * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-
+/**
+ * Catalog Price rules observer model
+ */
 class Mage_CatalogRule_Model_Observer
 {
     protected $_rulePrices = array();
 
+    /**
+     * Apply all catalog price rules for specific product
+     *
+     * @param   Varien_Event_Observer $observer
+     * @return  Mage_CatalogRule_Model_Observer
+     */
     public function applyAllRulesOnProduct($observer)
     {
         $product = $observer->getEvent()->getProduct();
@@ -50,30 +58,44 @@ public function applyAllRulesOnProduct($observer)
             $websiteIds = array_intersect($productWebsiteIds, $ruleWebsiteIds);
             $rule->applyToProduct($product, $websiteIds);
         }
+        return $this;
     }
 
+    /**
+     * Apply all price rules for current date
+     *
+     * @param   Varien_Event_Observer $observer
+     * @return  Mage_CatalogRule_Model_Observer
+     */
     public function applyAllRules($observer)
     {
         $resource = Mage::getResourceSingleton('catalogrule/rule');
         $resource->applyAllRulesForDateRange($resource->formatDate(mktime(0,0,0)));
         Mage::app()->removeCache('catalog_rules_dirty');
+        return $this;
     }
 
     /**
-     * Processing final price on frontend
+     * Apply catalog price rules to product on frontend
+     *
+     * @return  Mage_CatalogRule_Model_Observer
      */
     public function processFrontFinalPrice($observer)
     {
+        $product    = $observer->getEvent()->getProduct();
+        $pId        = $product->getId();
+        $storeId    = $product->getStoreId();
+
         if ($observer->hasDate()) {
             $date = $observer->getDate();
         } else {
-            $date = mktime(0,0,0);
+            $date = Mage::app()->getLocale()->storeDate($storeId);
         }
 
         if ($observer->hasWebsiteId()) {
             $wId = $observer->getWebsiteId();
         } else {
-            $wId = Mage::app()->getWebsite()->getId();
+            $wId = Mage::app()->getStore($storeId)->getWebsiteId();
         }
 
         if ($observer->hasCustomerGroupId()) {
@@ -82,9 +104,6 @@ public function processFrontFinalPrice($observer)
             $gId = Mage::getSingleton('customer/session')->getCustomerGroupId();
         }
 
-        $product = $observer->getEvent()->getProduct();
-        $pId = $product->getId();
-
         $key = "$date|$wId|$gId|$pId";
         if (!isset($this->_rulePrices[$key])) {
             $rulePrice = Mage::getResourceModel('catalogrule/rule')
@@ -99,14 +118,18 @@ public function processFrontFinalPrice($observer)
     }
 
     /**
-     * Processing final price in admin
+     * Apply catalog price rules to product in admin
+     *
+     * @return  Mage_CatalogRule_Model_Observer
      */
     public function processAdminFinalPrice($observer)
     {
         $product = $observer->getEvent()->getProduct();
+        $storeId = $product->getStoreId();
+        $date = Mage::app()->getLocale()->storeDate($storeId);
         $key = false;
+
         if ($ruleData = Mage::registry('rule_data')) {
-            $date = mktime(0,0,0);
             $wId = $ruleData->getWebsiteId();
             $gId = $ruleData->getCustomerGroupId();
             $pId = $product->getId();
@@ -114,7 +137,6 @@ public function processAdminFinalPrice($observer)
             $key = "$date|$wId|$gId|$pId";
         }
         elseif ($product->getWebsiteId() != null && $product->getCustomerGroupId() != null) {
-            $date = mktime(0,0,0);
             $wId = $product->getWebsiteId();
             $gId = $product->getCustomerGroupId();
             $pId = $product->getId();
@@ -135,13 +157,19 @@ public function processAdminFinalPrice($observer)
         return $this;
     }
 
-    public function dailyCatalogUpdate($schedule)
+    /**
+     * Daily update catalog price rule by cron
+     * Update include interval 3 days - current day - 1 days before + 1 days after
+     * This method is called from cron process, cron is workink in UTC time and
+     * we shold generate data for interval -1 day ... +1 day
+     *
+     * @param   Varien_Event_Observer $observer
+     * @return  Mage_CatalogRule_Model_Observer
+     */
+    public function dailyCatalogUpdate($observer)
     {
-        $resource = Mage::getResourceSingleton('catalogrule/rule');
-        $resource->applyAllRulesForDateRange(
-            $resource->formatDate(mktime(0,0,0)),
-            $resource->formatDate(mktime(0,0,0,date('m'),date('d')+1))
-        );
+        Mage::getResourceSingleton('catalogrule/rule')->applyAllRulesForDateRange();
+        return $this;
     }
 
     public function flushPriceCache()
diff --git a/app/code/core/Mage/CatalogRule/Model/Rule/Condition/Product.php b/app/code/core/Mage/CatalogRule/Model/Rule/Condition/Product.php
index f62bb21d..68968ab9 100644
--- a/app/code/core/Mage/CatalogRule/Model/Rule/Condition/Product.php
+++ b/app/code/core/Mage/CatalogRule/Model/Rule/Condition/Product.php
@@ -34,10 +34,14 @@ class Mage_CatalogRule_Model_Rule_Condition_Product extends Mage_Rule_Model_Cond
      */
     public function getAttributeObject()
     {
-        $obj = Mage::getSingleton('eav/config')
-            ->getAttribute('catalog_product', $this->getAttribute());
-        if ($obj && !$obj->getEntity()) {
-            $obj->setEntity(Mage::getResourceSingleton('catalog/product'));
+        try {
+            $obj = Mage::getSingleton('eav/config')
+                ->getAttribute('catalog_product', $this->getAttribute());
+        }
+        catch (Exception $e) {
+            $obj = new Varien_Object();
+            $obj->setEntity(Mage::getResourceSingleton('catalog/product'))
+                ->setFrontendInput('text');
         }
         return $obj;
     }
diff --git a/app/code/core/Mage/CatalogRule/etc/config.xml b/app/code/core/Mage/CatalogRule/etc/config.xml
index a98ec3ea..acf5b0a2 100644
--- a/app/code/core/Mage/CatalogRule/etc/config.xml
+++ b/app/code/core/Mage/CatalogRule/etc/config.xml
@@ -5,10 +5,10 @@
  *
  * 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.
+ * 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/osl-3.0.php
+ * 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.
@@ -22,13 +22,13 @@
  * @category   Mage
  * @package    Mage_CatalogRule
  * @copyright  Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
- * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ * @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
  */
 -->
 
     
         
-            0.7.3
+            0.7.5
         
     
     
@@ -54,6 +54,9 @@
                     
                         catalogrule_product_price
+ + catalogrule_affected_product
+
@@ -130,15 +133,6 @@ - - - - singleton - catalogrule/observer - applyAllRules - - - diff --git a/app/code/core/Mage/CatalogRule/sql/catalogrule_setup/mysql4-upgrade-0.7.3-0.7.4.php b/app/code/core/Mage/CatalogRule/sql/catalogrule_setup/mysql4-upgrade-0.7.3-0.7.4.php new file mode 100644 index 00000000..c461a518 --- /dev/null +++ b/app/code/core/Mage/CatalogRule/sql/catalogrule_setup/mysql4-upgrade-0.7.3-0.7.4.php @@ -0,0 +1,41 @@ +startSetup(); + +$installer->getConnection()->changeColumn($this->getTable('catalogrule'), + 'conditions_serialized', 'conditions_serialized', + 'mediumtext CHARACTER SET utf8 NOT NULL' +); +$installer->getConnection()->changeColumn($this->getTable('catalogrule'), + 'actions_serialized', 'actions_serialized', + 'mediumtext CHARACTER SET utf8 NOT NULL' +); + +$installer->endSetup(); diff --git a/app/code/core/Mage/CatalogRule/sql/catalogrule_setup/mysql4-upgrade-0.7.4-0.7.5.php b/app/code/core/Mage/CatalogRule/sql/catalogrule_setup/mysql4-upgrade-0.7.4-0.7.5.php new file mode 100644 index 00000000..dd929c95 --- /dev/null +++ b/app/code/core/Mage/CatalogRule/sql/catalogrule_setup/mysql4-upgrade-0.7.4-0.7.5.php @@ -0,0 +1,39 @@ +startSetup(); + +$installer->run(" +CREATE TABLE {$this->getTable('catalogrule_affected_product')} ( + `product_id` int(10) unsigned NOT NULL, + KEY `IDX_PRODUCT` (`product_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +"); + +$installer->endSetup(); diff --git a/app/code/core/Mage/CatalogSearch/Block/Advanced/Form.php b/app/code/core/Mage/CatalogSearch/Block/Advanced/Form.php index 10d8f994..b0514d9b 100644 --- a/app/code/core/Mage/CatalogSearch/Block/Advanced/Form.php +++ b/app/code/core/Mage/CatalogSearch/Block/Advanced/Form.php @@ -40,15 +40,15 @@ public function _prepareLayout() } // add Home breadcrumb - $this->getLayout()->getBlock('breadcrumbs') - ->addCrumb('home', - array('label'=>Mage::helper('catalogsearch')->__('Home'), - 'title'=>Mage::helper('catalogsearch')->__('Go to Home Page'), - 'link'=>Mage::getBaseUrl()) - ) - ->addCrumb('search', - array('label'=>Mage::helper('catalogsearch')->__('Catalog Advanced Search')) - ); + if ($breadcrumbs = $this->getLayout()->getBlock('breadcrumbs')) { + $breadcrumbs->addCrumb('home', array( + 'label'=>Mage::helper('catalogsearch')->__('Home'), + 'title'=>Mage::helper('catalogsearch')->__('Go to Home Page'), + 'link'=>Mage::getBaseUrl() + ))->addCrumb('search', array( + 'label'=>Mage::helper('catalogsearch')->__('Catalog Advanced Search') + )); + } return parent::_prepareLayout(); } @@ -71,7 +71,7 @@ public function getSearchableAttributes() */ public function getAttributeLabel($attribute) { - return Mage::helper('catalogsearch')->__($attribute->getFrontend()->getLabel()); + return Mage::helper('catalog')->__($attribute->getFrontend()->getLabel()); } /** @@ -198,6 +198,7 @@ public function getAttributeSelectElement($attribute) ->setExtraParams($extra) ->setValue($this->getAttributeValue($attribute)) ->setOptions($options) + ->setClass('multiselect') ->getHtml(); } diff --git a/app/code/core/Mage/CatalogSearch/Block/Advanced/Result.php b/app/code/core/Mage/CatalogSearch/Block/Advanced/Result.php index 257e8db5..aaf727a6 100644 --- a/app/code/core/Mage/CatalogSearch/Block/Advanced/Result.php +++ b/app/code/core/Mage/CatalogSearch/Block/Advanced/Result.php @@ -35,19 +35,18 @@ class Mage_CatalogSearch_Block_Advanced_Result extends Mage_Core_Block_Template { protected function _prepareLayout() { - $this->getLayout()->getBlock('breadcrumbs') - ->addCrumb('home', - array('label'=>Mage::helper('catalogsearch')->__('Home'), - 'title'=>Mage::helper('catalogsearch')->__('Go to Home Page'), - 'link'=>Mage::getBaseUrl()) - ) - ->addCrumb('search', - array('label'=>Mage::helper('catalogsearch')->__('Catalog Advanced Search'), 'link'=>$this->getUrl('*/*/')) - ) - ->addCrumb('search_result', - array('label'=>Mage::helper('catalogsearch')->__('Results')) - ); - + if ($breadcrumbs = $this->getLayout()->getBlock('breadcrumbs')) { + $breadcrumbs->addCrumb('home', array( + 'label'=>Mage::helper('catalogsearch')->__('Home'), + 'title'=>Mage::helper('catalogsearch')->__('Go to Home Page'), + 'link'=>Mage::getBaseUrl() + ))->addCrumb('search', array( + 'label'=>Mage::helper('catalogsearch')->__('Catalog Advanced Search'), + 'link'=>$this->getUrl('*/*/') + ))->addCrumb('search_result', array( + 'label'=>Mage::helper('catalogsearch')->__('Results') + )); + } return parent::_prepareLayout(); } diff --git a/app/code/core/Mage/CatalogSearch/Block/Autocomplete.php b/app/code/core/Mage/CatalogSearch/Block/Autocomplete.php index 6c436bd7..18ad6cc0 100644 --- a/app/code/core/Mage/CatalogSearch/Block/Autocomplete.php +++ b/app/code/core/Mage/CatalogSearch/Block/Autocomplete.php @@ -29,39 +29,68 @@ */ class Mage_CatalogSearch_Block_Autocomplete extends Mage_Core_Block_Abstract { + protected $_suggestData = null; + protected function _toHtml() { $html = ''; - if (!$this->_beforeToHtml()) { - return $html; - } + if (!$this->_beforeToHtml()) { + return $html; + } + + $suggestData = $this->getSuggestData(); + if (!($count = count($suggestData))) { + return $html; + } - $collection = $this->helper('catalogSearch')->getSuggestCollection(); - if (!$collection->getSize()) { - return $html; - } + $count--; - $query = $this->helper('catalogSearch')->getQueryText(); - $counter=0; + $html = '
  • '; + foreach ($suggestData as $index => $item) { + if ($index == 0) { + $item['row_class'] .= ' first'; + } - $html = '
    • '; - $itemsHtml = ''; - $firstHtml = ''; - foreach ($collection as $item) { - if ($item->getQueryText() == $query) { - $firstHtml.= '
    • '; - $firstHtml.= '
      '.$item->getNumResults().'
      '.$this->htmlEscape($item->getQueryText()).'
    • '; - } - else { - $itemsHtml.= '
    • '; - $itemsHtml.= '
      '.$item->getNumResults().'
      '.$this->htmlEscape($item->getQueryText()).'
    • '; - } - } + if ($index == $count) { + $item['row_class'] .= ' last'; + } - $html.= $firstHtml.$itemsHtml; - $html.= '
    '; + $html .= '
  • ' + . ''.$item['num_of_results'].''.$this->htmlEscape($item['title']).'
  • '; + } + + $html.= '
'; return $html; } + + public function getSuggestData() + { + if (!$this->_suggestData) { + $collection = $this->helper('catalogSearch')->getSuggestCollection(); + $query = $this->helper('catalogSearch')->getQueryText(); + $counter = 0; + $data = array(); + foreach ($collection as $item) { + $_data = array( + 'title' => $item->getQueryText(), + 'row_class' => (++$counter)%2?'odd':'even', + 'num_of_results' => $item->getNumResults() + ); + + if ($item->getQueryText() == $query) { + array_unshift($data, $_data); + } + else { + $data[] = $_data; + } + } + $this->_suggestData = $data; + } + return $this->_suggestData; + } +/* + * +*/ } \ No newline at end of file diff --git a/app/code/core/Mage/CatalogSearch/Block/Result.php b/app/code/core/Mage/CatalogSearch/Block/Result.php index 7069384c..a5922ad8 100644 --- a/app/code/core/Mage/CatalogSearch/Block/Result.php +++ b/app/code/core/Mage/CatalogSearch/Block/Result.php @@ -43,19 +43,19 @@ protected function _getQuery() protected function _prepareLayout() { + $title = $this->__("Search results for: '%s'", $this->helper('catalogSearch')->getEscapedQueryText()); + // add Home breadcrumb - $this->getLayout()->getBlock('breadcrumbs') - ->addCrumb('home', array( + if ($breadcrumbs = $this->getLayout()->getBlock('breadcrumbs')) { + $breadcrumbs->addCrumb('home', array( 'label' => $this->__('Home'), 'title' => $this->__('Go to Home Page'), 'link' => Mage::getBaseUrl() + ))->addCrumb('search', array( + 'label' => $title, + 'title' => $title )); - - $title = $this->__("Search results for: '%s'", $this->helper('catalogSearch')->getEscapedQueryText()); - $this->getLayout()->getBlock('breadcrumbs')->addCrumb('search', array( - 'label' => $title, - 'title' => $title - )); + } $this->getLayout()->getBlock('head')->setTitle($title); return parent::_prepareLayout(); diff --git a/app/code/core/Mage/CatalogSearch/Helper/Data.php b/app/code/core/Mage/CatalogSearch/Helper/Data.php index 8e905322..111c722d 100644 --- a/app/code/core/Mage/CatalogSearch/Helper/Data.php +++ b/app/code/core/Mage/CatalogSearch/Helper/Data.php @@ -71,6 +71,9 @@ public function getQueryText() { if (is_null($this->_queryText)) { $this->_queryText = $this->_getRequest()->getParam($this->getQueryParamName()); + if (is_array($this->_queryText)) { + $this->_queryText = null; + } $this->_queryText = trim($this->_queryText); if (Mage::helper('core/string')->strlen($this->_queryText) > self::MAX_QUERY_LEN) { $this->_queryText = Mage::helper('core/string')->substr($this->_queryText, 0, self::MAX_QUERY_LEN); diff --git a/app/code/core/Mage/CatalogSearch/Model/Advanced.php b/app/code/core/Mage/CatalogSearch/Model/Advanced.php index 046d19b8..8eb28d36 100644 --- a/app/code/core/Mage/CatalogSearch/Model/Advanced.php +++ b/app/code/core/Mage/CatalogSearch/Model/Advanced.php @@ -68,6 +68,10 @@ public function addFilters($values){ foreach ($indexFilters as $filter) { $this->getProductCollection()->addFieldToFilter('entity_id', array('in'=>new Zend_Db_Expr($filter))); } + $priceFilters = Mage::getModel('catalogindex/indexer')->buildEntityPriceFilter($attributes, $values, $filteredAttributes, $this->getProductCollection()); + foreach ($priceFilters as $code=>$filter) { + $this->getProductCollection()->getSelect()->joinInner(array("_price_filter_{$code}"=>$filter), "`_price_filter_{$code}`.`entity_id` = `e`.`entity_id`", array()); + } foreach ($attributes as $attribute) { $code = $attribute->getAttributeCode(); diff --git a/app/code/core/Mage/CatalogSearch/etc/config.xml b/app/code/core/Mage/CatalogSearch/etc/config.xml index 472265c7..fa65fc24 100644 --- a/app/code/core/Mage/CatalogSearch/etc/config.xml +++ b/app/code/core/Mage/CatalogSearch/etc/config.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_CatalogSearch * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/CatalogSearch/etc/system.xml b/app/code/core/Mage/CatalogSearch/etc/system.xml index d1b831cb..ff5cd58a 100644 --- a/app/code/core/Mage/CatalogSearch/etc/system.xml +++ b/app/code/core/Mage/CatalogSearch/etc/system.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_CatalogSearch * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Checkout/Block/Cart/Crosssell.php b/app/code/core/Mage/Checkout/Block/Cart/Crosssell.php index 2dc41d52..e2588701 100644 --- a/app/code/core/Mage/Checkout/Block/Cart/Crosssell.php +++ b/app/code/core/Mage/Checkout/Block/Cart/Crosssell.php @@ -60,7 +60,6 @@ public function getItems() ->addProductFilter($this->_getCartProductIds()) ->addExcludeProductFilter($ninProductIds) ->setPageSize($this->_maxItemCount-count($items)) - ->setGroupBy('e.entity_id') ->setRandomOrder() ->load(); foreach ($collection as $item) { @@ -102,24 +101,22 @@ public function getQuote() return Mage::getSingleton('checkout/session')->getQuote(); } + /** + * Get crosssell products collection + * + * @return Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Link_Product_Collection + */ protected function _getCollection() { $collection = Mage::getModel('catalog/product_link')->useCrossSellLinks() ->getProductCollection() - ->addAttributeToSelect('name') - ->addAttributeToSelect('price') - ->addAttributeToSelect('special_price') - ->addAttributeToSelect('special_from_date') - ->addAttributeToSelect('special_to_date') - ->addAttributeToSelect('image') - ->addAttributeToSelect('thumbnail') ->setStoreId(Mage::app()->getStore()->getId()) ->addStoreFilter() ->setPageSize($this->_maxItemCount); + $this->_addProductAttributesAndPrices($collection); Mage::getSingleton('catalog/product_status')->addSaleableFilterToCollection($collection); Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($collection); - Mage::getSingleton('cataloginventory/stock')->addInStockFilterToCollection($collection); return $collection; diff --git a/app/code/core/Mage/Checkout/Block/Cart/Item/Renderer.php b/app/code/core/Mage/Checkout/Block/Cart/Item/Renderer.php index 4e96b85c..d771d38d 100644 --- a/app/code/core/Mage/Checkout/Block/Cart/Item/Renderer.php +++ b/app/code/core/Mage/Checkout/Block/Cart/Item/Renderer.php @@ -207,7 +207,7 @@ public function getMessages() ); } } - return $messages; + return array_unique($messages); } public function getFormatedOptionValue($optionValue) diff --git a/app/code/core/Mage/Checkout/Block/Cart/Item/Renderer/Configurable.php b/app/code/core/Mage/Checkout/Block/Cart/Item/Renderer/Configurable.php index 5a27c8b5..9d7fbdb6 100644 --- a/app/code/core/Mage/Checkout/Block/Cart/Item/Renderer/Configurable.php +++ b/app/code/core/Mage/Checkout/Block/Cart/Item/Renderer/Configurable.php @@ -70,7 +70,8 @@ public function getChildProduct() public function getProductThumbnail() { $product = $this->getChildProduct(); - if (($product->getData('thumbnail') == 'no_selection') + if (!$product->getData('thumbnail') + || ($product->getData('thumbnail') == 'no_selection') || (Mage::getStoreConfig(self::CONFIGURABLE_PRODUCT_IMAGE) == self::USE_PARENT_IMAGE)) { $product = $this->getProduct(); } diff --git a/app/code/core/Mage/Checkout/Block/Cart/Item/Renderer/Grouped.php b/app/code/core/Mage/Checkout/Block/Cart/Item/Renderer/Grouped.php index e775d44c..af156d85 100644 --- a/app/code/core/Mage/Checkout/Block/Cart/Item/Renderer/Grouped.php +++ b/app/code/core/Mage/Checkout/Block/Cart/Item/Renderer/Grouped.php @@ -57,7 +57,8 @@ public function getGroupedProduct() public function getProductThumbnail() { $product = $this->getProduct(); - if (($product->getData('thumbnail') == 'no_selection') + if (!$product->getData('thumbnail') + ||($product->getData('thumbnail') == 'no_selection') || (Mage::getStoreConfig(self::GROUPED_PRODUCT_IMAGE) == self::USE_PARENT_IMAGE)) { $product = $this->getGroupedProduct(); } diff --git a/app/code/core/Mage/Checkout/Block/Cart/Sidebar.php b/app/code/core/Mage/Checkout/Block/Cart/Sidebar.php index 0991a18e..50bdcc3d 100644 --- a/app/code/core/Mage/Checkout/Block/Cart/Sidebar.php +++ b/app/code/core/Mage/Checkout/Block/Cart/Sidebar.php @@ -34,6 +34,8 @@ */ class Mage_Checkout_Block_Cart_Sidebar extends Mage_Checkout_Block_Cart_Abstract { + const XML_PATH_CHECKOUT_SIDEBAR_COUNT = 'checkout/sidebar/count'; + public function __construct() { parent::__construct(); @@ -45,17 +47,25 @@ public function __construct() * * @return array */ - public function getRecentItems() + public function getRecentItems($count = null) { + if ($count === null) { + $count = $this->getData('item_count'); + } + if ($count === null) { + $count = Mage::getStoreConfig(self::XML_PATH_CHECKOUT_SIDEBAR_COUNT); + } $items = array(); if (!$this->getSummaryCount()) { - return $items; + return $items; } $i = 0; $allItems = array_reverse($this->getItems()); foreach ($allItems as $item) { - $items[] = $item; - if (++$i==3) break; + $items[] = $item; + if (++$i == $count) { + break; + } } return $items; } @@ -95,14 +105,23 @@ public function getSubtotalInclTax() return $this->_addTax($this->getSubtotal(true)); } - private function _addTax($price) { + private function _addTax($price, $exclShippingTax=true) { $totals = $this->getTotals(); if (isset($totals['tax'])) { - $price += $totals['tax']->getValue(); + if ($exclShippingTax) { + $price += $totals['tax']->getValue()-$this->_getShippingTaxAmount(); + } else { + $price += $totals['tax']->getValue(); + } } return $price; } + protected function _getShippingTaxAmount() + { + return $this->getQuote()->getShippingAddress()->getShippingTaxAmount(); + } + public function getSummaryCount() { return Mage::getSingleton('checkout/cart')->getSummaryQty(); diff --git a/app/code/core/Mage/Checkout/Helper/Cart.php b/app/code/core/Mage/Checkout/Helper/Cart.php index 9e8d7a13..66ef01c7 100644 --- a/app/code/core/Mage/Checkout/Helper/Cart.php +++ b/app/code/core/Mage/Checkout/Helper/Cart.php @@ -61,20 +61,20 @@ public function getAddUrl($product, $additional = array()) // /** // * go to category view page // */ -// +// // $continueShoppingUrl = $currentCategory->getUrl().(count($this->_getRequest()->getQuery())!=0?'?'.http_build_qu//ery($this->_getRequest()->getQuery(), '', '&'):''); -// +// // } else { // $continueShoppingUrl = $this->_getUrl('*/*/*', array('_current'=>true)); // } - + $continueShoppingUrl = $this->getCurrentUrl(); - + $params = array( Mage_Core_Controller_Front_Action::PARAM_NAME_URL_ENCODED => Mage::helper('core')->urlEncode($continueShoppingUrl), 'product' => $product->getId() ); - + if ($this->_getRequest()->getRouteName() == 'checkout' && $this->_getRequest()->getControllerName() == 'cart') { $params['in_cart'] = 1; @@ -83,7 +83,7 @@ public function getAddUrl($product, $additional = array()) if (count($additional)){ $params = array_merge($params, $additional); } - + return $this->_getUrl('checkout/cart/add', $params); } @@ -149,7 +149,7 @@ public function getItemsQty() */ public function getSummaryCount() { - return Mage::getSingleton('checkout/cart')->getSummaryQty(); + return $this->getCart()->getSummaryQty(); } /** diff --git a/app/code/core/Mage/Checkout/Helper/Data.php b/app/code/core/Mage/Checkout/Helper/Data.php index f0e51b7b..1a5fb39a 100644 --- a/app/code/core/Mage/Checkout/Helper/Data.php +++ b/app/code/core/Mage/Checkout/Helper/Data.php @@ -93,10 +93,11 @@ public function canOnepageCheckout() public function getPriceInclTax($item) { - $price = ($item->getCalculationPrice() ? $item->getCalculationPrice() : $item->getPrice()); + //$price = ($item->getCalculationPrice() ? $item->getCalculationPrice() : $item->getPrice()); $qty = ($item->getQty() ? $item->getQty() : ($item->getQtyOrdered() ? $item->getQtyOrdered() : 1)); - $tax = ($item->getTaxBeforeDiscount() ? $item->getTaxBeforeDiscount() : $item->getTaxAmount()); - $price = Mage::app()->getStore()->roundPrice($price+($tax/$qty)); + //$tax = ($item->getTaxBeforeDiscount() ? $item->getTaxBeforeDiscount() : $item->getTaxAmount()); + //$price = Mage::app()->getStore()->roundPrice($price+($tax/$qty)); + $price = Mage::app()->getStore()->roundPrice(($item->getRowTotal()+$item->getTaxAmount())/$qty); return $price; } @@ -219,7 +220,7 @@ public function isMultishippingCheckoutAvailable() $maximunQty = (int)Mage::getStoreConfig('shipping/option/checkout_multiple_maximum_qty'); return $isMultiShipping && !$quote->hasItemsWithDecimalQty() - && $quote->validateMinimumAmount() + && $quote->validateMinimumAmount(true) && (($quote->getItemsSummaryQty() - $quote->getItemVirtualQty()) > 0) && ($quote->getItemsSummaryQty() <= $maximunQty) ; diff --git a/app/code/core/Mage/Checkout/Model/Cart.php b/app/code/core/Mage/Checkout/Model/Cart.php index aa6321de..db0b29d9 100644 --- a/app/code/core/Mage/Checkout/Model/Cart.php +++ b/app/code/core/Mage/Checkout/Model/Cart.php @@ -185,6 +185,10 @@ protected function _getProductRequest($requestInfo) if ($requestInfo instanceof Varien_Object) { $request = $requestInfo; } + elseif (is_numeric($requestInfo)) { + $request = new Varien_Object(); + $request->setQty($requestInfo); + } else { $request = new Varien_Object($requestInfo); } @@ -207,16 +211,16 @@ public function addProduct($product, $info=null) $product = $this->_getProduct($product); $request = $this->_getProductRequest($info); - + if ($product->getId()) { - + $result = $this->getQuote()->addProduct($product, $request); - + /** * String we can get if prepare process has error */ if (is_string($result)) { - + $this->getCheckoutSession()->setRedirectUrl($product->getProductUrl()); $this->getCheckoutSession()->setUseNotice(true); Mage::throwException($result); diff --git a/app/code/core/Mage/Checkout/Model/Mysql4/Cart.php b/app/code/core/Mage/Checkout/Model/Mysql4/Cart.php index ac92c04e..e4cbdeab 100644 --- a/app/code/core/Mage/Checkout/Model/Mysql4/Cart.php +++ b/app/code/core/Mage/Checkout/Model/Mysql4/Cart.php @@ -74,4 +74,17 @@ public function fetchItems($quoteId) return $read->fetchAll($select); } -} \ No newline at end of file + + /** + * Make collection not to load products that are in specified quote + * + * @param Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection $collection + * @param int $quoteId + */ + public function addExcludeProductFilter($collection, $quoteId) { + $collection->getSelect()->where(new Zend_Db_Expr(sprintf( + 'e.entity_id NOT IN (SELECT product_id FROM %s WHERE quote_id=%d)', + $this->getTable('sales/quote_item'), $quoteId + ))); + } +} diff --git a/app/code/core/Mage/Checkout/Model/Type/Multishipping.php b/app/code/core/Mage/Checkout/Model/Type/Multishipping.php index 5d43715d..920a6b79 100644 --- a/app/code/core/Mage/Checkout/Model/Type/Multishipping.php +++ b/app/code/core/Mage/Checkout/Model/Type/Multishipping.php @@ -261,8 +261,8 @@ protected function _addShippingItem($quoteItemId, $data) public function updateQuoteCustomerShippingAddress($addressId) { if ($address = $this->getCustomer()->getAddressById($addressId)) { - $address->setCollectShippingRates(true); $this->getQuote()->getShippingAddressByCustomerAddressId($addressId) + ->setCollectShippingRates(true) ->importCustomerAddress($address) ->collectTotals(); $this->getQuote()->save(); diff --git a/app/code/core/Mage/Checkout/Model/Type/Multishipping/State.php b/app/code/core/Mage/Checkout/Model/Type/Multishipping/State.php index 12f701a6..2ac8e378 100644 --- a/app/code/core/Mage/Checkout/Model/Type/Multishipping/State.php +++ b/app/code/core/Mage/Checkout/Model/Type/Multishipping/State.php @@ -39,9 +39,24 @@ class Mage_Checkout_Model_Type_Multishipping_State extends Varien_Object const STEP_OVERVIEW = 'multishipping_overview'; const STEP_SUCCESS = 'multishipping_success'; + /** + * Allow steps array + * + * @var array + */ protected $_steps; + + /** + * Checkout model + * + * @var Mage_Checkout_Model_Type_Multishipping + */ protected $_checkout; + /** + * Init model, steps + * + */ public function __construct() { parent::__construct(); @@ -63,10 +78,19 @@ public function __construct() )), ); + foreach ($this->_steps as $step) { + $step->setIsComplete(false); + } + $this->_checkout = Mage::getSingleton('checkout/type_multishipping'); $this->_steps[$this->getActiveStep()]->setIsActive(true); } + /** + * Retrieve checkout model + * + * @return Mage_Checkout_Model_Type_Multishipping + */ public function getCheckout() { return $this->_checkout; @@ -115,6 +139,48 @@ public function setActiveStep($step) return $this; } + /** + * Mark step as completed + * + * @param string $step + * @return Mage_Checkout_Model_Type_Multishipping_State + */ + public function setCompleteStep($step) + { + if (isset($this->_steps[$step])) { + $this->getCheckoutSession()->setStepData($step, 'is_complete', true); + } + return $this; + } + + /** + * Retrieve step complete status + * + * @param string $step + * @return bool + */ + public function getCompleteStep($step) + { + if (isset($this->_steps[$step])) { + return $this->getCheckoutSession()->getStepData($step, 'is_complete'); + } + return false; + } + + /** + * Unset complete status from step + * + * @param string $step + * @return Mage_Checkout_Model_Type_Multishipping_State + */ + public function unsCompleteStep($step) + { + if (isset($this->_steps[$step])) { + $this->getCheckoutSession()->setStepData($step, 'is_complete', false); + } + return $this; + } + public function canSelectAddresses() { diff --git a/app/code/core/Mage/Checkout/Model/Type/Onepage.php b/app/code/core/Mage/Checkout/Model/Type/Onepage.php index 667f56cc..9f614592 100644 --- a/app/code/core/Mage/Checkout/Model/Type/Onepage.php +++ b/app/code/core/Mage/Checkout/Model/Type/Onepage.php @@ -187,14 +187,10 @@ public function saveBilling($data, $customerAddressId) } } - if ($address->getCustomerPassword()) { - $customer = Mage::getModel('customer/customer'); - $this->getQuote()->setPasswordHash($customer->encryptPassword($address->getCustomerPassword())); + if (true !== $result = $this->_processValidateCustomer($address)) { + return $result; } - if ($address->getDob()) { - $this->getQuote()->setCustomerDob(Mage::app()->getLocale()->date($address->getDob(), null, null, false)->toString('yyyy-MM-dd')); - } $this->getQuote()->collectTotals(); $this->getQuote()->save(); @@ -206,6 +202,60 @@ public function saveBilling($data, $customerAddressId) return array(); } + /** + * Validate customer data and set some its data for further usage in quote + * Will return either true or array with error messages + * + * @param Mage_Sales_Model_Quote_Address $address + * @return true|array + */ + protected function _processValidateCustomer(Mage_Sales_Model_Quote_Address $address) + { + // set customer date of birth for further usage + $dob = ''; + if ($address->getDob()) { + // possible bug here (read date inappropriate and/or save in UTC) + $dob = Mage::app()->getLocale()->date($address->getDob(), null, null, false)->toString('yyyy-MM-dd'); + $this->getQuote()->setCustomerDob($dob); + } + + // set customer tax/vat number for further usage + if ($address->getTaxvat()) { + $this->getQuote()->setCustomerTaxvat($address->getTaxvat()); + } + + // invoke customer model, if it is registering + if ($address->getCustomerPassword()) { + // set customer password hash for further usage + $customer = Mage::getModel('customer/customer'); + $this->getQuote()->setPasswordHash($customer->encryptPassword($address->getCustomerPassword())); + + // validate customer + foreach (array( + 'firstname' => 'firstname', + 'lastname' => 'lastname', + 'email' => 'email', + 'password' => 'customer_password', + 'confirmation' => 'confirm_password', + 'taxvat' => 'taxvat', + ) as $key => $dataKey) { + $customer->setData($key, $address->getData($dataKey)); + } + if ($dob) { + $customer->setDob($dob); + } + $validationResult = $customer->validate(); + if (true !== $validationResult && is_array($validationResult)) { + return array( + 'error' => -1, + 'message' => implode(', ', $validationResult) + ); + } + } + + return true; + } + public function saveShipping($data, $customerAddressId) { if (empty($data)) { @@ -364,6 +414,10 @@ public function saveOrder() $billing->setCustomerDob($this->getQuote()->getCustomerDob()); } + if ($this->getQuote()->getCustomerTaxvat() && !$billing->getCustomerTaxvat()) { + $billing->setCustomerTaxvat($this->getQuote()->getCustomerTaxvat()); + } + Mage::helper('core')->copyFieldset('checkout_onepage_billing', 'to_customer', $billing, $customer); $customer->setPassword($customer->decryptPassword($this->getQuote()->getPasswordHash())); diff --git a/app/code/core/Mage/Checkout/controllers/CartController.php b/app/code/core/Mage/Checkout/controllers/CartController.php index a1f4a42b..e595c64a 100644 --- a/app/code/core/Mage/Checkout/controllers/CartController.php +++ b/app/code/core/Mage/Checkout/controllers/CartController.php @@ -121,6 +121,12 @@ public function indexAction() } } + /** + * if customer enteres shopping cart we should mark quote + * as modified bc he can has checkout page in another window. + */ + $this->_getSession()->setCartWasUpdated(true); + Varien_Profiler::start(__METHOD__ . 'cart_display'); $this->loadLayout(); $this->_initLayoutMessages('checkout/session'); @@ -157,6 +163,8 @@ public function addAction() $cart->save(); + $this->_getSession()->setCartWasUpdated(true); + /** * @todo remove wishlist observer processAddToCart */ @@ -171,7 +179,8 @@ public function addAction() if ($this->_getSession()->getUseNotice(true)) { $this->_getSession()->addNotice($e->getMessage()); } else { - foreach (explode("\n", $e->getMessage()) as $message) { + $messages = array_unique(explode("\n", $e->getMessage())); + foreach ($messages as $message) { $this->_getSession()->addError($message); } } @@ -216,6 +225,7 @@ public function addgroupAction() } } $cart->save(); + $this->_getSession()->setCartWasUpdated(true); } $this->_goBack(); } @@ -312,6 +322,7 @@ public function couponPostAction() $this->_getQuote()->setCouponCode(strlen($couponCode) ? $couponCode : '') ->collectTotals() ->save(); + if ($couponCode) { if ($couponCode == $this->_getQuote()->getCouponCode()) { $this->_getSession()->addSuccess( diff --git a/app/code/core/Mage/Checkout/controllers/MultishippingController.php b/app/code/core/Mage/Checkout/controllers/MultishippingController.php index 5253b3b9..706922e2 100644 --- a/app/code/core/Mage/Checkout/controllers/MultishippingController.php +++ b/app/code/core/Mage/Checkout/controllers/MultishippingController.php @@ -44,7 +44,7 @@ protected function _getCheckout() /** * Retrieve checkout state model * - * @return Mage_Checkot_Model_Type_Multishipping_State + * @return Mage_Checkout_Model_Type_Multishipping_State */ protected function _getState() { @@ -65,22 +65,24 @@ protected function _getHelper() * Action predispatch * * Check customer authentication for some actions + * + * @return Mage_Checkout_MultishippingController */ public function preDispatch() { parent::preDispatch(); - if (!Mage::helper('checkout')->isMultishippingCheckoutAvailable()){ - $this->_redirectUrl($this->_getHelper()->getCartUrl()); - $this->setFlag('', self::FLAG_NO_DISPATCH, true); - return $this; - } - $action = $this->getRequest()->getActionName(); if (!preg_match('#^(login|register)#', $action)) { if (!Mage::getSingleton('customer/session')->authenticate($this, $this->_getHelper()->getMSLoginUrl())) { $this->setFlag('', self::FLAG_NO_DISPATCH, true); } + + if (!Mage::helper('checkout')->isMultishippingCheckoutAvailable()) { + $this->_redirectUrl($this->_getHelper()->getCartUrl()); + $this->setFlag('', self::FLAG_NO_DISPATCH, true); + return $this; + } } if (!$this->_preDispatchValidateCustomer()) { @@ -195,6 +197,9 @@ public function addressesPostAction() $this->_getState()->setActiveStep( Mage_Checkout_Model_Type_Multishipping_State::STEP_SHIPPING ); + $this->_getState()->setCompleteStep( + Mage_Checkout_Model_Type_Multishipping_State::STEP_SELECT_ADDRESSES + ); $this->_redirect('*/*/shipping'); } elseif ($this->getRequest()->getParam('new_address')) { @@ -225,6 +230,9 @@ public function backToAddressesAction() $this->_getState()->setActiveStep( Mage_Checkout_Model_Type_Multishipping_State::STEP_SELECT_ADDRESSES ); + $this->_getState()->unsCompleteStep( + Mage_Checkout_Model_Type_Multishipping_State::STEP_SHIPPING + ); $this->_redirect('*/*/addresses'); } @@ -261,6 +269,11 @@ public function shippingAction() return; } + if (!$this->_getState()->getCompleteStep(Mage_Checkout_Model_Type_Multishipping_State::STEP_SELECT_ADDRESSES)) { + $this->_redirect('*/*/addresses'); + return $this; + } + $this->_getState()->setActiveStep( Mage_Checkout_Model_Type_Multishipping_State::STEP_SHIPPING ); @@ -275,6 +288,9 @@ public function backToShippingAction() $this->_getState()->setActiveStep( Mage_Checkout_Model_Type_Multishipping_State::STEP_SHIPPING ); + $this->_getState()->unsCompleteStep( + Mage_Checkout_Model_Type_Multishipping_State::STEP_BILLING + ); $this->_redirect('*/*/shipping'); } @@ -290,6 +306,9 @@ public function shippingPostAction() $this->_getState()->setActiveStep( Mage_Checkout_Model_Type_Multishipping_State::STEP_BILLING ); + $this->_getState()->setCompleteStep( + Mage_Checkout_Model_Type_Multishipping_State::STEP_SHIPPING + ); $this->_redirect('*/*/billing'); } catch (Exception $e){ @@ -311,6 +330,11 @@ public function billingAction() return; } + if (!$this->_getState()->getCompleteStep(Mage_Checkout_Model_Type_Multishipping_State::STEP_SHIPPING)) { + $this->_redirect('*/*/shipping'); + return $this; + } + $this->_getState()->setActiveStep( Mage_Checkout_Model_Type_Multishipping_State::STEP_BILLING ); @@ -360,6 +384,9 @@ public function backToBillingAction() $this->_getState()->setActiveStep( Mage_Checkout_Model_Type_Multishipping_State::STEP_BILLING ); + $this->_getState()->unsCompleteStep( + Mage_Checkout_Model_Type_Multishipping_State::STEP_OVERVIEW + ); $this->_redirect('*/*/billing'); } @@ -369,7 +396,7 @@ public function backToBillingAction() public function overviewAction() { if (!$this->_validateMinimumAmount()) { - return; + return $this; } $this->_getState()->setActiveStep(Mage_Checkout_Model_Type_Multishipping_State::STEP_OVERVIEW); @@ -379,6 +406,10 @@ public function overviewAction() $this->_getCheckout()->setPaymentMethod($payment); $this->_getCheckout()->getQuote()->getPayment()->importData($payment); + $this->_getState()->setCompleteStep( + Mage_Checkout_Model_Type_Multishipping_State::STEP_BILLING + ); + $this->loadLayout(); $this->_initLayoutMessages('checkout/session'); $this->_initLayoutMessages('customer/session'); @@ -423,6 +454,9 @@ public function overviewPostAction() $this->_getState()->setActiveStep( Mage_Checkout_Model_Type_Multishipping_State::STEP_SUCCESS ); + $this->_getState()->setCompleteStep( + Mage_Checkout_Model_Type_Multishipping_State::STEP_OVERVIEW + ); $this->_getCheckout()->getCheckoutSession()->clear(); $this->_getCheckout()->getCheckoutSession()->setDisplaySuccess(true); $this->_redirect('*/*/success'); @@ -444,6 +478,11 @@ public function overviewPostAction() */ public function successAction() { + if (!$this->_getState()->getCompleteStep(Mage_Checkout_Model_Type_Multishipping_State::STEP_OVERVIEW)) { + $this->_redirect('*/*/addresses'); + return $this; + } + $this->loadLayout(); $this->_initLayoutMessages('checkout/session'); $this->renderLayout(); diff --git a/app/code/core/Mage/Checkout/etc/config.xml b/app/code/core/Mage/Checkout/etc/config.xml index 18a20c9a..52fb55df 100644 --- a/app/code/core/Mage/Checkout/etc/config.xml +++ b/app/code/core/Mage/Checkout/etc/config.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,13 +22,13 @@ * @category Mage * @package Mage_Checkout * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - 0.9.2 + 0.9.3 @@ -50,7 +50,8 @@ * * * - * + dob + taxvat @@ -214,6 +215,7 @@ 1 + 3 general diff --git a/app/code/core/Mage/Checkout/etc/system.xml b/app/code/core/Mage/Checkout/etc/system.xml index 8b81a883..7671f36d 100644 --- a/app/code/core/Mage/Checkout/etc/system.xml +++ b/app/code/core/Mage/Checkout/etc/system.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_GiftMessage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> @@ -154,6 +154,14 @@ 1 1 + + + text + 2 + 1 + 1 + 1 + diff --git a/app/code/core/Mage/Checkout/sql/checkout_setup/mysql4-install-0.9.1.php b/app/code/core/Mage/Checkout/sql/checkout_setup/mysql4-install-0.9.1.php index 8fc0ef2a..35b88f46 100644 --- a/app/code/core/Mage/Checkout/sql/checkout_setup/mysql4-install-0.9.1.php +++ b/app/code/core/Mage/Checkout/sql/checkout_setup/mysql4-install-0.9.1.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Chronopay + * @package Mage_Checkout * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -38,7 +38,7 @@ `is_active` tinyint(4) NOT NULL default '0', PRIMARY KEY (`agreement_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; - + CREATE TABLE `{$this->getTable('checkout_agreement_store')}` ( `agreement_id` int(10) unsigned not null, `store_id` smallint(5) unsigned not null, diff --git a/app/code/core/Mage/Checkout/sql/checkout_setup/mysql4-upgrade-0.9.0-0.9.1.php b/app/code/core/Mage/Checkout/sql/checkout_setup/mysql4-upgrade-0.9.0-0.9.1.php index 5c447ed7..554e1303 100644 --- a/app/code/core/Mage/Checkout/sql/checkout_setup/mysql4-upgrade-0.9.0-0.9.1.php +++ b/app/code/core/Mage/Checkout/sql/checkout_setup/mysql4-upgrade-0.9.0-0.9.1.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Chronopay + * @package Mage_Checkout * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -39,7 +39,7 @@ `is_active` tinyint(4) NOT NULL default '0', PRIMARY KEY (`agreement_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; - + "); $installer->endSetup(); diff --git a/app/code/core/Mage/Checkout/sql/checkout_setup/mysql4-upgrade-0.9.1-0.9.2.php b/app/code/core/Mage/Checkout/sql/checkout_setup/mysql4-upgrade-0.9.1-0.9.2.php index 219146ce..040704db 100644 --- a/app/code/core/Mage/Checkout/sql/checkout_setup/mysql4-upgrade-0.9.1-0.9.2.php +++ b/app/code/core/Mage/Checkout/sql/checkout_setup/mysql4-upgrade-0.9.1-0.9.2.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Chronopay + * @package Mage_Checkout * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -29,9 +29,8 @@ $installer->startSetup(); -$installer->run(" -ALTER TABLE `{$installer->getTable('checkout_agreement')}` -ADD COLUMN `content_height` varchar(25) NULL DEFAULT NULL AFTER `content`; -"); +$installer->getConnection()->addColumn($installer->getTable('checkout_agreement'), 'content_height', + 'varchar(25) NULL DEFAULT NULL AFTER `content`' +); $installer->endSetup(); diff --git a/app/code/core/Mage/Checkout/sql/checkout_setup/mysql4-upgrade-0.9.2-0.9.3.php b/app/code/core/Mage/Checkout/sql/checkout_setup/mysql4-upgrade-0.9.2-0.9.3.php new file mode 100644 index 00000000..f60e4172 --- /dev/null +++ b/app/code/core/Mage/Checkout/sql/checkout_setup/mysql4-upgrade-0.9.2-0.9.3.php @@ -0,0 +1,36 @@ +startSetup(); + +$installer->getConnection()->addColumn($installer->getTable('checkout_agreement'), 'is_html', + 'tinyint(4) NOT NULL DEFAULT 0 AFTER `is_active`' +); + +$installer->endSetup(); diff --git a/app/code/core/Mage/Chronopay/etc/config.xml b/app/code/core/Mage/Chronopay/etc/config.xml index 5044b457..9f602f15 100644 --- a/app/code/core/Mage/Chronopay/etc/config.xml +++ b/app/code/core/Mage/Chronopay/etc/config.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Chronopay * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Chronopay/etc/system.xml b/app/code/core/Mage/Chronopay/etc/system.xml index 144e6a52..7df837b1 100644 --- a/app/code/core/Mage/Chronopay/etc/system.xml +++ b/app/code/core/Mage/Chronopay/etc/system.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Chronopay * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Cms/Helper/Page.php b/app/code/core/Mage/Cms/Helper/Page.php index a1add5f0..ecce7142 100644 --- a/app/code/core/Mage/Cms/Helper/Page.php +++ b/app/code/core/Mage/Cms/Helper/Page.php @@ -62,7 +62,7 @@ public function renderPage(Mage_Core_Controller_Front_Action $action, $pageId=nu if ($page->getCustomTheme()) { $apply = true; - $today = strtotime('today'); + $today = Mage::app()->getLocale()->date()->toValue(); if (($from = $page->getCustomThemeFrom()) && strtotime($from)>$today) { $apply = false; } diff --git a/app/code/core/Mage/Cms/Model/Mysql4/Page.php b/app/code/core/Mage/Cms/Model/Mysql4/Page.php index d7149ce8..379ce195 100644 --- a/app/code/core/Mage/Cms/Model/Mysql4/Page.php +++ b/app/code/core/Mage/Cms/Model/Mysql4/Page.php @@ -47,6 +47,18 @@ protected function _construct() */ protected function _beforeSave(Mage_Core_Model_Abstract $object) { + $format = Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT); + foreach (array('custom_theme_from', 'custom_theme_to') as $dataKey) { + if ($date = $object->getData($dataKey)) { + $object->setData($dataKey, Mage::app()->getLocale()->date($date, $format, null, false) + ->toString(Varien_Date::DATETIME_INTERNAL_FORMAT) + ); + } + else { + $object->setData($dataKey, new Zend_Db_Expr('NULL')); + } + } + if (!$this->getIsUniquePageToStores($object)) { Mage::throwException(Mage::helper('cms')->__('Page Identifier for specified store already exist.')); } @@ -60,14 +72,6 @@ protected function _beforeSave(Mage_Core_Model_Abstract $object) } $object->setUpdateTime(Mage::getSingleton('core/date')->gmtDate()); - - if (!$object->getCustomThemeFrom()) { - $object->setCustomThemeFrom(new Zend_Db_Expr('NULL')); - } - - if (!$object->getCustomThemeTo()) { - $object->setCustomThemeTo(new Zend_Db_Expr('NULL')); - } return $this; } diff --git a/app/code/core/Mage/Cms/Model/Page.php b/app/code/core/Mage/Cms/Model/Page.php index 016fae02..12688470 100644 --- a/app/code/core/Mage/Cms/Model/Page.php +++ b/app/code/core/Mage/Cms/Model/Page.php @@ -37,6 +37,8 @@ class Mage_Cms_Model_Page extends Mage_Core_Model_Abstract const NOROUTE_PAGE_ID = 'no-route'; + protected $_eventPrefix = 'cms_page'; + protected function _construct() { $this->_init('cms/page'); diff --git a/app/code/core/Mage/Cms/etc/config.xml b/app/code/core/Mage/Cms/etc/config.xml index 110910fd..9fecabe4 100644 --- a/app/code/core/Mage/Cms/etc/config.xml +++ b/app/code/core/Mage/Cms/etc/config.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Cms * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Cms/etc/system.xml b/app/code/core/Mage/Cms/etc/system.xml index 9bfb7aab..2abf65e0 100644 --- a/app/code/core/Mage/Cms/etc/system.xml +++ b/app/code/core/Mage/Cms/etc/system.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Cms * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Contacts/etc/config.xml b/app/code/core/Mage/Contacts/etc/config.xml index 1a79e721..05e03c84 100644 --- a/app/code/core/Mage/Contacts/etc/config.xml +++ b/app/code/core/Mage/Contacts/etc/config.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Contacts * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Contacts/etc/system.xml b/app/code/core/Mage/Contacts/etc/system.xml index 41edb499..bae27e2c 100644 --- a/app/code/core/Mage/Contacts/etc/system.xml +++ b/app/code/core/Mage/Contacts/etc/system.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Contacts * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Core/Block/Abstract.php b/app/code/core/Mage/Core/Block/Abstract.php index e094d4e9..30c34a56 100644 --- a/app/code/core/Mage/Core/Block/Abstract.php +++ b/app/code/core/Mage/Core/Block/Abstract.php @@ -647,13 +647,13 @@ final public function toHtml() $translate->setTranslateInline(true); } } - + $html = $this->_afterToHtml($html); Mage::dispatchEvent('core_block_abstract_to_html_after', array('block' => $this)); return $html; } - + /** * Processing block html after rendering * @@ -951,4 +951,34 @@ public function countChildren() { return count($this->_children); } + + /** + * Prepare url for save to cache + * + * @return Mage_Core_Block_Abstract + */ + protected function _beforeCacheUrl() + { + if (Mage::app()->useCache('block_html')) { + Mage::app()->setUseSessionVar(true); + } + return $this; + } + + /** + * Replace URLs from cache + * + * @param string $html + * @return string + */ + protected function _afterCacheUrl($html) + { + if (Mage::app()->useCache('block_html')) { + Mage::app()->setUseSessionVar(false); + Varien_Profiler::start('CACHE_URL'); + $html = Mage::getSingleton('core/url')->sessionUrlVar($html); + Varien_Profiler::stop('CACHE_URL'); + } + return $html; + } } diff --git a/app/code/core/Mage/Core/Block/Html/Calendar.php b/app/code/core/Mage/Core/Block/Html/Calendar.php new file mode 100644 index 00000000..6a9b7995 --- /dev/null +++ b/app/code/core/Mage/Core/Block/Html/Calendar.php @@ -0,0 +1,82 @@ + + */ +class Mage_Core_Block_Html_Calendar extends Mage_Core_Block_Template +{ + protected function _toHtml() + { + $localeCode = Mage::app()->getLocale()->getLocaleCode(); + + // get days names + $days = Zend_Locale_Data::getList($localeCode, 'days'); + $this->assign('days', array( + 'wide' => Zend_Json::encode(array_values($days['format']['wide'])), + 'abbreviated' => Zend_Json::encode(array_values($days['format']['abbreviated'])) + )); + + // get months names + $months = Zend_Locale_Data::getList($localeCode, 'months'); + $this->assign('months', array( + 'wide' => Zend_Json::encode(array_values($months['format']['wide'])), + 'abbreviated' => Zend_Json::encode(array_values($months['format']['abbreviated'])) + )); + + // get "today" and "week" words + $this->assign('today', Zend_Json::encode(Zend_Locale_Data::getContent($localeCode, 'relative', 0))); + $this->assign('week', Zend_Json::encode(Zend_Locale_Data::getContent($localeCode, 'field', 'week'))); + + // get "am" & "pm" words + $this->assign('am', Zend_Json::encode(Zend_Locale_Data::getContent($localeCode, 'am'))); + $this->assign('pm', Zend_Json::encode(Zend_Locale_Data::getContent($localeCode, 'pm'))); + + // get first day of week and weekend days + $this->assign('firstDay', (int)Mage::getStoreConfig('general/locale/firstday')); + $this->assign('weekendDays', Zend_Json::encode((string)Mage::getStoreConfig('general/locale/weekend'))); + + // define default format and tooltip format + $this->assign('defaultFormat', Zend_Json::encode(Mage::app()->getLocale()->getDateStrFormat(Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM))); + $this->assign('toolTipFormat', Zend_Json::encode(Mage::app()->getLocale()->getDateStrFormat(Mage_Core_Model_Locale::FORMAT_TYPE_LONG))); + + // get days and months for en_US locale - calendar will parse exactly in this locale + $days = Zend_Locale_Data::getList('en_US', 'days'); + $months = Zend_Locale_Data::getList('en_US', 'months'); + $enUS = new stdClass(); + $enUS->m = new stdClass(); + $enUS->m->wide = array_values($months['format']['wide']); + $enUS->m->abbr = array_values($months['format']['abbreviated']); + $this->assign('enUS', Zend_Json::encode($enUS)); + + return parent::_toHtml(); + } +} diff --git a/app/code/core/Mage/Core/Controller/Request/Http.php b/app/code/core/Mage/Core/Controller/Request/Http.php index 86a2b446..a053c91a 100644 --- a/app/code/core/Mage/Core/Controller/Request/Http.php +++ b/app/code/core/Mage/Core/Controller/Request/Http.php @@ -183,4 +183,41 @@ public function getRouteName() { return $this->_route; } + + /** + * Retrieve HTTP HOST + * + * @param bool $trimPort + * @return string + */ + public function getHttpHost($trimPort = true) + { + if (!isset($_SERVER['HTTP_HOST'])) { + return false; + } + if ($trimPort) { + $host = split(':', $_SERVER['HTTP_HOST']); + return $host[0]; + } + return $_SERVER['HTTP_HOST']; + } + + /** + * Set a member of the $_POST superglobal + * + * @param striing|array $key + * @param mixed $value + * + * @return Mage_Core_Controller_Request_Http + */ + public function setPost($key, $value = null) + { + if (is_array($key)) { + $_POST = $key; + } + else { + $_POST[$key] = $value; + } + return $this; + } } \ No newline at end of file diff --git a/app/code/core/Mage/Core/Helper/Data.php b/app/code/core/Mage/Core/Helper/Data.php index 50362ed6..8f4fd985 100644 --- a/app/code/core/Mage/Core/Helper/Data.php +++ b/app/code/core/Mage/Core/Helper/Data.php @@ -79,7 +79,7 @@ public function formatPrice($price, $includeContainer = true) /** * Format date using current locale options * - * @param date $date in GMT timezone + * @param date|Zend_Date|null $date in GMT timezone * @param string $format * @param bool $showTime * @return string @@ -92,13 +92,13 @@ public function formatDate($date=null, $format='short', $showTime=false) Mage_Core_Model_Locale::FORMAT_TYPE_SHORT !==$format) { return $date; } - if ($date && !strtotime($date)) { + if (!($date instanceof Zend_Date) && $date && !strtotime($date)) { return ''; } if (is_null($date)) { - $date = Mage::app()->getLocale()->date(Mage::getSingleton('core/date')->gmtTimestamp(), null, null, $showTime); + $date = Mage::app()->getLocale()->date(Mage::getSingleton('core/date')->gmtTimestamp(), null, null); } - else { + elseif (!$date instanceof Zend_Date) { $date = Mage::app()->getLocale()->date(strtotime($date), null, null, $showTime); } @@ -115,7 +115,7 @@ public function formatDate($date=null, $format='short', $showTime=false) /** * Format time using current locale options * - * @param date $date + * @param date|Zend_Date|null $time * @param string $format * @param bool $showTime * @return string @@ -132,6 +132,9 @@ public function formatTime($time=null, $format='short', $showDate=false) if (is_null($time)) { $date = Mage::app()->getLocale()->date(time()); } + elseif ($time instanceof Zend_Date) { + $date = $time; + } else { $date = Mage::app()->getLocale()->date(strtotime($time)); } diff --git a/app/code/core/Mage/Core/Helper/Http.php b/app/code/core/Mage/Core/Helper/Http.php new file mode 100644 index 00000000..c868ad20 --- /dev/null +++ b/app/code/core/Mage/Core/Helper/Http.php @@ -0,0 +1,83 @@ + + */ +class Mage_Core_Helper_Http extends Mage_Core_Helper_Abstract +{ + public function authValidate($headers=null) + { + if(!is_null($headers)) { + $_SERVER = $headers; + } + + $user = ''; + $pass = ''; + // moshe's fix for CGI + if (empty($_SERVER['HTTP_AUTHORIZATION'])) { + foreach ($_SERVER as $k=>$v) { + if (substr($k, -18)==='HTTP_AUTHORIZATION' && !empty($v)) { + $_SERVER['HTTP_AUTHORIZATION'] = $v; + break; + } + } + } + + if (isset($_SERVER['PHP_AUTH_USER']) && isset($_SERVER['PHP_AUTH_PW'])) { + $user = $_SERVER['PHP_AUTH_USER']; + $pass = $_SERVER['PHP_AUTH_PW']; + } + // IIS Note:: For HTTP Authentication to work with IIS, + // the PHP directive cgi.rfc2616_headers must be set to 0 (the default value). + elseif (!empty($_SERVER['HTTP_AUTHORIZATION'])) { + $auth = $_SERVER['HTTP_AUTHORIZATION']; + list($user, $pass) = explode(':', base64_decode(substr($auth, strpos($auth, " ") + 1))); + } + elseif (!empty($_SERVER['Authorization'])) { + $auth = $_SERVER['Authorization']; + list($user, $pass) = explode(':', base64_decode(substr($auth, strpos($auth, " ") + 1))); + } + + if(!$user || !$pass) { + $this->authFailed(); + } + + return array($user, $pass); + } + + public function authFailed() + { + Mage::app()->getResponse() + ->setHeader('HTTP/1.1','401 Unauthorized') + ->setHeader('WWW-Authenticate','Basic realm="RSS Feeds"') + ->setBody('

401 Unauthorized

') + ->sendResponse(); + exit; + } +} \ No newline at end of file diff --git a/app/code/core/Mage/Core/Helper/Js.php b/app/code/core/Mage/Core/Helper/Js.php index fceda9a2..e665a394 100644 --- a/app/code/core/Mage/Core/Helper/Js.php +++ b/app/code/core/Mage/Core/Helper/Js.php @@ -79,16 +79,17 @@ public function __construct() 'Please enter valid password.' => $this->__('Please enter valid password.'), 'Please enter 6 or more characters. Leading or trailing spaces will be ignored.' => $this->__('Please enter 6 or more characters. Leading or trailing spaces will be ignored.'), + 'Please use letters only (a-z or A-Z) in this field.' => $this->__('Please use letters only (a-z or A-Z) in this field.'), 'Please enter a number greater than 0 in this field.' => $this->__('Please enter a number greater than 0 in this field.'), 'Please enter a valid credit card number.' => $this->__('Please enter a valid credit card number.'), 'Please wait, loading...' => $this->__('Please wait, loading...'), 'Please choose to register or to checkout as a guest' => $this->__('Please choose to register or to checkout as a guest'), 'Error: Passwords do not match' => $this->__('Error: Passwords do not match'), - 'Your order can not be completed at this time as there is no shipping methods available for it. Please make neccessary changes in your shipping address.' => + 'Your order can not be completed at this time as there is no shipping methods available for it. Please make necessary changes in your shipping address.' => $this->__('Your order can not be completed at this time as there is no shipping methods available for it. Please make neccessary changes in your shipping address.'), 'Please specify shipping method.' => $this->__('Please specify shipping method.'), - 'Your order can not be completed at this time as there is no payment methods available for it.' => + 'Your order can not be completed at this time as there is no payment methods available for it.' => $this->__('Your order can not be completed at this time as there is no payment methods available for it.'), 'Please specify payment method.' => $this->__('Please specify payment method.'), diff --git a/app/code/core/Mage/Core/Helper/String.php b/app/code/core/Mage/Core/Helper/String.php index ad958734..6fa253db 100644 --- a/app/code/core/Mage/Core/Helper/String.php +++ b/app/code/core/Mage/Core/Helper/String.php @@ -146,14 +146,16 @@ public function strrev($str) * Binary-safe variant of str_split() * + option not to break words * + option to trim spaces (between each word) + * + option to set character(s) (pcre pattern) to be considered as words separator * * @param string $str * @param int $length * @param bool $keepWords * @param bool $trim + * @param string $wordSeparatorRegex * @return array */ - public function str_split($str, $length = 1, $keepWords = false, $trim = false) + public function str_split($str, $length = 1, $keepWords = false, $trim = false, $wordSeparatorRegex = '\s') { $result = array(); $strlen = $this->strlen($str); @@ -172,7 +174,7 @@ public function str_split($str, $length = 1, $keepWords = false, $trim = false) } // split smartly, keeping words else { - $split = preg_split('/(\s+)/is', $str, null, PREG_SPLIT_DELIM_CAPTURE); + $split = preg_split('/(' . $wordSeparatorRegex . '+)/is', $str, null, PREG_SPLIT_DELIM_CAPTURE); $i = 0; $space = ''; $spaceLen = 0; @@ -206,7 +208,7 @@ public function str_split($str, $length = 1, $keepWords = false, $trim = false) } // break too long part recursively else { - foreach ($this->str_split($part, $length, false, $trim) as $subpart) { + foreach ($this->str_split($part, $length, false, $trim, $wordSeparatorRegex) as $subpart) { $i++; $result[$i] = $subpart; } @@ -219,6 +221,10 @@ public function str_split($str, $length = 1, $keepWords = false, $trim = false) unset($result[$count - 1]); } } + // remove first element, if empty + if (isset($result[0]) && empty($result[0])) { + array_shift($result); + } return $result; } } diff --git a/app/code/core/Mage/Core/Model/App.php b/app/code/core/Mage/Core/Model/App.php index b54cc6f9..0b8b7da4 100644 --- a/app/code/core/Mage/Core/Model/App.php +++ b/app/code/core/Mage/Core/Model/App.php @@ -207,6 +207,13 @@ class Mage_Core_Model_App */ protected $_updateMode = false; + /** + * Use session var instead of SID for session in URL + * + * @var bool + */ + protected $_useSessionVar = false; + static protected $_isInstalled = NULL; /** @@ -290,6 +297,10 @@ protected function _checkGetStore($type) return $this; } + /** + * prevent running a store from another website or store group, + * if website or store group was specified explicitly in Mage::run() + */ $curStoreObj = $this->_stores[$this->_currentStore]; if ($type == 'website' && $storeObj->getWebsiteId() == $curStoreObj->getWebsiteId()) { $this->_currentStore = $store; @@ -645,6 +656,23 @@ protected function _getDefaultStore() return $this->_store; } + /** + * Retrieve default store for default group and website + * + * @return Mage_Core_Model_Store + */ + public function getDefaultStoreView() + { + foreach ($this->getWebsites() as $_website) { + if ($_website->getIsDefault()) { + if ($_defaultStore = $this->getGroup($_website->getDefaultGroupId())->getDefaultStore()) { + return $_defaultStore; + } + } + } + return null; + } + public function getDistroLocaleCode() { return self::DISTRO_LOCALE_CODE; @@ -777,6 +805,9 @@ public function getTranslator() */ public function getHelper($name) { + if (strpos($name, '/') === false) { + $name .= '/data'; + } if (!isset($this->_helpers[$name])) { $class = Mage::getConfig()->getHelperClassName($name); $this->_helpers[$name] = new $class(); @@ -860,7 +891,7 @@ protected function _getCacheId($id=null) protected function _getCacheTags($tags=array()) { foreach ($tags as $index=>$value) { - $tags[$index] = $this->_getCacheId($value); + $tags[$index] = $this->_getCacheId($value); } return $tags; } @@ -888,10 +919,17 @@ public function getCache() 'file_name_prefix'=>'mage', ); } + $lifetime = Mage::getConfig()->getNode('global/cache/lifetime'); + if ($lifetime !== false) { + $lifetime = (int) $lifetime; + } + else { + $lifetime = 7200; + } $this->_cache = Zend_Cache::factory('Core', $backend, array( 'caching'=>true, - 'lifetime'=>7200, + 'lifetime'=>$lifetime, 'automatic_cleaning_factor'=>0, ), $backendAttributes @@ -1130,4 +1168,26 @@ public function throwStoreException() { throw new Mage_Core_Model_Store_Exception(''); } + + /** + * Set use session var instead of SID for URL + * + * @param bool $var + * @return Mage_Core_Model_App + */ + public function setUseSessionVar($var) + { + $this->_useSessionVar = (bool)$var; + return $this; + } + + /** + * Retrieve use flag session var instead of SID for URL + * + * @return bool + */ + public function getUseSessionVar() + { + return $this->_useSessionVar; + } } diff --git a/app/code/core/Mage/Core/Model/Config/Base.php b/app/code/core/Mage/Core/Model/Config/Base.php index 90f1bdae..8343f0d7 100644 --- a/app/code/core/Mage/Core/Model/Config/Base.php +++ b/app/code/core/Mage/Core/Model/Config/Base.php @@ -30,9 +30,8 @@ * * Used to retrieve core configuration values * - * @category Mage - * @package Mage_Core - * @link http://var-dev.varien.com/wiki/doku.php?id=magento:api:mage:core:config + * @category Mage + * @package Mage_Core * @author Magento Core Team */ diff --git a/app/code/core/Mage/Core/Model/Date.php b/app/code/core/Mage/Core/Model/Date.php index c9f82cfb..2c9956c7 100644 --- a/app/code/core/Mage/Core/Model/Date.php +++ b/app/code/core/Mage/Core/Model/Date.php @@ -199,15 +199,7 @@ public function getGmtOffset($type = 'seconds') } /** - * Check if specified $year, $month, $day, $hour, $minute, $second are valid. - * - * @param int $year - * @param int $month - * @param int $day - * @param int $hour - * @param int $minute - * @param int $second - * @return bool + * Deprecated since 1.1.7 */ public function checkDateTime($year, $month, $day, $hour = 0, $minute = 0, $second = 0) { @@ -224,16 +216,7 @@ public function checkDateTime($year, $month, $day, $hour = 0, $minute = 0, $seco } /** - * Parse a string against predefined date format - * - * Date format must match at least substring (with offset 0) of predefined format. - * - * Array of integer values always will be returned: - * array($year, $month, $day, $hour, $minute, $second) - * - * @param string $dateTimeString - * @param string $dateTimeFormat - * @return array + * Deprecated since 1.1.7 */ public function parseDateTime($dateTimeString, $dateTimeFormat) { diff --git a/app/code/core/Mage/Core/Model/Design/Package.php b/app/code/core/Mage/Core/Model/Design/Package.php index 2667da85..1d4bd1ec 100644 --- a/app/code/core/Mage/Core/Model/Design/Package.php +++ b/app/code/core/Mage/Core/Model/Design/Package.php @@ -40,7 +40,7 @@ class Mage_Core_Model_Design_Package * * @var string|integer|Mage_Core_Model_Store */ - protected $_store; + protected $_store = null; /** * Package area @@ -72,11 +72,6 @@ class Mage_Core_Model_Design_Package protected $_config = null; - public function __construct() - { - - } - /** * Set store * @@ -96,6 +91,9 @@ public function setStore($store) */ public function getStore() { + if ($this->_store === null) { + return Mage::app()->getStore(); + } return $this->_store; } @@ -140,7 +138,7 @@ public function setPackageName($name = '') $this->_name = $customPackage; } else { - $this->_name = Mage::getStoreConfig('design/package/name'); + $this->_name = Mage::getStoreConfig('design/package/name', $this->getStore()); } } else { @@ -385,7 +383,7 @@ public function getFilename($file, array $params) public function getFallbackTheme() { - return Mage::getStoreConfig('design/theme/default'); + return Mage::getStoreConfig('design/theme/default', $this->getStore()); } public function getLayoutFilename($file, array $params=array()) @@ -505,7 +503,7 @@ protected function _checkUserAgentAgainstRegexps($regexpsConfigPath) if (!empty(self::$_customThemeTypeCache[$regexpsConfigPath])) { return self::$_customThemeTypeCache[$regexpsConfigPath]; } - $configValueSerialized = Mage::getStoreConfig($regexpsConfigPath); + $configValueSerialized = Mage::getStoreConfig($regexpsConfigPath, $this->getStore()); if ($configValueSerialized) { $regexps = @unserialize($configValueSerialized); if (!empty($regexps)) { diff --git a/app/code/core/Mage/Core/Model/Email/Template.php b/app/code/core/Mage/Core/Model/Email/Template.php index 7e242b4e..236e7865 100644 --- a/app/code/core/Mage/Core/Model/Email/Template.php +++ b/app/code/core/Mage/Core/Model/Email/Template.php @@ -62,8 +62,6 @@ class Mage_Core_Model_Email_Template extends Varien_Object static protected $_defaultTemplates; - - /** * Configuration of desing package for template * @@ -94,6 +92,23 @@ public function getMail() return $this->_mail; } + /** + * Declare template processing filter + * + * @param Varien_Filter_Template $filter + * @return Mage_Core_Model_Email_Template + */ + public function setTemplateFilter(Varien_Filter_Template $filter) + { + $this->_templateFilter = $filter; + return $this; + } + + /** + * Get filter object for template processing logi + * + * @return Mage_Core_Model_Email_Template_Filter + */ public function getTemplateFilter() { if (empty($this->_templateFilter)) { @@ -144,9 +159,7 @@ public function loadDefault($templateId, $locale=null) $this->setTemplateType($data['type']=='html' ? self::TYPE_HTML : self::TYPE_TEXT); $templateText = Mage::app()->getTranslator()->getTemplateFile( - $data['file'], - 'email', - $locale + $data['file'], 'email', $locale ); if (preg_match('//', $templateText, $matches)) { @@ -247,7 +260,12 @@ public function save() return $this; } - + /** + * Process email template code + * + * @param array $variables + * @return string + */ public function getProcessedTemplate(array $variables = array()) { $processor = $this->getTemplateFilter(); @@ -256,19 +274,22 @@ public function getProcessedTemplate(array $variables = array()) $variables['this'] = $this; } - $processor - ->setIncludeProcessor(array($this, 'getInclude')) + $processor->setIncludeProcessor(array($this, 'getInclude')) ->setVariables($variables); - $this->_applyDesignConfig(); $processedResult = $processor->filter($this->getTemplateText()); $this->_cancelDesignConfig(); return $processedResult; } - - + /** + * Get template code for include directive + * + * @param string $template + * @param array $variables + * @return string + */ public function getInclude($template, array $variables) { $thisClass = __CLASS__; @@ -285,7 +306,7 @@ public function getInclude($template, array $variables) * @param string $email E-mail * @param string|null $name receiver name * @param array $variables template variables - * @return boolean + * @return boolean **/ public function send($email, $name=null, array $variables = array()) { @@ -308,9 +329,7 @@ public function send($email, $name=null, array $variables = array()) foreach ($email as $emailOne) { $mail->addTo($emailOne, $name); } - } - else { - // $mail->addTo($email, $name); + } else { $mail->addTo($email, '=?utf-8?B?'.base64_encode($name).'?='); } @@ -324,7 +343,6 @@ public function send($email, $name=null, array $variables = array()) } $mail->setSubject('=?utf-8?B?'.base64_encode($this->getProcessedTemplateSubject($variables)).'?='); - //$mail->setSubject($this->getProcessedTemplateSubject($variables)); $mail->setFrom($this->getSenderEmail(), $this->getSenderName()); try { @@ -338,19 +356,23 @@ public function send($email, $name=null, array $variables = array()) return true; } + /** + * Send transactional email to recipient + * + * @param int $templateId + * @param string|array $sender sneder informatio, can be declared as part of config path + * @param string $email recipient email + * @param string $name recipient name + * @param array $vars varianles which can be used in template + * @param int|null $storeId + * @return Mage_Core_Model_Email_Template + */ public function sendTransactional($templateId, $sender, $email, $name, $vars=array(), $storeId=null) { $this->setSentSuccess(false); - - if (is_null($storeId)) { - if ($this->getDesignConfig() && $this->getDesignConfig()->getStore()) { - $storeId = $this->getDesignConfig()->getStore(); - } - else { - $storeId = Mage::app()->getStore(); - } + if (($storeId === null) && $this->getDesignConfig()->getStore()) { + $storeId = $this->getDesignConfig()->getStore(); } - Mage::app()->getLocale()->emulate($storeId); if (is_numeric($templateId)) { $this->load($templateId); @@ -371,8 +393,7 @@ public function sendTransactional($templateId, $sender, $email, $name, $vars=arr $this->setSenderEmail($sender['email']); } - $this->setSentSuccess( $this->send($email, $name, $vars) ); - Mage::app()->getLocale()->revert(); + $this->setSentSuccess($this->send($email, $name, $vars)); return $this; } @@ -386,7 +407,12 @@ public function delete() return $this; } - + /** + * Process email subject + * + * @param array $variables + * @return string + */ public function getProcessedTemplateSubject(array $variables) { $processor = $this->getTemplateFilter(); @@ -403,41 +429,64 @@ public function getProcessedTemplateSubject(array $variables) return $processedResult; } + /** + * Initialize design information for email template and subject processing + * + * @param array $config + * @return Mage_Core_Model_Email_Template + */ public function setDesignConfig(array $config) { - if(is_null($this->_designConfig)) { - $this->_designConfig = new Varien_Object(); - } $this->getDesignConfig()->setData($config); return $this; } + /** + * Get design configuration data + * + * @return Varien_Object + */ public function getDesignConfig() { + if(is_null($this->_designConfig)) { + $this->_designConfig = new Varien_Object(); + } return $this->_designConfig; } + /** + * Apply declared configuration for design + * + * @return Mage_Core_Model_Email_Template + */ protected function _applyDesignConfig() { if ($this->getDesignConfig()) { + $design = Mage::getDesign(); $this->getDesignConfig() - ->setOldArea(Mage::getDesign()->getArea()) - ->setOldStore(Mage::getDesign()->getStore()) - ->setOldThemeSkin(Mage::getDesign()->getTheme('skin')); + ->setOldArea($design->getArea()) + ->setOldStore($design->getStore()); if ($this->getDesignConfig()->getArea()) { Mage::getDesign()->setArea($this->getDesignConfig()->getArea()); } if ($this->getDesignConfig()->getStore()) { - Mage::getDesign()->setStore($this->getDesignConfig()->getStore()); - Mage::getDesign()->setTheme('skin', ''); + Mage::app()->getLocale()->emulate($this->getDesignConfig()->getStore()); + $design->setStore($this->getDesignConfig()->getStore()); + $design->setTheme(''); + $design->setPackageName(''); } } return $this; } + /** + * Revert design settings to previous + * + * @return Mage_Core_Model_Email_Template + */ protected function _cancelDesignConfig() { if ($this->getDesignConfig()) { @@ -447,9 +496,11 @@ protected function _cancelDesignConfig() if ($this->getDesignConfig()->getOldStore()) { Mage::getDesign()->setStore($this->getDesignConfig()->getOldStore()); - Mage::getDesign()->setTheme('skin', $this->getDesignConfig()->getOldThemeSkin()); + Mage::getDesign()->setTheme(''); + Mage::getDesign()->setPackageName(''); } } + Mage::app()->getLocale()->revert(); return $this; } @@ -465,4 +516,16 @@ public function addBcc($bcc) } return $this; } + + /** + * Set Return Path + * + * @param string $email + * @return Mage_Core_Model_Email_Template + */ + public function setReturnPath($email) + { + $this->getMail()->setReturnPath($email); + return $this; + } } \ No newline at end of file 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 5dcf4895..36c5c6b5 100644 --- a/app/code/core/Mage/Core/Model/Email/Template/Filter.php +++ b/app/code/core/Mage/Core/Model/Email/Template/Filter.php @@ -143,8 +143,15 @@ public function storeDirective($construction) } $params['_absolute'] = $this->_useAbsoluteLinks; - $path = $params['url']; - unset($params['url']); + if (isset($params['direct_url'])) { + $path = ''; + $params['_direct'] = $params['direct_url']; + unset($params['direct_url']); + } + else { + $path = $params['url']; + unset($params['url']); + } if (!self::$_urlInstance) { self::$_urlInstance = Mage::getModel('core/url')->setStore( diff --git a/app/code/core/Mage/Core/Model/Layout.php b/app/code/core/Mage/Core/Model/Layout.php index b1451def..e708a161 100644 --- a/app/code/core/Mage/Core/Model/Layout.php +++ b/app/code/core/Mage/Core/Model/Layout.php @@ -155,20 +155,20 @@ public function generateXml() $xml = $this->getUpdate()->asSimplexml(); $removeInstructions = $xml->xpath("//remove"); foreach ($removeInstructions as $infoNode) { - $attributes = $infoNode->attributes(); - if ($acl = (string)$attributes->acl && !Mage::getSingleton('admin/session')->isAllowed($acl)) { - $block->addAttribute('ignore', true); - } - if ($blockName = (string)$attributes->name) { + $attributes = $infoNode->attributes(); + if ($acl = (string)$attributes->acl && !Mage::getSingleton('admin/session')->isAllowed($acl)) { + $block->addAttribute('ignore', true); + } + if ($blockName = (string)$attributes->name) { $ignoreNodes = $xml->xpath("//block[@name='".$blockName."']"); foreach ($ignoreNodes as $block) { - $block->addAttribute('ignore', true); + $block->addAttribute('ignore', true); } $ignoreNodes = $xml->xpath("//reference[@name='".$blockName."']"); foreach ($ignoreNodes as $block) { - $block->addAttribute('ignore', true); + $block->addAttribute('ignore', true); } - } + } } $this->setXml($xml); @@ -312,6 +312,17 @@ protected function _generateAction($node, $parent) $arg = $arg->asArray(); unset($arg['@']); $args[$key] = call_user_func_array(array(Mage::helper($helperName), $helperMethod), $arg); + } else { + /** + * if there is no helper we hope that this is assoc array + */ + $arr = array(); + foreach($arg as $subkey => $value) { + $arr[(string)$subkey] = (string)$value; + } + if (!empty($arr)) { + $args[$key] = $arr; + } } } } @@ -324,7 +335,6 @@ protected function _generateAction($node, $parent) } $this->_translateLayoutNode($node, $args); - call_user_func_array(array($block, $method), $args); } @@ -456,7 +466,7 @@ protected function _getBlockInstance($block, array $attributes=array()) } return $block; } - + /** * Retrieve all blocks from registry as array diff --git a/app/code/core/Mage/Core/Model/Layout/Update.php b/app/code/core/Mage/Core/Model/Layout/Update.php index 32c4d872..3670f0fb 100644 --- a/app/code/core/Mage/Core/Model/Layout/Update.php +++ b/app/code/core/Mage/Core/Model/Layout/Update.php @@ -27,6 +27,11 @@ class Mage_Core_Model_Layout_Update { + /** + * Additional tag for cleaning layout cache convenience + */ + const LAYOUT_GENERAL_CACHE_TAG = 'LAYOUT_GENERAL_CACHE_TAG'; + /** * Layout Update Simplexml Element Class Name * @@ -188,7 +193,9 @@ public function saveCache() return false; } $str = $this->asString(); - return Mage::app()->saveCache($str, $this->getCacheId(), $this->getHandles(), null); + $tags = $this->getHandles(); + $tags[] = self::LAYOUT_GENERAL_CACHE_TAG; + return Mage::app()->saveCache($str, $this->getCacheId(), $tags, null); } /** diff --git a/app/code/core/Mage/Core/Model/Locale.php b/app/code/core/Mage/Core/Model/Locale.php index bba03f34..48e9de4c 100644 --- a/app/code/core/Mage/Core/Model/Locale.php +++ b/app/code/core/Mage/Core/Model/Locale.php @@ -222,6 +222,24 @@ public function getOptionTimezones() return $this->_sortOptionArray($options); } + /** + * Retrieve days of week option list + * + * @return array + */ + public function getOptionWeekdays() + { + $options= array(); + $days = $this->getLocale()->getTranslationList('days'); + foreach (array_values($days['format']['wide']) as $code => $name) { + $options[] = array( + 'label' => $name, + 'value' => $code, + ); + } + return $options; + } + /** * Retrieve country option list * @@ -376,14 +394,7 @@ public function getDateTimeFormat($type) */ public function getDateStrFormat($type) { - $convert = array('yyyy-MM-ddTHH:mm:ssZZZZ'=>'%c', 'EEEE'=>'%A', 'EEE'=>'%a','D'=>'%j', - 'MMMM'=>'%B', 'MMM'=>'%b', 'MM'=>'%m', 'M'=>'%m', 'dd'=>'%d', - 'd'=>'%e', 'yyyy'=>'%Y', 'yy'=>'%y'); - $format = $this->getDateFormat($type); - foreach ($convert as $key=>$value) { - $format = preg_replace('/(^|[^%])'.$key.'/', '$1'.$value, $format); - } - return $format; + return Varien_Date::convertZendToStrftime($this->getDateFormat($type), true, false); } /** @@ -394,13 +405,7 @@ public function getDateStrFormat($type) */ public function getTimeStrFormat($type) { - $convert = array('a'=>'%p', 'hh'=>'%I', 'h'=>'%I', 'HH'=>'%H', 'mm'=>'%M', 'ss'=>'%S', 'z'=>'%Z', 'v'=>'%Z'); - - $format = $this->getTimeFormat($type); - foreach ($convert as $key=>$value) { - $format = preg_replace('/(^|[^%])'.$key.'/', '$1'.$value, $format); - } - return $format; + return Varien_Date::convertZendToStrftime($this->getTimeFormat($type), false, true); } /** @@ -429,6 +434,28 @@ public function date($date=null, $part=null, $locale=null, $useTimezone=true) return $date; } + /** + * Create Zend_Date object with date converted to store timezone and store Locale + * + * @param mixed $store Information about store + * @param string|integer|Zend_Date|array|null $date date in UTC + * @param boolean $includeTime flag for including time to date + * @return Zend_Date + */ + public function storeDate($store=null, $date=null, $includeTime=false) + { + $timezone = Mage::app()->getStore($store)->getConfig(self::XML_PATH_DEFAULT_TIMEZONE); + $date = new Zend_Date($date, null, $this->getLocale()); + $date->setTimezone($timezone); + if (!$includeTime) { + $date->setHour(0) + ->setMinute(0) + ->setSecond(0); + } +// $date->getTimezone(); + return $date; + } + /** * Create Zend_Currency object for current locale * diff --git a/app/code/core/Mage/Core/Model/Locale/Currency.php b/app/code/core/Mage/Core/Model/Locale/Currency.php index 6e6b207e..d0fa2781 100644 --- a/app/code/core/Mage/Core/Model/Locale/Currency.php +++ b/app/code/core/Mage/Core/Model/Locale/Currency.php @@ -126,11 +126,17 @@ public function toCurrency($value, array $options = array()) if ($trimSettings) { $sign = trim($sign); } - //place the sign next to the number + // place the sign next to the number if ($options['position'] == self::RIGHT) { $value = $value . $sign; } else if ($options['position'] == self::LEFT) { - $value = $sign . $value; + // do not place sign before minus. And do not allow space between minus and sign + if (0 === strpos($value, '-', 0)) { + $value = '-' . ltrim($sign) . substr($value, 1); + } + else { + $value = $sign . $value; + } } return trim($value); } diff --git a/app/code/core/Mage/Core/Model/Mysql4/Abstract.php b/app/code/core/Mage/Core/Model/Mysql4/Abstract.php index b56ff1fc..20b3c111 100644 --- a/app/code/core/Mage/Core/Model/Mysql4/Abstract.php +++ b/app/code/core/Mage/Core/Model/Mysql4/Abstract.php @@ -321,7 +321,7 @@ public function load(Mage_Core_Model_Abstract $object, $value, $field=null) */ protected function _getLoadSelect($field, $value, $object) { - $select = $this->_getReadAdapter()->select() + $select = $this->_getReadAdapter()->select() ->from($this->getMainTable()) ->where($this->getMainTable().'.'.$field.'=?', $value); return $select; @@ -395,16 +395,20 @@ protected function _prepareDataForSave(Mage_Core_Model_Abstract $object) $data = array(); $fields = $this->_getWriteAdapter()->describeTable($this->getMainTable()); foreach (array_keys($fields) as $field) { - $fieldValue = $object->getData($field); - if ($fieldValue instanceof Zend_Db_Expr) { - $data[$field] = $fieldValue; + if ($object->hasData($field)) { + $fieldValue = $object->getData($field); + if ($fieldValue instanceof Zend_Db_Expr) { + $data[$field] = $fieldValue; + } + else { + if (null !== $fieldValue) { + $data[$field] = $this->_prepareValueForSave($fieldValue, $fields[$field]['DATA_TYPE']); + } + elseif (!empty($fields[$field]['NULLABLE'])) { + $data[$field] = null; + } + } } - elseif (!is_null($fieldValue)) { - $data[$field] = $this->_prepareValueForSave($fieldValue, $fields[$field]['DATA_TYPE']); - } - else { -// $data[$field] = $fieldValue; - } } return $data; } @@ -555,7 +559,7 @@ public function getChecksum($table) $data = $this->_getConnection('read')->fetchAll('checksum table '.$table); $checksum = 0; foreach ($data as $row) { - $checksum+= $row[self::CHECKSUM_KEY_NAME]; + $checksum+= $row[self::CHECKSUM_KEY_NAME]; } return $checksum; } diff --git a/app/code/core/Mage/Core/Model/Mysql4/Design.php b/app/code/core/Mage/Core/Model/Mysql4/Design.php index 75b638e5..e1f0dc5b 100644 --- a/app/code/core/Mage/Core/Model/Mysql4/Design.php +++ b/app/code/core/Mage/Core/Model/Mysql4/Design.php @@ -27,21 +27,24 @@ class Mage_Core_Model_Mysql4_Design extends Mage_Core_Model_Mysql4_Abstract { - protected function _construct() - { - $this->_init('core/design_change', 'design_change_id'); - } + protected function _construct() + { + $this->_init('core/design_change', 'design_change_id'); + } public function _beforeSave(Mage_Core_Model_Abstract $object) { - if ($object->getDateFrom()) { - $object->setDateFrom($this->formatDate($object->getDateFrom())); + $format = Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT); + if ($date = $object->getDateFrom()) { + $date = Mage::app()->getLocale()->date($date, $format, null, false); + $object->setDateFrom($date->toString(Varien_Date::DATETIME_INTERNAL_FORMAT)); } else { $object->setDateFrom(null); } - if ($object->getDateTo()) { - $object->setDateTo($this->formatDate($object->getDateTo())); + if ($date = $object->getDateTo()) { + $date = Mage::app()->getLocale()->date($date, $format, null, false); + $object->setDateTo($date->toString(Varien_Date::DATETIME_INTERNAL_FORMAT)); } else { $object->setDateTo(null); } diff --git a/app/code/core/Mage/Core/Model/Mysql4/Translate/String.php b/app/code/core/Mage/Core/Model/Mysql4/Translate/String.php index 2101e76e..3f036a7b 100644 --- a/app/code/core/Mage/Core/Model/Mysql4/Translate/String.php +++ b/app/code/core/Mage/Core/Model/Mysql4/Translate/String.php @@ -125,6 +125,38 @@ protected function _afterSave(Mage_Core_Model_Abstract $object) return parent::_afterSave($object); } + /** + * Delete translates + * + * @param string $string + * @param string $locale + * @param int|null $storeId + * + * @return Mage_Core_Model_Mysql4_Translate_String + */ + public function deleteTranslate($string, $locale = null, $storeId = null) + { + if (is_null($locale)) { + $locale = Mage::app()->getLocale()->getLocaleCode(); + } + + $where = array( + $this->_getWriteAdapter()->quoteInto('locale=?', $locale), + $this->_getWriteAdapter()->quoteInto('string=?', $string), + ); + + if ($storeId === false) { + $where[] = $this->_getWriteAdapter()->quoteInto('store_id>?', 0); + } + elseif (!is_null($storeId)) { + $where[] = $this->_getWriteAdapter()->quoteInto('store_id=?', $storeId); + } + + $this->_getWriteAdapter()->delete($this->getMainTable(), $where); + + return $this; + } + public function saveTranslate($string, $translate, $locale=null, $storeId=null) { $write = $this->_getWriteAdapter(); diff --git a/app/code/core/Mage/Core/Model/Resource/Abstract.php b/app/code/core/Mage/Core/Model/Resource/Abstract.php index c550b58b..0c94f358 100644 --- a/app/code/core/Mage/Core/Model/Resource/Abstract.php +++ b/app/code/core/Mage/Core/Model/Resource/Abstract.php @@ -86,14 +86,36 @@ public function rollBack() return $this; } - public function formatDate($date) + /** + * Format date to internal format + * + * @param string | Zend_Date $date + * @param bool $includeTime + * @return string + */ + public function formatDate($date, $includeTime=true) { + if ($date instanceof Zend_Date) { + if ($includeTime) { + return $date->toString(Varien_Date::DATETIME_INTERNAL_FORMAT); + } + else { + return $date->toString(Varien_Date::DATE_INTERNAL_FORMAT); + } + } + if (empty($date)) { return new Zend_Db_Expr('NULL'); } + if (!is_numeric($date)) { $date = strtotime($date); } - return date('Y-m-d H:i:s', $date); + if ($includeTime) { + return date('Y-m-d H:i:s', $date); + } + else { + return date('Y-m-d', $date); + } } } diff --git a/app/code/core/Mage/Core/Model/Resource/Setup.php b/app/code/core/Mage/Core/Model/Resource/Setup.php index 76bae22d..0329d93f 100644 --- a/app/code/core/Mage/Core/Model/Resource/Setup.php +++ b/app/code/core/Mage/Core/Model/Resource/Setup.php @@ -43,7 +43,7 @@ class Mage_Core_Model_Resource_Setup /** * Setup Connection * - * @var Zend_Db_Adapter_Abstract + * @var Varien_Db_Adapter_Pdo_Mysql */ protected $_conn; protected $_tables = array(); diff --git a/app/code/core/Mage/Core/Model/Session/Abstract.php b/app/code/core/Mage/Core/Model/Session/Abstract.php index e3ce3f9c..5a72c965 100644 --- a/app/code/core/Mage/Core/Model/Session/Abstract.php +++ b/app/code/core/Mage/Core/Model/Session/Abstract.php @@ -32,41 +32,36 @@ class Mage_Core_Model_Session_Abstract extends Mage_Core_Model_Session_Abstract_ const XML_PATH_COOKIE_LIFETIME = 'web/cookie/cookie_lifetime'; const XML_NODE_SESSION_SAVE = 'global/session_save'; + const XML_PATH_USE_REMOTE_ADDR = 'web/session/use_remote_addr'; + const XML_PATH_USE_HTTP_VIA = 'web/session/use_http_via'; + const XML_PATH_USE_X_FORWARDED = 'web/session/use_http_x_forwarded_for'; + const XML_PATH_USE_USER_AGENT = 'web/session/use_http_user_agent'; + + const XML_NODE_USET_AGENT_SKIP = 'global/session/validation/http_user_agent_skip'; + const SESSION_ID_QUERY_PARAM = 'SID'; protected static $_urlHostCache = array(); protected static $_encryptedSessionId; + protected $_skipSessionIdFlag = false; + public function init($namespace, $sessionName=null) { parent::init($namespace, $sessionName); - if (isset($_SERVER['HTTP_HOST'])) { - $hostArr = explode(':', $_SERVER['HTTP_HOST']); - $this->addHost($hostArr[0]); - } + $this->addHost(true); return $this; } public function getCookieDomain() { return Mage::getSingleton('core/cookie')->getCookieDomain(); - $domain = Mage::getStoreConfig(self::XML_PATH_COOKIE_DOMAIN); - if (empty($domain) && isset($_SERVER['HTTP_HOST'])) { - $domainArr = explode(':', $_SERVER['HTTP_HOST']); - $domain = $domainArr[0]; - } - return $domain; } public function getCookiePath() { return Mage::getSingleton('core/cookie')->getCookiePath(); - $path = Mage::getStoreConfig(self::XML_PATH_COOKIE_PATH); - if (empty($path)) { - $path = '/'; - } - return $path; } public function getCookieLifetime() @@ -75,6 +70,76 @@ public function getCookieLifetime() return $lifetime; } +/** + * Use REMOTE_ADDR in validator key + * + * @return bool + */ + public function useValidateRemoteAddr() + { + $use = Mage::getStoreConfig(self::XML_PATH_USE_REMOTE_ADDR); + if (is_null($use)) { + return parent::useValidateRemoteAddr(); + } + return (bool)$use; + } + + /** + * Use HTTP_VIA in validator key + * + * @return bool + */ + public function useValidateHttpVia() + { + $use = Mage::getStoreConfig(self::XML_PATH_USE_HTTP_VIA); + if (is_null($use)) { + return parent::useValidateHttpVia(); + } + return (bool)$use; + } + + /** + * Use HTTP_X_FORWARDED_FOR in validator key + * + * @return bool + */ + public function useValidateHttpXForwardedFor() + { + $use = Mage::getStoreConfig(self::XML_PATH_USE_X_FORWARDED); + if (is_null($use)) { + return parent::useValidateHttpXForwardedFor(); + } + return (bool)$use; + } + + /** + * Use HTTP_USER_AGENT in validator key + * + * @return bool + */ + public function useValidateHttpUserAgent() + { + $use = Mage::getStoreConfig(self::XML_PATH_USE_USER_AGENT); + if (is_null($use)) { + return parent::useValidateHttpUserAgent(); + } + return (bool)$use; + } + + /** + * Retrieve skip User Agent validation strings (Flash etc) + * + * @return array + */ + public function getValidateHttpUserAgentSkip() + { + $userAgents = array(); + $skip = Mage::getConfig()->getNode(self::XML_NODE_USET_AGENT_SKIP); + foreach ($skip->children() as $userAgent) { + $userAgents[] = (string)$userAgent; + } + return $userAgents; + } /** * Retrieve messages from session @@ -194,9 +259,8 @@ public function setSessionId($id=null) } } } - if (isset($_SERVER['HTTP_HOST'])) { - $this->addHost($_SERVER['HTTP_HOST']); - } + + $this->addHost(true); parent::setSessionId($id); } @@ -217,6 +281,28 @@ public function getSessionIdQueryParam() return self::SESSION_ID_QUERY_PARAM; } + /** + * Set skip flag if need skip generating of _GET session_id_key param + * + * @param bool $flag + * @return Mage_Core_Model_Session_Abstract + */ + public function setSkipSessionIdFlag($flag) + { + $this->_skipSessionIdFlag = $flag; + return $this; + } + + /** + * Retrieve session id skip flag + * + * @return bool + */ + public function getSkipSessionIdFlag() + { + return $this->_skipSessionIdFlag; + } + /** * If the host was switched but session cookie won't recognize it - add session id to query * @@ -225,7 +311,11 @@ public function getSessionIdQueryParam() */ public function getSessionIdForHost($urlHost) { - if (empty($_SERVER['HTTP_HOST'])) { + if ($this->getSkipSessionIdFlag() === true) { + return ''; + } + + if (!$httpHost = Mage::app()->getFrontController()->getRequest()->getHttpHost()) { return ''; } @@ -238,8 +328,7 @@ public function getSessionIdForHost($urlHost) $urlHostArr = explode(':', $urlHost); $urlHost = $urlHostArr[0]; - $curHostArr = explode(':', $_SERVER['HTTP_HOST']); - if ($curHostArr[0]!==$urlHost && !$this->isValidForHost($urlHost)) { + if ($httpHost !== $urlHost && !$this->isValidForHost($urlHost)) { $sessionId = $this->getEncryptedSessionId(); } else { $sessionId = ''; @@ -258,9 +347,18 @@ public function isValidForHost($host) public function addHost($host) { - $hostArr = explode(':', $host); + if ($host === true) { + if (!$host = Mage::app()->getFrontController()->getRequest()->getHttpHost()) { + return $this; + } + } + + if (!$host) { + return $this; + } + $hosts = $this->getSessionHosts(); - $hosts[$hostArr[0]] = true; + $hosts[$host] = true; $this->setSessionHosts($hosts); return $this; } diff --git a/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php b/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php index f626b274..36d90c51 100644 --- a/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php +++ b/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php @@ -27,6 +27,12 @@ class Mage_Core_Model_Session_Abstract_Varien extends Varien_Object { + const VALIDATOR_KEY = '_session_validator_data'; + const VALIDATOR_HTTP_USER_AGENT_KEY = 'http_user_agent'; + const VALIDATOR_HTTP_X_FORVARDED_FOR_KEY = 'http_x_forwarded_for'; + const VALIDATOR_HTTP_VIA_KEY = 'http_via'; + const VALIDATOR_REMOTE_ADDR_KEY = 'remote_addr'; + public function start($sessionName=null) { if (isset($_SESSION)) { @@ -76,6 +82,10 @@ public function start($sessionName=null) Varien_Profiler::start(__METHOD__.'/start'); + if ($sessionCacheLimiter = Mage::getConfig()->getNode('global/session_cache_limiter')) { + session_cache_limiter((string)$sessionCacheLimiter); + } + session_start(); Varien_Profiler::stop(__METHOD__.'/start'); @@ -85,12 +95,12 @@ public function start($sessionName=null) public function revalidateCookie() { - if (empty($_SESSION['_cookie_revalidate'])) { + if (empty($this->_data['_cookie_revalidate'])) { $time = time() + round(ini_get('session.gc_maxlifetime') / 4); - $_SESSION['_cookie_revalidate'] = $time; + $this->_data['_cookie_revalidate'] = $time; } else { - if ($_SESSION['_cookie_revalidate'] < time()) { + if ($this->_data['_cookie_revalidate'] < time()) { setcookie( session_name(), session_id(), @@ -100,7 +110,7 @@ public function revalidateCookie() ); $time = time() + round(ini_get('session.gc_maxlifetime') / 4); - $_SESSION['_cookie_revalidate'] = $time; + $this->_data['_cookie_revalidate'] = $time; } } } @@ -109,13 +119,16 @@ public function init($namespace, $sessionName=null) { if (!isset($_SESSION)) { $this->start($sessionName); - $this->revalidateCookie($namespace); } if (!isset($_SESSION[$namespace])) { $_SESSION[$namespace] = array(); } + $this->_data = &$_SESSION[$namespace]; + $this->validate(); + $this->revalidateCookie(); + return $this; } @@ -162,4 +175,144 @@ public function getSessionSaveMethod() { return 'files'; } + + /** + * Use REMOTE_ADDR in validator key + * + * @return bool + */ + public function useValidateRemoteAddr() + { + return true; + } + + /** + * Use HTTP_VIA in validator key + * + * @return bool + */ + public function useValidateHttpVia() + { + return true; + } + + /** + * Use HTTP_X_FORWARDED_FOR in validator key + * + * @return bool + */ + public function useValidateHttpXForwardedFor() + { + return true; + } + + /** + * Use HTTP_USER_AGENT in validator key + * + * @return bool + */ + public function useValidateHttpUserAgent() + { + return true; + } + + /** + * Retrieve skip User Agent validation strings (Flash etc) + * + * @return array + */ + public function getValidateHttpUserAgentSkip() + { + return array(); + } + + /** + * Validate session + * + * @param string $namespace + * @return Mage_Core_Model_Session_Abstract_Varien + */ + public function validate() + { + if (!isset($this->_data[self::VALIDATOR_KEY])) { + $this->_data[self::VALIDATOR_KEY] = $this->getValidatorData(); + } + else { + if (!$this->_validate()) { + // remove session cookie + setcookie( + session_name(), + null, + null, + ini_get('session.cookie_path'), + ini_get('session.cookie_domain') + ); + // throw core session exception + throw new Mage_Core_Model_Session_Exception(''); + } + } + + return $this; + } + + /** + * Validate data + * + * @return bool + */ + protected function _validate() + { + $sessionData = $this->_data[self::VALIDATOR_KEY]; + $validatorData = $this->getValidatorData(); + + if ($this->useValidateRemoteAddr() && $sessionData[self::VALIDATOR_REMOTE_ADDR_KEY] != $validatorData[self::VALIDATOR_REMOTE_ADDR_KEY]) { + return false; + } + if ($this->useValidateHttpVia() && $sessionData[self::VALIDATOR_HTTP_VIA_KEY] != $validatorData[self::VALIDATOR_HTTP_VIA_KEY]) { + return false; + } + if ($this->useValidateHttpXForwardedFor() && $sessionData[self::VALIDATOR_HTTP_X_FORVARDED_FOR_KEY] != $validatorData[self::VALIDATOR_HTTP_X_FORVARDED_FOR_KEY]) { + return false; + } + if ($this->useValidateHttpUserAgent() + && $sessionData[self::VALIDATOR_HTTP_USER_AGENT_KEY] != $validatorData[self::VALIDATOR_HTTP_USER_AGENT_KEY] + && !in_array($validatorData[self::VALIDATOR_HTTP_USER_AGENT_KEY], $this->getValidateHttpUserAgentSkip())) { + return false; + } + + return true; + } + + /** + * Retrieve unique user data for validator + * + * @return array + */ + public function getValidatorData() + { + $parts = array( + self::VALIDATOR_REMOTE_ADDR_KEY => '', + self::VALIDATOR_HTTP_VIA_KEY => '', + self::VALIDATOR_HTTP_X_FORVARDED_FOR_KEY => '', + self::VALIDATOR_HTTP_USER_AGENT_KEY => '' + ); + + // collect ip data + if (isset($_SERVER['REMOTE_ADDR'])) { + $parts[self::VALIDATOR_REMOTE_ADDR_KEY] = (string)$_SERVER['REMOTE_ADDR']; + } + if (isset($_ENV['HTTP_VIA'])) { + $parts[self::VALIDATOR_HTTP_VIA_KEY] = (string)$_ENV['HTTP_VIA']; + } + if (isset($_ENV['HTTP_X_FORWARDED_FOR'])) { + $parts[self::VALIDATOR_HTTP_X_FORVARDED_FOR_KEY] = (string)$_ENV['HTTP_X_FORWARDED_FOR']; + } + + // collect user agent data + if (isset($_SERVER['HTTP_USER_AGENT'])) { + $parts[self::VALIDATOR_HTTP_USER_AGENT_KEY] = (string)$_SERVER['HTTP_USER_AGENT']; + } + + return $parts; + } } \ No newline at end of file diff --git a/app/code/core/Mage/Core/Model/Session/Exception.php b/app/code/core/Mage/Core/Model/Session/Exception.php new file mode 100644 index 00000000..a5e3bb01 --- /dev/null +++ b/app/code/core/Mage/Core/Model/Session/Exception.php @@ -0,0 +1,38 @@ + + */ +class Mage_Core_Model_Session_Exception extends Mage_Core_Exception +{} diff --git a/app/code/core/Mage/Core/Model/Store.php b/app/code/core/Mage/Core/Model/Store.php index 6a2a4e30..5cad0b12 100644 --- a/app/code/core/Mage/Core/Model/Store.php +++ b/app/code/core/Mage/Core/Model/Store.php @@ -753,7 +753,7 @@ protected function _beforeDelete() $this->_protectFromNonAdmin(); return parent::_beforeDelete(); } - + /** * rewrite in order to clear configuration cache * @@ -761,8 +761,24 @@ protected function _beforeDelete() */ protected function _afterDelte() { - parent::_afterDelte(); - Mage::getConfig()->removeCache(); - return $this; + parent::_afterDelte(); + Mage::getConfig()->removeCache(); + return $this; + } + + /** + * Reinit and reset Config Data + * + * @return Mage_Core_Model_Store + */ + public function resetConfig() + { + Mage::getConfig()->reinit(); + $this->_dirCache = array(); + $this->_configCache = array(); + $this->_baseUrlCache = array(); + $this->_urlCache = array(); + + return $this; } } diff --git a/app/code/core/Mage/Core/Model/Store/Exception.php b/app/code/core/Mage/Core/Model/Store/Exception.php index 40e406e6..3e4df90d 100644 --- a/app/code/core/Mage/Core/Model/Store/Exception.php +++ b/app/code/core/Mage/Core/Model/Store/Exception.php @@ -33,4 +33,4 @@ * @author Magento Core Team */ class Mage_Core_Model_Store_Exception extends Mage_Core_Exception -{} \ No newline at end of file +{} diff --git a/app/code/core/Mage/Core/Model/Translate/Inline.php b/app/code/core/Mage/Core/Model/Translate/Inline.php index 967d2391..c3e2663b 100644 --- a/app/code/core/Mage/Core/Model/Translate/Inline.php +++ b/app/code/core/Mage/Core/Model/Translate/Inline.php @@ -64,8 +64,20 @@ public function processAjaxPost($translate) } $resource = Mage::getResourceModel('core/translate_string'); + /* @var $resource Mage_Core_Model_Mysql4_Translate_String */ foreach ($translate as $t) { - $resource->saveTranslate($t['original'], $t['custom'], null, Mage::getDesign()->getArea() == 'adminhtml' ? 0 : null); + if (Mage::getDesign()->getArea() == 'adminhtml') { + $storeId = 0; + } + elseif (empty($t['perstore'])) { + $resource->deleteTranslate($t['original'], null, false); + $storeId = 0; + } + else { + $storeId = Mage::app()->getStore()->getId(); + } + + $resource->saveTranslate($t['original'], $t['custom'], null, $storeId); } } diff --git a/app/code/core/Mage/Core/Model/Url.php b/app/code/core/Mage/Core/Model/Url.php index 51041561..8150a809 100644 --- a/app/code/core/Mage/Core/Model/Url.php +++ b/app/code/core/Mage/Core/Model/Url.php @@ -84,10 +84,22 @@ class Mage_Core_Model_Url extends Varien_Object const XML_PATH_UNSECURE_URL = 'web/unsecure/base_url'; const XML_PATH_SECURE_URL = 'web/secure/base_url'; + const XML_PATH_SECURE_IN_ADMIN = 'web/secure/use_in_adminhtml'; + const XML_PATH_SECURE_IN_FRONT = 'web/secure/use_in_frontend'; + static protected $_configDataCache; - static protected $_baseUrlCache; static protected $_encryptedSessionId; + /** + * Reserved Route parametr keys + * + * @var unknown_type + */ + protected $_reservedRouteParams = array( + '_store', '_type', '_secure', '_forced_secure', '_use_rewrite', + '_absolute', '_current', '_direct', '_fragment', '_escape', '_query' + ); + /** * Controller request object * @@ -202,24 +214,33 @@ public function getType() return $this->_getData('type'); } + /** + * Retrieve is secure mode URL + * + * @return bool + */ public function getSecure() { - if ($this->hasSecureIsForced()) { - return $this->_getData('secure'); + if ($this->hasData('secure_is_forced')) { + return $this->getData('secure'); } - if (!Mage::getStoreConfigFlag('web/secure/use_in_frontend')) { + if ($this->getStore()->isAdmin() && !Mage::getStoreConfigFlag(self::XML_PATH_SECURE_IN_ADMIN, $this->getStore()->getId())) { + return false; + } + if (!$this->getStore()->isAdmin() && !Mage::getStoreConfigFlag(self::XML_PATH_SECURE_IN_FRONT)) { return false; } + if (!$this->hasData('secure')) { - if ($this->getType()===Mage_Core_Model_Store::URL_TYPE_LINK) { + if ($this->getType() == Mage_Core_Model_Store::URL_TYPE_LINK) { $pathSecure = Mage::getConfig()->shouldUrlBeSecure('/'.$this->getActionPath()); $this->setData('secure', $pathSecure); } else { $this->setData('secure', Mage::app()->getStore()->isCurrentlySecure()); } } - return $this->_getData('secure'); + return $this->getData('secure'); } public function setStore($data) @@ -241,7 +262,13 @@ public function getStore() return $this->_getData('store'); } - public function getBaseUrl($params=array()) + /** + * Retrieve Base URL + * + * @param array $params + * @return string + */ + public function getBaseUrl($params = array()) { if (isset($params['_store'])) { $this->setStore($params['_store']); @@ -256,6 +283,12 @@ public function getBaseUrl($params=array()) return $this->getStore()->getBaseUrl($this->getType(), $this->getSecure()); } + /** + * Set Route Parameters + * + * @param array $data + * @return Mage_Core_Model_Url + */ public function setRoutePath($data) { if ($this->_getData('route_path')==$data) { @@ -333,7 +366,7 @@ public function getActionPath() public function getRoutePath($routeParams=array()) { if (!$this->hasData('route_path')) { - $routePath = $this->getRequest()->getAlias(Mage_Core_Model_Url_Rewrite::REWRITE_REQUEST_PATH_ALIAS); + $routePath = $this->getRequest()->getAlias(Mage_Core_Model_Url_Rewrite::REWRITE_REQUEST_PATH_ALIAS); if (!empty($routeParams['_use_rewrite']) && ($routePath !== null)) { $this->setData('route_path', $routePath); @@ -387,6 +420,13 @@ public function getRouteName() return $this->_getData('route_name'); } + /** + * Set Controller Name + * Reset action name and route path if has change + * + * @param string $data + * @return Mage_Core_Model_Url + */ public function setControllerName($data) { if ($this->_getData('controller_name')==$data) { @@ -401,9 +441,16 @@ public function getControllerName() return $this->_getData('controller_name'); } + /** + * Set Action name + * Reseted route path if action name has change + * + * @param string $data + * @return Mage_Core_Model_Url + */ public function setActionName($data) { - if ($this->_getData('action_name')==$data) { + if ($this->_getData('action_name') == $data) { return $this; } $this->unsetData('route_path'); @@ -466,7 +513,7 @@ public function setRouteParams(array $data, $unsetOldParams=true) } if (isset($data['_use_rewrite'])) { - unset($data['_use_rewrite']); + unset($data['_use_rewrite']); } foreach ($data as $k=>$v) { @@ -501,6 +548,10 @@ public function getRouteUrl($routePath=null, $routeParams=null) { $this->unsetData('route_params'); + if (isset($routeParams['_direct'])) { + return $this->getBaseUrl().$routeParams['_direct']; + } + if (!is_null($routePath)) { $this->setRoutePath($routePath); } @@ -557,10 +608,15 @@ public function addSessionParam() return $this; } - + /** + * Set URL query param(s) + * + * @param mixed $data + * @return Mage_Core_Model_Url + */ public function setQuery($data) { - if ($this->_getData('query')==$data) { + if ($this->_getData('query') == $data) { return $this; } $this->unsetData('query_params'); @@ -584,11 +640,11 @@ public function setQueryParams(array $data, $useCurrent = false) $this->unsetData('query'); if ($useCurrent) { $params = $this->_getData('query_params'); - foreach ($data as $param => $value) { - $params[$param] = $value; - } - $this->setData('query_params', $params); - return $this; + foreach ($data as $param => $value) { + $params[$param] = $value; + } + $this->setData('query_params', $params); + return $this; } if ($this->_getData('query_params')==$data) { @@ -631,6 +687,12 @@ public function getQueryParam($key) return $this->_getData('query_params', $key); } + /** + * Set fragment to URL + * + * @param string $data + * @return Mage_Core_Model_Url + */ public function setFragment($data) { return $this->setData('fragment', $data); @@ -652,6 +714,11 @@ public function getUrl($routePath=null, $routeParams=null) { $escapeQuery = false; + /** + * All system params should be unseted before we call getRouteUrl + * this method has condition for ading default controller anr actions names + * in case when we have params + */ if (isset($routeParams['_fragment'])) { $this->setFragment($routeParams['_fragment']); unset($routeParams['_fragment']); @@ -662,27 +729,29 @@ public function getUrl($routePath=null, $routeParams=null) unset($routeParams['_escape']); } + $query = null; + if (isset($routeParams['_query'])) { + $query = $routeParams['_query']; + unset($routeParams['_query']); + } + $url = $this->getRouteUrl($routePath, $routeParams); /** * Apply query params, need call after getRouteUrl for rewrite _current values */ - if (isset($routeParams['_query'])) { - if (is_string($routeParams['_query'])) { - $this->setQuery($routeParams['_query']); - } elseif (is_array($routeParams['_query'])) { - $this->setQueryParams($routeParams['_query'], !empty($routeParams['_current'])); + if ($query !== null) { + if (is_string($query)) { + $this->setQuery($query); + } elseif (is_array($query)) { + $this->setQueryParams($query, !empty($routeParams['_current'])); } - if ($routeParams['_query'] === false) { - $this->setQueryParams(array()); + if ($query === false) { + $this->setQueryParams(array()); } - unset($routeParams['_query']); } - $session = Mage::getSingleton('core/session'); - if ($sessionId = $session->getSessionIdForHost($url)) { - $this->setQueryParam($session->getSessionIdQueryParam(), $sessionId); - } + $this->_prepareSessionUrl($url); if ($query = $this->getQuery($escapeQuery)) { $url .= '?'.$query; @@ -694,6 +763,39 @@ public function getUrl($routePath=null, $routeParams=null) return $this->escape($url); } + /** + * Check and add session id to URL + * + * @param string $url + * @return Mage_Core_Model_Url + */ + protected function _prepareSessionUrl($url) + { + $session = Mage::getSingleton('core/session'); + /* @var $session Mage_Core_Model_Session */ + if (Mage::app()->getUseSessionVar()) { + // secure URL + if ($this->getSecure()) { + $this->setQueryParam('___SID', 'S'); + } + else { + $this->setQueryParam('___SID', 'U'); + } + } + else { + if ($sessionId = $session->getSessionIdForHost($url)) { + $this->setQueryParam($session->getSessionIdQueryParam(), $sessionId); + } + } + return $this; + } + + /** + * Escape (enclosure) URL string + * + * @param string $value + * @return string + */ public function escape($value) { $value = str_replace('"', '%22', $value); @@ -702,4 +804,83 @@ public function escape($value) $value = str_replace('<', '%3C', $value); return $value; } + + /** + * Build url by direct url and parameters + * + * @param string $url + * @param array $params + * @return string + */ + public function getDirectUrl($url, $params = array()) { + $params['_direct'] = $url; + return $this->getUrl('', $params); + } + + /** + * Replace Session ID value in URL + * + * @param string $html + * @return string + */ + public function sessionUrlVar($html) + { + return preg_replace_callback('#(\?|&|&)___SID=([SU])(&|&)?#', array($this, "sessionVarCallback"), $html); + } + + /** + * Check and return use SID for URL + * + * @param bool $secure + * @return bool + */ + public function useSessionIdForUrl($secure = false) + { + $key = 'use_session_id_for_url_' . (int)$secure; + if (is_null($this->getData($key))) { + $httpHost = Mage::app()->getFrontController()->getRequest()->getHttpHost(); + $urlHost = parse_url(Mage::app()->getStore()->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK, $secure), PHP_URL_HOST); + + if ($httpHost != $urlHost) { + $this->setData($key, true); + } + else { + $this->setData($key, false); + } + } + return $this->getData($key); + } + + /** + * Callback function for session replace + * + * @param array $match + * @return string + */ + public function sessionVarCallback($match) + { + if ($this->useSessionIdForUrl($match[2] == 'S' ? true : false)) { + $session = Mage::getSingleton('core/session'); + /* @var $session Mage_Core_Model_Session */ + return $match[1] + . $session->getSessionIdQueryParam() + . '=' . $session->getEncryptedSessionId() + . (isset($match[3]) ? $match[3] : ''); + } + else { + if ($match[1] == '?' && isset($match[3])) { + return '?'; + } + elseif ($match[1] == '?' && !isset($match[3])) { + return ''; + } + elseif (($match[1] == '&' || $match[1] == '&') && !isset($match[3])) { + return ''; + } + elseif (($match[1] == '&' || $match[1] == '&') && isset($match[3])) { + return $match[3]; + } + } + return ''; + } } \ No newline at end of file diff --git a/app/code/core/Mage/Core/Model/Website.php b/app/code/core/Mage/Core/Model/Website.php index 706e41be..79ab5384 100644 --- a/app/code/core/Mage/Core/Model/Website.php +++ b/app/code/core/Mage/Core/Model/Website.php @@ -414,7 +414,8 @@ public function isCanDelete() return false; } if (is_null($this->_isCanDelete)) { - $this->_isCanDelete = (Mage::getModel('core/website')->getCollection()->getSize() > 2); + $this->_isCanDelete = (Mage::getModel('core/website')->getCollection()->getSize() > 2) + && !$this->getIsDefault(); } return $this->_isCanDelete; } @@ -444,16 +445,16 @@ protected function _beforeDelete() $this->_protectFromNonAdmin(); return parent::_beforeDelete(); } - + /** * rewrite in order to clear configuration cache * * @return Mage_Core_Model_Website */ - protected function _afterDelte() + protected function _afterDelete() { - parent::_afterDelte(); - Mage::getConfig()->removeCache(); - return $this; + parent::_afterDelete(); + Mage::getConfig()->removeCache(); + return $this; } } diff --git a/app/code/core/Mage/Core/controllers/AjaxController.php b/app/code/core/Mage/Core/controllers/AjaxController.php index effac0ef..0ea0d174 100644 --- a/app/code/core/Mage/Core/controllers/AjaxController.php +++ b/app/code/core/Mage/Core/controllers/AjaxController.php @@ -1,4 +1,4 @@ -getRequest()->getPost('translate')) { - try { - if ($area = $this->getRequest()->getPost('area')) { - Mage::getDesign()->setArea($area); - } - Mage::getModel('core/translate_inline')->processAjaxPost($translate); - echo "{success:true}"; - } catch (Exception $e) { - echo "{error:true,message:'".$e->getMessage()."'}"; - } - } - exit; - } + */ +class Mage_Core_AjaxController extends Mage_Core_Controller_Front_Action +{ + public function translateAction () + { + if ($translate = $this->getRequest()->getPost('translate')) { + try { + if ($area = $this->getRequest()->getPost('area')) { + Mage::getDesign()->setArea($area); + } + Mage::getModel('core/translate_inline')->processAjaxPost($translate); + echo "{success:true}"; + } + catch (Exception $e) { + echo "{error:true,message:'" . $e->getMessage() . "'}"; + } + } + exit(); + } } diff --git a/app/code/core/Mage/Core/etc/config.xml b/app/code/core/Mage/Core/etc/config.xml index fc8dd7c1..a5904a7c 100644 --- a/app/code/core/Mage/Core/etc/config.xml +++ b/app/code/core/Mage/Core/etc/config.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,13 +22,13 @@ * @category Mage * @package Mage_Core * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - 0.8.11 + 0.8.12 @@ -72,6 +72,14 @@ + + + + Shockwave Flash + Adobe Flash Player 10 + + +
@@ -144,7 +152,6 @@ - 0 @@ -215,6 +222,13 @@ 3600 + + + 1 + 1 + 1 + 1 + @@ -226,6 +240,13 @@ + + + + 0 + 0,6 + + diff --git a/app/code/core/Mage/Core/etc/system.xml b/app/code/core/Mage/Core/etc/system.xml index 31470c8f..299278c8 100644 --- a/app/code/core/Mage/Core/etc/system.xml +++ b/app/code/core/Mage/Core/etc/system.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Core * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> @@ -481,22 +481,22 @@ 1 - + text 2 1 1 1 - located in {{base_dir}}/var/log + Logging from Mage::log(). File is located in {{base_dir}}/var/log - + text 3 1 1 1 - located in {{base_dir}}/var/log + Logging from Mage::logException(). File is located in {{base_dir}}/var/log @@ -546,6 +546,7 @@ 1 1 1 + 1 @@ -575,24 +576,42 @@ 1 1 + + + select + adminhtml/system_config_source_locale_timezone + 1 + 1 + 1 + 0 + select adminhtml/system_config_source_locale - 1 + 5 1 1 1 - - + + select - adminhtml/system_config_source_locale_timezone - 1 + adminhtml/system_config_source_locale_weekdays + 10 1 1 1 - + + + + multiselect + adminhtml/system_config_source_locale_weekdays + 15 + 1 + 1 + 1 + @@ -745,7 +764,7 @@ 0 0 - + text adminhtml/system_config_backend_admin_custom @@ -870,7 +889,7 @@ 1 1 - + text adminhtml/system_config_backend_baseurl @@ -880,7 +899,7 @@ 1 Please make sure that Base URL ends with '/' (slash), e.g. http://yourdomain/magento/ - + text adminhtml/system_config_backend_baseurl @@ -1005,6 +1024,52 @@ + + + text + 60 + 1 + 0 + 0 + + + + select + adminhtml/system_config_source_yesno + 1 + 1 + 0 + 0 + + + + select + adminhtml/system_config_source_yesno + 20 + 1 + 0 + 0 + + + + select + adminhtml/system_config_source_yesno + 30 + 1 + 0 + 0 + + + + select + adminhtml/system_config_source_yesno + 40 + 1 + 0 + 0 + + + diff --git a/app/code/core/Mage/Core/sql/core_setup/mysql4-upgrade-0.8.11-0.8.12.php b/app/code/core/Mage/Core/sql/core_setup/mysql4-upgrade-0.8.11-0.8.12.php new file mode 100644 index 00000000..0f98d3bf --- /dev/null +++ b/app/code/core/Mage/Core/sql/core_setup/mysql4-upgrade-0.8.11-0.8.12.php @@ -0,0 +1,40 @@ +startSetup(); + +$installer->getConnection()->changeColumn( + $this->getTable('core_store'), 'name', 'name', 'varchar(255) not null' +); +$installer->getConnection()->changeColumn( + $this->getTable('core_store_group'), 'name', 'name', 'varchar(255) not null' +); + +$installer->endSetup(); \ No newline at end of file diff --git a/app/code/core/Mage/Cron/Model/Observer.php b/app/code/core/Mage/Cron/Model/Observer.php index a54e4833..1d8c2cc7 100644 --- a/app/code/core/Mage/Cron/Model/Observer.php +++ b/app/code/core/Mage/Cron/Model/Observer.php @@ -18,49 +18,55 @@ * 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) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @category Mage + * @package Mage_Cron + * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ /** * Crontab observer * - * @category Mage - * @package Mage_Cron + * @category Mage + * @package Mage_Cron * @author Magento Core Team */ class Mage_Cron_Model_Observer { - const CACHE_KEY_LAST_SCHEDULE_GENERATE_AT = 'cron_last_schedule_generate_at'; + const CACHE_KEY_LAST_SCHEDULE_GENERATE_AT = 'cron_last_schedule_generate_at'; + const CACHE_KEY_LAST_HISTORY_CLEANUP_AT = 'cron_last_history_cleanup_at'; - const XML_PATH_SCHEDULE_GENERATE_EVERY = 'system/cron/schedule_generate_freq'; - const XML_PATH_SCHEDULE_AHEAD_FOR = 'system/cron/schedule_ahead_for'; - const XML_PATH_SCHEDULE_LIFETIME = 'system/cron/schedule_lifetime'; - - const CACHE_KEY_LAST_HISTORY_CLEANUP_AT = 'cron_last_history_cleanup_at'; - - const XML_PATH_HISTORY_CLEANUP_EVERY = 'system/cron/history_cleanup_every'; - const XML_PATH_HISTORY_SUCCESS = 'system/cron/history_success_lifetime'; - const XML_PATH_HISTORY_FAILURE = 'system/cron/history_failure_lifetime'; + const XML_PATH_SCHEDULE_GENERATE_EVERY = 'system/cron/schedule_generate_freq'; + const XML_PATH_SCHEDULE_AHEAD_FOR = 'system/cron/schedule_ahead_for'; + const XML_PATH_SCHEDULE_LIFETIME = 'system/cron/schedule_lifetime'; + const XML_PATH_HISTORY_CLEANUP_EVERY = 'system/cron/history_cleanup_every'; + const XML_PATH_HISTORY_SUCCESS = 'system/cron/history_success_lifetime'; + const XML_PATH_HISTORY_FAILURE = 'system/cron/history_failure_lifetime'; const REGEX_RUN_MODEL = '#^([a-z0-9_]+/[a-z0-9_]+)::([a-z0-9_]+)$#i'; protected $_pendingSchedules; + /** + * Process cron queue + * Geterate tasks schedule + * Cleanup tasks schedule + * + * @param Varien_Event_Observer $observer + */ public function dispatch($observer) { $schedules = $this->getPendingSchedules(); $scheduleLifetime = Mage::getStoreConfig(self::XML_PATH_SCHEDULE_LIFETIME) * 60; - $now = time(); $jobsRoot = Mage::getConfig()->getNode('crontab/jobs'); + foreach ($schedules->getIterator() as $schedule) { $jobConfig = $jobsRoot->{$schedule->getJobCode()}; if (!$jobConfig || !$jobConfig->run) { continue; } + $runConfig = $jobConfig->run; $time = strtotime($schedule->getScheduledAt()); if ($time > $now) { @@ -68,27 +74,27 @@ public function dispatch($observer) } try { $errorStatus = Mage_Cron_Model_Schedule::STATUS_ERROR; - $errorMessage = 'Unknown error'; + $errorMessage = Mage::helper('cron')->__('Unknown error'); if ($time < $now - $scheduleLifetime) { $errorStatus = Mage_Cron_Model_Schedule::STATUS_MISSED; - throw Mage::exception('Mage_Cron', 'Too late for the schedule'); + Mage::throwException(Mage::helper('cron')->__('Too late for the schedule')); } $schedule->setExecutedAt(strftime('%Y-%m-%d %H:%M:%S', time())); if ($runConfig->model) { if (!preg_match(self::REGEX_RUN_MODEL, (string)$runConfig->model, $run)) { - throw Mage::exception('Mage_Cron', 'Invalid model/method definition, expecting "model/class::method".'); + Mage::throwException(Mage::helper('cron')->__('Invalid model/method definition, expecting "model/class::method".')); } if (!($model = Mage::getModel($run[1])) || !method_exists($model, $run[2])) { - throw Mage::exception('Mage_Cron', 'Invalid callback: '.$run[1].'::'.$run[2].' does not exist'); + Mage::throwException(Mage::helper('cron')->__('Invalid callback: %s::%s does not exist', $run[1], $run[2])); } $callback = array($model, $run[2]); $arguments = array($schedule); } if (empty($callback)) { - throw Mage::exception('Mage_Cron', 'No callbacks found'); + Mage::throwException(Mage::helper('cron')->__('No callbacks found')); } $schedule->setStatus(Mage_Cron_Model_Schedule::STATUS_RUNNING) @@ -96,8 +102,7 @@ public function dispatch($observer) call_user_func_array($callback, $arguments); - $schedule - ->setStatus(Mage_Cron_Model_Schedule::STATUS_SUCCESS) + $schedule->setStatus(Mage_Cron_Model_Schedule::STATUS_SUCCESS) ->setFinishedAt(strftime('%Y-%m-%d %H:%M:%S', time())); } catch (Exception $e) { @@ -121,9 +126,16 @@ public function getPendingSchedules() return $this->_pendingSchedules; } + /** + * Generate cron schedule + * + * @return Mage_Cron_Model_Observer + */ public function generate() { - // check if schedule generation is needed + /** + * check if schedule generation is needed + */ $lastRun = Mage::app()->loadCache(self::CACHE_KEY_LAST_SCHEDULE_GENERATE_AT); if ($lastRun > time() - Mage::getStoreConfig(self::XML_PATH_SCHEDULE_GENERATE_EVERY)*60) { return $this; @@ -135,58 +147,37 @@ public function generate() $exists[$schedule->getJobCode().'/'.$schedule->getScheduledAt()] = 1; } - // generate global crontab jobs + /** + * generate global crontab jobs + */ $config = Mage::getConfig()->getNode('crontab/jobs'); if ($config instanceof Mage_Core_Model_Config_Element) { $this->_generateJobs($config->children(), $exists); } - // generate configurable crontab jobs + /** + * generate configurable crontab jobs + */ $config = Mage::getConfig()->getNode('default/crontab/jobs'); if ($config instanceof Mage_Core_Model_Config_Element) { $this->_generateJobs($config->children(), $exists); } - // save time schedules generation was ran with no expiration + /** + * save time schedules generation was ran with no expiration + */ Mage::app()->saveCache(time(), self::CACHE_KEY_LAST_SCHEDULE_GENERATE_AT, array('crontab'), null); return $this; } - public function cleanup() - { - // check if history cleanup is needed - $lastCleanup = Mage::app()->loadCache(self::CACHE_KEY_LAST_HISTORY_CLEANUP_AT); - if ($lastCleanup > time() - Mage::getStoreConfig(self::XML_PATH_HISTORY_CLEANUP_EVERY)*60) { - return $this; - } - - $history = Mage::getModel('cron/schedule')->getCollection() - ->addFieldToFilter('status', array('in'=>array( - Mage_Cron_Model_Schedule::STATUS_SUCCESS, - Mage_Cron_Model_Schedule::STATUS_MISSED, - Mage_Cron_Model_Schedule::STATUS_ERROR, - )))->load(); - - $historyLifetimes = array( - Mage_Cron_Model_Schedule::STATUS_SUCCESS => Mage::getStoreConfig(self::XML_PATH_HISTORY_SUCCESS)*60, - Mage_Cron_Model_Schedule::STATUS_MISSED => Mage::getStoreConfig(self::XML_PATH_HISTORY_FAILURE)*60, - Mage_Cron_Model_Schedule::STATUS_ERROR => Mage::getStoreConfig(self::XML_PATH_HISTORY_FAILURE)*60, - ); - - $now = time(); - foreach ($history->getIterator() as $record) { - if (strtotime($record->getExecutedAt()) < $now-$historyLifetimes[$record->getStatus()]) { - $record->delete(); - } - } - - // save time history cleanup was ran with no expiration - Mage::app()->saveCache(time(), self::CACHE_KEY_LAST_HISTORY_CLEANUP_AT, array('crontab'), null); - - return $this; - } - + /** + * Generate jobs for config information + * + * @param $jobs + * @param array $exists + * @return Mage_Cron_Model_Observer + */ protected function _generateJobs($jobs, $exists) { $scheduleAheadFor = Mage::getStoreConfig(self::XML_PATH_SCHEDULE_AHEAD_FOR)*60; @@ -223,5 +214,40 @@ protected function _generateJobs($jobs, $exists) $schedule->unsScheduleId()->save(); } } + return $this; + } + + public function cleanup() + { + // check if history cleanup is needed + $lastCleanup = Mage::app()->loadCache(self::CACHE_KEY_LAST_HISTORY_CLEANUP_AT); + if ($lastCleanup > time() - Mage::getStoreConfig(self::XML_PATH_HISTORY_CLEANUP_EVERY)*60) { + return $this; + } + + $history = Mage::getModel('cron/schedule')->getCollection() + ->addFieldToFilter('status', array('in'=>array( + Mage_Cron_Model_Schedule::STATUS_SUCCESS, + Mage_Cron_Model_Schedule::STATUS_MISSED, + Mage_Cron_Model_Schedule::STATUS_ERROR, + )))->load(); + + $historyLifetimes = array( + Mage_Cron_Model_Schedule::STATUS_SUCCESS => Mage::getStoreConfig(self::XML_PATH_HISTORY_SUCCESS)*60, + Mage_Cron_Model_Schedule::STATUS_MISSED => Mage::getStoreConfig(self::XML_PATH_HISTORY_FAILURE)*60, + Mage_Cron_Model_Schedule::STATUS_ERROR => Mage::getStoreConfig(self::XML_PATH_HISTORY_FAILURE)*60, + ); + + $now = time(); + foreach ($history->getIterator() as $record) { + if (strtotime($record->getExecutedAt()) < $now-$historyLifetimes[$record->getStatus()]) { + $record->delete(); + } + } + + // save time history cleanup was ran with no expiration + Mage::app()->saveCache(time(), self::CACHE_KEY_LAST_HISTORY_CLEANUP_AT, array('crontab'), null); + + return $this; } } \ No newline at end of file diff --git a/app/code/core/Mage/Cron/etc/config.xml b/app/code/core/Mage/Cron/etc/config.xml index 8bf61f30..fa5fc6ca 100644 --- a/app/code/core/Mage/Cron/etc/config.xml +++ b/app/code/core/Mage/Cron/etc/config.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Cron * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Cron/etc/system.xml b/app/code/core/Mage/Cron/etc/system.xml index b78cee9b..2e34f8ee 100644 --- a/app/code/core/Mage/Cron/etc/system.xml +++ b/app/code/core/Mage/Cron/etc/system.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Core * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Customer/Block/Account/Dashboard/Info.php b/app/code/core/Mage/Customer/Block/Account/Dashboard/Info.php index 0be02233..55ae0d5c 100644 --- a/app/code/core/Mage/Customer/Block/Account/Dashboard/Info.php +++ b/app/code/core/Mage/Customer/Block/Account/Dashboard/Info.php @@ -67,4 +67,15 @@ public function getIsSubscribed() { return $this->getSubscriptionObject()->isSubscribed(); } + + /** + * Newsletter module availability + * + * @param none + * @return boolean + */ + public function isNewsletterEnabled() + { + return $this->getLayout()->getBlockSingleton('customer/form_register')->isNewsletterEnabled(); + } } \ No newline at end of file diff --git a/app/code/core/Mage/Customer/Block/Address/Edit.php b/app/code/core/Mage/Customer/Block/Address/Edit.php index 4996bc01..a4ec30dd 100644 --- a/app/code/core/Mage/Customer/Block/Address/Edit.php +++ b/app/code/core/Mage/Customer/Block/Address/Edit.php @@ -74,6 +74,10 @@ public function getTitle() public function getBackUrl() { + if ($this->getData('back_url')) { + return $this->getData('back_url'); + } + if ($this->getCustomerAddressCount()) { return $this->getUrl('customer/address'); } else { diff --git a/app/code/core/Mage/Customer/Block/Form/Register.php b/app/code/core/Mage/Customer/Block/Form/Register.php index 07665111..97559264 100644 --- a/app/code/core/Mage/Customer/Block/Form/Register.php +++ b/app/code/core/Mage/Customer/Block/Form/Register.php @@ -36,7 +36,7 @@ protected function _prepareLayout() $this->getLayout()->getBlock('head')->setTitle(Mage::helper('customer')->__('Create New Customer Account')); return parent::_prepareLayout(); } - + /** * Retrieve form posting url * @@ -46,7 +46,7 @@ public function getPostActionUrl() { return $this->helper('customer')->getRegisterPostUrl(); } - + /** * Retrieve back url * @@ -60,7 +60,7 @@ public function getBackUrl() } return $url; } - + /** * Retrieve form data * @@ -75,7 +75,7 @@ public function getFormData() } return $data; } - + /** * Retrieve customer country identifier * @@ -104,4 +104,15 @@ public function getRegion() } return null; } + + /** + * Newsletter module availability + * + * @param none + * @return boolean + */ + public function isNewsletterEnabled() + { + return !Mage::getStoreConfigFlag('advanced/modules_disable_output/Mage_Newsletter'); + } } \ No newline at end of file diff --git a/app/code/core/Mage/Customer/Block/Widget/Name.php b/app/code/core/Mage/Customer/Block/Widget/Name.php index f9f1d40c..4db1ac7c 100644 --- a/app/code/core/Mage/Customer/Block/Widget/Name.php +++ b/app/code/core/Mage/Customer/Block/Widget/Name.php @@ -34,9 +34,29 @@ public function _construct() $this->setTemplate('customer/widget/name.phtml'); } + /** + * Can show config value + * + * @param string $key + * @return bool + */ + protected function _showConfig($key) + { + $value = $this->getConfig($key); + if (empty($value)) { + return false; + } + return true; + } + + /** + * Can show prefix + * + * @return bool + */ public function showPrefix() { - return $this->getConfig('prefix_show')!=''; + return $this->_showConfig('prefix_show'); } public function isPrefixRequired() @@ -51,7 +71,7 @@ public function getPrefixOptions() return false; } $options = explode(';', $options); - foreach ($options as $i=>&$v) { + foreach ($options as &$v) { $v = $this->htmlEscape(trim($v)); } return $options; @@ -59,17 +79,17 @@ public function getPrefixOptions() public function showMiddlename() { - return $this->getConfig('middlename_show')!=''; + return $this->_showConfig('middlename_show'); } public function showSuffix() { - return $this->getConfig('suffix_show')!=''; + return $this->_showConfig('suffix_show'); } public function isSuffixRequired() { - return $this->getConfig('suffix_show')=='req'; + return $this->getConfig('suffix_show') == 'req'; } public function getSuffixOptions() @@ -79,7 +99,7 @@ public function getSuffixOptions() return false; } $options = explode(';', $options); - foreach ($options as $i=>&$v) { + foreach ($options as &$v) { $v = $this->htmlEscape(trim($v)); } return $options; diff --git a/app/code/core/Mage/Customer/Model/Address/Abstract.php b/app/code/core/Mage/Customer/Model/Address/Abstract.php index ee7354c4..8c1996d8 100644 --- a/app/code/core/Mage/Customer/Model/Address/Abstract.php +++ b/app/code/core/Mage/Customer/Model/Address/Abstract.php @@ -73,11 +73,11 @@ public function getName() public function getStreet($line=0) { $street = parent::getData('street'); - if (-1===$line) { + if (-1 === $line) { return $street; } else { $arr = is_array($street) ? $street : explode("\n", $street); - if (0===$line || $line === null) { + if (0 === $line || $line === null) { return $arr; } elseif (isset($arr[$line-1])) { return $arr[$line-1]; @@ -89,12 +89,12 @@ public function getStreet($line=0) public function getStreet1() { - return $this->getSteet(1); + return $this->getStreet(1); } public function getStreet2() { - return $this->getSteet(2); + return $this->getStreet(2); } public function getStreet3() diff --git a/app/code/core/Mage/Customer/Model/Convert/Adapter/Customer.php b/app/code/core/Mage/Customer/Model/Convert/Adapter/Customer.php index ddd6eda0..c9f55618 100644 --- a/app/code/core/Mage/Customer/Model/Convert/Adapter/Customer.php +++ b/app/code/core/Mage/Customer/Model/Convert/Adapter/Customer.php @@ -412,6 +412,7 @@ public function saveRow($importData) { $customer = $this->getCustomerModel(); $customer->setId(null); + $customer->setImportMode(true); if (empty($importData['website'])) { $message = Mage::helper('customer')->__('Skip import row, required field "%s" not defined', 'website'); @@ -524,6 +525,10 @@ public function saveRow($importData) $customer->setData($field, $setValue); } + if (isset($importData['is_subscribed'])) { + $customer->setData('is_subscribed', $importData['is_subscribed']); + } + $importBillingAddress = $importShippingAddress = true; $savedBillingAddress = $savedShippingAddress = false; diff --git a/app/code/core/Mage/Customer/Model/Customer.php b/app/code/core/Mage/Customer/Model/Customer.php index 732849bd..0089cbf6 100644 --- a/app/code/core/Mage/Customer/Model/Customer.php +++ b/app/code/core/Mage/Customer/Model/Customer.php @@ -645,39 +645,38 @@ public function setStore(Mage_Core_Model_Store $store) public function validate() { $errors = array(); - $helper = Mage::helper('customer'); - if (!Zend_Validate::is($this->getFirstname(), 'NotEmpty')) { - $errors[] = $helper->__('First name can\'t be empty'); + if (!Zend_Validate::is( trim($this->getFirstname()) , 'NotEmpty')) { + $errors[] = Mage::helper('customer')->__('First name can\'t be empty'); } - if (!Zend_Validate::is($this->getLastname(), 'NotEmpty')) { - $errors[] = $helper->__('Last name can\'t be empty'); + if (!Zend_Validate::is( trim($this->getLastname()) , 'NotEmpty')) { + $errors[] = Mage::helper('customer')->__('Last name can\'t be empty'); } if (!Zend_Validate::is($this->getEmail(), 'EmailAddress')) { - $errors[] = $helper->__('Invalid email address'); + $errors[] = Mage::helper('customer')->__('Invalid email address "%s"', $this->getEmail()); } $password = $this->getPassword(); - if (!$this->getId() && !Zend_Validate::is($password, 'NotEmpty')) { - $errors[] = $helper->__('Password can\'t be empty'); + if (!$this->getId() && !Zend_Validate::is($password , 'NotEmpty')) { + $errors[] = Mage::helper('customer')->__('Password can\'t be empty'); } if ($password && !Zend_Validate::is($password, 'StringLength', array(6))) { - $errors[] = $helper->__('Password minimal length must be more %s', 6); + $errors[] = Mage::helper('customer')->__('Password minimal length must be more %s', 6); } $confirmation = $this->getConfirmation(); if ($password != $confirmation) { - $errors[] = $helper->__('Please make sure your passwords match.'); + $errors[] = Mage::helper('customer')->__('Please make sure your passwords match.'); } if (('req' === Mage::helper('customer/address')->getConfig('dob_show')) && '' == trim($this->getDob())) { - $errors[] = $helper->__('Date of Birth is required.'); + $errors[] = Mage::helper('customer')->__('Date of Birth is required.'); } if (('req' === Mage::helper('customer/address')->getConfig('taxvat_show')) && '' == trim($this->getTaxvat())) { - $errors[] = $helper->__('TAX/VAT number is required.'); + $errors[] = Mage::helper('customer')->__('TAX/VAT number is required.'); } if (empty($errors)) { diff --git a/app/code/core/Mage/Customer/Model/Entity/Customer/Collection.php b/app/code/core/Mage/Customer/Model/Entity/Customer/Collection.php index 07f79000..443be8e8 100644 --- a/app/code/core/Mage/Customer/Model/Entity/Customer/Collection.php +++ b/app/code/core/Mage/Customer/Model/Entity/Customer/Collection.php @@ -60,9 +60,9 @@ public function addNameToSelect() } $expr = 'CONCAT(' - .(isset($fields['prefix']) ? 'IF({{prefix}} IS NOT NULL, CONCAT({{prefix}}," "), ""),' : '') - .'{{firstname}}'.(isset($fields['middlename']) ? ',IF({{middlename}} IS NOT NULL, CONCAT(" ",{{middlename}}), "")' : '').'," ",{{lastname}}' - .(isset($fields['suffix']) ? ',IF({{suffix}} IS NOT NULL, CONCAT(" ",{{suffix}}), "")' : '') + .(isset($fields['prefix']) ? 'IF({{prefix}} IS NOT NULL AND {{prefix}} != "", CONCAT({{prefix}}," "), ""),' : '') + .'{{firstname}}'.(isset($fields['middlename']) ? ',IF({{middlename}} IS NOT NULL AND {{middlename}} != "", CONCAT(" ",{{middlename}}), "")' : '').'," ",{{lastname}}' + .(isset($fields['suffix']) ? ',IF({{suffix}} IS NOT NULL AND {{suffix}} != "", CONCAT(" ",{{suffix}}), "")' : '') .')'; $this->addExpressionAttributeToSelect('name', $expr, $fields); diff --git a/app/code/core/Mage/Customer/Model/Session.php b/app/code/core/Mage/Customer/Model/Session.php index 5bee4e53..5b477cb3 100644 --- a/app/code/core/Mage/Customer/Model/Session.php +++ b/app/code/core/Mage/Customer/Model/Session.php @@ -98,9 +98,15 @@ public function getCustomerId() return $this->getId(); } + /** + * Get customer group id + * If customer is not logged in, the default customer group id from config will be returned + * + * @return int + */ public function getCustomerGroupId() { - return $this->isLoggedIn() ? $this->getCustomer()->getGroupId() : 0; + return $this->getCustomer()->getGroupId(); } /** diff --git a/app/code/core/Mage/Customer/controllers/AccountController.php b/app/code/core/Mage/Customer/controllers/AccountController.php index 41448160..17f9969c 100644 --- a/app/code/core/Mage/Customer/controllers/AccountController.php +++ b/app/code/core/Mage/Customer/controllers/AccountController.php @@ -223,7 +223,12 @@ public function createPostAction() } try { - $validationResult = $customer->validate(); + $validationCustomer = $customer->validate(); + if (is_array($validationCustomer)) { + $errors = array_merge($validationCustomer, $errors); + } + $validationResult = count($errors) == 0; + if (true === $validationResult) { $customer->save(); @@ -243,10 +248,7 @@ public function createPostAction() } } else { $this->_getSession()->setCustomerFormData($this->getRequest()->getPost()); - if (is_array($validationResult)) { - foreach ($validationResult as $errorMessage) { - $this->_getSession()->addError($errorMessage); - } + if (is_array($errors)) { foreach ($errors as $errorMessage) { $this->_getSession()->addError($errorMessage); } diff --git a/app/code/core/Mage/Customer/etc/api.xml b/app/code/core/Mage/Customer/etc/api.xml index 8a71021e..88037904 100644 --- a/app/code/core/Mage/Customer/etc/api.xml +++ b/app/code/core/Mage/Customer/etc/api.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. diff --git a/app/code/core/Mage/Customer/etc/config.xml b/app/code/core/Mage/Customer/etc/config.xml index 800e630a..297b2309 100644 --- a/app/code/core/Mage/Customer/etc/config.xml +++ b/app/code/core/Mage/Customer/etc/config.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Customer * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> @@ -106,7 +106,7 @@ {{depend street2}}{{var street2}}{{/depend}} {{depend street3}}{{var street3}}{{/depend}} {{depend street4}}{{var street4}}{{/depend}} -{{depend city}}{{var city}}, {{/depend}}{{depend postcode}}{{var postcode}}, {{/depend}}{{var region}} +{{depend city}}{{var city}}, {{/depend}}{{depend region}}{{var region}}, {{/depend}}{{var postcode}} {{var country}} T: {{var telephone}} {{depend fax}}F: {{var fax}}{{/depend}} @@ -129,7 +129,7 @@ T: {{var telephone}} {{depend street2}}{{var street2}}
{{/depend}} {{depend street3}}{{var street3}}
{{/depend}} {{depend street4}}{{var street4}}
{{/depend}} -{{depend city}}{{var city}}, {{/depend}}{{depend postcode}}{{var postcode}}, {{/depend}}{{var region}}
+{{depend city}}{{var city}}, {{/depend}}{{depend region}}{{var region}}, {{/depend}}{{var postcode}}
{{var country}}
{{depend telephone}}T: {{var telephone}}{{/depend}} {{depend fax}}
F: {{var fax}}{{/depend}} @@ -144,7 +144,7 @@ T: {{var telephone}} {{depend street2}}{{var street2}}|{{/depend}} {{depend street3}}{{var street3}}|{{/depend}} {{depend street4}}{{var street4}}|{{/depend}} -{{depend city}}{{var city}}, {{/depend}}{{depend postcode}}{{var postcode}}, {{/depend}}{{var region}}| +{{depend city}}{{var city}}, {{/depend}}{{depend region}}{{var region}}, {{/depend}}{{var postcode}}| {{var country}}| {{depend telephone}}T: {{var telephone}}{{/depend}}| {{depend fax}}
F: {{var fax}}{{/depend}}| diff --git a/app/code/core/Mage/Customer/etc/system.xml b/app/code/core/Mage/Customer/etc/system.xml index 8a71f305..5dd297e3 100644 --- a/app/code/core/Mage/Customer/etc/system.xml +++ b/app/code/core/Mage/Customer/etc/system.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Customer * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Cybermut/etc/config.xml b/app/code/core/Mage/Cybermut/etc/config.xml index 529ab5cc..1e22f107 100644 --- a/app/code/core/Mage/Cybermut/etc/config.xml +++ b/app/code/core/Mage/Cybermut/etc/config.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Cybermut * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Cybermut/etc/system.xml b/app/code/core/Mage/Cybermut/etc/system.xml index 7003d220..129cd11e 100644 --- a/app/code/core/Mage/Cybermut/etc/system.xml +++ b/app/code/core/Mage/Cybermut/etc/system.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Cybermut * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Cybersource/etc/config.xml b/app/code/core/Mage/Cybersource/etc/config.xml index 018fd01e..1981517e 100644 --- a/app/code/core/Mage/Cybersource/etc/config.xml +++ b/app/code/core/Mage/Cybersource/etc/config.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Cybersource * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Cybersource/etc/system.xml b/app/code/core/Mage/Cybersource/etc/system.xml index 56bc2f20..1890a89e 100644 --- a/app/code/core/Mage/Cybersource/etc/system.xml +++ b/app/code/core/Mage/Cybersource/etc/system.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Paypal * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Dataflow/Model/Convert/Parser/Csv.php b/app/code/core/Mage/Dataflow/Model/Convert/Parser/Csv.php index 69af8c5e..1c9d1714 100644 --- a/app/code/core/Mage/Dataflow/Model/Convert/Parser/Csv.php +++ b/app/code/core/Mage/Dataflow/Model/Convert/Parser/Csv.php @@ -255,7 +255,7 @@ public function unparseRow($args) */ public function getCsvString($fields = array()) { $delimiter = $this->getVar('delimiter', ','); - $enclosure = $this->getVar('enclose', '"'); + $enclosure = $this->getVar('enclose', ''); $escapeChar = $this->getVar('escape', '\\'); if ($delimiter == '\t') { @@ -266,6 +266,7 @@ public function getCsvString($fields = array()) { foreach ($fields as $value) { if (strpos($value, $delimiter) !== false || + empty($enclosure) || strpos($value, $enclosure) !== false || strpos($value, "\n") !== false || strpos($value, "\r") !== false || diff --git a/app/code/core/Mage/Dataflow/etc/config.xml b/app/code/core/Mage/Dataflow/etc/config.xml index 7b6990e5..7681748a 100644 --- a/app/code/core/Mage/Dataflow/etc/config.xml +++ b/app/code/core/Mage/Dataflow/etc/config.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Dataflow * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Directory/etc/api.xml b/app/code/core/Mage/Directory/etc/api.xml index 8efdd1bc..81c284c6 100644 --- a/app/code/core/Mage/Directory/etc/api.xml +++ b/app/code/core/Mage/Directory/etc/api.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. diff --git a/app/code/core/Mage/Directory/etc/config.xml b/app/code/core/Mage/Directory/etc/config.xml index 0123f4b5..5cbb5cce 100644 --- a/app/code/core/Mage/Directory/etc/config.xml +++ b/app/code/core/Mage/Directory/etc/config.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Directory * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Directory/etc/system.xml b/app/code/core/Mage/Directory/etc/system.xml index 658d9f06..7a60b436 100644 --- a/app/code/core/Mage/Directory/etc/system.xml +++ b/app/code/core/Mage/Directory/etc/system.xml @@ -41,6 +41,7 @@ select directory/adminhtml_frontend_currency_base adminhtml/system_config_source_currency + adminhtml/system_config_backend_currency_base 1 Currency will be used for all online payment transactions 1 @@ -51,6 +52,7 @@ select adminhtml/system_config_source_currency + adminhtml/system_config_backend_currency_default 2 1 1 @@ -60,6 +62,7 @@ multiselect adminhtml/system_config_source_currency + adminhtml/system_config_backend_currency_allow 3 1 1 diff --git a/app/code/core/Mage/Eav/Model/Config.php b/app/code/core/Mage/Eav/Model/Config.php index e4af7491..25763185 100644 --- a/app/code/core/Mage/Eav/Model/Config.php +++ b/app/code/core/Mage/Eav/Model/Config.php @@ -27,15 +27,65 @@ class Mage_Eav_Model_Config { + const ENTITIES_CACHE_ID = 'EAV_ENTITY_TYPES'; + const ATTRIBUTES_CACHE_ID = 'EAV_ENTITY_ATTRIBUTES'; + + /** + * Entity types data + * + * @var array + */ + protected $_entityData; + + /** + * Attributes data + * + * @var unknown_type + */ + protected $_attributeData; + + /** + * Information about preloaded attributes + * + * @var array + */ + protected $_preloadedAttributes = array(); + + /** + * Information about entity types with initialized attributes + * + * @var array + */ + protected $_initializedAttributes = array(); + /** - * Array data loaded from cache + * Initialized objects + * + * array ($objectId => $object) * * @var array */ - protected $_data; protected $_objects; + + /** + * References between codes and identifiers + * + * array ( + * 'attributes'=> array ($attributeId => $attributeCode), + * 'entities' => array ($entityId => $entityCode) + * ) + * + * @var array + */ protected $_references; + /** + * Cache flag + * + * @var unknown_type + */ + protected $_isCacheEnabled = null; + /** * Reset object state * @@ -43,32 +93,94 @@ class Mage_Eav_Model_Config */ public function clear() { - $this->_data = null; + $this->_entityData = null; + $this->_attributeData = null; $this->_objects = null; $this->_references = null; + $this->_preloadedAttributes = array(); + $this->_initializedAttributes = array(); return $this; } + /** + * Get object by idetifier + * + * @param mixed $id + * @return mixed + */ protected function _load($id) { - if (isset($this->_references[$id])) { - $id = $this->_references[$id]; - } return isset($this->_objects[$id]) ? $this->_objects[$id] : null; } + /** + * Associate object with identifier + * + * @param mixed $obj + * @param mixed $id + * @return Mage_Eav_Model_Config + */ protected function _save($obj, $id) { $this->_objects[$id] = $obj; return $this; } - protected function _reference($ref, $id) + /** + * Specify reference for entity type id + * + * @param int $id + * @param string $code + * @return Mage_Eav_Model_Config + */ + protected function _addEntityTypeReference($id, $code) { - $this->_references[$ref] = $id; + $this->_references['entity'][$id] = $code; return $this; } + protected function _getEntityTypeReference($id) + { + return isset($this->_references['entity'][$id]) ? $this->_references['entity'][$id] : null; + } + + protected function _addAttributeReference($id, $code, $entityTypeCode) + { + $this->_references['attribute'][$entityTypeCode][$id] = $code; + return $this; + } + + protected function _getAttributeReference($id, $entityTypeCode) + { + if (isset($this->_references['attribute'][$entityTypeCode][$id])) { + return $this->_references['attribute'][$entityTypeCode][$id]; + } + return null; + } + + protected function _getEntityKey($code) + { + return 'ENTITY/'.$code; + } + + protected function _getAttributeKey($entityTypeCode, $attributeCode) + { + return 'ATTRIBUTE/'. $entityTypeCode .'/' . $attributeCode; + } + + /** + * Check EAV cache availability + * + * @return bool + */ + protected function _isCacheEnabled() + { + if ($this->_isCacheEnabled === null) { + $this->_isCacheEnabled = Mage::app()->useCache('eav'); + } + return $this->_isCacheEnabled; + } + /** * Initialize all entity types data * @@ -76,52 +188,57 @@ protected function _reference($ref, $id) */ protected function _initEntityTypes() { - if (isset($this->_data)) { + if (is_array($this->_entityData)) { return $this; } + Varien_Profiler::start('EAV: '.__METHOD__); + /** + * try load information about entity types from cache + */ + if ($this->_isCacheEnabled() + && ($cache = Mage::app()->loadCache(self::ENTITIES_CACHE_ID))) { - $useCache = Mage::app()->useCache('eav'); - if ($useCache && $cache = Mage::app()->loadCache('EAV_ENTITY_TYPE_CODES')) { - $this->_data['entity_type_codes'] = unserialize($cache); - + $this->_entityData = unserialize($cache); + foreach ($this->_entityData as $typeCode => $data) { + $typeId = $data['entity_type_id']; + $this->_addEntityTypeReference($typeId, $typeCode); + } + Varien_Profiler::stop('EAV: '.__METHOD__); return $this; } - Varien_Profiler::start('EAV: '.__METHOD__); - $entityTypes = Mage::getModel('eav/entity_type')->getCollection(); + $entityTypesData = Mage::getModel('eav/entity_type')->getCollection()->getData(); + $types = array(); - $codes = array(); - foreach ($entityTypes as $id=>$type) { - if (!$type->getAttributeModel()) { - $type->setAttributeModel('eav/entity_attribute'); + /** + * prepare entity type data + */ + foreach ($entityTypesData as $typeData) { + if (!isset($typeData['attribute_model'])) { + $typeData['attribute_model'] = 'eav/entity_attribute'; } - $code = $type->getEntityTypeCode(); - $this->_save($type, 'EAV_ENTITY_TYPE/'.$code); - $this->_reference('EAV_ENTITY_TYPE/'.$id, 'EAV_ENTITY_TYPE/'.$code); + $typeCode = $typeData['entity_type_code']; + $typeId = $typeData['entity_type_id']; - $codes[$id] = $code; - if ($useCache) { - Mage::app()->saveCache(serialize($type->getData()), 'EAV_ENTITY_TYPE_'.$code, - array('eav', Mage_Eav_Model_Entity_Attribute::CACHE_TAG) - ); - } + $this->_addEntityTypeReference($typeId, $typeCode); + $types[$typeCode] = $typeData; } - $this->_data['entity_type_codes'] = $codes; - if ($useCache) { - Mage::app()->saveCache(serialize($this->_data['entity_type_codes']), 'EAV_ENTITY_TYPE_CODES', + $this->_entityData = $types; + + if ($this->_isCacheEnabled()) { + Mage::app()->saveCache(serialize($this->_entityData), self::ENTITIES_CACHE_ID, array('eav', Mage_Eav_Model_Entity_Attribute::CACHE_TAG) ); } - Varien_Profiler::stop('EAV: '.__METHOD__); return $this; } /** - * Retrieve entity type object by entity type code + * Get entity type object by entity type code/identifier * * @param mixed $code * @return Mage_Eav_Model_Entity_Type @@ -131,26 +248,26 @@ public function getEntityType($code) if ($code instanceof Mage_Eav_Model_Entity_Type) { return $code; } - - $this->_initEntityTypes(); - - if ($entityType = $this->_load('EAV_ENTITY_TYPE/'.$code)) { - return $entityType; - } - Varien_Profiler::start('EAV: '.__METHOD__); + $this->_initEntityTypes(); if (is_numeric($code)) { - if (isset($this->_data['entity_type_codes'][$code])) { - $code = $this->_data['entity_type_codes'][$code]; - } else { + $code = $this->_getEntityTypeReference($code); + if ($code === null) { Mage::throwException(Mage::helper('eav')->__('Invalid entity_type specified: %s', $code)); } } + $entityKey = $this->_getEntityKey($code); + if ($entityType = $this->_load($entityKey)) { + Varien_Profiler::stop('EAV: '.__METHOD__); + return $entityType; + } + + $entityType = Mage::getModel('eav/entity_type'); - if ($cache = Mage::app()->loadCache('EAV_ENTITY_TYPE_'.$code)) { - $entityType->setData(unserialize($cache)); + if (isset($this->_entityData[$code])) { + $entityType->setData($this->_entityData[$code]); } else { $entityType->loadByCode($code); @@ -158,8 +275,7 @@ public function getEntityType($code) Mage::throwException(Mage::helper('eav')->__('Invalid entity_type specified: %s', $code)); } } - - $this->_save($entityType, 'EAV_ENTITY_TYPE/'.$code); + $this->_save($entityType, $entityKey); Varien_Profiler::stop('EAV: '.__METHOD__); return $entityType; @@ -176,47 +292,35 @@ protected function _initAttributes($entityType) $entityType = $this->getEntityType($entityType); $entityTypeCode = $entityType->getEntityTypeCode(); - if (isset($this->_data['attributes'][$entityTypeCode]) || $entityType->getAttributeCodes()) { + if (isset($this->_initializedAttributes[$entityTypeCode])) { return $this; } Varien_Profiler::start('EAV: '.__METHOD__); - $useCache = Mage::app()->useCache('eav'); - - $attributes = Mage::getResourceModel('eav/entity_attribute_collection') + $attributesInfo = Mage::getResourceModel('eav/entity_attribute_collection') ->setEntityTypeFilter($entityType->getId()) - ->addSetInfo(); + ->addSetInfo() + ->getData(); - $defaultAttributeModel = $entityType->getAttributeModel(); - $codes = array(); $attributesData = array(); - foreach ($attributes as $attribute) { - if (!$attribute->getAttributeModel()) { - $attribute->setAttributeModel($defaultAttributeModel); + $codes = array(); + foreach ($attributesInfo as $attribute) { + if (!isset($attribute['attribute_model'])) { + $attribute['attribute_model'] = $entityType->getAttributeModel(); } - if ($attribute->getAttributeModel()!=='eav/entity_attribute') { - $attribute = Mage::getModel($attribute->getAttributeModel(), $attribute->getData()); - } + $attributeCode = $attribute['attribute_code']; + $attributeId = $attribute['attribute_id']; - $code = $attribute->getAttributeCode(); - $this->_save($attribute, 'EAV_ATTRIBUTE/'.$entityTypeCode.'/'.$code); - $this->_reference($attribute->getId(), $code); - $codes[$attribute->getId()] = $code; - if ($useCache) { - Mage::app()->saveCache(serialize($attribute->getData()), 'EAV_ATTRIBUTE_'.$entityTypeCode.'__'.$code, - array('eav', Mage_Eav_Model_Entity_Attribute::CACHE_TAG) - ); - } + $this->_addAttributeReference($attributeId, $attributeCode, $entityTypeCode); + $attributesData[$attributeCode] = $attribute; + $codes[] = $attributeCode; } $entityType->setAttributeCodes($codes); - if ($useCache) { - $data = $entityType->getData(); - Mage::app()->saveCache(serialize($data), 'EAV_ENTITY_TYPE_'.$entityTypeCode, - array('eav', Mage_Eav_Model_Entity_Attribute::CACHE_TAG) - ); - } + $this->_attributeData[$entityTypeCode] = $attributesData; + $this->_initializedAttributes[$entityTypeCode] = true; + Varien_Profiler::stop('EAV: '.__METHOD__); return $this; } @@ -236,47 +340,45 @@ public function getAttribute($entityType, $code) Varien_Profiler::start('EAV: '.__METHOD__); - $this->_initAttributes($entityType); - $entityTypeCode = $this->getEntityType($entityType)->getEntityTypeCode(); $entityType = $this->getEntityType($entityType); - $attrCodes = $entityType->getAttributeCodes(); /** * Validate attribute code */ if (is_numeric($code)) { - if (isset($attrCodes[$code])) { - $code = $attrCodes[$code]; - } else { + $code = $this->_getAttributeReference($code, $entityTypeCode); + if (!$code) { return false; } } + $attributeKey = $this->_getAttributeKey($entityTypeCode, $code); /** * Try use loaded attribute */ - if ($attribute = $this->_load('EAV_ATTRIBUTE/'.$entityTypeCode.'/'.$code)) { + if ($attribute = $this->_load($attributeKey)) { Varien_Profiler::stop('EAV: '.__METHOD__); return $attribute; } + if (!isset($this->_preloadedAttributes[$entityTypeCode]) + || !in_array($code, $this->_preloadedAttributes[$entityTypeCode])) { + $this->_initAttributes($entityType); + } + $attribute = false; - if (in_array($code, $attrCodes)) { - if ($cache = Mage::app()->loadCache('EAV_ATTRIBUTE_'.$entityTypeCode.'__'.$code)) { - $data = unserialize($cache); - if (isset($data['attribute_model'])) { - $attribute = Mage::getModel($data['attribute_model'], $data); - } - } - else { - $attribute = Mage::getModel($entityType->getAttributeModel())->loadByCode($entityTypeCode, $code); - } + if (isset($this->_attributeData[$entityTypeCode][$code])) { + $data = $this->_attributeData[$entityTypeCode][$code]; + $attribute = Mage::getModel($data['attribute_model'], $data); + } + else { + $attribute = Mage::getModel($entityType->getAttributeModel())->loadByCode($entityType, $code); } if ($attribute) { $attribute->setEntityType($entityType); - $this->_save($attribute, 'EAV_ATTRIBUTE/'.$entityTypeCode.'/'.$code); + $this->_save($attribute, $attributeKey); } Varien_Profiler::stop('EAV: '.__METHOD__); return $attribute; @@ -288,9 +390,85 @@ public function getAttribute($entityType, $code) * @param string $entityType * @return array */ - public function getEntityAttributeCodes($entityType) + public function getEntityAttributeCodes($entityType, $object=null) { - $this->_initAttributes($entityType); + if (($object instanceof Varien_Object) && $object->getAttributeSetId()) { + $attributesInfo = Mage::getResourceModel('eav/entity_attribute_collection') + ->setEntityTypeFilter($this->getEntityType($entityType)->getId()) + ->setAttributeSetFilter($object->getAttributeSetId()) + ->getData(); + $attributes = array(); + foreach ($attributesInfo as $attributeData) { + $attributes[] = $attributeData['attribute_code']; + } + + $this->preloadAttributes($entityType, $attributes); + return $attributes; + } + else { + $this->_initAttributes($entityType); + } return $this->getEntityType($entityType)->getAttributeCodes(); } + + /** + * Preload entity type attributes for performance optimization + * + * @param mixed $entityType + * @param mixed $attributes + * @return Mage_Eav_Model_Config + */ + public function preloadAttributes($entityType, $attributes) + { + if (is_string($attributes)) { + $attributes = array($attributes); + } + + $entityType = $this->getEntityType($entityType); + $entityTypeCode = $entityType->getEntityTypeCode(); + + if (!isset($this->_preloadedAttributes[$entityTypeCode])) { + $this->_preloadedAttributes[$entityTypeCode] = $attributes; + } + else { + $attributes = array_diff($attributes, $this->_preloadedAttributes[$entityTypeCode]); + $this->_preloadedAttributes[$entityTypeCode] = array_merge($this->_preloadedAttributes[$entityTypeCode], $attributes); + } + + if (empty($attributes)) { + return $this; + } + Varien_Profiler::start('EAV: '.__METHOD__); + + $attributesInfo = Mage::getResourceModel('eav/entity_attribute_collection') + ->setEntityTypeFilter($entityType->getId()) + ->setCodeFilter($attributes) + ->addSetInfo() + ->getData(); + + if (!$attributesInfo) { + return $this; + } + + $attributesData = array(); + $codes = array(); + + foreach ($attributesInfo as $attribute) { + if (!isset($attribute['attribute_model'])) { + $attribute['attribute_model'] = $entityType->getAttributeModel(); + } + + $attributeCode = $attribute['attribute_code']; + $attributeId = $attribute['attribute_id']; + + $this->_addAttributeReference($attributeId, $attributeCode, $entityTypeCode); + $attributesData[$attributeCode] = $attribute; + $codes[] = $attributeCode; + } + + $this->_attributeData[$entityTypeCode] = $attributesData; + + Varien_Profiler::stop('EAV: '.__METHOD__); + return $this; + } } \ No newline at end of file diff --git a/app/code/core/Mage/Eav/Model/Entity/Abstract.php b/app/code/core/Mage/Eav/Model/Entity/Abstract.php index 7e563747..ea46f83b 100644 --- a/app/code/core/Mage/Eav/Model/Entity/Abstract.php +++ b/app/code/core/Mage/Eav/Model/Entity/Abstract.php @@ -440,33 +440,11 @@ public function isPartialSave($flag=null) */ public function loadAllAttributes($object=null) { - $attributeCodes = Mage::getSingleton('eav/config')->getEntityAttributeCodes($this->getEntityType()); + $attributeCodes = Mage::getSingleton('eav/config')->getEntityAttributeCodes($this->getEntityType(), $object); foreach ($attributeCodes as $code) { $this->getAttribute($code); } return $this; - /* - if (is_null($object)) { - $attributeCodes = Mage::getSingleton('eav/config')->getEntityAttributeCodes($this->getEntityType()); - foreach ($attributeCodes as $code) { - $this->getAttribute($code); - } - return $this; - } - elseif($object->getAttributeSetId()) { - $setId = $object->getAttributeSetId(); - } - else { - $setId = $this->getEntityType()->getDefaultAttributeSetId(); - } - - $attributes = $this->getEntityType()->getAttributeCollection($setId); - $attributes->load(); - - foreach ($attributes->getItems() as $attribute) { - $this->getAttribute($attribute); - }*/ - return $this; } public function getSortedAttributes($setId=null) diff --git a/app/code/core/Mage/Eav/Model/Entity/Attribute.php b/app/code/core/Mage/Eav/Model/Entity/Attribute.php index 21935f05..23b9a321 100644 --- a/app/code/core/Mage/Eav/Model/Entity/Attribute.php +++ b/app/code/core/Mage/Eav/Model/Entity/Attribute.php @@ -72,6 +72,12 @@ public function deleteEntity() protected function _beforeSave() { + // prevent overriding product data + if (isset($this->_data['attribute_code']) + && Mage::getModel('catalog/product')->isReservedAttribute($this)) { + Mage::throwException(Mage::helper('eav')->__('The attribute code \'%s\' is reserved by system. Please, try another attribute code.', $this->_data['attribute_code'])); + } + // prevent changing attribute scope, if used in configurable products if (isset($this->_origData['is_global'])) { if (!isset($this->_data['is_global'])) { @@ -91,6 +97,12 @@ protected function _beforeSave() if (!$this->getFrontendModel()) { $this->setFrontendModel('eav/entity_attribute_frontend_datetime'); } + + // save default date value as timestamp + if ($defaultValue = $this->getDefaultValue()) { + $format = Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT); + $this->setDefaultValue(Mage::app()->getLocale()->date($defaultValue, $format, null, false)->toValue()); + } } if ($this->getBackendType() == 'gallery') { diff --git a/app/code/core/Mage/Eav/Model/Entity/Attribute/Backend/Datetime.php b/app/code/core/Mage/Eav/Model/Entity/Attribute/Backend/Datetime.php index 78493d81..02fc6638 100644 --- a/app/code/core/Mage/Eav/Model/Entity/Attribute/Backend/Datetime.php +++ b/app/code/core/Mage/Eav/Model/Entity/Attribute/Backend/Datetime.php @@ -43,23 +43,21 @@ public function beforeSave($object) */ public function formatDate($date) { - if (empty($date)) { - return null; - } - if (!is_numeric($date)) { - $_date = Mage::app()->getLocale()->date( - $date, - Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT), - Mage::app()->getDistroLocaleCode(), - false - ); - $date = strtotime($_date->toString()); - } - if ($date == -1){ + if (empty($date)) { return null; } - - return date('Y-m-d H:i:s', $date); + // unix timestamp given - simply instantiate date object + if (preg_match('/^[0-9]+$/', $date)) { + $date = new Zend_Date((int)$date); + } + // parse this date in current locale, do not apply GMT offset + else { + $date = Mage::app()->getLocale()->date($date, + Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT), + null, false + ); + } + return $date->toString(Varien_Date::DATETIME_INTERNAL_FORMAT); } -} \ No newline at end of file +} diff --git a/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php b/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php index a713f64d..dab7b0cc 100644 --- a/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php +++ b/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php @@ -683,7 +683,7 @@ public function removeAttributeToSelect($attribute=null) public function setPage($pageNum, $pageSize) { $this->setCurPage($pageNum) - ->getPageSize($pageSize); + ->setPageSize($pageSize); return $this; } @@ -716,7 +716,7 @@ public function load($printQuery = false, $logQuery = false) * * @return array */ - public function getAllIds() + public function getAllIds($limit=null, $offset=null) { $idsSelect = clone $this->getSelect(); $idsSelect->reset(Zend_Db_Select::ORDER); @@ -724,6 +724,7 @@ public function getAllIds() $idsSelect->reset(Zend_Db_Select::LIMIT_OFFSET); $idsSelect->reset(Zend_Db_Select::COLUMNS); $idsSelect->from(null, 'e.'.$this->getEntity()->getIdFieldName()); + $idsSelect->limit($limit, $offset); return $this->getConnection()->fetchCol($idsSelect, $this->_bindParams); } diff --git a/app/code/core/Mage/Eav/Model/Entity/Type.php b/app/code/core/Mage/Eav/Model/Entity/Type.php index 96652e2b..44da9e93 100644 --- a/app/code/core/Mage/Eav/Model/Entity/Type.php +++ b/app/code/core/Mage/Eav/Model/Entity/Type.php @@ -168,8 +168,8 @@ public function fetchNewIncrementId($storeId=null) $incrementInstance = Mage::getModel($this->getIncrementModel()) ->setPrefix($entityStoreConfig->getIncrementPrefix()) - ->setPadLength($entityStoreConfig->getIncrementPadLength()) - ->setPadChar($entityStoreConfig->getIncrementPadChar()) + ->setPadLength($this->getIncrementPadLength()) + ->setPadChar($this->getIncrementPadChar()) ->setLastId($entityStoreConfig->getIncrementLastId()); /** diff --git a/app/code/core/Mage/Eav/Model/Mysql4/Entity/Attribute.php b/app/code/core/Mage/Eav/Model/Mysql4/Entity/Attribute.php index 35596771..eb109008 100644 --- a/app/code/core/Mage/Eav/Model/Mysql4/Entity/Attribute.php +++ b/app/code/core/Mage/Eav/Model/Mysql4/Entity/Attribute.php @@ -67,14 +67,16 @@ protected function _loadTypeAttributes($entityTypeId) */ public function loadByCode(Mage_Core_Model_Abstract $object, $entityTypeId, $code) { - $this->_loadTypeAttributes($entityTypeId); - $data = isset(self::$_entityAttributes[$entityTypeId][$code]) ? self::$_entityAttributes[$entityTypeId][$code] : array(); - if (!$data) { - return false; + $select = $this->_getLoadSelect('attribute_code', $code, $object) + ->where('entity_type_id=?', $entityTypeId); + $data = $this->_getReadAdapter()->fetchRow($select); + + if ($data) { + $object->setData($data); + $this->_afterLoad($object); + return true; } - $object->setData($data); - $this->_afterLoad($object); - return true; + return false; } /** diff --git a/app/code/core/Mage/Eav/Model/Mysql4/Entity/Attribute/Collection.php b/app/code/core/Mage/Eav/Model/Mysql4/Entity/Attribute/Collection.php index df0b3f18..97680a8f 100644 --- a/app/code/core/Mage/Eav/Model/Mysql4/Entity/Attribute/Collection.php +++ b/app/code/core/Mage/Eav/Model/Mysql4/Entity/Attribute/Collection.php @@ -277,7 +277,10 @@ public function addSetInfo($flag=true) protected function _addSetInfo() { if ($this->_addSetInfoFlag) { - $attributeIds = array_keys($this->_items); + $attributeIds = array(); + foreach ($this->_data as &$dataItem) { + $attributeIds[] = $dataItem['attribute_id']; + } $attributeToSetInfo = array(); if (count($attributeIds) > 0) { @@ -304,14 +307,14 @@ protected function _addSetInfo() } } - foreach ($this->getItems() as $attribute) { - if (isset($attributeToSetInfo[$attribute->getId()])) { - $setInfo = $attributeToSetInfo[$attribute->getId()]; + foreach ($this->_data as &$attributeData) { + if (isset($attributeToSetInfo[$attributeData['attribute_id']])) { + $setInfo = $attributeToSetInfo[$attributeData['attribute_id']]; } else { $setInfo = array(); } - $attribute->setAttributeSetInfo($setInfo); + $attributeData['attribute_set_info'] = $setInfo; } unset($attributeToSetInfo); @@ -319,6 +322,12 @@ protected function _addSetInfo() } } + protected function _afterLoadData() + { + $this->_addSetInfo(); + return parent::_afterLoadData(); + } + /** * TODO: issue #5126 * @@ -345,10 +354,21 @@ public function checkConfigurableProducts() return $this; } - protected function _afterLoad() + /** + * Specify collection attribute codes filter + * + * @param string || array $code + * @return Mage_Eav_Model_Mysql4_Entity_Attribute_Collection + */ + public function setCodeFilter($code) { - $this->_addSetInfo(); - return parent::_afterLoad(); + if (empty($code)) { + return $this; + } + if (!is_array($code)) { + $code = array($code); + } + $this->getSelect()->where('main_table.attribute_code IN(?)', $code); + return $this; } - } diff --git a/app/code/core/Mage/Eav/etc/config.xml b/app/code/core/Mage/Eav/etc/config.xml index 0fae8ac9..6fe29f86 100644 --- a/app/code/core/Mage/Eav/etc/config.xml +++ b/app/code/core/Mage/Eav/etc/config.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Eav * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Eway/etc/config.xml b/app/code/core/Mage/Eway/etc/config.xml index b4b6f3d9..f71ecccc 100644 --- a/app/code/core/Mage/Eway/etc/config.xml +++ b/app/code/core/Mage/Eway/etc/config.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Eway * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Eway/etc/system.xml b/app/code/core/Mage/Eway/etc/system.xml index bd698e0d..3491e0ec 100644 --- a/app/code/core/Mage/Eway/etc/system.xml +++ b/app/code/core/Mage/Eway/etc/system.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Eway * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Flo2Cash/etc/config.xml b/app/code/core/Mage/Flo2Cash/etc/config.xml index 5887af83..ca43c21b 100644 --- a/app/code/core/Mage/Flo2Cash/etc/config.xml +++ b/app/code/core/Mage/Flo2Cash/etc/config.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Flo2Cash * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Flo2Cash/etc/system.xml b/app/code/core/Mage/Flo2Cash/etc/system.xml index 0e1ea64f..5c5b8699 100644 --- a/app/code/core/Mage/Flo2Cash/etc/system.xml +++ b/app/code/core/Mage/Flo2Cash/etc/system.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Flo2Cash * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/GiftMessage/etc/config.xml b/app/code/core/Mage/GiftMessage/etc/config.xml index 242e79d9..ba495f53 100644 --- a/app/code/core/Mage/GiftMessage/etc/config.xml +++ b/app/code/core/Mage/GiftMessage/etc/config.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_GiftMessage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/GiftMessage/etc/system.xml b/app/code/core/Mage/GiftMessage/etc/system.xml index b59ed715..5d2a4f97 100644 --- a/app/code/core/Mage/GiftMessage/etc/system.xml +++ b/app/code/core/Mage/GiftMessage/etc/system.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_GiftMessage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/GiftRegistry/etc/config.xml b/app/code/core/Mage/GiftRegistry/etc/config.xml index 33d35769..9e818cc4 100644 --- a/app/code/core/Mage/GiftRegistry/etc/config.xml +++ b/app/code/core/Mage/GiftRegistry/etc/config.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_GiftRegistry * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Giftcert/etc/config.xml b/app/code/core/Mage/Giftcert/etc/config.xml index 72b730c5..2af7bc11 100644 --- a/app/code/core/Mage/Giftcert/etc/config.xml +++ b/app/code/core/Mage/Giftcert/etc/config.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Giftcert * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/GoogleAnalytics/Block/Ga.php b/app/code/core/Mage/GoogleAnalytics/Block/Ga.php index a3fa38d2..d799d918 100644 --- a/app/code/core/Mage/GoogleAnalytics/Block/Ga.php +++ b/app/code/core/Mage/GoogleAnalytics/Block/Ga.php @@ -32,7 +32,11 @@ */ class Mage_GoogleAnalytics_Block_Ga extends Mage_Core_Block_Text { - + /** + * Retrieve Quote Data HTML + * + * @return unknown + */ public function getQuoteOrdersHtml() { $quote = $this->getQuote(); @@ -62,6 +66,11 @@ public function getQuoteOrdersHtml() return $html; } + /** + * Retrieve Order Data HTML + * + * @return string + */ public function getOrderHtml() { @@ -81,6 +90,7 @@ public function getOrderHtml() $address = $order->getBillingAddress(); $html = ''; return $html; } + /** + * Retrieve Google Account Identifier + * + * @return string + */ public function getAccount() { if (!$this->hasData('account')) { @@ -117,14 +133,28 @@ public function getAccount() return $this->getData('account'); } + /** + * Retrieve current page URL + * + * @return string + */ public function getPageName() { if (!$this->hasData('page_name')) { - $this->setPageName($this->getRequest()->getPathInfo()); + $queryStr = ''; + if ($request = Mage::app()->getFrontController()->getRequest()) { + $queryStr = substr($request->getRequestUri(), strpos($request->getRequestUri(), '?')); + } + $this->setPageName(Mage::getSingleton('core/url')->escape($this->getRequest()->getPathInfo()) . $queryStr); } return $this->getData('page_name'); } + /** + * Prepare and return block's html output + * + * @return string + */ protected function _toHtml() { if (!Mage::getStoreConfigFlag('google/analytics/active')) { @@ -134,15 +164,16 @@ protected function _toHtml() $this->addText(' '); @@ -156,5 +187,4 @@ protected function _toHtml() return parent::_toHtml(); } - } diff --git a/app/code/core/Mage/GoogleAnalytics/etc/config.xml b/app/code/core/Mage/GoogleAnalytics/etc/config.xml index b5f897b0..72c95162 100644 --- a/app/code/core/Mage/GoogleAnalytics/etc/config.xml +++ b/app/code/core/Mage/GoogleAnalytics/etc/config.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_GoogleAnalytics * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/GoogleAnalytics/etc/system.xml b/app/code/core/Mage/GoogleAnalytics/etc/system.xml index e1e37a1a..fc2c4c5e 100644 --- a/app/code/core/Mage/GoogleAnalytics/etc/system.xml +++ b/app/code/core/Mage/GoogleAnalytics/etc/system.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_GoogleAnalytics * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/GoogleBase/Block/Adminhtml/Items.php b/app/code/core/Mage/GoogleBase/Block/Adminhtml/Items.php new file mode 100644 index 00000000..41c3b4ee --- /dev/null +++ b/app/code/core/Mage/GoogleBase/Block/Adminhtml/Items.php @@ -0,0 +1,83 @@ + + */ +class Mage_GoogleBase_Block_Adminhtml_Items extends Mage_Adminhtml_Block_Widget_Grid_Container +{ + + public function __construct() + { + parent::__construct(); + $this->setTemplate('googlebase/items.phtml'); + } + + protected function _prepareLayout() + { + $this->setChild('item', $this->getLayout()->createBlock('googlebase/adminhtml_items_item')); + $this->setChild('product', $this->getLayout()->createBlock('googlebase/adminhtml_items_product')); + if (!Mage::app()->isSingleStoreMode()) { + $_defaultStoreName = Mage::app()->getDefaultStoreView()->getName(); + $this->setChild('store_switcher', + $this->getLayout()->createBlock('adminhtml/store_switcher') + ->setDefaultStoreName($this->__('Default Store (%s)', $_defaultStoreName)) + ->setUseConfirm(false) + ->setSwitchUrl($this->getUrl('*/*/*', array('store'=>null))) + ); + } + } + + public function getAddButtonHtml() + { + $addButtonData = array( + 'id' => 'products_grid_button', + 'label' => $this->__('View Available Products'), + ); + return $this->getLayout() + ->createBlock('adminhtml/widget_button') + ->setData($addButtonData) + ->toHtml(); + } + public function getStoreSwitcherHtml() + { + return $this->getChildHtml('store_switcher'); + } + + public function getStore() + { + $storeId = (int) $this->getRequest()->getParam('store', 0); + if ($storeId == 0) { + return Mage::app()->getDefaultStoreView(); + } + return Mage::app()->getStore($storeId); + } +} \ No newline at end of file diff --git a/app/code/core/Mage/GoogleBase/Block/Adminhtml/Items/Item.php b/app/code/core/Mage/GoogleBase/Block/Adminhtml/Items/Item.php new file mode 100644 index 00000000..e2e909fb --- /dev/null +++ b/app/code/core/Mage/GoogleBase/Block/Adminhtml/Items/Item.php @@ -0,0 +1,185 @@ + + */ +class Mage_GoogleBase_Block_Adminhtml_Items_Item extends Mage_Adminhtml_Block_Widget_Grid +{ + public function __construct() + { + parent::__construct(); + $this->setId('items'); + $this->setUseAjax(true); + } + + protected function _prepareCollection() + { + $collection = Mage::getResourceModel('googlebase/item_collection'); + $store = $this->_getStore(); + $collection->addStoreFilterId($store->getId()); + $this->setCollection($collection); + parent::_prepareCollection(); + return $this; + } + + protected function _prepareColumns() + { + $this->addColumn('name', + array( + 'header' => $this->__('Product Name'), + 'width' => '30%', + 'index' => 'name', + )); + + $this->addColumn('gbase_item_id', + array( + 'header' => $this->__('Google Base ID'), + 'width' => '150px', + 'index' => 'gbase_item_id', + 'renderer' => 'googlebase/adminhtml_items_renderer_id', + + )); + + $this->addColumn('gbase_itemtype', + array( + 'header' => $this->__('Google Base Item Type'), + 'width' => '150px', + 'index' => 'gbase_itemtype', + )); + +// $this->addColumn('published', +// array( +// 'header'=> $this->__('Published'), +// 'type' => 'datetime', +// 'width' => '100px', +// 'index' => 'published', +// )); + + $this->addColumn('expires', + array( + 'header' => $this->__('Expires'), + 'type' => 'datetime', + 'width' => '100px', + 'index' => 'expires', + )); + + $this->addColumn('impr', + array( + 'header' => $this->__('Impr.'), + 'width' => '150px', + 'index' => 'impr', + 'filter' => false, + )); + + $this->addColumn('clicks', + array( + 'header' => $this->__('Clicks'), + 'width' => '150px', + 'index' => 'clicks', + 'filter' => false, + )); + + $this->addColumn('views', + array( + 'header' => $this->__('Page views'), + 'width' => '150px', + 'index' => 'views', + 'filter' => false, + )); + + $this->addColumn('active', + array( + 'header' => $this->__('Active'), + 'width' => '150px', + 'type' => 'options', + 'width' => '70px', + 'options' => Mage::getSingleton('googlebase/source_statuses')->getStatuses(), + 'index' => 'is_hidden', + )); + + return parent::_prepareColumns(); + } + + protected function _prepareMassaction() + { + $this->setMassactionIdField('item_id'); + $this->getMassactionBlock()->setFormFieldName('item'); + + $this->getMassactionBlock()->addItem('delete', array( + 'label' => $this->__('Delete'), + 'url' => $this->getUrl('*/*/massDelete', array('_current'=>true)), + 'confirm' => $this->__('Are you sure?') + )); + + $this->getMassactionBlock()->addItem('publish', array( + 'label' => $this->__('Publish'), + 'url' => $this->getUrl('*/*/massPublish', array('_current'=>true)) + )); + + $this->getMassactionBlock()->addItem('unpublish', array( + 'label' => $this->__('Hide'), + 'url' => $this->getUrl('*/*/massHide', array('_current'=>true)) + )); + return $this; + } + + public function getSynchronizeButtonHtml() + { + $confirmMsg = $this->__('This action will update items statistics and remove the items which are not available in Google Base. Continue?'); + + $refreshButtonHtml = $this->getLayout()->createBlock('adminhtml/widget_button') + ->setData(array( + 'label' => $this->__('Synchronize'), + 'onclick' => "if(confirm('".$confirmMsg."')) + { + setLocation('".$this->getUrl('*/*/refresh', array('_current'=>true))."'); + }", + 'class' => 'task' + ))->toHtml(); + + return $refreshButtonHtml; + } + + public function getMainButtonsHtml() + { + return $this->getSynchronizeButtonHtml() . parent::getMainButtonsHtml(); + } + + public function getGridUrl() + { + return $this->getUrl('*/*/grid', array('_current'=>true)); + } + + protected function _getStore() + { + return $this->getLayout()->getBlockSingleton('googlebase/adminhtml_items')->getStore(); + } +} \ No newline at end of file diff --git a/app/code/core/Mage/GoogleBase/Block/Adminhtml/Items/Product.php b/app/code/core/Mage/GoogleBase/Block/Adminhtml/Items/Product.php new file mode 100644 index 00000000..a9d33b40 --- /dev/null +++ b/app/code/core/Mage/GoogleBase/Block/Adminhtml/Items/Product.php @@ -0,0 +1,158 @@ + + */ +class Mage_GoogleBase_Block_Adminhtml_Items_Product extends Mage_Adminhtml_Block_Widget_Grid +{ + + public function __construct() + { + parent::__construct(); + $this->setId('googlebase_selection_search_grid'); + $this->setDefaultSort('id'); + $this->setUseAjax(true); + } + + protected function _beforeToHtml() + { + $this->setId($this->getId().'_'.$this->getIndex()); + $this->getChild('reset_filter_button')->setData('onclick', $this->getJsObjectName().'.resetFilter()'); + $this->getChild('search_button')->setData('onclick', $this->getJsObjectName().'.doFilter()'); + return parent::_beforeToHtml(); + } + + protected function _prepareCollection() + { + $collection = Mage::getModel('catalog/product')->getCollection() + ->setStore($this->_getStore()) + ->addAttributeToSelect('name') + ->addAttributeToSelect('sku') + ->addAttributeToSelect('price') + ->addAttributeToSelect('attribute_set_id'); +// ->addFilterByRequiredOptions(); + + $store = $this->_getStore(); + if ($store->getId()) { + $collection->addStoreFilter($store); + } + + if ($excludeIds = $this->_getGoogleBaseProductIds()) { + $collection->addIdFilter($excludeIds, true); + } + + Mage::getSingleton('catalog/product_status')->addSaleableFilterToCollection($collection); + + $this->setCollection($collection); + + return parent::_prepareCollection(); + } + + protected function _prepareColumns() + { + $this->addColumn('id', array( + 'header' => Mage::helper('sales')->__('ID'), + 'sortable' => true, + 'width' => '60px', + 'index' => 'entity_id' + )); + $this->addColumn('name', array( + 'header' => Mage::helper('sales')->__('Product Name'), + 'index' => 'name', + 'column_css_class'=> 'name' + )); + + $sets = Mage::getResourceModel('eav/entity_attribute_set_collection') + ->setEntityTypeFilter(Mage::getModel('catalog/product')->getResource()->getTypeId()) + ->load() + ->toOptionHash(); + + $this->addColumn('set_name', + array( + 'header'=> Mage::helper('catalog')->__('Attrib. Set Name'), + 'width' => '100px', + 'index' => 'attribute_set_id', + 'type' => 'options', + 'options' => $sets, + )); + + $this->addColumn('sku', array( + 'header' => Mage::helper('sales')->__('SKU'), + 'width' => '80px', + 'index' => 'sku', + 'column_css_class'=> 'sku' + )); + $this->addColumn('price', array( + 'header' => Mage::helper('sales')->__('Price'), + 'align' => 'center', + 'type' => 'currency', + 'currency_code' => $this->_getStore()->getCurrentCurrencyCode(), + 'rate' => $this->_getStore()->getBaseCurrency()->getRate($this->_getStore()->getCurrentCurrencyCode()), + 'index' => 'price' + )); + + return parent::_prepareColumns(); + } + + protected function _prepareMassaction() + { + $this->setMassactionIdField('product_id'); + $this->getMassactionBlock()->setFormFieldName('product'); + + $this->getMassactionBlock()->addItem('add', array( + 'label' => $this->__('Add to Google Base'), + 'url' => $this->getUrl('*/*/massAdd', array('_current'=>true)), + )); + return $this; + } + + public function getGridUrl() + { + return $this->getUrl('googlebase/selection/grid', array('index' => $this->getIndex(),'_current'=>true)); + } + + protected function _getGoogleBaseProductIds() + { + $collection = Mage::getResourceModel('googlebase/item_collection') + ->addStoreFilterId($this->_getStore()->getId()) + ->load(); + $productIds = array(); + foreach ($collection as $item) { + $productIds[] = $item->getProductId(); + } + return $productIds; + } + + protected function _getStore() + { + return $this->getLayout()->getBlockSingleton('googlebase/adminhtml_items')->getStore(); + } +} \ No newline at end of file diff --git a/app/code/core/Mage/GoogleBase/Block/Adminhtml/Items/Renderer/Id.php b/app/code/core/Mage/GoogleBase/Block/Adminhtml/Items/Renderer/Id.php new file mode 100644 index 00000000..5b33cae2 --- /dev/null +++ b/app/code/core/Mage/GoogleBase/Block/Adminhtml/Items/Renderer/Id.php @@ -0,0 +1,60 @@ + + */ +class Mage_GoogleBase_Block_Adminhtml_Items_Renderer_Id + extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract +{ + /** + * Renders Google Base Item Id + * + * @param Varien_Object $row + * @return string + */ + public function render(Varien_Object $row) + { + $baseUrl = 'http://www.google.com/base/step2offer?docId='; + + $itemUrl = $row->getData($this->getColumn()->getIndex()); + $urlParts = parse_url($itemUrl); + if (isset($urlParts['path'])) { + $pathParts = explode('/', $urlParts['path']); + $itemId = $pathParts[count($pathParts) - 1]; + } else { + $itemId = $itemUrl; + } + $title = $this->__('View Item in Google Base'); + + return sprintf('%s', $baseUrl . $itemId, $title, $title, $itemId); + } +} \ No newline at end of file diff --git a/app/code/core/Mage/GoogleBase/Block/Adminhtml/Types.php b/app/code/core/Mage/GoogleBase/Block/Adminhtml/Types.php new file mode 100644 index 00000000..a1b788c9 --- /dev/null +++ b/app/code/core/Mage/GoogleBase/Block/Adminhtml/Types.php @@ -0,0 +1,45 @@ + + */ + +class Mage_GoogleBase_Block_Adminhtml_Types extends Mage_Adminhtml_Block_Widget_Grid_Container +{ + public function __construct() + { + $this->_blockGroup = 'googlebase'; + $this->_controller = 'adminhtml_types'; + $this->_addButtonLabel = Mage::helper('googlebase')->__('Add Attribute Mapping'); + $this->_headerText = Mage::helper('googlebase')->__('Manage Attribute Mapping'); + parent::__construct(); + } +} \ No newline at end of file diff --git a/app/code/core/Mage/GoogleBase/Block/Adminhtml/Types/Edit.php b/app/code/core/Mage/GoogleBase/Block/Adminhtml/Types/Edit.php new file mode 100644 index 00000000..f593c8cf --- /dev/null +++ b/app/code/core/Mage/GoogleBase/Block/Adminhtml/Types/Edit.php @@ -0,0 +1,94 @@ + + */ + +class Mage_GoogleBase_Block_Adminhtml_Types_Edit extends Mage_Adminhtml_Block_Widget_Form_Container +{ + public function __construct() + { + parent::__construct(); + $this->_blockGroup = 'googlebase'; + $this->_controller = 'adminhtml_types'; + $this->_mode = 'edit'; + $model = Mage::registry('current_item_type'); + $this->_removeButton('reset'); + $this->_updateButton('save', 'label', $this->__('Save Mapping')); + $this->_updateButton('save', 'id', 'save_button'); + $this->_updateButton('delete', 'label', $this->__('Delete Mapping')); + if(!$model->getId()) { + $this->_removeButton('delete'); + } + + $this->_formInitScripts[] = ' + var itemType = function() { + return { + updateAttributes: function() { + if ($("select_attribute_set").value != "" && $("select_itemtype").value != "") + { + var blocksCount = Element.select($("attributes_details"), "div[id^=gbase_attribute_]").length; + if (blocksCount > 0 && confirm("'.$this->__('Current Mapping will be reloaded. Continue?').'") || blocksCount == 0) + { + var elements = [$("select_attribute_set"),$("select_itemtype")].flatten(); + $(\'save_button\').disabled = true; + new Ajax.Updater("attributes_details", "'.$this->getUrl('*/*/loadAttributes').'", {parameters:Form.serializeElements(elements), evalScripts:true, onComplete:function(){ $(\'save_button\').disabled = false; } }); + } + } + } + } + }(); + + Event.observe(window, \'load\', function(){ + if ($("select_attribute_set")) { + Event.observe($("select_attribute_set"), \'change\', itemType.updateAttributes); + } + if ($("select_itemtype")) { + Event.observe($("select_itemtype"), \'change\', itemType.updateAttributes); + } + }); + '; + } + + public function getHeaderText() + { + if(!is_null(Mage::registry('current_item_type')->getId())) { + return $this->__('Edit Item Type "%s"', $this->htmlEscape(Mage::registry('current_item_type')->getGbaseItemtype())); + } else { + return $this->__('New Item Type'); + } + } + + public function getHeaderCssClass() { + return 'icon-head head-customer-groups'; + } + +} diff --git a/app/code/core/Mage/GoogleBase/Block/Adminhtml/Types/Edit/Attributes.php b/app/code/core/Mage/GoogleBase/Block/Adminhtml/Types/Edit/Attributes.php new file mode 100644 index 00000000..051badab --- /dev/null +++ b/app/code/core/Mage/GoogleBase/Block/Adminhtml/Types/Edit/Attributes.php @@ -0,0 +1,126 @@ + + */ +class Mage_GoogleBase_Block_Adminhtml_Types_Edit_Attributes extends Mage_Adminhtml_Block_Widget_Form_Renderer_Fieldset_Element +{ + public function __construct() + { + $this->setTemplate('googlebase/types/edit/attributes.phtml'); + } + + protected function _prepareLayout() + { + $this->setChild('add_button', + $this->getLayout()->createBlock('adminhtml/widget_button') + ->setData(array( + 'label' => Mage::helper('googlebase')->__('Add New Attribute'), + 'class' => 'add', + 'id' => 'add_new_attribute', + 'on_click' => 'gBaseAttribute.add()' + )) + ); + $this->setChild('delete_button', + $this->getLayout()->createBlock('adminhtml/widget_button') + ->setData(array( + 'label' => Mage::helper('googlebase')->__('Remove'), + 'class' => 'delete delete-product-option', + 'on_click' => 'gBaseAttribute.remove(event)' + )) + ); + + parent::_prepareLayout(); + } + + public function getFieldId() + { + return 'gbase_attribute'; + } + + public function getFieldName () + { + return 'attributes'; + } + + public function getGbaseAttributesSelectHtml() + { + $options = array('' => $this->__('Custom attribute, no mapping')); + + $attributes = Mage::getModel('googlebase/service_feed') + ->getAttributes($this->getGbaseItemtype()); + foreach ($attributes as $attr) { + $options[$attr->getId()] = $attr->getName(); + } + + $select = $this->getLayout()->createBlock('adminhtml/html_select') + ->setId($this->getFieldId().'_{{index}}_gattribute') + ->setName($this->getFieldName().'[{{index}}][gbase_attribute]') + ->setOptions($options); + return $select->getHtml(); + } + + public function getAttributesSelectHtml() + { + $select = $this->getLayout()->createBlock('adminhtml/html_select') + ->setId($this->getFieldId().'_{{index}}_attribute') + ->setName($this->getFieldName().'[{{index}}][attribute_id]') + ->setOptions($this->_getAttributes($this->getAttributeSetId())); + return $select->getHtml(); + } + + public function getAddButtonHtml() + { + return $this->getChildHtml('add_button'); + } + + public function getDeleteButtonHtml() + { + return $this->getChildHtml('delete_button'); + } + + public function _getAttributes($setId) + { + $attributes = Mage::getModel('googlebase/attribute')->getAllowedAttributes($setId); + $result = array(); + + foreach ($attributes as $attribute) { + /* @var $attribute Mage_Catalog_Model_Resource_Eav_Attribute */ + $result[$attribute->getAttributeId()] = $attribute->getFrontendLabel(); + } + return $result; + } + + protected function _toJson($data) + { + return Zend_Json::encode($data); + } +} \ No newline at end of file diff --git a/app/code/core/Mage/GoogleBase/Block/Adminhtml/Types/Edit/Form.php b/app/code/core/Mage/GoogleBase/Block/Adminhtml/Types/Edit/Form.php new file mode 100644 index 00000000..46a00a61 --- /dev/null +++ b/app/code/core/Mage/GoogleBase/Block/Adminhtml/Types/Edit/Form.php @@ -0,0 +1,141 @@ + + */ + +class Mage_GoogleBase_Block_Adminhtml_Types_Edit_Form extends Mage_Adminhtml_Block_Widget_Form +{ + protected function _prepareForm() + { + $form = new Varien_Data_Form(); + + $itemType = Mage::registry('current_item_type'); + + $fieldset = $form->addFieldset('base_fieldset', array( + 'legend' => $this->__('Attribute Set and Item Type') + )); + + $attributeSelect = $fieldset->addField('select_attribute_set', 'select', array( + 'label' => $this->__('Attribute Set'), + 'title' => $this->__('Attribute Set'), + 'name' => 'attribute_set_id', + 'required' => true, + 'options' => $this->_getAttributeSetsArray(), + 'value' => $itemType->getAttributeSetId(), + )); + if ($itemType->getAttributeSetId()) { + $attributeSelect->setValue($itemType->getAttributeSetId()) + ->setDisabled(true); + } + + $itemTypeSelect = $fieldset->addField('select_itemtype', 'select', array( + 'label' => $this->__('Google Base Item Type'), + 'title' => $this->__('Google Base Item Type'), + 'name' => 'gbase_itemtype', + 'required' => true, + 'options' => $this->_getGbaseItemTypesArray(), + 'value' => $itemType->getGbaseItemtype(), + )); + if ($itemType->getGbaseItemtype()) { + $itemTypeSelect->setValue($itemType->getGbaseItemtype()) + ->setDisabled(true); + } + + $attributesBlock = $this->getLayout()->createBlock('googlebase/adminhtml_types_edit_attributes'); + if ($itemType->getId()) { + $attributesBlock->setAttributeSetId($itemType->getAttributeSetId()) + ->setGbaseItemtype($itemType->getGbaseItemtype()) + ->setAttributeSetSelected(true); + + } + + $attributes = Mage::registry('attributes'); + if (is_array($attributes) && count($attributes) > 0) { + $attributesBlock->setAttributesData($attributes); + } + + $fieldset->addField('attributes_box', 'note', array( + 'label' => $this->__('Attributes mapping'), + 'text' => '
' . $attributesBlock->toHtml() . '
', + )); + + $form->addValues($itemType->getData()); + $form->setUseContainer(true); + $form->setId('edit_form'); + $form->setMethod('post'); + $form->setAction($this->getSaveUrl()); + $this->setForm($form); + } + + protected function _getAttributeSetsArray() + { + $entityType = Mage::getModel('catalog/product')->getResource()->getEntityType(); + $collection = Mage::getResourceModel('eav/entity_attribute_set_collection') + ->setEntityTypeFilter($entityType->getId()); + + $ids = array(); + $itemType = Mage::registry('current_item_type'); + if (!$itemType->getId()) { + $typesCollection = Mage::getResourceModel('googlebase/type_collection')->load(); + foreach ($typesCollection as $type) { + $ids[] = $type->getAttributeSetId(); + } + } + + $result = array('' => ''); + foreach ($collection as $attributeSet) { + if (!in_array($attributeSet->getId(), $ids)) { + $result[$attributeSet->getId()] = $attributeSet->getAttributeSetName(); + } + } + return $result; + } + protected function _getGbaseItemTypesArray() + { + $itemTypes = Mage::getModel('googlebase/service_feed')->getItemTypes(); + $result = array('' => ''); + foreach ($itemTypes as $type) { + $result[$type->getId()] = $type->getName(); + } + return $result; + } + + public function getItemType() + { + return Mage::registry('current_item_type'); + } + + public function getSaveUrl() + { + return $this->getUrl('*/*/save', array('type_id' => $this->getItemType()->getId())); + } +} \ No newline at end of file diff --git a/app/code/core/Mage/GoogleBase/Block/Adminhtml/Types/Grid.php b/app/code/core/Mage/GoogleBase/Block/Adminhtml/Types/Grid.php new file mode 100644 index 00000000..2ccb9908 --- /dev/null +++ b/app/code/core/Mage/GoogleBase/Block/Adminhtml/Types/Grid.php @@ -0,0 +1,87 @@ + + */ +class Mage_GoogleBase_Block_Adminhtml_Types_Grid extends Mage_Adminhtml_Block_Widget_Grid +{ + public function __construct() + { + parent::__construct(); + $this->setId('types_grid'); + $this->setSaveParametersInSession(true); + $this->setUseAjax(true); + } + + protected function _prepareCollection() + { + $collection = Mage::getResourceModel('googlebase/type_collection')->addItemsCount(); + $this->setCollection($collection); + parent::_prepareCollection(); + return $this; + } + + protected function _prepareColumns() + { + $this->addColumn('attribute_set_name', + array( + 'header' => $this->__('Attributes Set'), + 'width' => '150px', + 'index' => 'attribute_set_name', + )); + $this->addColumn('gbase_itemtype', + array( + 'header' => $this->__('Google Base Item type'), + 'width' => '150px', + 'index' => 'gbase_itemtype', + )); + + $this->addColumn('items_total', + array( + 'header' => Mage::helper('catalog')->__('Total Qty Base Items'), + 'width' => '150px', + 'index' => 'items_total', + 'filter' => false + )); + + return parent::_prepareColumns(); + } + + public function getRowUrl($row) + { + return $this->getUrl('*/*/edit', array('id'=>$row->getId())); + } + + public function getGridUrl() + { + return $this->getUrl('*/*/grid', array('_current'=>true)); + } +} \ No newline at end of file diff --git a/skin/frontend/default/modern/css/custom.css b/app/code/core/Mage/GoogleBase/Helper/Data.php similarity index 76% rename from skin/frontend/default/modern/css/custom.css rename to app/code/core/Mage/GoogleBase/Helper/Data.php index 5178b509..449cc336 100644 --- a/skin/frontend/default/modern/css/custom.css +++ b/app/code/core/Mage/GoogleBase/Helper/Data.php @@ -1,3 +1,4 @@ + + */ +class Mage_GoogleBase_Helper_Data extends Mage_Core_Helper_Abstract +{ +} \ No newline at end of file diff --git a/app/code/core/Mage/GoogleBase/Model/Attribute.php b/app/code/core/Mage/GoogleBase/Model/Attribute.php new file mode 100644 index 00000000..78118241 --- /dev/null +++ b/app/code/core/Mage/GoogleBase/Model/Attribute.php @@ -0,0 +1,116 @@ + + */ +class Mage_GoogleBase_Model_Attribute extends Mage_Core_Model_Abstract +{ + /** + * Default ignored attribute codes + * + * @var array + */ + protected $_ignoredAttributeCodes = array( + 'custom_design','custom_design_from','custom_design_to','custom_layout_update', + 'gift_message_available','news_from_date','news_to_date','options_container', + 'price_view','sku_type' + ); + + /** + * Default ignored attribute types + * + * @var array + */ + protected $_ignoredAttributeTypes = array('hidden', 'media_image', 'image', 'gallery'); + + protected function _construct() + { + $this->_init('googlebase/attribute'); + } + + public function getAllowedAttributes($setId) + { + $attributes = Mage::getModel('catalog/product')->getResource() + ->loadAllAttributes() + ->getSortedAttributes($setId); + + $result = array(); + foreach ($attributes as $attribute) { + /* @var $attribute Mage_Catalog_Model_Resource_Eav_Attribute */ + if ($attribute->isInSet($setId) && $this->_isAllowedAttribute($attribute)) { + $list[$attribute->getAttributeId()] = $attribute; + $titles[$attribute->getAttributeId()] = $attribute->getFrontendLabel(); + } + } + asort($titles); + $result = array(); + foreach ($titles as $attributeId => $label) { + $result[$attributeId] = $list[$attributeId]; + } + return $result; + } + + /** + * Check if attribute allowed + * + * @param Mage_Eav_Model_Entity_Attribute_Abstract $attribute + * @param array $attributes + * @return boolean + */ + protected function _isAllowedAttribute($attribute) + { + return !in_array($attribute->getFrontendInput(), $this->_ignoredAttributeTypes) + && !in_array($attribute->getAttributeCode(), $this->_ignoredAttributeCodes) + && $attribute->getFrontendLabel() != ""; + } + + /** + * Return Google Base Attribute Type By Product Attribute + * + * @param Mage_Catalog_Model_Resource_Eav_Attribute $attribute + * @return string Google Base Attribute Type + */ + public function getGbaseAttributeType($attribute) + { + $typesMapping = array( +// 'date' => 'dateTime', + 'price' => 'floatUnit', + 'decimal' => 'numberUnit', + ); + if (isset($typesMapping[$attribute->getFrontendInput()])) { + return $typesMapping[$attribute->getFrontendInput()]; + } elseif (isset($typesMapping[$attribute->getBackendType()])) { + return $typesMapping[$attribute->getBackendType()]; + } else { + return Mage_GoogleBase_Model_Service_Item::DEFAULT_ATTRIBUTE_TYPE; + } + } +} \ No newline at end of file diff --git a/app/code/core/Mage/GoogleBase/Model/Item.php b/app/code/core/Mage/GoogleBase/Model/Item.php new file mode 100644 index 00000000..c9408f57 --- /dev/null +++ b/app/code/core/Mage/GoogleBase/Model/Item.php @@ -0,0 +1,350 @@ + + */ +class Mage_GoogleBase_Model_Item extends Mage_Core_Model_Abstract +{ + const ATTRIBUTES_REGISTRY_KEY = 'gbase_attributes_registry'; + const TYPES_REGISTRY_KEY = 'gbase_types_registry'; + + protected function _construct() + { + parent::_construct(); + $this->_init('googlebase/item'); + } + + /** + * Return Service Item Instance + * + * @return Mage_GoogleBase_Model_Service_Item + */ + public function getServiceItem() + { + return Mage::getModel('googlebase/service_item'); + } + + /** + * Save item to Google Base + * + * @return Mage_GoogleBase_Model_Item + */ + public function insertItem() + { + $this->_checkProduct() + ->_prepareProductObject(); + + $typeModel = $this->_getTypeModel(); + $this->getServiceItem() + ->setItem($this) + ->setObject($this->getProduct()) + ->setAttributeValues($this->_getAttributeValues()) + ->setItemType($typeModel->getGbaseItemtype()) + ->insert(); + $this->setTypeId($typeModel->getTypeId()); + return $this; + } + + /** + * Update Item data + * + * @return Mage_GoogleBase_Model_Item + */ + public function updateItem() + { + $this->_checkProduct() + ->_prepareProductObject(); + $this->loadByProduct($this->getProduct()); + if ($this->getId()) { + $typeModel = $this->_getTypeModel(); + $this->getServiceItem() + ->setItem($this) + ->setObject($this->getProduct()) + ->setAttributeValues($this->_getAttributeValues()) + ->setItemType($typeModel->getGbaseItemtype()) + ->update(); + } + return $this; + } + + /** + * Delete Item from Google Base + * + * @return Mage_GoogleBase_Model_Item + */ + public function deleteItem() + { + $this->getServiceItem()->setItem($this)->delete(); + return $this; + } + + /** + * Delete Item from Google Base + * + * @return Mage_GoogleBase_Model_Item + */ + public function hideItem() + { + $this->getServiceItem()->setItem($this)->hide(); + $this->setIsHidden(1); + $this->save(); + return $this; + } + + /** + * Delete Item from Google Base + * + * @return Mage_GoogleBase_Model_Item + */ + public function activateItem() + { + $this->getServiceItem()->setItem($this)->activate(); + $this->setIsHidden(0); + $this->save(); + return $this; + } + + /** + * Load Item Model by Product + * + * @param Mage_Catalog_Model_Product $product + * @return Mage_GoogleBase_Model_Item + */ + public function loadByProduct($product) + { + if (!$this->getProduct()) { + $this->setProduct($product); + } + $this->getResource()->loadByProduct($this); + return $this; + } + + /** + * Product Setter + * + * @param Mage_Catalog_Model_Product + * @return Mage_GoogleBase_Model_Item + */ + public function setProduct($product) + { + if (!($product instanceof Mage_Catalog_Model_Product)) { + Mage::throwException(Mage::helper('googlebase')->__('Invalid Product Model for Google Base Item')); + } + $this->setData('product', $product); + $this->setProductId($product->getId()); + $this->setStoreId($product->getStoreId()); + return $this; + } + + /** + * Check product instance + * + * @return Mage_GoogleBase_Model_Item + */ + protected function _checkProduct() + { + if (!($this->getProduct() instanceof Mage_Catalog_Model_Product)) { + Mage::throwException(Mage::helper('googlebase')->__('Invalid Product Model for Google Base Item')); + } + return $this; + } + + /** + * Copy Product object and assign additional data to the copy + * + * @return Mage_GoogleBase_Model_Item + */ + protected function _prepareProductObject() + { + $product = clone $this->getProduct(); + + $url = $product->getProductUrl(); + if (!Mage::getStoreConfigFlag('web/url/use_store')) { + $urlInfo = parse_url($url); + $store = $product->getStore()->getCode(); + if (isset($urlInfo['query']) && $urlInfo['query'] != '') { + $url .= '&___store=' . $store; + } else { + $url .= '?___store=' . $store; + } + } + $product->setUrl($url) + ->setQuantity( $this->getProduct()->getStockItem()->getQty() ) + ->setImageUrl( Mage::helper('catalog/product')->getImageUrl($product) ); + $this->setProduct($product); + return $this; + } + + /** + * Return Product attribute values array + * + * @return array Product attribute values + */ + protected function _getAttributeValues() + { + $result = array(); + $productAttributes = $this->_getProductAttributes(); + + foreach ($this->_getAttributesCollection() as $attribute) { + + $attributeId = $attribute->getAttributeId(); + + if (isset($productAttributes[$attributeId])) { + $productAttribute = $productAttributes[$attributeId]; + + if ($attribute->getGbaseAttribute()) { + $name = $attribute->getGbaseAttribute(); + } else { + $name = $this->_getAttributeLabel($productAttribute, $this->getProduct()->getStoreId()); + } + + $value = $productAttribute->getGbaseValue(); + $type = Mage::getSingleton('googlebase/attribute')->getGbaseAttributeType($productAttribute); + + if ($name && $value && $type) { + $result[$name] = array( + 'value' => $value, + 'type' => $type + ); + } + } + } + return $result; + } + + /** + * Return Product Attribute Store Label + * + * @param Mage_Catalog_Model_Resource_Eav_Attribute $attribute + * @param int $storeId Store View Id + * @return string Attribute Store View Label or Attribute code + */ + protected function _getAttributeLabel($attribute, $storeId) + { + $frontendLabel = $attribute->getFrontend()->getLabel(); + if (is_array($frontendLabel)) { + $frontendLabel = array_shift($frontendLabel); + } + if (!$this->_translations) { + $this->_translations = Mage::getModel('core/translate_string') + ->load(Mage_Catalog_Model_Entity_Attribute::MODULE_NAME.Mage_Core_Model_Translate::SCOPE_SEPARATOR.$frontendLabel) + ->getStoreTranslations(); + } + if (isset($this->_translations[$storeId])) { + return $this->_translations[$storeId]; + } else { + return $attribute->getAttributeCode(); + } + } + + /** + * Return Google Base Item Type Model for current Product Attribute Set + * + * @return Mage_GoogleBase_Model_Type + */ + protected function _getTypeModel() + { + $registry = Mage::registry(self::TYPES_REGISTRY_KEY); + $attributeSetId = $this->getProduct()->getAttributeSetId(); + if (is_array($registry) && isset($registry[$attributeSetId])) { + return $registry[$attributeSetId]; + } + $model = Mage::getModel('googlebase/type')->loadByAttributeSetId($attributeSetId); + $registry[$attributeSetId] = $model; + Mage::unregister(self::TYPES_REGISTRY_KEY); + Mage::register(self::TYPES_REGISTRY_KEY, $registry); + return $model; + } + + /** + * Return Product attributes array + * + * @return array Product attributes + */ + protected function _getProductAttributes() + { + $product = $this->getProduct(); + $attributes = $product->getAttributes(); + $result = array(); + foreach ($attributes as $attribute) { + $value = $attribute->getFrontend()->getValue($product); + if (is_string($value) && strlen($value) && $product->hasData($attribute->getAttributeCode())) { + $attribute->setGbaseValue($value); + $result[$attribute->getAttributeId()] = $attribute; + } + } + return $result; + } + + /** + * Get Product Media files info + * + * @return array Media files info + */ + protected function _getProductImages() + { + $product = $this->getProduct(); + $galleryData = $product->getData('media_gallery'); + + if (!isset($galleryData['images']) || !is_array($galleryData['images'])) { + return array(); + } + + $result = array(); + foreach ($galleryData['images'] as $image) { + $image['url'] = Mage::getSingleton('catalog/product_media_config') + ->getMediaUrl($image['file']); + $result[] = $image; + } + return $result; + } + + /** + * Return attribute collection for current Product Attribute Set + * + * @return Mage_GoogleBase_Model_Mysql4_Attribute_Collection + */ + protected function _getAttributesCollection() + { + $registry = Mage::registry(self::ATTRIBUTES_REGISTRY_KEY); + $attributeSetId = $this->getProduct()->getAttributeSetId(); + if (is_array($registry) && isset($registry[$attributeSetId])) { + return $registry[$attributeSetId]; + } + $collection = Mage::getResourceModel('googlebase/attribute_collection') + ->addAttributeSetFilter($attributeSetId) + ->load(); + $registry[$attributeSetId] = $collection; + Mage::unregister(self::ATTRIBUTES_REGISTRY_KEY); + Mage::register(self::ATTRIBUTES_REGISTRY_KEY, $registry); + return $collection; + } +} \ No newline at end of file diff --git a/app/code/core/Mage/GoogleBase/Model/Mysql4/Attribute.php b/app/code/core/Mage/GoogleBase/Model/Mysql4/Attribute.php new file mode 100644 index 00000000..78207657 --- /dev/null +++ b/app/code/core/Mage/GoogleBase/Model/Mysql4/Attribute.php @@ -0,0 +1,40 @@ + + */ +class Mage_GoogleBase_Model_Mysql4_Attribute extends Mage_Core_Model_Mysql4_Abstract +{ + protected function _construct() + { + $this->_init('googlebase/attributes', 'id'); + } +} \ No newline at end of file diff --git a/app/code/core/Mage/GoogleBase/Model/Mysql4/Attribute/Collection.php b/app/code/core/Mage/GoogleBase/Model/Mysql4/Attribute/Collection.php new file mode 100644 index 00000000..6e82fac4 --- /dev/null +++ b/app/code/core/Mage/GoogleBase/Model/Mysql4/Attribute/Collection.php @@ -0,0 +1,93 @@ + + */ +class Mage_GoogleBase_Model_Mysql4_Attribute_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract +{ + /** + * Whether to join attribute_set_id to attributes or not + */ + protected $_joinAttributeSetFlag = true; + + + protected function _construct() + { + $this->_init('googlebase/attribute'); + } + + public function addAttributeSetFilter($attributeSetId) + { + if (!$this->getJoinAttributeSetFlag()) { + return $this; + } + $this->getSelect()->where('attribute_set_id = ?', $attributeSetId); + return $this; + } + + public function addTypeFilter($type_id) + { + $this->getSelect()->where('main_table.type_id = ?', $type_id); + return $this; + } + + public function load($printQuery = false, $logQuery = false) + { + if ($this->isLoaded()) { + return $this; + } + if ($this->getJoinAttributeSetFlag()) { + $this->_joinAttributeSet(); + } + parent::load($printQuery, $logQuery); + return $this; + } + + protected function _joinAttributeSet() + { + $this->getSelect() + ->joinInner( + array('types'=>$this->getTable('googlebase/types')), + 'main_table.type_id=types.type_id', + array('attribute_set_id' => 'types.attribute_set_id')); + return $this; + } + + public function getJoinAttributeSetFlag() + { + return $this->_joinAttributeSetFlag; + } + + public function setJoinAttributeSetFlag($flag) + { + return $this->_joinAttributeSetFlag = (bool)$flag; + } +} \ No newline at end of file diff --git a/app/code/core/Mage/GoogleBase/Model/Mysql4/Item.php b/app/code/core/Mage/GoogleBase/Model/Mysql4/Item.php new file mode 100644 index 00000000..ffd67c13 --- /dev/null +++ b/app/code/core/Mage/GoogleBase/Model/Mysql4/Item.php @@ -0,0 +1,71 @@ + + */ +class Mage_GoogleBase_Model_Mysql4_Item extends Mage_Core_Model_Mysql4_Abstract +{ + protected function _construct() + { + $this->_init('googlebase/items', 'item_id'); + } + + /** + * Load Item model by product + * + * @param Mage_GoogleBase_Model_Item $model + * @return Mage_GoogleBase_Model_Mysql4_Item + */ + public function loadByProduct($model) + { + if (!($model->getProduct() instanceof Varien_Object)) { + return $this; + } + + $product = $model->getProduct(); + $productId = $product->getId(); + $storeId = $model->getStoreId() ? $model->getStoreId() : $product->getStoreId(); + + $read = $this->_getReadAdapter(); + $select = $read->select(); + + if ($productId !== null) { + $select->from($this->getMainTable()) + ->where("product_id = ?", $productId) + ->where('store_id = ?', (int)$storeId); + + $data = $read->fetchRow($select); + $data = is_array($data) ? $data : array(); + $model->addData($data); + } + return $this; + } +} \ No newline at end of file diff --git a/app/code/core/Mage/GoogleBase/Model/Mysql4/Item/Collection.php b/app/code/core/Mage/GoogleBase/Model/Mysql4/Item/Collection.php new file mode 100644 index 00000000..edeb69bb --- /dev/null +++ b/app/code/core/Mage/GoogleBase/Model/Mysql4/Item/Collection.php @@ -0,0 +1,107 @@ + + */ +class Mage_GoogleBase_Model_Mysql4_Item_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract +{ + protected function _construct() + { + $this->_init('googlebase/item'); + } + + protected function _initSelect() + { + parent::_initSelect(); + $this->_joinTables(); + return $this; + } + + public function addStoreFilterId($storeId) + { + $this->getSelect()->where('main_table.store_id=?', $storeId); + return $this; + } + + public function addProductFilterId($productId) + { + $this->getSelect()->where('main_table.product_id=?', $productId); + return $this; + } + + public function addFieldToFilter($field, $condition=null) + { + if ($field == 'name') { + $conditionSql = $this->_getConditionSql('p.value', $condition); + $this->getSelect()->where($conditionSql); + } else { + parent::addFieldToFilter($field, $condition); + } + } + + /** + * Join product and type data + * + * @return Mage_GoogleBase_Model_Mysql4_Item_Collection + */ + protected function _joinTables() + { + $entityType = Mage::getSingleton('eav/config')->getEntityType('catalog_product'); + $attribute = Mage::getModel('eav/config')->getAttribute($entityType->getEntityTypeId(),'name'); + + $joinConditionDefault = sprintf("p_d.attribute_id=%d AND p_d.store_id='0' AND main_table.product_id=p_d.entity_id", + $attribute->getAttributeId() + ); + $joinCondition = sprintf("p.attribute_id=%d AND p.store_id=main_table.store_id AND main_table.product_id=p.entity_id", + $attribute->getAttributeId() + ); + + $this->getSelect() + ->joinLeft( + array('p_d' => $attribute->getBackend()->getTable()), + $joinConditionDefault, + array()); + + $this->getSelect() + ->joinLeft( + array('p' => $attribute->getBackend()->getTable()), + $joinCondition, + array('name' => new Zend_Db_Expr('IFNULL(p.value, p_d.value)'))); + + $this->getSelect() + ->joinLeft( + array('types' => $this->getTable('googlebase/types')), + 'main_table.type_id=types.type_id', + array('gbase_itemtype' => new Zend_Db_Expr('IFNULL(types.gbase_itemtype, \''.Mage_GoogleBase_Model_Service_Item::DEFAULT_ITEM_TYPE .'\')'))); + + return $this; + } +} \ No newline at end of file diff --git a/app/code/core/Mage/GoogleBase/Model/Mysql4/Type.php b/app/code/core/Mage/GoogleBase/Model/Mysql4/Type.php new file mode 100644 index 00000000..11b85816 --- /dev/null +++ b/app/code/core/Mage/GoogleBase/Model/Mysql4/Type.php @@ -0,0 +1,40 @@ + + */ +class Mage_GoogleBase_Model_Mysql4_Type extends Mage_Core_Model_Mysql4_Abstract +{ + protected function _construct() + { + $this->_init('googlebase/types', 'type_id'); + } +} \ No newline at end of file diff --git a/app/code/core/Mage/GoogleBase/Model/Mysql4/Type/Collection.php b/app/code/core/Mage/GoogleBase/Model/Mysql4/Type/Collection.php new file mode 100644 index 00000000..2ad85d46 --- /dev/null +++ b/app/code/core/Mage/GoogleBase/Model/Mysql4/Type/Collection.php @@ -0,0 +1,79 @@ + + */ +class Mage_GoogleBase_Model_Mysql4_Type_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract +{ + + protected function _construct() + { + $this->_init('googlebase/type'); + } + + protected function _initSelect() + { + parent::_initSelect(); + $this->_joinAttributeSet(); + return $this; + } + + /** + * Add total count of Items for each type + * + * @return Mage_GoogleBase_Model_Mysql4_Type_Collection + */ + public function addItemsCount() + { + $this->getSelect() + ->joinLeft( + array('items'=>$this->getTable('googlebase/items')), + 'main_table.type_id=items.type_id', + array('items_total' => 'COUNT(items.item_id)')) + ->group('main_table.type_id'); + return $this; + } + + /** + * Join Attribute Set data + * + * @return Mage_GoogleBase_Model_Mysql4_Type_Collection + */ + protected function _joinAttributeSet() + { + $this->getSelect() + ->join( + array('set'=>$this->getTable('eav/attribute_set')), + 'main_table.attribute_set_id=set.attribute_set_id', + array('attribute_set_name' => 'set.attribute_set_name')); + return $this; + } +} \ No newline at end of file diff --git a/app/code/core/Mage/GoogleBase/Model/Observer.php b/app/code/core/Mage/GoogleBase/Model/Observer.php new file mode 100644 index 00000000..cd49c53b --- /dev/null +++ b/app/code/core/Mage/GoogleBase/Model/Observer.php @@ -0,0 +1,80 @@ + + */ +class Mage_GoogleBase_Model_Observer +{ + /** + * Update product item in Google Base + * + * @param Varien_Object $observer + * @return Mage_GoogleBase_Model_Observer + */ + public function saveProductItem($observer) + { + if (Mage::getStoreConfigFlag('google/googlebase/observed')) { + $product = $observer->getEvent()->getProduct(); + + $collection = Mage::getResourceModel('googlebase/item_collection') + ->addProductFilterId($product->getId()) + ->load(); + foreach ($collection as $item) { + $product = Mage::getSingleton('catalog/product') + ->setStoreId($item->getStoreId()) + ->load($item->getProductId()); + Mage::getModel('googlebase/item')->setProduct($product)->updateItem(); + } + } + return $this; + } + + /** + * Delete product item from Google Base + * + * @param Varien_Object $observer + * @return Mage_GoogleBase_Model_Observer + */ + public function deleteProductItem($observer) + { + if (Mage::getStoreConfigFlag('google/googlebase/observed')) { + $product = $observer->getEvent()->getProduct(); + + $collection = Mage::getResourceModel('googlebase/item_collection') + ->addProductFilterId($product->getId()) + ->load(); + foreach ($collection as $item) { + $item->deleteItem()->delete(); + } + } + return $this; + } +} \ No newline at end of file diff --git a/app/code/core/Mage/GoogleBase/Model/Service.php b/app/code/core/Mage/GoogleBase/Model/Service.php new file mode 100644 index 00000000..042f0448 --- /dev/null +++ b/app/code/core/Mage/GoogleBase/Model/Service.php @@ -0,0 +1,96 @@ + + */ +class Mage_GoogleBase_Model_Service extends Varien_Object +{ + /** + * Retutn Google Base Client Instance + * + * @return Zend_Http_Client + */ + public function getClient() + { + $user = Mage::getStoreConfig('google/googlebase/login'); + $pass = Mage::getStoreConfig('google/googlebase/password'); + + // Create an authenticated HTTP client + $errorMsg = Mage::helper('googlebase')->__('Unable to connect to Google Base. Please, check Account settings in configuration.'); + try { + $client = Zend_Gdata_ClientLogin::getHttpClient($user, $pass, Zend_Gdata_Gbase::AUTH_SERVICE_NAME); + } catch (Zend_Gdata_App_AuthException $e) { + Mage::throwException($errorMsg . Mage::helper('googlebase')->__('Error: %s', $e->getMessage())); + } catch (Zend_Gdata_App_HttpException $e) { + Mage::throwException($errorMsg . Mage::helper('googlebase')->__('Error: %s', $e->getMessage())); + } catch (Zend_Gdata_App_CaptchaRequiredException $e) { + Mage::throwException($errorMsg . Mage::helper('googlebase')->__('Error: %s', $e->getMessage())); + } + + return $client; + } + + /** + * Retutn Google Base Service Instance + * + * @return Zend_Gdata_Gbase + */ + public function getService() + { + if (!$this->_service) { + $service = $this->_connect(); + $this->_service = $service; + } + return $this->_service; + } + + /** + * Authorize Google Account + * + * @return Zend_Gdata_Gbase + */ + protected function _connect() + { + $client = $this->getClient(); + $service = new Zend_Gdata_Gbase($client); + return $service; + } + + /** + * Get Dry Run mode + * + * @return boolean + */ + public function getDryRun() + { + return $this->getDataSetDefault('dry_run', false); + } +} \ No newline at end of file diff --git a/app/code/core/Mage/GoogleBase/Model/Service/Feed.php b/app/code/core/Mage/GoogleBase/Model/Service/Feed.php new file mode 100644 index 00000000..8c3bef83 --- /dev/null +++ b/app/code/core/Mage/GoogleBase/Model/Service/Feed.php @@ -0,0 +1,143 @@ + + */ +class Mage_GoogleBase_Model_Service_Feed extends Mage_GoogleBase_Model_Service +{ + const ITEM_TYPES_LOCATION = 'http://www.google.com/base/feeds/itemtypes'; + const ITEMS_LOCATION = 'http://www.google.com/base/feeds/items'; + + /** + * Google Base Feed Instance + * + * @param string $location + * @return Zend_Gdata_Feed + */ + public function getFeed($location = null) + { + $query = new Zend_Gdata_Query($location); + return $this->getService()->getFeed($query); + } + + /** + * Retrieve Items Statistics (expires, clicks, views, impr. etc.) + * + * @return array + */ + public function getItemsStatsArray() + { + $feed = $this->getFeed(self::ITEMS_LOCATION); + $result = array(); + foreach ($feed as $entry) { + $draft = 'no'; + if (is_object($entry->getControl()) && is_object($entry->getControl()->getDraft())) { + $draft = $entry->getControl()->getDraft()->getText(); + } + $data = array( + 'draft' => ($draft == 'yes' ? 1 : 0) + ); + $elements = $entry->getExtensionElements(); + foreach ($elements as $el) { + switch ($el->rootElement) { + case 'expiration_date': + $data['expires'] = Mage::getSingleton('googlebase/service_item') + ->gBaseDate2DateTime($el->getText()); + break; + + default: + break; + } + } + + $result[$entry->getId()->getText()] = $data; + } + return $result; + } + + /** + * Returns Google Base recommended Item Types + * + * @return array + */ + public function getItemTypes() + { + if (is_array($this->_itemTypes)) { + return $this->_itemTypes; + } + $location = self::ITEM_TYPES_LOCATION . '/' . Mage::app()->getLocale()->getLocale(); + $feed = $this->getFeed($location); + + $itemTypes = array(); + foreach ($feed->entries as $entry) { + $type = $entry->extensionElements[0]->text; + $item = new Varien_Object(); + $item->setId($type); + $item->setName($entry->title->text); + $item->setLocation($entry->id->text); + $itemTypes[$type] = $item; + + $typeAttributes = $entry->extensionElements[1]->extensionElements; + $attributes = array(); + if (is_array($typeAttributes)) { + foreach($typeAttributes as $attr) { + $name = $attr->extensionAttributes['name']['value']; + $type = $attr->extensionAttributes['type']['value']; + $attribute = new Varien_Object(); + $attribute->setId($name); + $attribute->setName($name); + $attribute->setType($type); + $attributes[$name] = $attribute; + } + } + ksort($attributes); + $item->setAttributes($attributes); + } + ksort($itemTypes); + $this->_itemTypes = $itemTypes; + return $itemTypes; + } + + /** + * Returns Google Base Attributes + * + * @param string $type Google Base Item Type + * @return array + */ + public function getAttributes($type) + { + $itemTypes = $this->getItemTypes(); + if (isset($itemTypes[$type]) && $itemTypes[$type] instanceof Varien_Object) { + return $itemTypes[$type]->getAttributes(); + } + Mage::throwException(Mage::helper('googlebase')->__('No such Item Type "%s" in Google Base to retrieve attributes', $type)); + } +} \ No newline at end of file diff --git a/app/code/core/Mage/GoogleBase/Model/Service/Item.php b/app/code/core/Mage/GoogleBase/Model/Service/Item.php new file mode 100644 index 00000000..1ff0d262 --- /dev/null +++ b/app/code/core/Mage/GoogleBase/Model/Service/Item.php @@ -0,0 +1,359 @@ + + */ +class Mage_GoogleBase_Model_Service_Item extends Mage_GoogleBase_Model_Service +{ + const DEFAULT_ITEM_TYPE = 'products'; + const DEFAULT_ATTRIBUTE_TYPE = 'text'; + + /** + * Object instance to populate entry data + * + * @var Varien_Object + */ + protected $_object = null; + + /** + * Item instance to update entry data + * + * @var Mage_GoogleBase_Model_Item + */ + protected $_item = null; + + /** + * $_object Setter + * + * @param Varien_Object $object + * @return Mage_GoogleBase_Model_Service_Item + */ + public function setObject($object) + { + $this->_object = $object; + return $this; + } + + /** + * $_object Getter + * + * @return Varien_Object + */ + public function getObject() + { + return $this->_object; + } + + /** + * $_item Setter + * + * @param Mage_GoogleBase_Model_Item $item + * @return Mage_GoogleBase_Model_Service_Item + */ + public function setItem($item) + { + $this->_item = $item; + return $this; + } + + /** + * $_item Getter + * + * @return Mage_GoogleBase_Model_Item + */ + public function getItem() + { + return $this->_item; + } + + /** + * Insert Item into Google Base + * + * @return Zend_Gdata_Gbase_ItemEntry + */ + public function insert() + { + $this->_checkItem(); + $service = $this->getService(); + $entry = $service->newItemEntry(); + $this->setEntry($entry); + $this->_prepareEnrtyForSave(); + $this->getEntry()->setItemType($this->_getItemType()); + $entry = $service->insertGbaseItem($this->getEntry()); + $this->setEntry($entry); + $entryId = $this->getEntry()->getId(); + $published = $this->gBaseDate2DateTime($this->getEntry()->getPublished()->getText()); + $this->getItem() + ->setGbaseItemId($entryId) + ->setPublished($published); + + if ($expires = $this->_getAttributeValue('expiration_date')) { + $expires = $this->gBaseDate2DateTime($expires); + $this->getItem()->setExpires($expires); + } + } + + /** + * Update Item data in Google Base + * + * @return Zend_Gdata_Gbase_ItemEntry + */ + public function update() + { + $this->_checkItem(); + $service = $this->getService(); + $entry = $service->getGbaseItemEntry( $this->getItem()->getGbaseItemId() ); + $this->setEntry($entry); + $this->_prepareEnrtyForSave(); + $entry = $service->updateGbaseItem($this->getEntry()); + + } + + /** + * Delete Item from Google Base + * + * @return Zend_Gdata_Gbase_ItemFeed + */ + public function delete() + { + $this->_checkItem(); + + $service = $this->getService(); + $entry = $service->getGbaseItemEntry( $this->getItem()->getGbaseItemId() ); + return $service->deleteGbaseItem($entry, $this->getDryRun()); + } + + /** + * Hide item in Google Base + * + * @return Mage_GoogleBase_Model_Service_Item + */ + public function hide() + { + $this->_saveDraft(true); + return $this; + } + + /** + * Publish item in Google Base + * + * @return Mage_GoogleBase_Model_Service_Item + */ + public function activate() + { + $this->_saveDraft(false); + return $this; + } + + /** + * Update item Control property + * + * @param boolean Save as draft or not + * @return Mage_GoogleBase_Model_Service_Item + */ + protected function _saveDraft($yes = true) + { + $this->_checkItem(); + + $service = $this->getService(); + $entry = $service->getGbaseItemEntry( $this->getItem()->getGbaseItemId() ); + + $draftText = $yes ? 'yes' : 'no'; + $draft = $service->newDraft($draftText); + $control = $service->newControl($draft); + + $entry->setControl($control); + $entry->save(); + return $this; + } + + /** + * Prepare Entry data and attributes before saving in Google Base + * + * @return Mage_GoogleBase_Model_Service_Item + */ + protected function _prepareEnrtyForSave() + { + $object = $this->getObject(); + if (!($object instanceof Varien_Object)) { + Mage::throwException(Mage::helper('googlebase')->__('Object model is not specified to save Google Base entry')); + } + + $this->_setUniversalData(); + + $attributes = $this->getAttributeValues(); + if (is_array($attributes) && count($attributes)) { + foreach ($attributes as $name => $data) { + $name = $this->_normalizeString($name); + $value = isset($data['value']) ? $data['value'] : ''; + $type = isset($data['type']) && $data['type'] ? $data['type'] : self::DEFAULT_ATTRIBUTE_TYPE; + $this->_setAttribute($name, $value, $type); + } + } + return $this; + } + + /** + * Assign values to universal attribute of entry + * + * @return Mage_GoogleBase_Model_Service_Item + */ + protected function _setUniversalData() + { + $service = $this->getService(); + $object = $this->getObject(); + $entry = $this->getEntry(); + + if ($object->getName()) { + $title = $service->newTitle()->setText( $object->getName() ); + $entry->setTitle($title); + } + + if ($object->getUrl()) { + $links = $entry->getLink(); + if (!is_array($links)) { + $links = array(); + } + $link = $service->newLink(); + $link->setHref($object->getUrl()); + $link->setRel('alternate'); + $link->setType('text/html'); + if ($object->getName()) { + $link->setTitle($object->getName()); + } + $links[0] = $link; + $entry->setLink($links); + } + + if ($object->getDescription()) { + $content = $service->newContent()->setText( $object->getDescription() ); + $entry->setContent($content); + } + + if ($this->_getItemType() == 'products') { + $quantity = $object->getQuantity() ? max(1, (int)$object->getQuantity()) : 1; + $this->_setAttribute('quantity', $quantity, 'int'); + } + if ($object->getImageUrl()) { + $this->_setAttribute('image_link', $object->getImageUrl(), 'url'); + } + + return $this; + } + + /** + * Set Google Base Item Attribute + * + * @param string $attribute Google Base attribute name + * @param string $value Google Base attribute value + * @param string $type Google Base attribute type + * + * @return Mage_GoogleBase_Model_Service_Item + */ + protected function _setAttribute($attribute, $value, $type = 'text') + { + $entry = $this->getEntry(); + $gBaseAttribute = $entry->getGbaseAttribute($attribute); + if (isset($gBaseAttribute[0]) && is_object($gBaseAttribute[0])) { + $gBaseAttribute[0]->text = $value; + } else { + $entry->addGbaseAttribute($attribute, $value, $type); + } + return $this; + } + + /** + * Return Google Base Item Attribute Value + * + * @param string $attribute Google Base attribute name + * @return string|null Attribute value + */ + protected function _getAttributeValue($attribute) + { + $entry = $this->getEntry(); + $attributeArr = $entry->getGbaseAttribute($attribute); + if (is_array($attributeArr) && is_object($attributeArr[0])) { + return $attributeArr[0]->getText(); + } + return null; + } + + /** + * Return assign item type or default item type + * + * @return string Google Base Item Type + */ + protected function _getItemType() + { + return $this->getItemType() ? $this->getItemType() : self::DEFAULT_ITEM_TYPE; + } + + /** + * Check Item Instance + * + * @return void + */ + protected function _checkItem() + { + if (!($this->getItem() instanceof Mage_GoogleBase_Model_Item)) { + Mage::throwException(Mage::helper('googlebase')->__('Item model is not specified to delete Google Base entry')); + } + } + + /** + * Prepare Google Base attribute name before save + * + * @param string Attribute name + * @return string Normalized attribute name + */ + protected function _normalizeString($string) + { + return preg_replace('/\s+/', '_', $string); + +// $string = preg_replace('/([^a-z^0-9^_])+/','_',strtolower($string)); +// $string = preg_replace('/_{2,}/','_',$string); +// return trim($string,'_'); + } + + /** + * Convert Google Base date format to unix timestamp + * Ex. 2008-12-08T16:57:23Z -> 2008-12-08 16:57:23 + * + * @param string Google Base datetime + * @return int + */ + public function gBaseDate2DateTime($gBaseDate) + { + return Mage::getSingleton('core/date')->timestamp($gBaseDate); + //ex return Y-m-d H:i:s format in current timezone use next code + // return Mage::getSingleton('core/date')->date(null, Mage::getSingleton('core/date')->timestamp($gBaseDate)); + } +} \ No newline at end of file diff --git a/app/code/core/Mage/GoogleBase/Model/Source/Authtype.php b/app/code/core/Mage/GoogleBase/Model/Source/Authtype.php new file mode 100644 index 00000000..35af7621 --- /dev/null +++ b/app/code/core/Mage/GoogleBase/Model/Source/Authtype.php @@ -0,0 +1,43 @@ + + */ +class Mage_GoogleBase_Model_Source_Authtype +{ + public function toOptionArray() + { + return array( + array('value' => 'authsub', 'label' => Mage::helper('googlebase')->__('AuthSub')), + array('value' => 'clientlogin', 'label' => Mage::helper('googlebase')->__('ClientLogin')) + ); + } +} \ No newline at end of file diff --git a/app/code/core/Mage/GoogleBase/Model/Source/Statuses.php b/app/code/core/Mage/GoogleBase/Model/Source/Statuses.php new file mode 100644 index 00000000..b9b54214 --- /dev/null +++ b/app/code/core/Mage/GoogleBase/Model/Source/Statuses.php @@ -0,0 +1,43 @@ + + */ +class Mage_GoogleBase_Model_Source_Statuses +{ + public function getStatuses() + { + return array( + '0' => Mage::helper('googlebase')->__('Yes'), + '1' => Mage::helper('googlebase')->__('No') + ); + } +} \ No newline at end of file diff --git a/app/code/core/Mage/GoogleBase/Model/Type.php b/app/code/core/Mage/GoogleBase/Model/Type.php new file mode 100644 index 00000000..50afe966 --- /dev/null +++ b/app/code/core/Mage/GoogleBase/Model/Type.php @@ -0,0 +1,45 @@ + + */ +class Mage_GoogleBase_Model_Type extends Mage_Core_Model_Abstract +{ + protected function _construct() + { + $this->_init('googlebase/type'); + } + + public function loadByAttributeSetId($attributeSetId) + { + return $this->load($attributeSetId, 'attribute_set_id'); + } +} \ No newline at end of file diff --git a/app/code/core/Mage/GoogleBase/controllers/ItemsController.php b/app/code/core/Mage/GoogleBase/controllers/ItemsController.php new file mode 100644 index 00000000..98b8e464 --- /dev/null +++ b/app/code/core/Mage/GoogleBase/controllers/ItemsController.php @@ -0,0 +1,251 @@ + +*/ +class Mage_GoogleBase_ItemsController extends Mage_Adminhtml_Controller_Action +{ + protected function _initAction() + { + $this->loadLayout() + ->_setActiveMenu('catalog/googlebase/items') + ->_addBreadcrumb(Mage::helper('adminhtml')->__('Catalog'), Mage::helper('adminhtml')->__('Catalog')) + ->_addBreadcrumb(Mage::helper('adminhtml')->__('Google Base'), Mage::helper('adminhtml')->__('Google Base')); + return $this; + } + + public function indexAction() + { + $this->_initAction() + ->_addBreadcrumb(Mage::helper('googlebase')->__('Items'), Mage::helper('googlebase')->__('Items')) + ->_addContent($this->getLayout()->createBlock('googlebase/adminhtml_items')) + ->renderLayout(); + } + + public function gridAction() + { + return $this->getResponse()->setBody( + $this->getLayout() + ->createBlock('googlebase/adminhtml_items_item') + ->setIndex($this->getRequest()->getParam('index')) + ->toHtml() + ); + } + + public function massAddAction() + { + $storeId = $this->_getStore()->getId(); + $productIds = $this->getRequest()->getParam('product'); + + $totalAdded = 0; + + try { + foreach ($productIds as $productId) { + $product = Mage::getSingleton('catalog/product') + ->setStoreId($storeId) + ->load($productId); + + if ($product->getId()) { + Mage::getModel('googlebase/item') + ->setProduct($product) + ->insertItem() + ->save(); + + $totalAdded++; + } + } + if ($totalAdded > 0) { + $this->_getSession()->addSuccess( + $this->__('Total of %d product(s) were successfully added to Google Base', $totalAdded) + ); + } else { + $this->_getSession()->addError($this->__('No products were added to Google Base')); + } + } catch (Exception $e) { + $this->_getSession()->addError($e->getMessage()); + } + + $this->_redirect('*/*/index', array('store'=>$storeId)); + } + + public function massDeleteAction() + { + $storeId = $this->_getStore()->getId(); + $itemIds = $this->getRequest()->getParam('item'); + + $totalDeleted = 0; + + try { + foreach ($itemIds as $itemId) { + $item = Mage::getModel('googlebase/item')->load($itemId); + if ($item->getId()) { + $item->deleteItem(); + $item->delete(); + $totalDeleted++; + } + } + if ($totalDeleted > 0) { + $this->_getSession()->addSuccess( + $this->__('Total of %d items(s) were successfully removed from Google Base', $totalDeleted) + ); + } else { + $this->_getSession()->addError($this->__('No items were deleted from Google Base')); + } + } catch (Exception $e) { + $this->_getSession()->addError($e->getMessage()); + } + + $this->_redirect('*/*/index', array('store'=>$storeId)); + } + + public function massPublishAction() + { + $storeId = $this->_getStore()->getId(); + $itemIds = $this->getRequest()->getParam('item'); + + $totalPublished = 0; + + try { + foreach ($itemIds as $itemId) { + $item = Mage::getModel('googlebase/item')->load($itemId); + if ($item->getId()) { + $item->activateItem(); + $totalPublished++; + } + } + if ($totalPublished > 0) { + $this->_getSession()->addSuccess( + $this->__('Total of %d items(s) were successfully published', $totalPublished) + ); + } else { + $this->_getSession()->addError($this->__('No items were published')); + } + } catch (Exception $e) { + $this->_getSession()->addError($e->getMessage()); + } + + $this->_redirect('*/*/index', array('store'=>$storeId)); + } + + public function massHideAction() + { + $storeId = $this->_getStore()->getId(); + $itemIds = $this->getRequest()->getParam('item'); + + $totalHidden = 0; + + try { + foreach ($itemIds as $itemId) { + $item = Mage::getModel('googlebase/item')->load($itemId); + if ($item->getId()) { + $item->hideItem(); + $totalHidden++; + } + } + if ($totalHidden > 0) { + $this->_getSession()->addSuccess( + $this->__('Total of %d items(s) were successfully saved as Inactive items', $totalHidden) + ); + } else { + $this->_getSession()->addError($this->__('No items were saved as Inactive items')); + } + } catch (Exception $e) { + $this->_getSession()->addError($e->getMessage()); + } + + $this->_redirect('*/*/index', array('store'=>$storeId)); + } + + /** + * Update items statistics and remove the items which are not available in Google Base + */ + public function refreshAction() + { + $storeId = $this->_getStore()->getId(); + $totalUpdated = 0; + $totalDeleted = 0; + + try { + $collection = Mage::getResourceModel('googlebase/item_collection') + ->addStoreFilterId($storeId) + ->load(); + + $existing = array(); + foreach ($collection as $item) { + $existing[$item->getGbaseItemId()] = array( + 'id' => $item->getId(), + 'is_hidden' => $item->getIsHidden(), + ); + } + + $stats = Mage::getModel('googlebase/service_feed')->getItemsStatsArray(); + + foreach ($existing as $entryId => $itemInfo) { + + $item = Mage::getModel('googlebase/item')->load($itemInfo['id']); + + if (!isset($stats[$entryId])) { + $item->delete(); + $totalDeleted++; + continue; + } + + if ($stats[$entryId]['draft'] != $itemInfo['is_hidden']) { + $item->setIsHidden($stats[$entryId]['draft']); + } + + if (isset($stats[$entryId]['expires'])) { + $item->setExpires($stats[$entryId]['expires']); + } + + $item->save(); + $totalUpdated++; + } + $this->_getSession()->addSuccess( + $this->__('Total of %d items(s) were successfully deleted, Total of %d items(s) were successfully updated', $totalDeleted, $totalUpdated) + ); + } catch (Exception $e) { + $this->_getSession()->addError($e->getMessage()); + } + + $this->_redirect('*/*/index', array('store'=>$storeId)); + } + + public function _getStore() + { + $storeId = (int) $this->getRequest()->getParam('store', 0); + if ($storeId == 0) { + return Mage::app()->getDefaultStoreView(); + } + return Mage::app()->getStore($storeId); + } +} \ No newline at end of file diff --git a/app/code/core/Mage/GoogleBase/controllers/SelectionController.php b/app/code/core/Mage/GoogleBase/controllers/SelectionController.php new file mode 100644 index 00000000..4c8d9919 --- /dev/null +++ b/app/code/core/Mage/GoogleBase/controllers/SelectionController.php @@ -0,0 +1,56 @@ + + */ +class Mage_GoogleBase_SelectionController extends Mage_Adminhtml_Controller_Action +{ + public function searchAction() + { + return $this->getResponse()->setBody( + $this->getLayout() + ->createBlock('googlebase/adminhtml_items_product') + ->setIndex($this->getRequest()->getParam('index')) + ->setFirstShow(true) + ->toHtml() + ); + } + + public function gridAction() + { + return $this->getResponse()->setBody( + $this->getLayout() + ->createBlock('googlebase/adminhtml_items_product') + ->setIndex($this->getRequest()->getParam('index')) + ->toHtml() + ); + } +} \ No newline at end of file diff --git a/app/code/core/Mage/GoogleBase/controllers/TypesController.php b/app/code/core/Mage/GoogleBase/controllers/TypesController.php new file mode 100644 index 00000000..8dc21dcb --- /dev/null +++ b/app/code/core/Mage/GoogleBase/controllers/TypesController.php @@ -0,0 +1,191 @@ + +*/ +class Mage_GoogleBase_TypesController extends Mage_Adminhtml_Controller_Action +{ + protected function _initItemType() + { + Mage::register('current_item_type', Mage::getModel('googlebase/type')); + $typeId = $this->getRequest()->getParam('id'); + if (!is_null($typeId)) { + Mage::registry('current_item_type')->load($typeId); + } + } + + protected function _initAction() + { + $this->loadLayout() + ->_setActiveMenu('catalog/googlebase/types') + ->_addBreadcrumb(Mage::helper('adminhtml')->__('Catalog'), Mage::helper('adminhtml')->__('Catalog')) + ->_addBreadcrumb(Mage::helper('adminhtml')->__('Google Base'), Mage::helper('adminhtml')->__('Google Base')); + return $this; + } + + public function indexAction() + { + $this->_initAction() + ->_addBreadcrumb(Mage::helper('googlebase')->__('Item Types'), Mage::helper('googlebase')->__('Item Types')) + ->_addContent($this->getLayout()->createBlock('googlebase/adminhtml_types')) + ->renderLayout(); + } + + /** + * Grid for AJAX request + */ + public function gridAction() + { + $this->getResponse()->setBody( + $this->getLayout()->createBlock('googlebase/adminhtml_types_grid')->toHtml() + ); + } + public function newAction() + { + try { + $this->_initItemType(); + $this->_initAction() + ->_addBreadcrumb(Mage::helper('googlebase')->__('New Item Type'), Mage::helper('adminhtml')->__('New Item Type')) + ->_addContent($this->getLayout()->createBlock('googlebase/adminhtml_types_edit')) + ->renderLayout(); + } catch (Exception $e) { + $this->_getSession()->addError($e->getMessage()); + $this->_redirect('*/*/index'); + } + } + + public function editAction() + { + $id = $this->getRequest()->getParam('id'); + $model = Mage::getModel('googlebase/type'); + + try { + $result = array(); + if ($id) { + $model->load($id); + $collection = Mage::getResourceModel('googlebase/attribute_collection') + ->addAttributeSetFilter($model->getAttributeSetId()) + ->load(); + foreach ($collection as $attribute) { + $result[] = $attribute->getData(); + } + } + + Mage::register('current_item_type', $model); + Mage::register('attributes', $result); + + $this->_initAction() + ->_addBreadcrumb($id ? Mage::helper('googlebase')->__('Edit Item Type') : Mage::helper('googlebase')->__('New Item Type'), $id ? Mage::helper('googlebase')->__('Edit Item Type') : Mage::helper('googlebase')->__('New Item Type')) + ->_addContent($this->getLayout()->createBlock('googlebase/adminhtml_types_edit')) + ->renderLayout(); + } catch (Exception $e) { + $this->_getSession()->addError($e->getMessage()); + $this->_redirect('*/*/index'); + } + } + + public function saveAction() + { + $typeModel = Mage::getModel('googlebase/type'); + $id = $this->getRequest()->getParam('type_id'); + if (!is_null($id)) { + $typeModel->load($id); + } + + try { + if ($typeModel->getId()) { + $collection = Mage::getResourceModel('googlebase/attribute_collection') + ->addTypeFilter($typeModel->getId()) + ->load(); + foreach ($collection as $attribute) { + $attribute->delete(); + } + } + $typeModel->setAttributeSetId($this->getRequest()->getParam('attribute_set_id')) + ->setGbaseItemtype($this->getRequest()->getParam('gbase_itemtype')) + ->save(); + + + $attributes = $this->getRequest()->getParam('attributes'); + if (is_array($attributes)) { + $typeId = $typeModel->getId(); + foreach ($attributes as $attrInfo) { + if (isset($attrInfo['delete']) && $attrInfo['delete'] == 1) { + continue; + } + Mage::getModel('googlebase/attribute') + ->setAttributeId($attrInfo['attribute_id']) + ->setGbaseAttribute($attrInfo['gbase_attribute']) + ->setTypeId($typeId) + ->save(); + } + } + + Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('googlebase')->__('Item type was successfully saved')); + } catch (Exception $e) { + Mage::getSingleton('adminhtml/session')->addError($e->getMessage()); + } + $this->_redirect('*/*/index'); + } + + public function deleteAction () + { + try { + $id = $this->getRequest()->getParam('id'); + $model = Mage::getModel('googlebase/type'); + $model->load($id); + if ($model->getTypeId()) { + $model->delete(); + } + $this->_getSession()->addSuccess($this->__('Item Type was deleted')); + } catch (Exception $e) { + $this->_getSession()->addError($e->getMessage()); + } + $this->_redirect('*/*/index'); + } + + public function loadAttributesAction () + { + try { + $this->getResponse()->setBody( + $this->getLayout()->createBlock('googlebase/adminhtml_types_edit_attributes') + ->setAttributeSetId($this->getRequest()->getParam('attribute_set_id')) + ->setGbaseItemtype($this->getRequest()->getParam('gbase_itemtype')) + ->setAttributeSetSelected(true) + ->toHtml() + ); + } catch (Exception $e) { + // just need to output text with error + $this->_getSession()->addError($e->getMessage()); + } + } +} \ No newline at end of file diff --git a/app/code/core/Mage/GoogleBase/etc/config.xml b/app/code/core/Mage/GoogleBase/etc/config.xml new file mode 100644 index 00000000..da51fbeb --- /dev/null +++ b/app/code/core/Mage/GoogleBase/etc/config.xml @@ -0,0 +1,168 @@ + + + + + + 0.1.0 + + + + + + Mage_GoogleBase_Model + googlebase_mysql4 + + + Mage_GoogleBase_Model_Mysql4 + + + googlebase_types
+
+ + googlebase_items
+
+ + googlebase_attributes
+
+
+
+
+ + + Mage_GoogleBase_Helper + + + + + + Mage_GoogleBase + + + core_setup + + + + + core_write + + + + + core_read + + + + + Mage_GoogleBase_Block + +
+ + + + standard + + Mage_GoogleBase + googlebase + + + + + + + + Mage_GoogleBase.csv + + + + + + + + + singleton + googlebase/observer + saveProductItem + + + + + + + singleton + googlebase/observer + deleteProductItem + + + + + + + + googlebase.xml + + + + + + + + Google Base + + + Manage Attributes + googlebase/types + + + Manage Items + googlebase/items + + + + + + + + + + + standard + + Mage_GoogleBase + googlebase + + + + + + + + 0 + + + +
diff --git a/app/code/core/Mage/GoogleBase/etc/system.xml b/app/code/core/Mage/GoogleBase/etc/system.xml new file mode 100644 index 00000000..993a8874 --- /dev/null +++ b/app/code/core/Mage/GoogleBase/etc/system.xml @@ -0,0 +1,70 @@ + + + + + + + + + text + 20 + 1 + 0 + 0 + + + + text + 1 + 1 + 0 + 0 + + + + password + 2 + 1 + 0 + 0 + + + + select + adminhtml/system_config_source_yesno + 100 + 1 + 0 + 0 + + + + + + + \ No newline at end of file diff --git a/app/code/core/Mage/GoogleBase/sql/googlebase_setup/mysql4-install-0.1.0.php b/app/code/core/Mage/GoogleBase/sql/googlebase_setup/mysql4-install-0.1.0.php new file mode 100644 index 00000000..fbcec892 --- /dev/null +++ b/app/code/core/Mage/GoogleBase/sql/googlebase_setup/mysql4-install-0.1.0.php @@ -0,0 +1,74 @@ +startSetup(); + +$installer->run(" + +-- DROP TABLE IF EXISTS {$this->getTable('googlebase/types')}; +CREATE TABLE {$this->getTable('googlebase/types')} ( + `type_id` int(10) unsigned not null auto_increment , + `attribute_set_id` smallint(5) unsigned not null , + `gbase_itemtype` varchar(255) not null , + PRIMARY KEY (`type_id`), + CONSTRAINT `GOOGLEBASE_TYPES_ATTRIBUTE_SET_ID` FOREIGN KEY (`attribute_set_id`) REFERENCES `{$this->getTable('eav/attribute_set')}` (`attribute_set_id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Google Base Item Types link Attribute Sets'; + +-- DROP TABLE IF EXISTS {$this->getTable('googlebase/items')}; +CREATE TABLE {$this->getTable('googlebase/items')} ( + `item_id` int(10) unsigned not null auto_increment , + `type_id` int(10) unsigned not null default '0', + `product_id` int(10) unsigned not null , + `gbase_item_id` varchar(255) not null , + `store_id` smallint(5) unsigned not null , + `published` datetime NOT NULL default '0000-00-00 00:00:00', + `expires` datetime NOT NULL default '0000-00-00 00:00:00', + `impr` smallint(5) unsigned not null default '0', + `clicks` smallint(5) unsigned not null default '0', + `views` smallint(5) unsigned not null default '0', + `is_hidden` tinyint not null default '0', + PRIMARY KEY (`item_id`), + CONSTRAINT `GOOGLEBASE_ITEMS_PRODUCT_ID` FOREIGN KEY (`product_id`) REFERENCES `{$this->getTable('catalog/product_entity')}` (`entity_id`) ON DELETE CASCADE, + CONSTRAINT `GOOGLEBASE_ITEMS_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `{$this->getTable('core/store')}` (`store_id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Google Base Items Products'; + +-- DROP TABLE IF EXISTS {$this->getTable('googlebase/attributes')}; +CREATE TABLE {$this->getTable('googlebase/attributes')} ( + `id` int(10) unsigned not null auto_increment , + `attribute_id` smallint(5) unsigned not null , + `gbase_attribute` varchar(255) not null , + `type_id` int(10) unsigned not null , + PRIMARY KEY (`id`), + CONSTRAINT `GOOGLEBASE_ATTRIBUTES_ATTRIBUTE_ID` FOREIGN KEY (`attribute_id`) REFERENCES `{$this->getTable('eav/attribute')}` (`attribute_id`) ON DELETE CASCADE, + CONSTRAINT `GOOGLEBASE_ATTRIBUTES_TYPE_ID` FOREIGN KEY (`type_id`) REFERENCES `{$this->getTable('googlebase/types')}` (`type_id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Google Base Attributes link Product Attributes'; + +"); + +$installer->endSetup(); \ No newline at end of file diff --git a/app/code/core/Mage/GoogleCheckout/Model/Api/Xml/Callback.php b/app/code/core/Mage/GoogleCheckout/Model/Api/Xml/Callback.php index 7bd53cef..9459f0d5 100644 --- a/app/code/core/Mage/GoogleCheckout/Model/Api/Xml/Callback.php +++ b/app/code/core/Mage/GoogleCheckout/Model/Api/Xml/Callback.php @@ -119,6 +119,7 @@ protected function _responseMerchantCalculationCallback() $billingAddress = $quote->getBillingAddress(); $address = $quote->getShippingAddress(); + $googleAddress = $this->getData('root/calculate/addresses/anonymous-address'); $googleAddresses = array(); @@ -178,7 +179,13 @@ protected function _responseMerchantCalculationCallback() $errors[$rate->getCarrierTitle()] = 1; } else { $k = $rate->getCarrierTitle().' - '.$rate->getMethodTitle(); - $price = $rate->getPrice(); + + if ($address->getFreeShipping()) { + $price = 0; + } else { + $price = $rate->getPrice(); + } + if ($price) { $price = Mage::helper('tax')->getShippingPrice($price, false, $address); } @@ -212,8 +219,8 @@ protected function _responseMerchantCalculationCallback() if ($this->getData('root/calculate/tax/VALUE')=='true') { $address->setShippingMethod($rateCodes[$methodName]); - $address->setCollectShippingRates(false)->collectTotals(); - $billingAddress->setCollectShippingRates(false)->collectTotals(); + $address->setCollectShippingRates(true)->collectTotals(); + $billingAddress->setCollectShippingRates(true)->collectTotals(); $taxAmount = $address->getTaxAmount(); $taxAmount += $billingAddress->getTaxAmount(); @@ -228,8 +235,8 @@ protected function _responseMerchantCalculationCallback() } elseif ($this->getData('root/calculate/tax/VALUE')=='true') { $address->setShippingMethod(null); - $address->setCollectShippingRates(false)->collectTotals(); - $billingAddress->setCollectShippingRates(false)->collectTotals(); + $address->setCollectShippingRates(true)->collectTotals(); + $billingAddress->setCollectShippingRates(true)->collectTotals(); $taxAmount = $address->getTaxAmount(); $taxAmount += $billingAddress->getTaxAmount(); @@ -406,17 +413,22 @@ protected function _importGoogleTotals($qAddress) } if (!empty($method)) { $excludingTax = $shipping['shipping-cost']['VALUE']; + $qAddress->setShippingMethod($method) + ->setShippingDescription($shipping['shipping-name']['VALUE']) + ->setShippingAmount($excludingTax, true) + ->setBaseShippingAmount($excludingTax, true); + if (!Mage::helper('tax')->shippingPriceIncludesTax()) { $includingTax = Mage::helper('tax')->getShippingPrice($excludingTax, true, $qAddress, $qAddress->getQuote()->getCustomerTaxClassId()); $shippingTax = $includingTax - $excludingTax; $qAddress->setShippingTaxAmount($shippingTax) ->setBaseShippingTaxAmount($shippingTax); + } else { + if ($method == 'googlecheckout_carrier') { + $qAddress->setShippingTaxAmount(0) + ->setBaseShippingTaxAmount(0); + } } - - $qAddress->setShippingMethod($method) - ->setShippingDescription($shipping['shipping-name']['VALUE']) - ->setShippingAmount($excludingTax, true) - ->setBaseShippingAmount($excludingTax, true); } else { $qAddress->setShippingMethod(null); } @@ -487,6 +499,10 @@ protected function _responseAuthorizationAmountNotification() $msg .= '
'.$this->__('Expiration: %s', ''.$expDate->toString().''); $order->addStatusToHistory($order->getStatus(), $msg); + + $order->setPaymentAuthorizationAmount($payment->getAmountAuthorized()); + $order->setPaymentAuthorizationExpiration(Mage::getModel('core/date')->gmtTimestamp($this->getData('root/authorization-expiration-date/VALUE'))); + $order->save(); } @@ -511,6 +527,15 @@ protected function _responseChargeAmountNotification() $msg .= '
'.$this->__('Invoice auto-created: %s', ''.$invoice->getIncrementId().''); } + foreach ($order->getInvoiceCollection() as $orderInvoice) { + $open = Mage_Sales_Model_Order_Invoice::STATE_OPEN; + $paid = Mage_Sales_Model_Order_Invoice::STATE_PAID; + if ($orderInvoice->getState() == $open && $orderInvoice->getGrandTotal() == $latestCharged) { + $orderInvoice->setState($paid)->save(); + break; + } + } + $order->addStatusToHistory($order->getStatus(), $msg); $order->save(); diff --git a/app/code/core/Mage/GoogleCheckout/Model/Api/Xml/Checkout.php b/app/code/core/Mage/GoogleCheckout/Model/Api/Xml/Checkout.php index e8fbc3bf..264c6afd 100644 --- a/app/code/core/Mage/GoogleCheckout/Model/Api/Xml/Checkout.php +++ b/app/code/core/Mage/GoogleCheckout/Model/Api/Xml/Checkout.php @@ -557,6 +557,11 @@ protected function _getTaxTableXml($rules, $type) protected function _getAllTaxTablesXml() { + if (Mage::getStoreConfigFlag('google/checkout/disable_default_tax_tables', $this->getQuote()->getStoreId())) { + return ''; + } + + $xml = << {$this->_getTaxTableXml($this->_getShippingTaxRules(), 'default')} diff --git a/app/code/core/Mage/GoogleCheckout/Model/Payment.php b/app/code/core/Mage/GoogleCheckout/Model/Payment.php index df23de49..44227b9f 100644 --- a/app/code/core/Mage/GoogleCheckout/Model/Payment.php +++ b/app/code/core/Mage/GoogleCheckout/Model/Payment.php @@ -98,14 +98,25 @@ public function authorize(Varien_Object $payment, $amount) */ public function capture(Varien_Object $payment, $amount) { + /* try { $this->authorize($payment, $amount); } catch (Exception $e) { // authorization is not expired yet } + */ + + if ($payment->getOrder()->getPaymentAuthorizationExpiration() < Mage::getModel('core/date')->gmtTimestamp()) { + try { + $this->authorize($payment, $amount); + } catch (Exception $e) { + // authorization is not expired yet + } + } $api = Mage::getModel('googlecheckout/api'); $api->charge($payment->getOrder()->getExtOrderId(), $amount); + $payment->setForcedState(Mage_Sales_Model_Order_Invoice::STATE_OPEN); return $this; } diff --git a/app/code/core/Mage/GoogleCheckout/controllers/RedirectController.php b/app/code/core/Mage/GoogleCheckout/controllers/RedirectController.php index fd73286c..ac84d62d 100644 --- a/app/code/core/Mage/GoogleCheckout/controllers/RedirectController.php +++ b/app/code/core/Mage/GoogleCheckout/controllers/RedirectController.php @@ -70,7 +70,7 @@ protected function _getApi () Mage::getModel('checkout/cart')->init()->save(); if (Mage::getStoreConfigFlag('google/checkout/hide_cart_contents')) { $session->setGoogleCheckoutQuoteId($session->getQuoteId()); - $session->unsQuoteId(); + $session->setQuoteId(null); } } } @@ -116,7 +116,7 @@ public function cartAction() $session->getQuote()->delete(); } $session->setQuoteId($session->getGoogleCheckoutQuoteId()); - $session->unsGoogleCheckoutQuoteId(); + $session->setGoogleCheckoutQuoteId(null); } $this->_redirect('checkout/cart'); diff --git a/app/code/core/Mage/GoogleCheckout/etc/config.xml b/app/code/core/Mage/GoogleCheckout/etc/config.xml index 31ed3e20..68f8a870 100644 --- a/app/code/core/Mage/GoogleCheckout/etc/config.xml +++ b/app/code/core/Mage/GoogleCheckout/etc/config.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_GoogleCheckout * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> @@ -187,6 +187,7 @@ Something like this is to be added to resolve bug #4890 0 + 0 COMMERCIAL diff --git a/app/code/core/Mage/GoogleCheckout/etc/system.xml b/app/code/core/Mage/GoogleCheckout/etc/system.xml index 5b3a382f..02d4c2c4 100644 --- a/app/code/core/Mage/GoogleCheckout/etc/system.xml +++ b/app/code/core/Mage/GoogleCheckout/etc/system.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_GoogleAnalytics * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> @@ -145,6 +145,16 @@ 1 0 + + + Enable this if your checkout request is too big and being cut off. + select + adminhtml/system_config_source_yesno + 100 + 1 + 1 + 0 + diff --git a/app/code/core/Mage/GoogleOptimizer/Block/Adminhtml/Catalog/Category/Edit/Tab/Googleoptimizer.php b/app/code/core/Mage/GoogleOptimizer/Block/Adminhtml/Catalog/Category/Edit/Tab/Googleoptimizer.php new file mode 100644 index 00000000..c63a334e --- /dev/null +++ b/app/code/core/Mage/GoogleOptimizer/Block/Adminhtml/Catalog/Category/Edit/Tab/Googleoptimizer.php @@ -0,0 +1,193 @@ + + */ +class Mage_GoogleOptimizer_Block_Adminhtml_Catalog_Category_Edit_Tab_Googleoptimizer extends Mage_Adminhtml_Block_Catalog_Form +{ + public function __construct() + { + parent::__construct(); + $this->setShowGlobalIcon(true); + } + + public function getCategory() + { + if (!$this->_category) { + $this->_category = Mage::registry('current_category'); + } + return $this->_category; + } + + public function getGoogleOptimizer() + { + return $this->getCategory()->getGoogleOptimizerScripts(); + } + + public function _prepareLayout() + { + $form = new Varien_Data_Form(); + + $fieldset = $form->addFieldset('base_fieldset', + array('legend'=>Mage::helper('googleoptimizer')->__('Google Optimizer Scripts')) + ); + + if ($this->getCategory()->getStoreId() == '0') { + Mage::helper('googleoptimizer')->setStoreId(Mage::app()->getDefaultStoreView()); + } else { + Mage::helper('googleoptimizer')->setStoreId($this->getCategory()->getStoreId()); + } + + $disabledScriptsFields = false; + $values = array(); + if ($this->getGoogleOptimizer() && $this->getGoogleOptimizer()->getData()) { + $disabledScriptsFields = true; + $values = $this->getGoogleOptimizer()->getData(); + $checkedUseDefault = true; + if ($this->getGoogleOptimizer()->getStoreId() == $this->getCategory()->getStoreId()) { + $checkedUseDefault = false; + $disabledScriptsFields = false; + $fieldset->addField('code_id', 'hidden', array('name' => 'code_id')); + } + // show 'use default' checkbox if store different for default and product has scripts for default store + if ($this->getCategory()->getStoreId() != '0') { + $fieldset->addField('store_flag', 'checkbox', + array( + 'name' => 'store_flag', + 'value' => '1', + 'label' => Mage::helper('googleoptimizer')->__('Use Default'), + 'class' => 'checkbox', + 'required' => false, + 'onchange' => 'googleOptimizerScopeAction()', + ) + )->setIsChecked($checkedUseDefault); + } + } + + $fieldset->addField('conversion_page', 'select', + array( + 'name' => 'conversion_page', + 'label' => Mage::helper('googleoptimizer')->__('Conversion Page'), + 'values'=> Mage::getModel('googleoptimizer/adminhtml_system_config_source_googleoptimizer_conversionpages')->toOptionArray(), + 'class' => 'select googleoptimizer validate-googleoptimizer', + 'required' => false, + 'onchange' => 'googleOptimizerConversionPageAction(this)' + ) + ); + //Mage::getStoreConfigFlag(Mage_Core_Model_Store::XML_PATH_STORE_IN_URL) + if ($this->getCategory()->getStoreId() == '0' && !Mage::app()->isSingleStoreMode()) { + $fieldset->addField('conversion_page_url', 'note', + array( + 'name' => 'conversion_page_url', + 'label' => Mage::helper('googleoptimizer')->__('Conversion Page URL'), + 'text' => Mage::helper('googleoptimizer')->__('Please select store view to see the URL') + ) + ); + } else { + $fieldset->addField('conversion_page_url', 'text', + array( + 'name' => 'conversion_page_url', + 'label' => Mage::helper('googleoptimizer')->__('Conversion Page URL'), + 'class' => 'input-text', + 'readonly' => 'readonly', + 'required' => false, + 'note' => Mage::helper('googleoptimizer')->__('Please copy and paste this value to experiment edit form') + ) + ); + } + + $fieldset->addField('export_controls', 'text', array('name' => 'export_controls',)); + + $fieldset->addField('control_script', 'textarea', + array( + 'name' => 'control_script', + 'label' => Mage::helper('googleoptimizer')->__('Control Script'), + 'class' => 'textarea googleoptimizer validate-googleoptimizer', + 'required' => false, + ) + ); + + $fieldset->addField('tracking_script', 'textarea', + array( + 'name' => 'tracking_script', + 'label' => Mage::helper('googleoptimizer')->__('Tracking Script'), + 'class' => 'textarea googleoptimizer validate-googleoptimizer', + 'required' => false, + ) + ); + + $fieldset->addField('conversion_script', 'textarea', + array( + 'name' => 'conversion_script', + 'label' => Mage::helper('googleoptimizer')->__('Conversion Script'), + 'class' => 'textarea googleoptimizer validate-googleoptimizer', + 'required' => false, + ) + ); + + if (Mage::helper('googleoptimizer')->getConversionPagesUrl() + && $this->getGoogleOptimizer() + && $this->getGoogleOptimizer()->getConversionPage()) + { + $form->getElement('conversion_page_url') + ->setValue(Mage::helper('googleoptimizer') + ->getConversionPagesUrl()->getData($this->getGoogleOptimizer()->getConversionPage()) + ); + } + + if ($disabledScriptsFields) { + foreach ($fieldset->getElements() as $element) { + if ($element->getType() == 'textarea' || $element->getType() == 'select') { + $element->setDisabled($disabledScriptsFields); + } + } + } + + $fakeEntityAttribute = Mage::getModel('catalog/resource_eav_attribute'); + + foreach ($fieldset->getElements() as $element) { + if ($element->getId() != 'store_flag') { + $element->setEntityAttribute($fakeEntityAttribute); + } + } + + $form->getElement('export_controls')->setRenderer( + $this->getLayout()->createBlock('adminhtml/catalog_form_renderer_googleoptimizer_import') + ); + + $form->addValues($values); + $form->setFieldNameSuffix('googleoptimizer'); + $this->setForm($form); + + return parent::_prepareLayout(); + } + +} \ No newline at end of file diff --git a/app/code/core/Mage/GoogleOptimizer/Block/Adminhtml/Catalog/Product/Edit/Tab/Googleoptimizer.php b/app/code/core/Mage/GoogleOptimizer/Block/Adminhtml/Catalog/Product/Edit/Tab/Googleoptimizer.php new file mode 100644 index 00000000..6de78ed9 --- /dev/null +++ b/app/code/core/Mage/GoogleOptimizer/Block/Adminhtml/Catalog/Product/Edit/Tab/Googleoptimizer.php @@ -0,0 +1,223 @@ + + */ +class Mage_Googleoptimizer_Block_Adminhtml_Catalog_Product_Edit_Tab_Googleoptimizer + extends Mage_Adminhtml_Block_Catalog_Form implements Mage_Adminhtml_Block_Widget_Tab_Interface +{ + + protected function _prepareForm() + { + $form = new Varien_Data_Form(); + + $fieldset = $form->addFieldset('googleoptimizer_fields', + array('legend'=>Mage::helper('googleoptimizer')->__('Google Optimizer Scripts')) + ); + + if ($this->getProduct()->getStoreId() == '0') { + Mage::helper('googleoptimizer')->setStoreId(Mage::app()->getDefaultStoreView()); + } else { + Mage::helper('googleoptimizer')->setStoreId($this->getProduct()->getStoreId()); + } + + + $disabledScriptsFields = false; + $values = array(); + if ($this->getGoogleOptimizer() && $this->getGoogleOptimizer()->getData()) { + $disabledScriptsFields = true; + $values = $this->getGoogleOptimizer()->getData(); + $checkedUseDefault = true; + if ($this->getGoogleOptimizer()->getStoreId() == $this->getProduct()->getStoreId()) { + $checkedUseDefault = false; + $disabledScriptsFields = false; + $fieldset->addField('code_id', 'hidden', array('name' => 'code_id')); + } + + // show 'use default' checkbox if store different for default and product has scripts for default store + if ($this->getProduct()->getStoreId() != '0') { + $fieldset->addField('store_flag', 'checkbox', + array( + 'name' => 'store_flag', + 'value' => '1', + 'label' => Mage::helper('googleoptimizer')->__('Use Default Values'), + 'class' => 'checkbox', + 'required' => false, + 'onchange' => 'googleOptimizerScopeAction()', + ) + )->setIsChecked($checkedUseDefault); + } + } + + $fieldset->addField('conversion_page', 'select', + array( + 'name' => 'conversion_page', + 'label' => Mage::helper('googleoptimizer')->__('Conversion Page'), + 'values'=> Mage::getModel('googleoptimizer/adminhtml_system_config_source_googleoptimizer_conversionpages')->toOptionArray(), + 'class' => 'select googleoptimizer validate-googleoptimizer', + 'required' => false, + 'onchange' => 'googleOptimizerConversionPageAction(this)' + ) + ); + + if ($this->getProduct()->getStoreId() == '0' && !Mage::app()->isSingleStoreMode()) { + $fieldset->addField('conversion_page_url', 'note', + array( + 'name' => 'conversion_page_url', + 'label' => Mage::helper('googleoptimizer')->__('Conversion Page URL'), + 'text' => Mage::helper('googleoptimizer')->__('Please select store view to see the URL') + ) + ); + } else { + $fieldset->addField('conversion_page_url', 'text', + array( + 'name' => 'conversion_page_url', + 'label' => Mage::helper('googleoptimizer')->__('Conversion Page URL'), + 'class' => 'input-text', + 'readonly' => 'readonly', + 'required' => false, + 'note' => Mage::helper('googleoptimizer')->__('Please copy and paste this value to experiment edit form') + ) + ); + } + + $fieldset->addField('export_controls', 'text', array('name' => 'export_controls')); + + $fieldset->addField('control_script', 'textarea', + array( + 'name' => 'control_script', + 'label' => Mage::helper('googleoptimizer')->__('Control Script'), + 'class' => 'textarea googleoptimizer validate-googleoptimizer', + 'required' => false, + ) + ); + $fieldset->addField('tracking_script', 'textarea', + array( + 'name' => 'tracking_script', + 'label' => Mage::helper('googleoptimizer')->__('Tracking Script'), + 'class' => 'textarea googleoptimizer validate-googleoptimizer', + 'required' => false, + ) + ); + $fieldset->addField('conversion_script', 'textarea', + array( + 'name' => 'conversion_script', + 'label' => Mage::helper('googleoptimizer')->__('Conversion Script'), + 'class' => 'textarea googleoptimizer validate-googleoptimizer', + 'required' => false, + ) + ); + + $attributes = Mage::helper('googleoptimizer')->getProductAttributes($this->getProduct()); + $fieldset->addField('attributes', 'multiselect', + array( + 'name' => 'attributes', + 'label' => Mage::helper('googleoptimizer')->__('Attributes'), + 'class' => 'googleoptimizer validate-googleoptimizer validate-googleoptimizer-attributes', + 'values' => $attributes, + 'required' => false, + 'onchange' => 'googleOptimizerAttributesCheckAction(this)', + 'note' => Mage::helper('googleoptimizer')->__('Limit is 8 attributes only.') + ) + ); + + if (Mage::helper('googleoptimizer')->getConversionPagesUrl() + && $this->getGoogleOptimizer() + && $this->getGoogleOptimizer()->getConversionPage()) + { + $form->getElement('conversion_page_url') + ->setValue(Mage::helper('googleoptimizer') + ->getConversionPagesUrl()->getData($this->getGoogleOptimizer()->getConversionPage()) + ); + } + + if ($disabledScriptsFields) { + foreach ($fieldset->getElements() as $element) { + if ($element->getType() == 'textarea' || $element->getType() == 'select') { + $element->setDisabled($disabledScriptsFields); + } + } + $form->getElement('export_controls')->setDisabled($disabledScriptsFields); + } + + $fakeEntityAttribute = Mage::getModel('catalog/resource_eav_attribute'); + + foreach ($fieldset->getElements() as $element) { + if ($element->getId() != 'store_flag') { + $element->setEntityAttribute($fakeEntityAttribute); + } + } + + $form->getElement('export_controls')->setRenderer( + $this->getLayout()->createBlock('adminhtml/catalog_form_renderer_googleoptimizer_import') + ); + + $form->addValues($values); + $form->setFieldNameSuffix('googleoptimizer'); + $this->setForm($form); + + return parent::_prepareForm(); + } + + public function getProduct() + { + return Mage::registry('product'); + } + + public function getGoogleOptimizer() + { + return $this->getProduct()->getGoogleOptimizerScripts(); + } + + public function getTabLabel() + { + return Mage::helper('googleoptimizer')->__('Product View Optimization'); + } + + public function getTabTitle() + { + return Mage::helper('googleoptimizer')->__('Product View Optimization'); + } + + public function canShowTab() + { + if (Mage::helper('googleoptimizer')->isOptimizerActive() && $this->getProduct()->getAttributeSetId()) { + return true; + } + return false; + } + + public function isHidden() + { + return false; + } + +} diff --git a/app/code/core/Mage/GoogleOptimizer/Block/Adminhtml/Cms/Page/Edit/Renderer/Conversion.php b/app/code/core/Mage/GoogleOptimizer/Block/Adminhtml/Cms/Page/Edit/Renderer/Conversion.php new file mode 100644 index 00000000..77b82d23 --- /dev/null +++ b/app/code/core/Mage/GoogleOptimizer/Block/Adminhtml/Cms/Page/Edit/Renderer/Conversion.php @@ -0,0 +1,78 @@ + + */ +class Mage_GoogleOptimizer_Block_Adminhtml_Cms_Page_Edit_Renderer_Conversion extends Mage_Adminhtml_Block_Widget_Form_Renderer_Fieldset_Element +{ + public function __construct() + { + $this->setTemplate('googleoptimizer/cms/edit/renderer/conversion.phtml'); + } + + public function render(Varien_Data_Form_Element_Abstract $element) + { + $this->_element = $element; + return $this->toHtml(); + } + + public function getElement() + { + return $this->_element; + } + + public function getStoreViews() + { + $storeViews = Mage::app()->getStores(); + return $storeViews; + } + + public function getJsonStoreViews() + { + $storeViews = array(); + foreach ($this->getStoreViews() as $_store) { + $storeViews[] = $_store->getCode(); + } + $storeViews = new Varien_Object($storeViews); + return $storeViews->toJson(); + } + + public function getJsonConversionPagesUrl() + { + $storeViewsUrls = array(); + foreach ($this->getStoreViews() as $_store) { + Mage::helper('googleoptimizer')->setStoreId($_store->getId()); + $storeViewsUrls[$_store->getCode()] = Mage::helper('googleoptimizer')->getConversionPagesUrl()->getData(); + } + $storeViewsUrls = new Varien_Object($storeViewsUrls); + return $storeViewsUrls->toJson(); + } +} \ No newline at end of file diff --git a/app/code/core/Mage/GoogleOptimizer/Block/Adminhtml/Cms/Page/Edit/Tab/Googleoptimizer.php b/app/code/core/Mage/GoogleOptimizer/Block/Adminhtml/Cms/Page/Edit/Tab/Googleoptimizer.php new file mode 100644 index 00000000..52c0de17 --- /dev/null +++ b/app/code/core/Mage/GoogleOptimizer/Block/Adminhtml/Cms/Page/Edit/Tab/Googleoptimizer.php @@ -0,0 +1,178 @@ + + */ +class Mage_Googleoptimizer_Block_Adminhtml_Cms_Page_Edit_Tab_Googleoptimizer extends Mage_Adminhtml_Block_Widget_Form +{ + protected function _prepareForm() + { + $form = new Varien_Data_Form(); + + $fieldset = $form->addFieldset('googleoptimizer_fields', + array('legend'=>Mage::helper('googleoptimizer')->__('Google Optimizer Scripts')) + ); + + Mage::helper('googleoptimizer')->setStoreId(Mage::app()->getDefaultStoreView()); + + $fieldset->addField('conversion_page', 'select', + array( + 'name' => 'conversion_page', + 'label' => Mage::helper('googleoptimizer')->__('Conversion Page'), + 'values'=> Mage::getModel('googleoptimizer/adminhtml_system_config_source_googleoptimizer_conversionpages')->toOptionArray(), + 'class' => 'select googleoptimizer validate-googleoptimizer', + 'required' => false, + 'onchange' => 'googleOptimizerConversionPageAction(this)' + ) + ); + + if (!Mage::app()->isSingleStoreMode()) { + $form->getElement('conversion_page')->setOnchange('googleOptimizerConversionCmsPageAction(this)'); + $fieldset->addField('conversion_page_url', 'note', + array( + 'name' => 'conversion_page_url', + 'label' => Mage::helper('googleoptimizer')->__('Conversion Page URL'), + ) + )->setRenderer($this->getLayout()->createBlock('googleoptimizer/adminhtml_cms_page_edit_renderer_conversion')); + } else { + $fieldset->addField('conversion_page_url', 'text', + array( + 'name' => 'conversion_page_url', + 'label' => Mage::helper('googleoptimizer')->__('Conversion Page URL'), + 'class' => 'input-text', + 'readonly' => 'readonly', + 'required' => false, + 'note' => Mage::helper('googleoptimizer')->__('Please copy and paste this value to experiment edit form') + ) + ); + } + + $fieldset->addField('export_controls', 'text', + array( + 'name' => 'export_controls', + ) + ); + + $pageTypes = array( + '' => Mage::helper('googleoptimizer')->__('-- Please Select --'), + 'original' => Mage::helper('googleoptimizer')->__('Original Page'), + 'variant' => Mage::helper('googleoptimizer')->__('Variant Page') + ); + + $fieldset->addField('page_type', 'select', + array( + 'name' => 'page_type', + 'label' => Mage::helper('googleoptimizer')->__('Page Type'), + 'values'=> $pageTypes, + 'class' => 'select googleoptimizer validate-googleoptimizer', + 'required' => false, + 'onchange' => 'googleOptimizerVariantPageAction(this)' + ) + ); + + $fieldset->addField('control_script', 'textarea', + array( + 'name' => 'control_script', + 'label' => Mage::helper('googleoptimizer')->__('Control Script'), + 'class' => 'textarea validate-googleoptimizer', + 'required' => false, + 'note' => '', + ) + ); + $fieldset->addField('tracking_script', 'textarea', + array( + 'name' => 'tracking_script', + 'label' => Mage::helper('googleoptimizer')->__('Tracking Script'), + 'class' => 'textarea validate-googleoptimizer', + 'required' => false, + 'note' => '', + ) + ); + $fieldset->addField('conversion_script', 'textarea', + array( + 'name' => 'conversion_script', + 'label' => Mage::helper('googleoptimizer')->__('Conversion Script'), + 'class' => 'textarea validate-googleoptimizer', + 'required' => false, + 'note' => '', + ) + ); + + if (Mage::helper('googleoptimizer')->getConversionPagesUrl() + && $this->getGoogleOptimizer() + && $this->getGoogleOptimizer()->getConversionPage()) + { + $form->getElement('conversion_page_url') + ->setValue(Mage::helper('googleoptimizer') + ->getConversionPagesUrl()->getData($this->getGoogleOptimizer()->getConversionPage()) + ); + } + + $renderer = $this->getLayout()->createBlock('adminhtml/catalog_form_renderer_googleoptimizer_import'); + $form->getElement('export_controls')->setRenderer($renderer); + + $values = array(); + if ($this->getGoogleOptimizer() && $this->getGoogleOptimizer()->getData()) { + $values = $this->getGoogleOptimizer()->getData(); + $fieldset->addField('code_id', 'hidden', array('name' => 'code_id')); + if ($this->getGoogleOptimizer()->getData('page_type') == Mage_Googleoptimizer_Model_Code_Page::PAGE_TYPE_VARIANT) { + foreach ($fieldset->getElements() as $element) { + if (($element->getId() != 'tracking_script' && $element->getId() != 'page_type') + && ($element->getType() == 'textarea' || $element->getType() == 'select')) + { + $element->setDisabled(true); + } + } + } + } + + $form->addValues($values); + $form->setFieldNameSuffix('googleoptimizer'); + $this->setForm($form); + + return parent::_prepareForm(); + } + + public function getCmsPage() + { + return Mage::registry('cms_page'); + } + + public function getGoogleOptimizer() + { + if ($this->getCmsPage()->getGoogleoptimizer()) {//if data was set from session after exception + $googleOptimizer = new Varien_Object($this->getCmsPage()->getGoogleoptimizer()); + } else { + $googleOptimizer = $this->getCmsPage()->getGoogleOptimizerScripts(); + } + return $googleOptimizer; + } +} \ No newline at end of file diff --git a/app/code/core/Mage/GoogleOptimizer/Block/Code.php b/app/code/core/Mage/GoogleOptimizer/Block/Code.php new file mode 100644 index 00000000..56e9c692 --- /dev/null +++ b/app/code/core/Mage/GoogleOptimizer/Block/Code.php @@ -0,0 +1,111 @@ + + */ +class Mage_GoogleOptimizer_Block_Code extends Mage_Core_Block_Template +{ + protected $_scriptType = null; + protected $_googleOptmizerModel = null; + protected $_avaibleScriptTypes = array('control_script', 'tracking_script', 'conversion_script'); + + /** + * override this method if need something special for type of script + * + * @return Mage_GoogleOptimizer_Block_Code + */ + protected function _initGoogleOptimizerModel() + { + return $this; + } + + /** + * Setting google optimizer model + * + * @param Varien_Object $model + * @return Mage_GoogleOptimizer_Block_Code + */ + protected function _setGoogleOptimizerModel($model) + { + $this->_googleOptmizerModel = $model; + return $this; + } + + /** + * Return google optimizer model + * + * @return Varien_Object + */ + protected function _getGoogleOptimizerModel() + { + return $this->_googleOptmizerModel; + } + + protected function _toHtml() + { + return parent::_toHtml() . $this->getScriptCode(); + } + + /** + * Return script by type $this->_scriptType + * + * @return string + */ + public function getScriptCode() + { + if (!Mage::helper('googleoptimizer')->isOptimizerActive()) { + return ''; + } + if (is_null($this->_scriptType)) { + return ''; + } + $this->_initGoogleOptimizerModel(); + if (!($this->_getGoogleOptimizerModel() instanceof Varien_Object)) { + return ''; + } + return $this->_getGoogleOptimizerModel()->getData($this->_scriptType); + } + + /** + * Check than set script type + * + * @param string $scriptType + * @return Mage_GoogleOptimizer_Block_Code + */ + public function setScriptType($scriptType) + { + if (in_array($scriptType, $this->_avaibleScriptTypes)) { + $this->_scriptType = $scriptType; + } + return $this; + } +} \ No newline at end of file diff --git a/app/code/core/Mage/GoogleOptimizer/Block/Code/Category.php b/app/code/core/Mage/GoogleOptimizer/Block/Code/Category.php new file mode 100644 index 00000000..7d445d6f --- /dev/null +++ b/app/code/core/Mage/GoogleOptimizer/Block/Code/Category.php @@ -0,0 +1,52 @@ + + */ +class Mage_GoogleOptimizer_Block_Code_Category extends Mage_GoogleOptimizer_Block_Code +{ + protected function _initGoogleOptimizerModel() + { + $this->_setGoogleOptimizerModel($this->getGoogleOptimizer()); + return parent::_initGoogleOptimizerModel(); + } + + public function getCategory() + { + return Mage::registry('current_category'); + } + + public function getGoogleOptimizer() + { + return $this->getCategory()->getGoogleOptimizerScripts(); + } +} \ No newline at end of file diff --git a/app/code/core/Mage/GoogleOptimizer/Block/Code/Conversion.php b/app/code/core/Mage/GoogleOptimizer/Block/Code/Conversion.php new file mode 100644 index 00000000..8755a089 --- /dev/null +++ b/app/code/core/Mage/GoogleOptimizer/Block/Code/Conversion.php @@ -0,0 +1,71 @@ + + */ +class Mage_GoogleOptimizer_Block_Code_Conversion extends Mage_GoogleOptimizer_Block_Code +{ + protected $_pageType = null; + + protected function _initGoogleOptimizerModel() + { + $collection = Mage::getModel('googleoptimizer/code') + ->getCollection(); + + if ($this->getPageType()) { + $collection->addFieldToFilter('conversion_page', $this->getPageType()); + } + + $conversionCodes = array(); + foreach ($collection as $_item) { + $conversionCodes[] = $_item->getConversionScript(); + } + $this->_setGoogleOptimizerModel( + new Varien_Object(array( + 'conversion_script' => implode('', $conversionCodes) + )) + ); + return parent::_initGoogleOptimizerModel(); + } + + public function setPageType($pageType) + { + $this->_pageType = $pageType; + return $this; + } + + public function getPageType() + { + return $this->_pageType; + } +} \ No newline at end of file diff --git a/app/code/core/Mage/GoogleOptimizer/Block/Code/Page.php b/app/code/core/Mage/GoogleOptimizer/Block/Code/Page.php new file mode 100644 index 00000000..8d579e2b --- /dev/null +++ b/app/code/core/Mage/GoogleOptimizer/Block/Code/Page.php @@ -0,0 +1,43 @@ + + */ +class Mage_GoogleOptimizer_Block_Code_Page extends Mage_GoogleOptimizer_Block_Code +{ + protected function _initGoogleOptimizerModel() + { + $cmsPage = Mage::getSingleton('cms/page'); + $this->_setGoogleOptimizerModel($cmsPage->getGoogleOptimizerScripts()); + return parent::_initGoogleOptimizerModel(); + } +} \ No newline at end of file diff --git a/app/code/core/Mage/GoogleOptimizer/Block/Code/Product.php b/app/code/core/Mage/GoogleOptimizer/Block/Code/Product.php new file mode 100644 index 00000000..b21fb5d0 --- /dev/null +++ b/app/code/core/Mage/GoogleOptimizer/Block/Code/Product.php @@ -0,0 +1,52 @@ + + */ +class Mage_GoogleOptimizer_Block_Code_Product extends Mage_GoogleOptimizer_Block_Code +{ + protected function _initGoogleOptimizerModel() + { + $this->_setGoogleOptimizerModel($this->getGoogleOptimizer()); + return parent::_initGoogleOptimizerModel(); + } + + public function getProduct() + { + return Mage::registry('current_product'); + } + + public function getGoogleOptimizer() + { + return $this->getProduct()->getGoogleOptimizerScripts(); + } +} \ No newline at end of file diff --git a/app/code/core/Mage/GoogleOptimizer/Block/Js.php b/app/code/core/Mage/GoogleOptimizer/Block/Js.php new file mode 100644 index 00000000..c9eb9482 --- /dev/null +++ b/app/code/core/Mage/GoogleOptimizer/Block/Js.php @@ -0,0 +1,65 @@ + + */ +class Mage_GoogleOptimizer_Block_Js extends Mage_Adminhtml_Block_Template +{ + public function getJsonConversionPagesUrl() + { + return Mage::helper('googleoptimizer')->getConversionPagesUrl()->toJson(); + } + + public function getMaxCountOfAttributes() + { + return Mage_GoogleOptimizer_Model_Code_Product::DEFAULT_COUNT_OF_ATTRIBUTES; + } + + public function getExportUrl() + { + return Mage::getUrl('googleoptimizer/index/codes'); + } + + public function getControlFieldKey () + { + return $this->getDataSetDefault('control_field_key', 'control_script'); + } + + public function getTrackingFieldKey () + { + return $this->getDataSetDefault('tracking_field_key', 'tracking_script'); + } + + public function getConversionFieldKey () + { + return $this->getDataSetDefault('conversion_field_key', 'conversion_script'); + } +} \ No newline at end of file diff --git a/app/code/core/Mage/GoogleOptimizer/Helper/Data.php b/app/code/core/Mage/GoogleOptimizer/Helper/Data.php new file mode 100644 index 00000000..dd66eb9d --- /dev/null +++ b/app/code/core/Mage/GoogleOptimizer/Helper/Data.php @@ -0,0 +1,208 @@ + + */ +class Mage_GoogleOptimizer_Helper_Data extends Mage_Core_Helper_Abstract +{ + const XML_PATH_ENABLED = 'google/optimizer/active'; + const XML_PATH_ALLOWED_ATTRIBUTES = 'admin/attributes'; + + const MAX_ATTRIBUTE_LENGTH_LIMIT = 25; + + protected $_storeId = null; + + public function setStoreId($storeId) + { + $this->_storeId = $storeId; + return $this; + } + + public function getStoreId() + { + return $this->_storeId; + } + + public function isOptimizerActive() + { + return Mage::app()->getStore()->getConfig(self::XML_PATH_ENABLED); + } + + /** + * Prepare product attribute html output + * + * @param unknown_type $callObject + * @param unknown_type $attributeHtml + * @param unknown_type $params + * @return unknown + */ + public function productAttribute($callObject, $attributeHtml, $params) + { + $attributeName = $params['attribute']; + $product = $params['product']; + + if (!$this->isOptimizerActive() + || !$product->getGoogleOptimizerScripts() + || !$product->getGoogleOptimizerScripts()->getControlScript()) { + return $attributeHtml; + } + if (in_array($attributeName, $product->getGoogleOptimizerScripts()->getAttributes())) { + $newAttributeName = 'product_'.$attributeName.'_'.$product->getId(); + if (strlen($newAttributeName) > self::MAX_ATTRIBUTE_LENGTH_LIMIT) { + $newAttributeName = 'product_'; + $newAttributeName .= substr($attributeName, 0, (self::MAX_ATTRIBUTE_LENGTH_LIMIT - strlen('product__'.$product->getId()))); + $newAttributeName .= '_'.$product->getId(); + } + $attributeHtml = '' . $attributeHtml . ''; + } + return $attributeHtml; + } + + /** + * Prepare category attribute html output + * + * @param unknown_type $callObject + * @param unknown_type $attributeHtml + * @param unknown_type $params + * @return unknown + */ + public function categoryAttribute($callObject, $attributeHtml, $params) + { + $attributeName = $params['attribute']; + $category = $params['category']; + + if (!$this->isOptimizerActive() + || !$category->getGoogleOptimizerScripts() + || !$category->getGoogleOptimizerScripts()->getControlScript()) { + return $attributeHtml; + } + + $newAttributeName = 'product_'.$attributeName.'_'.$category->getId(); + if (strlen($newAttributeName) > self::MAX_ATTRIBUTE_LENGTH_LIMIT) { + $newAttributeName = 'category_'; + $newAttributeName .= substr($attributeName, 0, (self::MAX_ATTRIBUTE_LENGTH_LIMIT - strlen('category__'.$category->getId()))); + $newAttributeName .= '_'.$category->getId(); + } + + $attributeHtml = '' . $attributeHtml . ''; + return $attributeHtml; + } + + /** + * Return conversion pages from source model + * + * @return Varien_Object + */ + public function getConversionPagesUrl() + { + /** + * Example: + * + * array( + * 'checkout_cart' => 'http://base.url/...' + * ) + */ + $urls = array(); + $choices = Mage::getModel('googleoptimizer/adminhtml_system_config_source_googleoptimizer_conversionpages') + ->toOptionArray(); + $url = Mage::getModel('core/url'); + $session = Mage::getSingleton('core/session')->setSkipSessionIdFlag(true); + $store = Mage::app()->getStore($this->getStoreId()); + foreach ($choices as $choice) { + $route = ''; + switch ($choice['value']) { + case 'checkout_cart': + $route = 'checkout/cart'; + break; + case 'checkout_onepage': + $route = 'checkout/onepage'; + break; + case 'checkout_multishipping': + $route = 'checkout/multishipping'; + break; + case 'checkout_onepage_success': + $route = 'checkout/onepage/success/'; + break; + case 'checkout_multishipping_success': + $route = 'checkout/multishipping/success/'; + break; + case 'customer_account_create': + $route = 'customer/account/create/'; + break; + } + if ($route) { + $_query = array(); + $_path = Mage_Core_Model_Url::XML_PATH_UNSECURE_URL; + if (Mage::getConfig()->shouldUrlBeSecure('/' . $route)) { + $_path = Mage_Core_Model_Url::XML_PATH_SECURE_URL; + } + $storeBaseUrl = $store->getConfig($_path); + $websiteBaseUrl = $store->getWebsite()->getConfig($_path); + $defaultBaseUrl = Mage::app()->getStore(0)->getConfig($_path); + if ($storeBaseUrl == $websiteBaseUrl && !Mage::app()->isSingleStoreMode()) { + $_query = array('__store' => $store->getCode()); + } + $urls[$choice['value']] = $url->setStore($this->getStoreId())->getUrl($route, array('_secure' => true, '_query' => $_query)); + } + } + $session->setSkipSessionIdFlag(false); + return new Varien_Object($urls); + } + + /** + * Create array of attributes for variation + * allowed by googleoptimizer config and user defined attributes + * + * @param Mage_Catalog_Model_Product $product + * @return array + */ + public function getProductAttributes(Varien_Object $product) + { + /** @var $product Mage_Catalog_Model_Product */ + $allowedAttributes = array_keys(Mage::getConfig()->getNode(self::XML_PATH_ALLOWED_ATTRIBUTES)->asArray()); + $productAttributes = $product->getAttributes(); + $optimizerAttributes = array(); + foreach ($productAttributes as $_attributeCode => $_attribute) { + if ($_attribute->getIsUserDefined() && $_attribute->getIsVisibleOnFront()) { + $optimizerAttributes[] = array( + 'label' => $_attribute->getFrontendLabel(), + 'value' => $_attributeCode + ); + } elseif (in_array($_attributeCode, $allowedAttributes)) { + $optimizerAttributes[] = array( + 'label' => $_attribute->getFrontendLabel(), + 'value' => $_attributeCode + ); + } + } + return $optimizerAttributes; + } +} \ No newline at end of file diff --git a/app/code/core/Mage/GoogleOptimizer/Model/Adminhtml/System/Config/Source/Googleoptimizer/Conversionpages.php b/app/code/core/Mage/GoogleOptimizer/Model/Adminhtml/System/Config/Source/Googleoptimizer/Conversionpages.php new file mode 100644 index 00000000..579309e9 --- /dev/null +++ b/app/code/core/Mage/GoogleOptimizer/Model/Adminhtml/System/Config/Source/Googleoptimizer/Conversionpages.php @@ -0,0 +1,50 @@ + + */ +class Mage_GoogleOptimizer_Model_Adminhtml_System_Config_Source_Googleoptimizer_Conversionpages +{ + public function toOptionArray() + { + return array( + array('value'=>'', 'label'=>Mage::helper('googleoptimizer')->__('-- Please Select --')), + array('value'=>'other', 'label'=>Mage::helper('googleoptimizer')->__('Other')), + array('value'=>'checkout_cart', 'label'=>Mage::helper('googleoptimizer')->__('Shopping Cart')), + array('value'=>'checkout_onepage', 'label'=>Mage::helper('googleoptimizer')->__('One Page Checkout')), + array('value'=>'checkout_multishipping', 'label'=>Mage::helper('googleoptimizer')->__('Multi Address Checkout')), + array('value'=>'checkout_onepage_success', 'label'=>Mage::helper('googleoptimizer')->__('Order Success (One Page Checkout)')), + array('value'=>'checkout_multishipping_success', 'label'=>Mage::helper('googleoptimizer')->__('Order Success (Multi Address Checkout)')), + array('value'=>'customer_account_create', 'label'=>Mage::helper('googleoptimizer')->__('Account Registration')), + ); + } +} \ No newline at end of file diff --git a/app/code/core/Mage/GoogleOptimizer/Model/Code.php b/app/code/core/Mage/GoogleOptimizer/Model/Code.php new file mode 100644 index 00000000..5bfb8c0f --- /dev/null +++ b/app/code/core/Mage/GoogleOptimizer/Model/Code.php @@ -0,0 +1,176 @@ + + */ +class Mage_GoogleOptimizer_Model_Code extends Mage_Core_Model_Abstract +{ + protected $_entity = null; + protected $_entityType = null; + protected $_validateEntryFlag = false; + protected $_scriptTypes = array('control', 'tracking', 'conversion'); + + protected function _construct() + { + parent::_construct(); + $this->_init('googleoptimizer/code'); + } + + /** + * Set entity + * + * @param Varien_Object $entity + * @return Mage_GoogleOptimizer_Model_Code + */ + public function setEntity(Varien_Object $entity) + { + $this->_entity = $entity; + return $this; + } + + /** + * Return entity + * + * @return unknown + */ + public function getEntity() + { + return $this->_entity; + } + + /** + * Return entity type (product|category|...etc) + * + * @return string + */ + public function getEntityType() + { + return $this->_entityType; + } + + /** + * Loading scripts and assigning scripts on entity + * + * @param Varien_Object $entity + * @return Mage_Googleoptimizer_Model_Code + */ + public function loadScripts($storeId) + { + if (is_null($this->getEntity()) || is_null($this->getEntityType())) { + return $this; + } + + if (!$storeId) { + $storeId = Mage::app()->getStore()->getId(); + } + + $this->getResource()->loadByEntityType($this, $storeId); + $this->_afterLoad(); + return $this; + } + + /** + * Validate sctipts that assigned on entity + * + * @return bool + */ + protected function _validate() + { + $entryFlag = false; + $validationResult = false; + if ($control = $this->getControlScript()) { + $entryFlag = true; + } + if ($tracking = $this->getTrackingScript()) { + $entryFlag = true; + } + if ($conversion = $this->getConversionScript()) { + $entryFlag = true; + } + if ($conversionPage = $this->getConversionPage()) { + $entryFlag = true; + } + $this->_validateEntryFlag = $entryFlag; + if ($entryFlag && (!$control || !$tracking || !$conversion || !$conversionPage)) { + return false; + } + return true; + } + + /** + * Save scripts assigned on entity + * + * @param Varien_Object $entity + * @return Mage_Googleoptimizer_Model_Code + */ + public function saveScripts($storeId) + { + if (is_null($this->getEntity()) || is_null($this->getEntityType())) { + return $this; + } + if (!$this->getEntity()->getGoogleOptimizerScripts()) { + return $this; + } + + $this->setData($this->getEntity()->getGoogleOptimizerScripts()->getData()) + ->setEntityId($this->getEntity()->getId()) + ->setEntityType($this->getEntityType()) + ->setStoreId($storeId); + + if (false === $this->_validate()) { + throw new Exception(Mage::helper('googleoptimizer')->__('All fields of script types have to be filled.')); + } + + // use default scripts, need to delete scripts for current store + if ($this->getStoreFlag()) { + $this->deleteScripts($storeId); + return $this; + } + + $this->save(); + return $this; + } + + /** + * Removing scripts assigned to entity + * + * @param Varien_Object $entity + * @return Mage_Googleoptimizer_Model_Code + */ + public function deleteScripts($storeId) + { + if (is_null($this->getEntity()) || is_null($this->getEntityType())) { + return $this; + } + $this->getResource()->deleteByEntityType($this, $storeId); + return $this; + } +} \ No newline at end of file diff --git a/app/code/core/Mage/GoogleOptimizer/Model/Code/Category.php b/app/code/core/Mage/GoogleOptimizer/Model/Code/Category.php new file mode 100644 index 00000000..cb199883 --- /dev/null +++ b/app/code/core/Mage/GoogleOptimizer/Model/Code/Category.php @@ -0,0 +1,37 @@ + + */ +class Mage_GoogleOptimizer_Model_Code_Category extends Mage_GoogleOptimizer_Model_Code +{ + protected $_entityType = 'category'; +} \ No newline at end of file diff --git a/app/code/core/Mage/GoogleOptimizer/Model/Code/Page.php b/app/code/core/Mage/GoogleOptimizer/Model/Code/Page.php new file mode 100644 index 00000000..037fa606 --- /dev/null +++ b/app/code/core/Mage/GoogleOptimizer/Model/Code/Page.php @@ -0,0 +1,71 @@ + + */ +class Mage_GoogleOptimizer_Model_Code_Page extends Mage_GoogleOptimizer_Model_Code +{ + const PAGE_TYPE_VARIANT = 'variant'; + protected $_entityType = 'page'; + + protected function _afterLoad() + { + if ($data = $this->getAdditionalData()) { + $data = unserialize($data); + if (isset($data['page_type'])) { + $this->setPageType($data['page_type']); + } + } + return parent::_afterLoad(); + } + + protected function _beforeSave() + { + + if ($pageType = $this->getData('page_type')) { + $this->setData('additional_data', serialize(array( + 'page_type' => $pageType)) + ); + } + parent::_beforeSave(); + } + + protected function _validate() + { + if ($this->getPageType() && $this->getPageType() == self::PAGE_TYPE_VARIANT) { + if ($this->getTrackingScript()) { + return true; + } + } + return parent::_validate(); + } + +} \ No newline at end of file diff --git a/app/code/core/Mage/GoogleOptimizer/Model/Code/Product.php b/app/code/core/Mage/GoogleOptimizer/Model/Code/Product.php new file mode 100644 index 00000000..d40ad57a --- /dev/null +++ b/app/code/core/Mage/GoogleOptimizer/Model/Code/Product.php @@ -0,0 +1,100 @@ + + */ +class Mage_GoogleOptimizer_Model_Code_Product extends Mage_GoogleOptimizer_Model_Code +{ + const DEFAULT_COUNT_OF_ATTRIBUTES = 8; + protected $_entityType = 'product'; + + protected function _afterLoad() + { + if ($data = $this->getAdditionalData()) { + $data = unserialize($data); + if (isset($data['attributes'])) { + $this->setAttributes($data['attributes']); + } + } + return parent::_afterLoad(); + } + + protected function _beforeSave() + { + if (!($attributes = $this->getData('attributes'))) { + $attributes = array(); + } + $this->setData('additional_data', serialize(array( + 'attributes' => $attributes)) + ); + parent::_beforeSave(); + } + + protected function _validate() + { + $_validationResult = parent::_validate(); + if (!$_validationResult) { + return false; + } + $attributesFlag = false; + if ($attributes = $this->getAttributes()) { + $attributesCount = 0; + foreach ($attributes as $_attributeId=>$_attributeValue) { + if ($_attributeValue != '') { + $attributesCount++; + } + } + if ($attributesCount && $attributesCount <= self::DEFAULT_COUNT_OF_ATTRIBUTES) { + $attributesFlag = true; + } + } + if ($this->_validateEntryFlag && !$attributesFlag) { + return false; + } + if (!$this->_validateEntryFlag && $attributesFlag) { + return false; + } + return true; + } + + /** + * Return empty array if attributes is not defined + * + * @return array + */ + public function getAttributes() + { + if ($attributes = $this->_getData('attributes')) { + return $attributes; + } + return array(); + } +} \ No newline at end of file diff --git a/app/code/core/Mage/GoogleOptimizer/Model/Mysql4/Code.php b/app/code/core/Mage/GoogleOptimizer/Model/Mysql4/Code.php new file mode 100644 index 00000000..ef9c64d2 --- /dev/null +++ b/app/code/core/Mage/GoogleOptimizer/Model/Mysql4/Code.php @@ -0,0 +1,105 @@ + + */ +class Mage_GoogleOptimizer_Model_Mysql4_Code extends Mage_Core_Model_Mysql4_Abstract +{ + protected function _construct() + { + $this->_init('googleoptimizer/code', 'code_id'); + } + + /** + * Load scripts by entity and store + * + * @param Mage_GoogleOptimizer_Model_Code $object + * @param integer $storeId + * @return Mage_GoogleOptimizer_Model_Mysql4_Code + */ + public function loadbyEntityType($object, $storeId) + { + $read = $this->_getReadAdapter(); + if ($read) { + //preapre colums to fetch, except scope columns + $_columns = array_keys($read->describeTable($this->getMainTable())); + $columnsToFetch = array(); + foreach ($_columns as $_column) { + if (in_array($_column, array('entity_id', 'entity_type'))) { + $columnsToFetch[] = $_column; + } + } + $select = $read->select() + ->from(array('_default_table' => $this->getMainTable()), $columnsToFetch) + ->joinLeft(array('_store_table' => $this->getMainTable()), + "_store_table.entity_id = _default_table.entity_id AND _store_table.entity_type = _default_table.entity_type AND _store_table.store_id = {$storeId}", + array('code_id' => new Zend_Db_Expr("IFNULL(_store_table.code_id, _default_table.code_id)"), + 'store_id' => new Zend_Db_Expr("IFNULL(_store_table.store_id, _default_table.store_id)"), + 'control_script' => new Zend_Db_Expr("IFNULL(_store_table.control_script, _default_table.control_script)"), + 'tracking_script' => new Zend_Db_Expr("IFNULL(_store_table.tracking_script, _default_table.tracking_script)"), + 'conversion_script' => new Zend_Db_Expr("IFNULL(_store_table.conversion_script, _default_table.conversion_script)"), + 'conversion_page' => new Zend_Db_Expr("IFNULL(_store_table.conversion_page, _default_table.conversion_page)"), + 'additional_data' => new Zend_Db_Expr("IFNULL(_store_table.additional_data, _default_table.additional_data)"))) + ->where('_default_table.entity_id=?', $object->getEntity()->getId()) + ->where('_default_table.entity_type=?', $object->getEntityType()) + ->where('_default_table.store_id IN (0, ?)', $storeId) + ->order('_default_table.store_id DESC') + ->limit(1); + $data = $read->fetchRow($select); + if ($data) { + $object->setData($data); + } + } + $this->_afterLoad($object); + return $this; + } + + /** + * Delete scripts by entity and store + * + * @param Mage_GoogleOptimizer_Model_Code $object + * @param integer $store_id + * @return Mage_GoogleOptimizer_Model_Mysql4_Code + */ + public function deleteByEntityType($object, $store_id) + { + $write = $this->_getWriteAdapter(); + if ($write) { + $where = $write->quoteInto($this->getMainTable().'.entity_id=?', $object->getEntity()->getId()) . + ' AND ' . $write->quoteInto($this->getMainTable().'.entity_type=?', $object->getEntityType()) . + ' AND ' . $write->quoteInto($this->getMainTable().'.store_id=?', $store_id); + $write->delete($this->getMainTable(), $where); + } + + $this->_afterDelete($object); + return $this; + } +} \ No newline at end of file diff --git a/app/code/core/Mage/GoogleOptimizer/Model/Mysql4/Code/Collection.php b/app/code/core/Mage/GoogleOptimizer/Model/Mysql4/Code/Collection.php new file mode 100644 index 00000000..20099c90 --- /dev/null +++ b/app/code/core/Mage/GoogleOptimizer/Model/Mysql4/Code/Collection.php @@ -0,0 +1,41 @@ + + */ +class Mage_GoogleOptimizer_Model_Mysql4_Code_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract +{ + protected function _construct() + { + $this->_init('googleoptimizer/code'); + } +} \ No newline at end of file diff --git a/app/code/core/Mage/GoogleOptimizer/Model/Observer.php b/app/code/core/Mage/GoogleOptimizer/Model/Observer.php new file mode 100644 index 00000000..6e2b0a63 --- /dev/null +++ b/app/code/core/Mage/GoogleOptimizer/Model/Observer.php @@ -0,0 +1,253 @@ + + */ +class Mage_GoogleOptimizer_Model_Observer +{ + /** + * Loading product scripts after load product + * + * @param Varien_Object $observer + * @return Mage_Googleoptimizer_Model_Observer + */ + public function appendToProductGoogleOptimizerScripts($observer) + { + $product = $observer->getEvent()->getProduct(); + $googleOptimizerModel = Mage::getModel('googleoptimizer/code_product') + ->setEntity($product) + ->loadScripts($product->getStoreId()); + if ($googleOptimizerModel->getId()) { + $product->setGoogleOptimizerScripts($googleOptimizerModel); + } + return $this; + } + + /** + * Prepare product scripts for saving + * + * @param Varien_Object $observer + * @return Mage_Googleoptimizer_Model_Observer + */ + public function prepareGoogleOptimizerScripts($observer) + { + $product = $observer->getEvent()->getProduct(); + $request = $observer->getEvent()->getRequest(); + + if ($googleOptimizer = $request->getPost('googleoptimizer')) { + $product->setGoogleOptimizerScripts(new Varien_Object($googleOptimizer)); + } + return $this; + } + + /** + * Save product scripts after saving product + * + * @param Varien_Object $observer + * @return Mage_Googleoptimizer_Model_Observer + */ + public function saveProductGoogleOptimizerScripts($observer) + { + $product = $observer->getEvent()->getProduct(); + + if ($product->getGoogleOptimizerScripts()) { + $googleOptimizer = Mage::getModel('googleoptimizer/code_product') + ->setEntity($product) + ->saveScripts($product->getStoreId()); + } + + return $this; + } + + /** + * Delete Produt scripts after deleting product + * + * @param Varien_Object $observer + * @return Mage_Googleoptimizer_Model_Observer + */ + public function deleteProductGoogleOptimizerScripts($observer) + { + $product = $observer->getEvent()->getProduct(); + $googleOptimizer = Mage::getModel('googleoptimizer/code_product') + ->setEntity($product) + ->deleteScripts($product->getStoreId()); + return $this; + } + + /** + * Loading page scripts after load page + * + * @param Varien_Object $observer + * @return Mage_Googleoptimizer_Model_Observer + */ + public function appendToPageGoogleOptimizerScripts($observer) + { + $cmsPage = $observer->getEvent()->getObject(); + $googleOptimizerModel = Mage::getModel('googleoptimizer/code_page') + ->setEntity($cmsPage) + ->loadScripts(0); + + if ($googleOptimizerModel->getId()) { + $cmsPage->setGoogleOptimizerScripts($googleOptimizerModel); + } + return $this; + } + + /** + * Prepare page scripts for saving + * + * @param Varien_Object $observer + * @return Mage_Googleoptimizer_Model_Observer + */ + public function preparePageGoogleOptimizerScripts($observer) + { + $cmsPage = $observer->getEvent()->getPage(); + $request = $observer->getEvent()->getRequest(); + + if ($googleOptimizer = $request->getPost('googleoptimizer')) { + $cmsPage->setGoogleOptimizerScripts(new Varien_Object($googleOptimizer)); + } + return $this; + } + + /** + * Save page scripts after saving page + * + * @param Varien_Object $observer + * @return Mage_Googleoptimizer_Model_Observer + */ + public function savePageGoogleOptimizerScripts($observer) + { + $cmsPage = $observer->getEvent()->getObject(); + + if ($cmsPage->getGoogleOptimizerScripts()) { + $googleOptimizer = Mage::getModel('googleoptimizer/code_page') + ->setEntity($cmsPage) + ->saveScripts(0); + } + + return $this; + } + + /** + * Delete page scripts after deleting page + * + * @param Varien_Object $observer + * @return Mage_Googleoptimizer_Model_Observer + */ + public function deletePageGoogleOptimizerScripts($observer) + { + $cmsPage = $observer->getEvent()->getObject(); + $googleOptimizer = Mage::getModel('googleoptimizer/code_page') + ->setEntity($cmsPage) + ->deleteScripts(0); + return $this; + } + + public function assignHandlers($observer) + { + $catalogHalper = $observer->getEvent()->getHelper(); + $helper = Mage::helper('googleoptimizer'); + $catalogHalper->addHandler('productAttribute', $helper) + ->addHandler('categoryAttribute', $helper); + return $this; + } + + /** + * Loading category scripts after load category + * + * @param Varien_Object $observer + * @return Mage_Googleoptimizer_Model_Observer + */ + public function appendToCategoryGoogleOptimizerScripts($observer) + { + $category = $observer->getEvent()->getCategory(); + $googleOptimizerModel = Mage::getModel('googleoptimizer/code_category') + ->setEntity($category) + ->loadScripts($category->getStoreId()); + if ($googleOptimizerModel->getId()) { + $category->setGoogleOptimizerScripts($googleOptimizerModel); + } + return $this; + } + + /** + * Prepare category scripts for saving + * + * @param Varien_Object $observer + * @return Mage_Googleoptimizer_Model_Observer + */ + public function prepareCategoryGoogleOptimizerScripts($observer) + { + $category = $observer->getEvent()->getCategory(); + $request = $observer->getEvent()->getRequest(); + + if ($googleOptimizer = $request->getPost('googleoptimizer')) { + $category->setGoogleOptimizerScripts(new Varien_Object($googleOptimizer)); + } + return $this; + } + + /** + * Save category scripts after saving category + * + * @param Varien_Object $observer + * @return Mage_Googleoptimizer_Model_Observer + */ + public function saveCategoryGoogleOptimizerScripts($observer) + { + $category = $observer->getEvent()->getCategory(); + + if ($category->getGoogleOptimizerScripts()) { + $googleOptimizer = Mage::getModel('googleoptimizer/code_category') + ->setEntity($category) + ->saveScripts($category->getStoreId()); + } + + return $this; + } + + /** + * Delete Produt scripts after deleting product + * + * @param Varien_Object $observer + * @return Mage_Googleoptimizer_Model_Observer + */ + public function deleteCategoryGoogleOptimizerScripts($observer) + { + $category = $observer->getEvent()->getCategory(); + $googleOptimizer = Mage::getModel('googleoptimizer/code_category') + ->setEntity($category) + ->deleteScripts($category->getStoreId()); + return $this; + } + +} \ No newline at end of file diff --git a/app/code/core/Mage/GoogleOptimizer/controllers/IndexController.php b/app/code/core/Mage/GoogleOptimizer/controllers/IndexController.php new file mode 100644 index 00000000..33ad40df --- /dev/null +++ b/app/code/core/Mage/GoogleOptimizer/controllers/IndexController.php @@ -0,0 +1,57 @@ + +*/ +class Mage_GoogleOptimizer_IndexController extends Mage_Adminhtml_Controller_Action +{ + /** + * Retrieve js scripts by parsing remote Google Optimizer page + */ + public function codesAction() + { + if ($this->getRequest()->getQuery('url')) { + $client = new Varien_Http_Client($this->getRequest()->getQuery('url')); + $response = $client->request(Varien_Http_Client::GET); + $result = array(); + if (preg_match_all('/]*id="([_a-zA-Z0-9]+)"[^>]*>([^<]+)<\/textarea>/', $response->getRawBody(), $matches)) { + $c = count($matches[1]); + for ($i = 0; $i < $c; $i++) { + $id = $matches[1][$i]; + $code = $matches[2][$i]; + $result[$id] = $code; + } + } + $this->getResponse()->setBody( Zend_Json::encode($result) ); + } + } +} \ No newline at end of file diff --git a/app/code/core/Mage/GoogleOptimizer/etc/config.xml b/app/code/core/Mage/GoogleOptimizer/etc/config.xml new file mode 100644 index 00000000..f4c7f79e --- /dev/null +++ b/app/code/core/Mage/GoogleOptimizer/etc/config.xml @@ -0,0 +1,272 @@ + + + + + + 0.1.2 + + + + + + Mage_GoogleOptimizer_Model + googleoptimizer_mysql4 + + + + Mage_GoogleOptimizer_Model_Mysql4 + + + googleoptimizer_code
+
+
+
+
+ + + Mage_GoogleOptimizer_Helper + + + + + + Mage_GoogleOptimizer + + + core_setup + + + + + core_write + + + + + core_read + + + + + Mage_GoogleOptimizer_Block + + + + + + singleton + googleoptimizer/observer + appendToPageGoogleOptimizerScripts + + + + + + + singleton + googleoptimizer/observer + appendToProductGoogleOptimizerScripts + + + + + + + singleton + googleoptimizer/observer + appendToCategoryGoogleOptimizerScripts + + + + +
+ + + + + + + + + + admin + + Mage_GoogleOptimizer + googleoptimizer + + + + + + + + + + Mage_GoogleOptimizer.csv + + + + + + + + googleoptimizer.xml + + + + + + + + singleton + googleoptimizer/observer + assignHandlers + + + + + + + + + + + + Mage_GoogleOptimizer.csv + + + + + + + + + singleton + googleoptimizer/observer + appendToProductGoogleOptimizerScripts + + + + + + + singleton + googleoptimizer/observer + prepareGoogleOptimizerScripts + + + + + + + singleton + googleoptimizer/observer + saveProductGoogleOptimizerScripts + + + + + + + singleton + googleoptimizer/observer + deleteProductGoogleOptimizerScripts + + + + + + + singleton + googleoptimizer/observer + prepareCategoryGoogleOptimizerScripts + + + + + + + singleton + googleoptimizer/observer + saveCategoryGoogleOptimizerScripts + + + + + + + singleton + googleoptimizer/observer + deleteCategoryGoogleOptimizerScripts + + + + + + + singleton + googleoptimizer/observer + preparePageGoogleOptimizerScripts + + + + + + + singleton + googleoptimizer/observer + savePageGoogleOptimizerScripts + + + + + + + singleton + googleoptimizer/observer + deletePageGoogleOptimizerScripts + + + + + + + + googleoptimizer.xml + + + + + + + + 0 + + + +
diff --git a/app/code/core/Mage/GoogleOptimizer/etc/system.xml b/app/code/core/Mage/GoogleOptimizer/etc/system.xml new file mode 100644 index 00000000..27bc7647 --- /dev/null +++ b/app/code/core/Mage/GoogleOptimizer/etc/system.xml @@ -0,0 +1,54 @@ + + + + + + + + + text + 20 + 1 + 1 + 1 + + + + select + adminhtml/system_config_source_yesno + 10 + 1 + 1 + 1 + + + + + + + \ No newline at end of file diff --git a/app/code/core/Mage/GoogleOptimizer/sql/googleoptimizer_setup/mysql4-install-0.1.0.php b/app/code/core/Mage/GoogleOptimizer/sql/googleoptimizer_setup/mysql4-install-0.1.0.php new file mode 100644 index 00000000..2da94fc3 --- /dev/null +++ b/app/code/core/Mage/GoogleOptimizer/sql/googleoptimizer_setup/mysql4-install-0.1.0.php @@ -0,0 +1,50 @@ +startSetup(); + +$installer->run(" + +DROP TABLE IF EXISTS {$this->getTable('googleoptimizer/code')}; +CREATE TABLE {$this->getTable('googleoptimizer/code')} ( + `code_id` int(10) unsigned NOT NULL auto_increment, + `entity_id` int(10) unsigned NOT NULL, + `entity_type` varchar(50) NOT NULL default '', + `store_id` smallint(5) unsigned NOT NULL, + `control_script` text, + `tracking_script` text, + `conversion_script` text, + PRIMARY KEY (`code_id`), + KEY `GOOGLEOPTIMIZER_CODE_STORE` (`store_id`), + CONSTRAINT `FK_GOOGLEOPTIMIZER_CODE_STORE` FOREIGN KEY (`store_id`) REFERENCES `{$this->getTable('core/store')}` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + + "); + +$installer->endSetup(); diff --git a/app/code/core/Mage/GoogleOptimizer/sql/googleoptimizer_setup/mysql4-upgrade-0.1.0-0.1.1.php b/app/code/core/Mage/GoogleOptimizer/sql/googleoptimizer_setup/mysql4-upgrade-0.1.0-0.1.1.php new file mode 100644 index 00000000..351b3e80 --- /dev/null +++ b/app/code/core/Mage/GoogleOptimizer/sql/googleoptimizer_setup/mysql4-upgrade-0.1.0-0.1.1.php @@ -0,0 +1,34 @@ +startSetup(); + +$installer->getConnection()->addColumn($installer->getTable('googleoptimizer/code'), 'conversion_page', "varchar(255) NOT NULL default ''"); + +$installer->endSetup(); \ No newline at end of file diff --git a/skin/frontend/default/default/css/ie7.css b/app/code/core/Mage/GoogleOptimizer/sql/googleoptimizer_setup/mysql4-upgrade-0.1.1-0.1.2.php similarity index 75% rename from skin/frontend/default/default/css/ie7.css rename to app/code/core/Mage/GoogleOptimizer/sql/googleoptimizer_setup/mysql4-upgrade-0.1.1-0.1.2.php index 30a68749..517bb751 100644 --- a/skin/frontend/default/default/css/ie7.css +++ b/app/code/core/Mage/GoogleOptimizer/sql/googleoptimizer_setup/mysql4-upgrade-0.1.1-0.1.2.php @@ -1,3 +1,4 @@ +startSetup(); + +$installer->getConnection()->addColumn($installer->getTable('googleoptimizer/code'), 'additional_data', "text"); + +$installer->endSetup(); \ No newline at end of file diff --git a/app/code/core/Mage/Ideal/etc/config.xml b/app/code/core/Mage/Ideal/etc/config.xml index 68dcca58..fd664508 100755 --- a/app/code/core/Mage/Ideal/etc/config.xml +++ b/app/code/core/Mage/Ideal/etc/config.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Ideal * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Ideal/etc/system.xml b/app/code/core/Mage/Ideal/etc/system.xml index bac91b97..a1b415a2 100755 --- a/app/code/core/Mage/Ideal/etc/system.xml +++ b/app/code/core/Mage/Ideal/etc/system.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Ideal * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Install/Block/Locale.php b/app/code/core/Mage/Install/Block/Locale.php index 304eed4a..781e7b20 100644 --- a/app/code/core/Mage/Install/Block/Locale.php +++ b/app/code/core/Mage/Install/Block/Locale.php @@ -118,7 +118,9 @@ public function getTimezoneSelect() */ public function getTimezone() { - $timezone = Mage::app()->getLocale()->getTimezone(); + $timezone = Mage::getSingleton('install/session')->getTimezone() + ? Mage::getSingleton('install/session')->getTimezone() + : Mage::app()->getLocale()->getTimezone(); if ($timezone == Mage_Core_Model_Locale::DEFAULT_TIMEZONE) { $timezone = 'America/Los_Angeles'; } @@ -150,7 +152,9 @@ public function getCurrencySelect() */ public function getCurrency() { - return Mage::app()->getLocale()->getCurrency(); + return Mage::getSingleton('install/session')->getCurrency() + ? Mage::getSingleton('install/session')->getCurrency() + : Mage::app()->getLocale()->getCurrency(); } public function getFormData() diff --git a/app/code/core/Mage/Install/Model/Installer/Config.php b/app/code/core/Mage/Install/Model/Installer/Config.php index df7dc486..e3ddbb7e 100644 --- a/app/code/core/Mage/Install/Model/Installer/Config.php +++ b/app/code/core/Mage/Install/Model/Installer/Config.php @@ -100,11 +100,6 @@ public function install() } file_put_contents($this->_localConfigFile, $template); chmod($this->_localConfigFile, 0777); - /** - * New config initialization we do on install db action - * @author Magento Core Team - */ - //Mage::getConfig()->init(); } public function getFormData() diff --git a/app/code/core/Mage/Install/Model/Installer/Console.php b/app/code/core/Mage/Install/Model/Installer/Console.php index 685a19ad..92aaca0f 100644 --- a/app/code/core/Mage/Install/Model/Installer/Console.php +++ b/app/code/core/Mage/Install/Model/Installer/Console.php @@ -72,15 +72,16 @@ protected function _getOptions() if (is_null($this->_options)) { $this->_options = array( 'license_agreement_accepted' => array('required' => true, 'comment' => ''), - 'locale' => array('required' => true, 'comment' => ''), - 'timezone' => array('required' => true, 'comment' => ''), - 'default_currency' => array('required' => true, 'comment' => ''), - 'db_host' => array('required' => true, 'comment' => ''), - 'db_name' => array('required' => true, 'comment' => ''), - 'db_user' => array('required' => true, 'comment' => ''), - 'db_pass' => array('comment' => ''), - 'db_prefix' => array('comment' => ''), - 'url' => array('required' => true, 'comment' => ''), + 'locale' => array('required' => true, 'comment' => ''), + 'timezone' => array('required' => true, 'comment' => ''), + 'default_currency' => array('required' => true, 'comment' => ''), + 'db_host' => array('required' => true, 'comment' => ''), + 'db_name' => array('required' => true, 'comment' => ''), + 'db_user' => array('required' => true, 'comment' => ''), + 'db_pass' => array('comment' => ''), + 'db_prefix' => array('comment' => ''), + 'url' => array('required' => true, 'comment' => ''), + 'skip_url_validation' => array('comment' => ''), 'use_rewrites' => array('required' => true, 'comment' => ''), 'use_secure' => array('required' => true, 'comment' => ''), 'secure_base_url' => array('required' => true, 'comment' => ''), @@ -285,18 +286,19 @@ protected function _prepareData() * Database and web config */ $this->_getDataModel()->setConfigData(array( - 'db_host' => $this->_args['db_host'], - 'db_name' => $this->_args['db_name'], - 'db_user' => $this->_args['db_user'], - 'db_pass' => $this->_args['db_pass'], - 'db_prefix' => $this->_args['db_prefix'], - 'use_rewrites' => $this->_checkFlag($this->_args['use_rewrites']), - 'use_secure' => $this->_checkFlag($this->_args['use_secure']), - 'unsecure_base_url' => $this->_args['url'], - 'secure_base_url' => $this->_args['secure_base_url'], - 'use_secure_admin' => $this->_checkFlag($this->_args['use_secure_admin']), - 'session_save' => $this->_checkSessionSave($this->_args['session_save']), - 'admin_frontname' => $this->_checkAdminFrontname($this->_args['admin_frontname']), + 'db_host' => $this->_args['db_host'], + 'db_name' => $this->_args['db_name'], + 'db_user' => $this->_args['db_user'], + 'db_pass' => $this->_args['db_pass'], + 'db_prefix' => $this->_args['db_prefix'], + 'use_rewrites' => $this->_checkFlag($this->_args['use_rewrites']), + 'use_secure' => $this->_checkFlag($this->_args['use_secure']), + 'unsecure_base_url' => $this->_args['url'], + 'secure_base_url' => $this->_args['secure_base_url'], + 'use_secure_admin' => $this->_checkFlag($this->_args['use_secure_admin']), + 'session_save' => $this->_checkSessionSave($this->_args['session_save']), + 'admin_frontname' => $this->_checkAdminFrontname($this->_args['admin_frontname']), + 'skip_url_validation' => $this->_checkFlag($this->_args['skip_url_validation']), )); /** @@ -330,6 +332,12 @@ public function install() return false; } + /** + * Skip URL validation, if set + */ + $this->_getDataModel()->setSkipUrlValidation($this->_args['skip_url_validation']); + $this->_getDataModel()->setSkipBaseUrlValidation($this->_args['skip_url_validation']); + /** * Prepare data */ diff --git a/app/code/core/Mage/Install/Model/Wizard.php b/app/code/core/Mage/Install/Model/Wizard.php index cc3786ff..3ca30a12 100644 --- a/app/code/core/Mage/Install/Model/Wizard.php +++ b/app/code/core/Mage/Install/Model/Wizard.php @@ -39,11 +39,11 @@ class Mage_Install_Model_Wizard * @var array */ protected $_steps = array(); - - public function __construct() + + public function __construct() { $this->_steps = Mage::getSingleton('install/config')->getWizardSteps(); - + foreach ($this->_steps as $index => $step) { $this->_steps[$index]->setUrl( $this->_getUrl($this->_steps[$index]->getController(), $this->_steps[$index]->getAction()) @@ -53,15 +53,21 @@ public function __construct() $this->_steps[$index]->setNextUrl( $this->_getUrl($this->_steps[$index+1]->getController(), $this->_steps[$index+1]->getAction()) ); + $this->_steps[$index]->setNextUrlPath( + $this->_getUrlPath($this->_steps[$index+1]->getController(), $this->_steps[$index+1]->getAction()) + ); } if (isset($this->_steps[$index-1])) { $this->_steps[$index]->setPrevUrl( $this->_getUrl($this->_steps[$index-1]->getController(), $this->_steps[$index-1]->getAction()) ); + $this->_steps[$index]->setPrevUrlPath( + $this->_getUrlPath($this->_steps[$index-1]->getController(), $this->_steps[$index-1]->getAction()) + ); } } } - + /** * Get wizard step by request * @@ -77,7 +83,7 @@ public function getStepByRequest(Zend_Controller_Request_Abstract $request) } return false; } - + /** * Get wizard step by name * @@ -93,7 +99,7 @@ public function getStepByName($name) } return false; } - + /** * Get all wizard steps * @@ -103,9 +109,21 @@ public function getSteps() { return $this->_steps; } - + protected function _getUrl($controller, $action) { - return Mage::getUrl('install/'.$controller.'/'.$action); + return Mage::getUrl($this->_getUrlPath($controller, $action)); + } + + /** + * Retrieve Url Path + * + * @param string $controller + * @param string $action + * @return string + */ + protected function _getUrlPath($controller, $action) + { + return 'install/'.$controller.'/'.$action; } } \ No newline at end of file diff --git a/app/code/core/Mage/Install/controllers/WizardController.php b/app/code/core/Mage/Install/controllers/WizardController.php index b191e6fd..c820a730 100644 --- a/app/code/core/Mage/Install/controllers/WizardController.php +++ b/app/code/core/Mage/Install/controllers/WizardController.php @@ -157,8 +157,12 @@ public function localeChangeAction() $this->_checkIfInstalled(); $locale = $this->getRequest()->getParam('locale'); + $timezone = $this->getRequest()->getParam('timezone'); + $currency = $this->getRequest()->getParam('currency'); if ($locale) { Mage::getSingleton('install/session')->setLocale($locale); + Mage::getSingleton('install/session')->setTimezone($timezone); + Mage::getSingleton('install/session')->setCurrency($currency); } $this->_redirect('*/*/locale'); @@ -338,7 +342,10 @@ public function installDbAction() * Clear session config data */ Mage::getSingleton('install/session')->getConfigData(true); - $this->getResponse()->setRedirect($step->getNextUrl()); + + Mage::app()->getStore()->resetConfig(); + + $this->getResponse()->setRedirect(Mage::getUrl($step->getNextUrlPath())); } catch (Exception $e){ Mage::getSingleton('install/session')->addError($e->getMessage()); diff --git a/app/code/core/Mage/Install/etc/config.xml b/app/code/core/Mage/Install/etc/config.xml index de5bb79d..9cef93f6 100644 --- a/app/code/core/Mage/Install/etc/config.xml +++ b/app/code/core/Mage/Install/etc/config.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Install * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Install/etc/install.xml b/app/code/core/Mage/Install/etc/install.xml index bf5b5c1a..edd3f8db 100644 --- a/app/code/core/Mage/Install/etc/install.xml +++ b/app/code/core/Mage/Install/etc/install.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Install * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Log/Model/Cron.php b/app/code/core/Mage/Log/Model/Cron.php new file mode 100644 index 00000000..0f0e3a31 --- /dev/null +++ b/app/code/core/Mage/Log/Model/Cron.php @@ -0,0 +1,103 @@ + + */ +class Mage_Log_Model_Cron extends Mage_Core_Model_Abstract +{ + const XML_PATH_EMAIL_LOG_CLEAN_TEMPLATE = 'system/log/error_email_template'; + const XML_PATH_EMAIL_LOG_CLEAN_IDENTITY = 'system/log/error_email_identity'; + const XML_PATH_EMAIL_LOG_CLEAN_RECIPIENT = 'system/log/error_email'; + + /** + * Error messages + * + * @var array + */ + protected $_errors = array(); + + /** + * Send Log Clean Warnings + * + * @return Mage_Log_Model_Cron + */ + protected function _sendLogCleanEmail() + { + if (!$this->_errors) { + return $this; + } + if (!Mage::getStoreConfig(self::XML_PATH_EMAIL_LOG_CLEAN_RECIPIENT)) { + return $this; + } + + $translate = Mage::getSingleton('core/translate'); + /* @var $translate Mage_Core_Model_Translate */ + $translate->setTranslateInline(false); + + $emailTemplate = Mage::getModel('core/email_template'); + /* @var $emailTemplate Mage_Core_Model_Email_Template */ + $emailTemplate->setDesignConfig(array('area' => 'backend')) + ->sendTransactional( + Mage::getStoreConfig(self::XML_PATH_EMAIL_LOG_CLEAN_TEMPLATE), + Mage::getStoreConfig(self::XML_PATH_EMAIL_LOG_CLEAN_IDENTITY), + Mage::getStoreConfig(self::XML_PATH_EMAIL_LOG_CLEAN_RECIPIENT), + null, + array('warnings' => join("\n", $this->_errors)) + ); + + $translate->setTranslateInline(true); + + return $this; + } + + /** + * Clean logs + * + * @return Mage_Log_Model_Cron + */ + public function logClean() + { + $this->_errors = array(); + + try { + Mage::getModel('log/log')->clean(); + } + catch (Exception $e) { + $this->_errors[] = $e->getMessage(); + $this->_errors[] = $e->getTrace(); + } + + $this->_sendLogCleanEmail(); + + return $this; + } +} diff --git a/app/code/core/Mage/Log/Model/Log.php b/app/code/core/Mage/Log/Model/Log.php new file mode 100644 index 00000000..d0618813 --- /dev/null +++ b/app/code/core/Mage/Log/Model/Log.php @@ -0,0 +1,63 @@ + + */ +class Mage_Log_Model_Log extends Mage_Core_Model_Abstract +{ + const XML_LOG_CLEAN_DAYS = 'system/log/clean_after_day'; + + /** + * Init Resource Model + * + */ + protected function _construct() + { + $this->_init('log/log'); + } + + public function getLogCleanTime() + { + return Mage::getStoreConfig(self::XML_LOG_CLEAN_DAYS) * 60 * 60 * 24; + } + + /** + * Clean Logs + * + * @return Mage_Log_Model_Log + */ + public function clean() + { + $this->getResource()->clean($this); + return $this; + } +} diff --git a/app/code/core/Mage/Log/Model/Mysql4/Log.php b/app/code/core/Mage/Log/Model/Mysql4/Log.php new file mode 100644 index 00000000..b335386a --- /dev/null +++ b/app/code/core/Mage/Log/Model/Mysql4/Log.php @@ -0,0 +1,256 @@ + + */ +class Mage_Log_Model_Mysql4_Log extends Mage_Core_Model_Mysql4_Abstract +{ + /** + * Init Resource model and connection + * + */ + protected function _construct() + { + $this->_init('log/visitor', 'visitor_id'); + } + + /** + * Clean logs + * + * @param Mage_Log_Model_Log $object + * @return Mage_Log_Model_Mysql4_Log + */ + public function clean(Mage_Log_Model_Log $object) + { + $cleanTime = $object->getLogCleanTime(); + + Mage::dispatchEvent('log_log_clean_before', array( + 'log' => $object + )); + + $this->_cleanVisitors($cleanTime); + $this->_cleanCustomers(); + $this->_cleanCustomers(); + + Mage::dispatchEvent('log_log_clean_after', array( + 'log' => $object + )); + + return $this; + } + + /** + * Clean visitors table + * + * @param int $time + * @return Mage_Log_Model_Mysql4_Log + */ + protected function _cleanVisitors($time) + { + while (true) { + $select = $this->_getReadAdapter()->select() + ->from( + array('visitor_table' => $this->getTable('log/visitor')), + array('visitor_id' => 'visitor_table.visitor_id')) + ->joinLeft( + array('customer_table' => $this->getTable('log/customer')), + 'visitor_table.visitor_id = customer_table.visitor_id', + array()) + ->where('customer_table.log_id IS NULL') + ->where('visitor_table.last_visit_at < ?', gmdate('Y-m-d H:i:s', time() - $time)) + ->order('visitor_table.visitor_id') + ->limit(1000); + + $query = $this->_getReadAdapter()->query($select); + $visitorIds = array(); + while ($row = $query->fetch()) { + $visitorIds[] = $row['visitor_id']; + } + + if (!$visitorIds) { + break; + } + + // remove visitors from log/quote + $this->_getWriteAdapter()->delete( + $this->getTable('log/quote_table'), + $this->_getWriteAdapter()->quoteInto('visitor_id IN(?)', $visitorIds) + ); + + // remove visitors from log/url + $this->_getWriteAdapter()->delete( + $this->getTable('log/url_table'), + $this->_getWriteAdapter()->quoteInto('visitor_id IN(?)', $visitorIds) + ); + + // remove visitors from log/visitor_info + $this->_getWriteAdapter()->delete( + $this->getTable('log/visitor_info'), + $this->_getWriteAdapter()->quoteInto('visitor_id IN(?)', $visitorIds) + ); + + // remove visitors from log/visitor + $this->_getWriteAdapter()->delete( + $this->getTable('log/visitor'), + $this->_getWriteAdapter()->quoteInto('visitor_id IN(?)', $visitorIds) + ); + } + + return $this; + } + + /** + * Clean customer table + * + * @return Mage_Log_Model_Mysql4_Log + */ + protected function _cleanCustomers() + { + // retrieve last active customer log id + $row = $this->_getReadAdapter()->fetchRow( + $this->_getReadAdapter()->select() + ->from($this->getTable('log/customer'), 'log_id') + ->order('log_id DESC') + ->limit(1) + ); + + if (!$row) { + return $this; + } + + $lastLogId = $row['log_id']; + + $needLogIds = array(); + $select = $this->_getReadAdapter()->select() + ->from( + $this->getTable('log/customer'), + array('log_id')) + ->group('customer_id') + ->where('log_idorder('log_id DESC'); + + $query = $this->_getReadAdapter()->query($select); + while ($row = $query->fetch()) { + $needLogIds[$row['log_id']] = 1; + } + + $customerLogId = 0; + while (true) { + $visitorIds = array(); + $select = $this->_getReadAdapter()->select() + ->from( + $this->getTable('log/customer'), + array('log_id', 'visitor_id')) + ->where('log_id>?', $customerLogId) + ->where('log_idorder('log_id') + ->limit(1000); + $query = $this->_getReadAdapter()->query($select); + $count = 0; + while ($row = $query->fetch()) { + $count ++; + $customerLogId = $row['log_id']; + if (!isset($needLogIds[$row['log_id']])) { + $visitorIds[] = $row['visitor_id']; + } + } + + if (!$count || $customerLogId == $lastLogId) { + break; + } + + if ($visitorIds) { + // remove visitors from log/quote + $this->_getWriteAdapter()->delete( + $this->getTable('log/quote_table'), + $this->_getWriteAdapter()->quoteInto('visitor_id IN(?)', $visitorIds) + ); + + // remove visitors from log/url + $this->_getWriteAdapter()->delete( + $this->getTable('log/url_table'), + $this->_getWriteAdapter()->quoteInto('visitor_id IN(?)', $visitorIds) + ); + + // remove visitors from log/visitor_info + $this->_getWriteAdapter()->delete( + $this->getTable('log/visitor_info'), + $this->_getWriteAdapter()->quoteInto('visitor_id IN(?)', $visitorIds) + ); + + // remove visitors from log/visitor + $this->_getWriteAdapter()->delete( + $this->getTable('log/visitor'), + $this->_getWriteAdapter()->quoteInto('visitor_id IN(?)', $visitorIds) + ); + } + } + + return $this; + } + + /** + * Clean url table + * + * @return Mage_Log_Model_Mysql4_Log + */ + protected function _cleanUrls() + { + while (true) { + $urlIds = array(); + $select = $this->_getReadAdapter()->select() + ->from( + array('url_info_table' => $this->getTable('log/url_info_table')), + array('url_id')) + ->joinLeft( + array('url_table' => $this->getTable('log/url_table')), + 'url_info_table.url_id = url_table.url_id', + array()) + ->where('url_table.url_id IS NULL') + ->order('url_info_table.url_id ASC') + ->limit(1000); + $query = $this->_getReadAdapter()->query($select); + while ($row = $query->fetch()) { + $urlIds[] = $row['url_id']; + } + + if (!$urlIds) { + break; + } + + $this->_getWriteAdapter()->delete( + $this->getTable('log/url_info_table'), + $this->_getWriteAdapter()->quoteInto('url_id IN(?)', $urlIds) + ); + } + } +} \ No newline at end of file diff --git a/app/code/core/Mage/Log/etc/config.xml b/app/code/core/Mage/Log/etc/config.xml index 995f7878..e0b34639 100644 --- a/app/code/core/Mage/Log/etc/config.xml +++ b/app/code/core/Mage/Log/etc/config.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,13 +22,13 @@ * @category Mage * @package Mage_Log * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - 0.7.2 + 0.7.3 @@ -94,6 +94,15 @@ + @@ -166,8 +175,27 @@ + + + + 1 + 0 + + D + + general + system_log_error_email_template + + + + + + + log/cron::logClean + + */10 * * * * diff --git a/app/code/core/Mage/Log/etc/system.xml b/app/code/core/Mage/Log/etc/system.xml new file mode 100644 index 00000000..fb11d6a1 --- /dev/null +++ b/app/code/core/Mage/Log/etc/system.xml @@ -0,0 +1,106 @@ + + + + + + + + + text + 200 + 1 + 0 + 0 + + + + text + 1 + 1 + 0 + 0 + + + + select + adminhtml/system_config_source_yesno + 2 + 1 + 0 + 0 + + + + + select + adminhtml/system_config_source_cron_frequency + adminhtml/system_config_backend_log_cron + 4 + 1 + 0 + 0 + + + + text + 5 + 1 + 0 + 0 + + + + select + adminhtml/system_config_source_email_identity + 6 + 1 + 0 + 0 + + + + select + adminhtml/system_config_source_email_template + 7 + 1 + 0 + 0 + + + + + + + \ No newline at end of file diff --git a/app/code/core/Mage/Media/etc/config.xml b/app/code/core/Mage/Media/etc/config.xml index 4b12b8ce..d8ea7505 100644 --- a/app/code/core/Mage/Media/etc/config.xml +++ b/app/code/core/Mage/Media/etc/config.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_GiftMessage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Newsletter/Model/Mysql4/Subscriber/Collection.php b/app/code/core/Mage/Newsletter/Model/Mysql4/Subscriber/Collection.php index c6e46edc..26c6a034 100644 --- a/app/code/core/Mage/Newsletter/Model/Mysql4/Subscriber/Collection.php +++ b/app/code/core/Mage/Newsletter/Model/Mysql4/Subscriber/Collection.php @@ -42,8 +42,6 @@ class Mage_Newsletter_Model_Mysql4_Subscriber_Collection extends Varien_Data_Col */ protected $_subscriberTable; - - /** * Queue link table name * @@ -131,13 +129,17 @@ public function useOnlyUnsent( ) */ public function showCustomerInfo() { + $customer = Mage::getModel('customer/customer'); + /* @var $customer Mage_Customer_Model_Customer */ + $firstname = $customer->getAttribute('firstname'); + $lastname = $customer->getAttribute('lastname'); - $customersCollection = Mage::getModel('customer/customer')->getCollection(); - /* @var $customersCollection Mage_Customer_Model_Entity_Customer_Collection */ - $firstname = $customersCollection->getAttribute('firstname'); - $lastname = $customersCollection->getAttribute('lastname'); +// $customersCollection = Mage::getModel('customer/customer')->getCollection(); +// /* @var $customersCollection Mage_Customer_Model_Entity_Customer_Collection */ +// $firstname = $customersCollection->getAttribute('firstname'); +// $lastname = $customersCollection->getAttribute('lastname'); - $this->_select + $this->getSelect() ->joinLeft( array('customer_lastname_table'=>$lastname->getBackend()->getTable()), 'customer_lastname_table.entity_id=main_table.customer_id @@ -158,7 +160,7 @@ public function showCustomerInfo() public function addSubscriberTypeField() { - $this->_select + $this->getSelect() ->from(null, array('type'=>new Zend_Db_Expr('IF(main_table.customer_id = 0, 1, 2)'))); return $this; } @@ -171,7 +173,11 @@ public function addSubscriberTypeField() */ public function showStoreInfo() { - $this->_select->join(array('store'=>$this->_storeTable), 'store.store_id = main_table.store_id', array('website_id','group_id')); + $this->getSelect()->join( + array('store' => $this->_storeTable), + 'store.store_id = main_table.store_id', + array('group_id', 'website_id') + ); return $this; } diff --git a/app/code/core/Mage/Newsletter/Model/Queue.php b/app/code/core/Mage/Newsletter/Model/Queue.php index ded71f03..e8810bd9 100644 --- a/app/code/core/Mage/Newsletter/Model/Queue.php +++ b/app/code/core/Mage/Newsletter/Model/Queue.php @@ -118,15 +118,8 @@ public function sendPerSubscriber($count=20, array $additionalVariables=array()) } } - - - - - foreach($collection->getItems() as $item) { - $this->getTemplate()->send($item, array('subscriber'=>$item), null, $this); - } if(count($collection->getItems()) < $count-1 || count($collection->getItems()) == 0) { diff --git a/app/code/core/Mage/Newsletter/Model/Subscriber.php b/app/code/core/Mage/Newsletter/Model/Subscriber.php index 005af35a..28309c2c 100644 --- a/app/code/core/Mage/Newsletter/Model/Subscriber.php +++ b/app/code/core/Mage/Newsletter/Model/Subscriber.php @@ -45,6 +45,8 @@ class Mage_Newsletter_Model_Subscriber extends Varien_Object const XML_PATH_UNSUBSCRIBE_EMAIL_IDENTITY = 'newsletter/subscription/un_email_identity'; const XML_PATH_CONFIRMATION_FLAG = 'newsletter/subscription/confirm'; + const XML_PATH_SENDING_SET_RETURN_PATH = 'newsletter/sending/set_return_path'; + protected $_isStatusChanged = false; /** @@ -341,7 +343,8 @@ public function unsubscribe() Mage::throwException(Mage::helper('newsletter')->__('Invalid subscription confirmation code')); } - $this->setSubscriberStatus(self::STATUS_UNSUBSCRIBED)->save(); + $this->setSubscriberStatus(self::STATUS_UNSUBSCRIBED) + ->save(); $this->sendUnsubscriptionEmail(); return $this; } @@ -356,6 +359,10 @@ public function subscribeCustomer($customer) { $this->loadByCustomer($customer); + if ($customer->getImportMode()) { + $this->setImportMode(true); + } + if (!$customer->getIsSubscribed() && !$this->getId()) { // If subscription flag not seted or customer not subscriber // and no subscribe bellow @@ -433,6 +440,10 @@ public function received(Mage_Newsletter_Model_Queue $queue) public function sendConfirmationRequestEmail() { + if ($this->getImportMode()) { + return $this; + } + if(!Mage::getStoreConfig(self::XML_PATH_CONFIRM_EMAIL_TEMPLATE) || !Mage::getStoreConfig(self::XML_PATH_CONFIRM_EMAIL_IDENTITY)) { return $this; } @@ -441,14 +452,18 @@ public function sendConfirmationRequestEmail() /* @var $translate Mage_Core_Model_Translate */ $translate->setTranslateInline(false); - Mage::getModel('core/email_template') - ->sendTransactional( - Mage::getStoreConfig(self::XML_PATH_CONFIRM_EMAIL_TEMPLATE), - Mage::getStoreConfig(self::XML_PATH_CONFIRM_EMAIL_IDENTITY), - $this->getEmail(), - $this->getName(), - array('subscriber'=>$this) - ); + $email = Mage::getModel('core/email_template'); + /* @var $email Mage_Core_Model_Email_Template */ + if (Mage::getStoreConfigFlag(self::XML_PATH_SENDING_SET_RETURN_PATH)) { + $email->setReturnPath(Mage::getStoreConfig(self::XML_PATH_CONFIRM_EMAIL_IDENTITY)); + } + $email->sendTransactional( + Mage::getStoreConfig(self::XML_PATH_CONFIRM_EMAIL_TEMPLATE), + Mage::getStoreConfig(self::XML_PATH_CONFIRM_EMAIL_IDENTITY), + $this->getEmail(), + $this->getName(), + array('subscriber'=>$this) + ); $translate->setTranslateInline(true); @@ -457,6 +472,10 @@ public function sendConfirmationRequestEmail() public function sendConfirmationSuccessEmail() { + if ($this->getImportMode()) { + return $this; + } + if(!Mage::getStoreConfig(self::XML_PATH_SUCCESS_EMAIL_TEMPLATE) || !Mage::getStoreConfig(self::XML_PATH_SUCCESS_EMAIL_IDENTITY)) { return $this; } @@ -465,14 +484,18 @@ public function sendConfirmationSuccessEmail() /* @var $translate Mage_Core_Model_Translate */ $translate->setTranslateInline(false); - Mage::getModel('core/email_template') - ->sendTransactional( - Mage::getStoreConfig(self::XML_PATH_SUCCESS_EMAIL_TEMPLATE), - Mage::getStoreConfig(self::XML_PATH_SUCCESS_EMAIL_IDENTITY), - $this->getEmail(), - $this->getName(), - array('subscriber'=>$this) - ); + $email = Mage::getModel('core/email_template'); + /* @var $email Mage_Core_Model_Email_Template */ + if (Mage::getStoreConfigFlag(self::XML_PATH_SENDING_SET_RETURN_PATH)) { + $email->setReturnPath(Mage::getStoreConfig(self::XML_PATH_SUCCESS_EMAIL_IDENTITY)); + } + $email->sendTransactional( + Mage::getStoreConfig(self::XML_PATH_SUCCESS_EMAIL_TEMPLATE), + Mage::getStoreConfig(self::XML_PATH_SUCCESS_EMAIL_IDENTITY), + $this->getEmail(), + $this->getName(), + array('subscriber'=>$this) + ); $translate->setTranslateInline(true); @@ -481,6 +504,9 @@ public function sendConfirmationSuccessEmail() public function sendUnsubscriptionEmail() { + if ($this->getImportMode()) { + return $this; + } if(!Mage::getStoreConfig(self::XML_PATH_UNSUBSCRIBE_EMAIL_TEMPLATE) || !Mage::getStoreConfig(self::XML_PATH_UNSUBSCRIBE_EMAIL_IDENTITY)) { return $this; } @@ -489,14 +515,18 @@ public function sendUnsubscriptionEmail() /* @var $translate Mage_Core_Model_Translate */ $translate->setTranslateInline(false); - Mage::getModel('core/email_template') - ->sendTransactional( - Mage::getStoreConfig(self::XML_PATH_UNSUBSCRIBE_EMAIL_TEMPLATE), - Mage::getStoreConfig(self::XML_PATH_UNSUBSCRIBE_EMAIL_IDENTITY), - $this->getEmail(), - $this->getName(), - array('subscriber'=>$this) - ); + $email = Mage::getModel('core/email_template'); + /* @var $email Mage_Core_Model_Email_Template */ + if (Mage::getStoreConfigFlag(self::XML_PATH_SENDING_SET_RETURN_PATH)) { + $email->setReturnPath(Mage::getStoreConfig(self::XML_PATH_UNSUBSCRIBE_EMAIL_IDENTITY)); + } + $email->sendTransactional( + Mage::getStoreConfig(self::XML_PATH_UNSUBSCRIBE_EMAIL_TEMPLATE), + Mage::getStoreConfig(self::XML_PATH_UNSUBSCRIBE_EMAIL_IDENTITY), + $this->getEmail(), + $this->getName(), + array('subscriber'=>$this) + ); $translate->setTranslateInline(true); diff --git a/app/code/core/Mage/Newsletter/Model/Template.php b/app/code/core/Mage/Newsletter/Model/Template.php index e20498f8..bc645143 100644 --- a/app/code/core/Mage/Newsletter/Model/Template.php +++ b/app/code/core/Mage/Newsletter/Model/Template.php @@ -39,7 +39,6 @@ class Mage_Newsletter_Model_Template extends Varien_Object const TYPE_TEXT = 1; const TYPE_HTML = 2; - protected $_preprocessFlag = false; protected $_mail; @@ -103,8 +102,8 @@ public function setId($value) public function isValidForSend() { return !Mage::getStoreConfigFlag('system/smtp/disable') - && $this->getTemplateSenderName() - && $this->getTemplateSenderEmail() + && $this->getTemplateSenderName() + && $this->getTemplateSenderEmail() && $this->getTemplateSubject(); } @@ -129,16 +128,16 @@ public function save() public function isPreprocessed() { - return strlen($this->getTemplateTextPreprocessed()) > 0; + return strlen($this->getTemplateTextPreprocessed()) > 0; } public function getTemplateTextPreprocessed() { - if($this->_preprocessFlag) { - $this->setTemplateTextPreprocessed($this->getProcessedTemplate()); - } + if($this->_preprocessFlag) { + $this->setTemplateTextPreprocessed($this->getProcessedTemplate()); + } - return $this->getData('template_text_preprocessed'); + return $this->getData('template_text_preprocessed'); } public function getProcessedTemplate(array $variables = array(), $usePreprocess=false) @@ -146,7 +145,7 @@ public function getProcessedTemplate(array $variables = array(), $usePreprocess= $processor = new Varien_Filter_Template(); if(!$this->_preprocessFlag) { - $variables['this'] = $this; + $variables['this'] = $this; } $processor @@ -154,14 +153,12 @@ public function getProcessedTemplate(array $variables = array(), $usePreprocess= ->setVariables($variables); if($usePreprocess && $this->isPreprocessed()) { - return $processor->filter($this->getTemplateTextPreprocessed()); + return $processor->filter($this->getTemplateTextPreprocessed()); } return $processor->filter($this->getTemplateText()); } - - public function getInclude($template, array $variables) { $thisClass = __CLASS__; @@ -202,7 +199,7 @@ public function send($subscriber, array $variables = array(), $name=null, Mage_N } $email = ''; - if($subscriber instanceof Mage_Newsletter_Model_Subscriber) { + if ($subscriber instanceof Mage_Newsletter_Model_Subscriber) { $email = $subscriber->getSubscriberEmail(); if (is_null($name) && ($subscriber->hasCustomerFirstname() || $subscriber->hasCustomerLastname()) ) { $name = $subscriber->getCustomerFirstname() . ' ' . $subscriber->getCustomerLastname(); @@ -211,6 +208,9 @@ public function send($subscriber, array $variables = array(), $name=null, Mage_N $email = (string) $subscriber; } + if (Mage::getStoreConfigFlag(Mage_Newsletter_Model_Subscriber::XML_PATH_SENDING_SET_RETURN_PATH)) { + $this->getMail()->setReturnPath($this->getTemplateSenderEmail()); + } ini_set('SMTP', Mage::getStoreConfig('system/smtp/host')); ini_set('smtp_port', Mage::getStoreConfig('system/smtp/port')); @@ -231,8 +231,8 @@ public function send($subscriber, array $variables = array(), $name=null, Mage_N try { $mail->send(); $this->_mail = null; - if(!is_null($queue)) { - $subscriber->received($queue); + if(!is_null($queue)) { + $subscriber->received($queue); } } catch (Exception $e) { @@ -241,13 +241,13 @@ public function send($subscriber, array $variables = array(), $name=null, Mage_N $problem = Mage::getModel('newsletter/problem'); $problem->addSubscriberData($subscriber); if(!is_null($queue)) { - $problem->addQueueData($queue); + $problem->addQueueData($queue); } $problem->addErrorData($e); $problem->save(); if(!is_null($queue)) { - $subscriber->received($queue); + $subscriber->received($queue); } } else { // Otherwise throw error to upper level @@ -271,36 +271,36 @@ public function delete() public function preprocess() { - $this->_preprocessFlag = true; - $this->save(); - $this->_preprocessFlag = false; - return $this; + $this->_preprocessFlag = true; + $this->save(); + $this->_preprocessFlag = false; + return $this; } - public function getProcessedTemplateSubject(array $variables) - { - $processor = new Varien_Filter_Template(); + public function getProcessedTemplateSubject(array $variables) + { + $processor = new Varien_Filter_Template(); - if(!$this->_preprocessFlag) { - $variables['this'] = $this; - } + if(!$this->_preprocessFlag) { + $variables['this'] = $this; + } - $processor->setVariables($variables); + $processor->setVariables($variables); - return $processor->filter($this->getTemplateSubject()); - } + return $processor->filter($this->getTemplateSubject()); + } - public function getTemplateText() - { - if (!$this->getData('template_text') && !$this->getId()) { - $this->setData( - 'template_text', - Mage::helper('newsletter')->__( - ' Follow this link to unsubscribe {{var subscriber.getUnsubscriptionLink()}}' - ) - ); - } + public function getTemplateText() + { + if (!$this->getData('template_text') && !$this->getId()) { + $this->setData( + 'template_text', + Mage::helper('newsletter')->__( + ' Follow this link to unsubscribe {{var subscriber.getUnsubscriptionLink()}}' + ) + ); + } - return $this->getData('template_text'); - } + return $this->getData('template_text'); + } } \ No newline at end of file diff --git a/app/code/core/Mage/Newsletter/etc/config.xml b/app/code/core/Mage/Newsletter/etc/config.xml index 5d2c50d0..c1ae6311 100644 --- a/app/code/core/Mage/Newsletter/etc/config.xml +++ b/app/code/core/Mage/Newsletter/etc/config.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Newsletter * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> @@ -259,6 +259,9 @@ support newsletter_subscription_un_email_template + + 0 +
diff --git a/app/code/core/Mage/Newsletter/etc/system.xml b/app/code/core/Mage/Newsletter/etc/system.xml index 9847545c..a7a36df2 100644 --- a/app/code/core/Mage/Newsletter/etc/system.xml +++ b/app/code/core/Mage/Newsletter/etc/system.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Newsletter * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> @@ -109,6 +109,25 @@ + + + text + 2 + 1 + 0 + 0 + + + + select + adminhtml/system_config_source_yesno + 1 + 1 + 0 + 0 + + + diff --git a/app/code/core/Mage/Oscommerce/Model/Mysql4/Oscommerce.php b/app/code/core/Mage/Oscommerce/Model/Mysql4/Oscommerce.php index 88d35718..3b3ae2c7 100644 --- a/app/code/core/Mage/Oscommerce/Model/Mysql4/Oscommerce.php +++ b/app/code/core/Mage/Oscommerce/Model/Mysql4/Oscommerce.php @@ -31,21 +31,21 @@ */ class Mage_Oscommerce_Model_Mysql4_Oscommerce extends Mage_Core_Model_Mysql4_Abstract { - const DEFAULT_DISPLAY_MODE = 'PRODUCTS'; - const DEFAULT_IS_ANCHOR = '0'; - const DEFAULT_STORE = 'Default'; - const DEFAULT_PRODUCT_TYPE = 'Simple'; - const DEFAULT_ATTRIBUTE_SET = 'Default'; - const DEFAULT_VISIBILITY = 'Catalog, Search'; - const DEFAULT_LOCALE = 'en_US'; - const DEFAULT_MAGENTO_CHARSET = 'UTF-8'; - const DEFAULT_OSC_CHARSET = 'ISO-8859-1'; - const DEFAULT_FIELD_CHARSET = 'utf8'; + const DEFAULT_DISPLAY_MODE = 'PRODUCTS'; + const DEFAULT_IS_ANCHOR = '0'; + const DEFAULT_STORE = 'Default'; + const DEFAULT_PRODUCT_TYPE = 'Simple'; + const DEFAULT_ATTRIBUTE_SET = 'Default'; + const DEFAULT_VISIBILITY = 'Catalog, Search'; + const DEFAULT_LOCALE = 'en_US'; + const DEFAULT_MAGENTO_CHARSET = 'UTF-8'; + const DEFAULT_OSC_CHARSET = 'ISO-8859-1'; + const DEFAULT_FIELD_CHARSET = 'utf8'; protected $_currentWebsiteId; protected $_currentWebsite; - protected $_importType = array(); + protected $_importType = array(); protected $_countryIdToCode = array(); protected $_countryNameToCode = array(); protected $_regionCode = array(); @@ -59,8 +59,8 @@ class Mage_Oscommerce_Model_Mysql4_Oscommerce extends Mage_Core_Model_Mysql4_Abs protected $_isProductWithCategories = false; protected $_setupConnection ; protected $_customerIdPair = array(); - protected $_categoryIdPair = array(); - protected $_prefixPath = ''; + protected $_categoryIdPair = array(); + protected $_prefixPath = ''; protected $_stores = array(); protected $_productsToCategories = array(); protected $_productsToStores = array(); @@ -88,10 +88,10 @@ class Mage_Oscommerce_Model_Mysql4_Oscommerce extends Mage_Core_Model_Mysql4_Abs protected $_lengthShortDescription; protected $_currentUserId; - protected $_oscTables = array( - 'products', 'customers', 'categories', 'orders', - 'languages','orders_products', 'orders_status_history', - 'orders_total', 'products_description', 'address_book', 'categories_description' + protected $_oscTables = array( + 'products', 'customers', 'categories', 'orders', 'languages', + 'orders_products', 'orders_status_history', 'orders_total', + 'products_description', 'address_book', 'categories_description' ); protected function _construct() @@ -175,7 +175,7 @@ public function setWebsiteCode($code) */ public function createWebsite($websiteId = null) { - $importModel = $this->getImportModel(); + $importModel = $this->getImportModel(); $websiteModel = $this->getWebsiteModel(); if (!is_null($websiteId)) { $websiteModel->load($websiteId); @@ -208,7 +208,7 @@ public function createWebsite($websiteId = null) public function createStoreGroup() { - $importModel = $this->getImportModel(); + $importModel = $this->getImportModel(); $storeInfo = $this->getOscStoreInformation(); $websiteModel = $this->getWebsiteModel(); if (!$websiteModel->getId()) { @@ -239,7 +239,7 @@ public function createStoreGroup() public function createRootCategory() { - $importModel = $this->getImportModel(); + $importModel = $this->getImportModel(); $categoryModel = $this->getCategoryModel(); $categoryModel->unsetData(); $categoryModel->setOrigData(); @@ -280,7 +280,7 @@ public function createRootCategory() */ public function importStores() { - $importModel = $this->getImportModel(); + $importModel = $this->getImportModel(); $locales = $this->getStoreLocales(); $defaultStore = ''; $storeInformation = $this->getOscStoreInformation(); @@ -309,7 +309,7 @@ public function importStores() $store['code'] = $store['code'].'_'.$websiteId.time(); // for unique store code $locales[$store['code']] = $localeCode; } - $store['name'] = $this->convert($store['name']); + $store['name'] = $this->convert($store['name']); $storeModel->unsetData(); $storeModel->setOrigData(); $storeModel->setData($store); @@ -387,15 +387,15 @@ public function importCustomers($startFrom = 0, $useStartFrom = false, $sendSubs * @param array $data */ protected function _saveCustomer($data = null) { - $addressFieldMapping = array( - 'street' => 'entry_street_address', - 'firstname' => 'entry_firstname', - 'lastname' => 'entry_lastname', - 'city' => 'entry_city', - 'region' => 'entry_state' - ); - $importModel = $this->getImportModel(); - $timezone = $importModel->getTimezone(); + $addressFieldMapping = array( + 'street' => 'entry_street_address', + 'firstname' => 'entry_firstname', + 'lastname' => 'entry_lastname', + 'city' => 'entry_city', + 'region' => 'entry_state' + ); + $importModel = $this->getImportModel(); + $timezone = $importModel->getTimezone(); if (!is_null($data)) { $customerAddresses = array(); // Getting customer group data @@ -407,20 +407,20 @@ protected function _saveCustomer($data = null) { $oscCustomerId = $data['id']; $data['group_id'] = $customerGroupModel->getName(); - $prepareCreated = explode(' ', $data['created_at']); - $dateFormat = 'YYYY-MM-dd HH:mm:ss'; - $dateCreated = new Zend_Date(); - $dateCreated->setTimezone($timezone); - $dateCreated->setDate($prepareCreated[0], 'YYYY-MM-dd'); - $dateCreated->setTime($prepareCreated[1], 'HH:mm:ss'); - $dateCreated->setTimezone('GMT'); - $data['created_at'] = $dateCreated->toString($dateFormat); + $prepareCreated = explode(' ', $data['created_at']); + $dateFormat = 'YYYY-MM-dd HH:mm:ss'; + $dateCreated = new Zend_Date(); + $dateCreated->setTimezone($timezone); + $dateCreated->setDate($prepareCreated[0], 'YYYY-MM-dd'); + $dateCreated->setTime($prepareCreated[1], 'HH:mm:ss'); + $dateCreated->setTimezone('GMT'); + $data['created_at'] = $dateCreated->toString($dateFormat); foreach($data as $field => $value) { - if (in_array($field, array('firstname', 'lastname'))) { + if (in_array($field, array('firstname', 'lastname'))) { $value = $this->convert($value); - } - $data[$field] = html_entity_decode($value, ENT_QUOTES, self::DEFAULT_MAGENTO_CHARSET); + } + $data[$field] = html_entity_decode($value, ENT_QUOTES, self::DEFAULT_MAGENTO_CHARSET); } @@ -465,6 +465,7 @@ protected function _saveCustomer($data = null) { try { $customerModel->setData($data); + $customerModel->setImportMode(true); $customerModel->setWebsiteId($websiteId > 0 ? $websiteId: $this->getCurrentWebsite()->getId()); $customerModel->save(); $customerId = $customerModel->getId(); @@ -509,7 +510,7 @@ public function setCustomerIdPair($data) public function importCategories($startFrom = 0, $useStartFrom = false) { - $importModel = $this->getImportModel(); + $importModel = $this->getImportModel(); $this->_logData['type_id'] = $this->getImportTypeIdByCode('category'); $this->_logData['import_id'] = $importModel->getId(); $categoryModel = $this->getCategoryModel(); @@ -538,35 +539,35 @@ public function importCategories($startFrom = 0, $useStartFrom = false) } protected function _saveCategory($data) { - $importModel = $this->getImportModel(); + $importModel = $this->getImportModel(); $categoryModel = $this->getCategoryModel(); $oscCategoryId = $data['id']; - unset($data['id']); + unset($data['id']); try { - $data['store_id'] = 0; - $data['is_active'] = 1; - $data['display_mode'] = self::DEFAULT_DISPLAY_MODE; - $data['is_anchor'] = self::DEFAULT_IS_ANCHOR; - $data['attribute_set_id'] = $categoryModel->getDefaultAttributeSetId(); + $data['store_id'] = 0; + $data['is_active'] = 1; + $data['display_mode'] = self::DEFAULT_DISPLAY_MODE; + $data['is_anchor'] = self::DEFAULT_IS_ANCHOR; + $data['attribute_set_id'] = $categoryModel->getDefaultAttributeSetId(); $data['name'] = $this->convert($data['name']); - $data['meta_title'] = html_entity_decode($data['name'], ENT_QUOTES, self::DEFAULT_MAGENTO_CHARSET); - $categoryModel->setData($data); - $categoryModel->save(); - $categoryId = $categoryModel->getId(); - $this->saveLogs(array($oscCategoryId => $categoryId), 'category'); - - // saving data for different (encoding has been done in getCategoryToStores method) - $storeData = $data['stores']; - unset($data['stores']); - if (isset($storeData)) { - foreach($storeData as $storeId=>$catData) { - $categoryModel->setStoreId($storeId)->setName($catData['name'])->setMetaTitle($catData['name']) - ->save(); - } - } - $this->_saveRows++; + $data['meta_title'] = html_entity_decode($data['name'], ENT_QUOTES, self::DEFAULT_MAGENTO_CHARSET); + $categoryModel->setData($data); + $categoryModel->save(); + $categoryId = $categoryModel->getId(); + $this->saveLogs(array($oscCategoryId => $categoryId), 'category'); + + // saving data for different (encoding has been done in getCategoryToStores method) + $storeData = $data['stores']; + unset($data['stores']); + if (isset($storeData)) { + foreach($storeData as $storeId=>$catData) { + $categoryModel->setStoreId($storeId)->setName($catData['name'])->setMetaTitle($catData['name']) + ->save(); + } + } + $this->_saveRows++; } catch (Exception $e) { - $this->_addErrors(Mage::helper('oscommerce')->__('Category %s cannot be saved because of %s', $data['name'], $e->getMessage())); + $this->_addErrors(Mage::helper('oscommerce')->__('Category %s cannot be saved because of %s', $data['name'], $e->getMessage())); } } @@ -574,47 +575,47 @@ protected function _saveCategory($data) { public function buildCategoryPath() { - $categoryIdPair = $this->getCategoryIdPair(); - $importModel = $this->getImportModel(); - if ($categoryIdPair) foreach ($categoryIdPair as $oscommerceId => $magentoId) { - $path = $this->getRootCategory()->getPath().'/'.join('/',$this->getCategoryPath($oscommerceId)); - $this->_getWriteAdapter()->raw_query("UPDATE `{$this->getTable('catalog_category')}` SET `path`='{$path}' WHERE `entity_id`={$magentoId}"); - } + $categoryIdPair = $this->getCategoryIdPair(); + $importModel = $this->getImportModel(); + if ($categoryIdPair) foreach ($categoryIdPair as $oscommerceId => $magentoId) { + $path = $this->getRootCategory()->getPath().'/'.join('/',$this->getCategoryPath($oscommerceId)); + $this->_getWriteAdapter()->raw_query("UPDATE `{$this->getTable('catalog_category')}` SET `path`='{$path}' WHERE `entity_id`={$magentoId}"); + } } public function getCategoryPath($categoryId) { - $categoryIdPair = $this->getCategoryIdPair(); + $categoryIdPair = $this->getCategoryIdPair(); $select = "SELECT `c`.`parent_id` FROM `{$this->getOscTable('categories')}` c "; $select .= " WHERE `c`.`categories_id`={$categoryId}"; if ($parentId = $this->_getForeignAdapter()->fetchOne($select)) { - if ($result = $this->getCategoryPath($parentId)) { - if (!isset($results)) { - $results = $result; - } else { - array_merge($results, $result); - } - } else { - $results[] = $categoryIdPair[$parentId]; - } - } - $results[] = $categoryIdPair[$categoryId]; + if ($result = $this->getCategoryPath($parentId)) { + if (!isset($results)) { + $results = $result; + } else { + array_merge($results, $result); + } + } else { + $results[] = $categoryIdPair[$parentId]; + } + } + $results[] = $categoryIdPair[$categoryId]; return $results; } public function getCategoryIdPair() { - if (!$this->_categoryIdPair) { + if (!$this->_categoryIdPair) { $this->_categoryIdPair = $this->getLogPairsByTypeCode('category'); - } - return $this->_categoryIdPair; + } + return $this->_categoryIdPair; } public function setCategoryIdPair($data) { - if (is_array($data)) { - $this->_categoryIdPair = $data; - } + if (is_array($data)) { + $this->_categoryIdPair = $data; + } } /** @@ -624,7 +625,7 @@ public function setCategoryIdPair($data) */ public function importProducts($startFrom = 0, $useStartFrom = false) { - $importModel = $this->getImportModel(); + $importModel = $this->getImportModel(); $productAdapterModel = Mage::getModel('catalog/convert_adapter_product'); $productModel = $this->getProductModel(); $taxCollections = $this->_getTaxCollections(); @@ -663,8 +664,8 @@ public function importProducts($startFrom = 0, $useStartFrom = false) * @param array $data */ protected function _saveProduct($data) { - $importModel = $this->getImportModel(); - $productAdapterModel = $this->getProductAdapterModel(); + $importModel = $this->getImportModel(); + $productAdapterModel = $this->getProductAdapterModel(); $productModel = $this->getProductModel(); $mageStores = $this->getLanguagesToStores(); $storeInfo = $this->getOscStoreInformation(); @@ -686,16 +687,16 @@ protected function _saveProduct($data) { $productId = $productModel->getIdBySku($data['sku']); $productModel->load($productId); if ($productModel->getId()) { - $websiteIds = $productModel->getWebsiteIds(); - - if ($websiteIds) foreach($websiteIds as $websiteId) { - if ($websiteId == $this->getWebsiteModel()->getId()) { - $this->_addErrors(Mage::helper('oscommerce')->__('SKU %s was not imported since it already exists in %s', - $data['sku'], - $this->getWebsiteModel()->getName())); - return ; - } - } + $websiteIds = $productModel->getWebsiteIds(); + + if ($websiteIds) foreach($websiteIds as $websiteId) { + if ($websiteId == $this->getWebsiteModel()->getId()) { + $this->_addErrors(Mage::helper('oscommerce')->__('SKU %s was not imported since it already exists in %s', + $data['sku'], + $this->getWebsiteModel()->getName())); + return ; + } + } } try { if (isset($data['image'])) { @@ -733,7 +734,7 @@ protected function _saveProduct($data) { public function importOrders($startFrom = 0, $useStartFrom = false) { - $importModel = $this->getImportModel(); + $importModel = $this->getImportModel(); $this->_resetSaveRows(); $this->_resetErrors(); // Get orders @@ -759,7 +760,7 @@ public function importOrders($startFrom = 0, $useStartFrom = false) public function createOrderTables() { - $importModel = $this->getImportModel(); + $importModel = $this->getImportModel(); $importId = $importModel->getId(); $websiteId = $this->getWebsiteModel()->getId(); @@ -1029,48 +1030,48 @@ protected function _saveOrder($data) 'products_id' ); - $importModel = $this->getImportModel(); - $timezone = $importModel->getTimezone(); + $importModel = $this->getImportModel(); + $timezone = $importModel->getTimezone(); $customerIdPair = $this->getCustomerIdPair(); $importId = $importModel->getId(); $websiteId = $this->getWebsiteModel()->getId(); if ($data['customers_id'] > 0 && isset($this->_customerIdPair[$data['customers_id']])) { - foreach($data as $field => $value) { - if (!in_array($field, $fieldNoEnc)) { - $data[$field] = $this->convert($value); - } - } - - if ($data['date_purchased']) { - $preparePurchased = explode(' ', $data['date_purchased']); - $dateFormat = 'YYYY-MM-dd HH:mm:ss'; - $datePurchased = new Zend_Date(); - $datePurchased->setTimezone($timezone); - $datePurchased->setDate($preparePurchased[0], 'YYYY-MM-dd'); - $datePurchased->setTime($preparePurchased[1], 'HH:mm:ss'); - $datePurchased->setTimezone('GMT'); - $data['date_purchased'] = $datePurchased->toString($dateFormat); - } - - if ($data['last_modified']) { - $prepareModified = explode(' ', $data['last_modified']); - $dateModified = new Zend_Date(); - $dateModified->setTimezone($timezone); - $dateModified->setDate($prepareModified[0], 'YYYY-MM-dd'); - $dateModified->setTime($prepareModified[1], 'HH:mm:ss'); - $dateModified->setTimezone('GMT'); - $data['last_modified'] = $dateModified->toString($dateFormat); - } - - if ($data['orders_date_finished']) { - $prepareFinished = explode(' ', $data['orders_date_finished']); - $dateFinished = new Zend_Date(); - $dateFinished->setTimezone($timezone); - $dateFinished->setDate($prepareFinished[0], 'YYYY-MM-dd'); - $dateFinished->setTime($prepareFinished[1], 'HH:mm:ss'); - $dateFinished->setTimezone('GMT'); - $data['orders_date_finished'] = $dateFinished->toString($dateFormat); - } + foreach($data as $field => $value) { + if (!in_array($field, $fieldNoEnc)) { + $data[$field] = $this->convert($value); + } + } + + if ($data['date_purchased']) { + $preparePurchased = explode(' ', $data['date_purchased']); + $dateFormat = 'YYYY-MM-dd HH:mm:ss'; + $datePurchased = new Zend_Date(); + $datePurchased->setTimezone($timezone); + $datePurchased->setDate($preparePurchased[0], 'YYYY-MM-dd'); + $datePurchased->setTime($preparePurchased[1], 'HH:mm:ss'); + $datePurchased->setTimezone('GMT'); + $data['date_purchased'] = $datePurchased->toString($dateFormat); + } + + if ($data['last_modified']) { + $prepareModified = explode(' ', $data['last_modified']); + $dateModified = new Zend_Date(); + $dateModified->setTimezone($timezone); + $dateModified->setDate($prepareModified[0], 'YYYY-MM-dd'); + $dateModified->setTime($prepareModified[1], 'HH:mm:ss'); + $dateModified->setTimezone('GMT'); + $data['last_modified'] = $dateModified->toString($dateFormat); + } + + if ($data['orders_date_finished']) { + $prepareFinished = explode(' ', $data['orders_date_finished']); + $dateFinished = new Zend_Date(); + $dateFinished->setTimezone($timezone); + $dateFinished->setDate($prepareFinished[0], 'YYYY-MM-dd'); + $dateFinished->setTime($prepareFinished[1], 'HH:mm:ss'); + $dateFinished->setTimezone('GMT'); + $data['orders_date_finished'] = $dateFinished->toString($dateFormat); + } $data['magento_customers_id'] = $this->_customerIdPair[$data['customers_id']]; // get Magento CustomerId $data['import_id'] = $importId; @@ -1091,11 +1092,11 @@ protected function _saveOrder($data) unset($orderProduct['orders_id']); unset($orderProduct['orders_products_id']); $orderProduct['osc_magento_id'] = $oscMagentoId; - foreach ($orderProduct as $field => $value) { - if (!in_array($field, $fieldNoEnc)) { - $orderProduct[$field] = $this->convert($value); - } - } + foreach ($orderProduct as $field => $value) { + if (!in_array($field, $fieldNoEnc)) { + $orderProduct[$field] = $this->convert($value); + } + } $this->_getWriteAdapter()->insert($this->getTable('oscommerce_order_products'), $orderProduct); } } @@ -1116,8 +1117,8 @@ protected function _saveOrder($data) } } - $defaultLanguage = $this->getOscDefaultLanguage(); - $defaultLanguageId = $defaultLanguage['id']; + $defaultLanguage = $this->getOscDefaultLanguage(); + $defaultLanguageId = $defaultLanguage['id']; // Get orders status history $select = "SELECT `osh`.`orders_status_history_id`, `osh`.`orders_id`, `osh`.`orders_status_id` "; @@ -1131,14 +1132,14 @@ protected function _saveOrder($data) unset($orderHistory['orders_id']); unset($orderHistory['orders_status_history_id']); $orderHistory['osc_magento_id'] = $oscMagentoId; - $prepareAdded = explode(' ', $orderHistory['date_added']); - $dateFormat = 'YYYY-MM-dd HH:mm:ss'; - $dateAdded = new Zend_Date(); - $dateAdded->setTimezone($timezone); - $dateAdded->setDate($prepareAdded[0], 'YYYY-MM-dd'); - $dateAdded->setTime($prepareAdded[1], 'HH:mm:ss'); - $dateAdded->setTimezone('GMT'); - $orderHistory['date_added'] = $dateAdded->toString($dateFormat); + $prepareAdded = explode(' ', $orderHistory['date_added']); + $dateFormat = 'YYYY-MM-dd HH:mm:ss'; + $dateAdded = new Zend_Date(); + $dateAdded->setTimezone($timezone); + $dateAdded->setDate($prepareAdded[0], 'YYYY-MM-dd'); + $dateAdded->setTime($prepareAdded[1], 'HH:mm:ss'); + $dateAdded->setTimezone('GMT'); + $orderHistory['date_added'] = $dateAdded->toString($dateFormat); $orderHistory['orders_status'] = $this->convert($orderHistory['orders_status']); $orderHistory['comments'] = $this->convert($orderHistory['comments']); $orderHistory['customer_notified'] = $this->convert($orderHistory['customer_notified']); @@ -1147,7 +1148,7 @@ protected function _saveOrder($data) } } } else { - $this->_addErrors(Mage::helper('oscommerce')->__('Order #%s failed to import because the customer ID #%s associated with this order could not be found.', $data['orders_id'], $data['customers_id'])); + $this->_addErrors(Mage::helper('oscommerce')->__('Order #%s failed to import because the customer ID #%s associated with this order could not be found.', $data['orders_id'], $data['customers_id'])); } } @@ -1181,7 +1182,7 @@ public function getProductStores($productId) { */ public function getProductCategories($productId) { - $importModel = $this->getImportModel(); + $importModel = $this->getImportModel(); if (!$this->_productsToCategories) { $select = "SELECT `products_id`, `categories_id` FROM `{$this->getOscTable('products_to_categories')}`"; @@ -1220,14 +1221,14 @@ public function getProductCategories($productId) } public function getCategories($limit = array()) { - $importModel = $this->getImportModel(); + $importModel = $this->getImportModel(); $defaultLanguage = $this->getOscDefaultLanguage(); $defaultLanguageId = $defaultLanguage['id']; $select = "SELECT `c`.`categories_id` as `id`, `c`.`parent_id`, `cd`.`categories_name` `name` FROM `{$this->getOscTable('categories')}` c ";// WHERE `c`.`parent_id`={$parentId}"; $select .= " INNER JOIN `{$this->getOscTable('categories_description')}` cd on `cd`.`categories_id`=`c`.`categories_id`"; $select .= " AND `cd`.`language_id`={$defaultLanguageId} "; if ($limit && isset($limit['from']) && isset($limit['max'])) { - $select .= " LIMIT {$limit['from']}, {$limit['max']} "; + $select .= " LIMIT {$limit['from']}, {$limit['max']} "; } if (!$results = $this->_getForeignAdapter()->fetchAll($select)) { $results = array(); @@ -1253,7 +1254,7 @@ public function getCategories($limit = array()) { */ public function getLanguagesToStores() { - $importModel = $this->getImportModel(); + $importModel = $this->getImportModel(); $typeId = $this->getImportTypeIdByCode('store'); $importId = $importModel->getId(); if (!$this->_languagesToStores) { @@ -1425,11 +1426,11 @@ public function getImportTypes() public function getImportTypeIdByCode($code = '') { $types = $this->getImportTypes(); if (isset($code) && $types) { - foreach ($types as $type) { - if ($type['type_code'] == $code) { - return $type['type_id']; - } - } + foreach ($types as $type) { + if ($type['type_code'] == $code) { + return $type['type_id']; + } + } } return false; } @@ -1480,11 +1481,11 @@ public function getCountryIdByCode($countryCode) $this->getCountryCodeData(); } if (isset($code)) { - foreach($this->_countryToCode as $id => $code) { - if ($code == $countryCode) { - return $id; - } - } + foreach($this->_countryToCode as $id => $code) { + if ($code == $countryCode) { + return $id; + } + } } return false; } @@ -1582,9 +1583,9 @@ protected function _getTaxCollections() $flipTaxPairs = array_flip($taxPairs); $newTaxPairs = array(); $taxCollections = Mage::getResourceModel('tax/class_collection') - ->addFieldToFilter('class_type', 'PRODUCT') - ->load() - ->toOptionArray(); + ->addFieldToFilter('class_type', 'PRODUCT') + ->load() + ->toOptionArray(); if ($taxCollections) { foreach ($taxCollections as $tax) { if (isset($flipTaxPairs[$tax['value']])) { @@ -1642,9 +1643,9 @@ public function getTaxClasses() private function _format($str) { - $str = preg_replace('#[^0-9a-z\/\.]+#i', '', $str); - $str = strtolower(str_replace('\\s','',$str)); - return $str; + $str = preg_replace('#[^0-9a-z\/\.]+#i', '', $str); + $str = strtolower(str_replace('\\s','',$str)); + return $str; } public function setPrefixPath($prefix) { @@ -1888,14 +1889,14 @@ public function importCollection($importId = null) { public function setImportModel(Mage_Oscommerce_Model_Oscommerce $model) { - $this->_importModel = $model; + $this->_importModel = $model; } public function getImportModel() { - if ($this->_importModel) { - return $this->_importModel; - } + if ($this->_importModel) { + return $this->_importModel; + } } public function getCollections($code) @@ -1928,52 +1929,52 @@ public function deleteRecords($id = null) * @param integer $number * @return string */ - protected function _formatStringTruncate($data, $number) - { - if (str_word_count($data, 0)>$number) { - $wordKey = str_word_count($data, 1); - $posKey = str_word_count($data, 2); - reset($posKey); - foreach ($wordKey as $key => &$value) { - $value=key($posKey); - next($posKey); - } - return substr($data, 0, $wordKey[$number]); - } else { - return $data; - } - } - - /** - * Getting current user ID - * - * @return string - */ - protected function _getCurrentUserId() - { - if (!$this->_currentUserId) { - $this->_currentUserId = Mage::getSingleton('admin/session')->getUser()->getId(); - $this->_logData['user_id'] = $this->_currentUserId; - } - return $this->_currentUserId; - } - - /** - * Getting oscommerce table with prefix - * - * @param string $table - * @return string - */ - function getOscTable($table) - { - return $this->_prefix.$table; - } - - /** - * Setting connection charset - * - * @param string $charset - */ + protected function _formatStringTruncate($data, $number) + { + if (str_word_count($data, 0)>$number) { + $wordKey = str_word_count($data, 1); + $posKey = str_word_count($data, 2); + reset($posKey); + foreach ($wordKey as $key => &$value) { + $value=key($posKey); + next($posKey); + } + return substr($data, 0, $wordKey[$number]); + } else { + return $data; + } + } + + /** + * Getting current user ID + * + * @return string + */ + protected function _getCurrentUserId() + { + if (!$this->_currentUserId) { + $this->_currentUserId = Mage::getSingleton('admin/session')->getUser()->getId(); + $this->_logData['user_id'] = $this->_currentUserId; + } + return $this->_currentUserId; + } + + /** + * Getting oscommerce table with prefix + * + * @param string $table + * @return string + */ + function getOscTable($table) + { + return $this->_prefix.$table; + } + + /** + * Setting connection charset + * + * @param string $charset + */ public function setConnectionCharset($charset) { $this->_connectionCharset = $charset; @@ -1987,70 +1988,70 @@ public function setConnectionCharset($charset) */ public function getConnectionCharset() { - if (!$this->_connectionCharset) { - $this->_connectionCharset = self::DEFAULT_FIELD_CHARSET; - } - return $this->_connectionCharset; + if (!$this->_connectionCharset) { + $this->_connectionCharset = self::DEFAULT_FIELD_CHARSET; + } + return $this->_connectionCharset; } public function resetConnectionCharset() { - $charset = $this->getConnectionCharset(); - $this->_getForeignAdapter()->query("SET NAMES '{$charset}'"); - } - - - /** - * Setting dataCharset by user defined encoding charset - * - * @param string $charset - */ - public function setDataCharset($charset) - { - if (!is_null($charset)) { - $this->_dataCharset = $charset; - } - } - - /** - * Getting dataCharset - * - * @return string - */ - public function getDataCharset() - { - return $this->_dataCharset; - } - - /** - * Converting encoded charsets - * - * @param mixed $data - * @param array $notIncludedFields - * @return mixed - */ - public function convert($data, array $notIncludedFields = array()) - { - $charset = $this->getDataCharset(); - if (!is_null($charset) || $charset != self::DEFAULT_FIELD_CHARSET) { - if (is_array($data)) { - foreach($data as $field => $value) { - if (!in_array($field, $notIncludedFields)) { - $data[$field] = @iconv($charset, self::DEFAULT_FIELD_CHARSET, $value); - } - } - } else { - $data = @iconv($charset, self::DEFAULT_MAGENTO_CHARSET, $data); - } - } - return $data; - } - - /** - * Getting saveRows - * - * @return integer - */ + $charset = $this->getConnectionCharset(); + $this->_getForeignAdapter()->query("SET NAMES '{$charset}'"); + } + + + /** + * Setting dataCharset by user defined encoding charset + * + * @param string $charset + */ + public function setDataCharset($charset) + { + if (!is_null($charset)) { + $this->_dataCharset = $charset; + } + } + + /** + * Getting dataCharset + * + * @return string + */ + public function getDataCharset() + { + return $this->_dataCharset; + } + + /** + * Converting encoded charsets + * + * @param mixed $data + * @param array $notIncludedFields + * @return mixed + */ + public function convert($data, array $notIncludedFields = array()) + { + $charset = $this->getDataCharset(); + if (!is_null($charset) || $charset != self::DEFAULT_FIELD_CHARSET) { + if (is_array($data)) { + foreach($data as $field => $value) { + if (!in_array($field, $notIncludedFields)) { + $data[$field] = @iconv($charset, self::DEFAULT_FIELD_CHARSET, $value); + } + } + } else { + $data = @iconv($charset, self::DEFAULT_MAGENTO_CHARSET, $data); + } + } + return $data; + } + + /** + * Getting saveRows + * + * @return integer + */ public function getSaveRows() { return $this->_saveRows; @@ -2095,6 +2096,4 @@ protected function _resetErrors() { $this->_errors = array(); } - - } diff --git a/app/code/core/Mage/Oscommerce/etc/config.xml b/app/code/core/Mage/Oscommerce/etc/config.xml index e4a2edfe..0782b4d6 100755 --- a/app/code/core/Mage/Oscommerce/etc/config.xml +++ b/app/code/core/Mage/Oscommerce/etc/config.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_OsCommerce * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Page/Block/Html.php b/app/code/core/Mage/Page/Block/Html.php index d2ca4784..249c1688 100644 --- a/app/code/core/Mage/Page/Block/Html.php +++ b/app/code/core/Mage/Page/Block/Html.php @@ -49,6 +49,8 @@ public function __construct() if ($action) { $this->addBodyClass($action->getFullActionName()); } + + $this->_beforeCacheUrl(); } public function getBaseUrl() @@ -156,4 +158,15 @@ public function getAbsoluteFooter() { return Mage::getStoreConfig('design/footer/absolute_footer'); } + + /** + * Processing block html after rendering + * + * @param string $html + * @return string + */ + protected function _afterToHtml($html) + { + return $this->_afterCacheUrl($html); + } } diff --git a/app/code/core/Mage/Page/etc/config.xml b/app/code/core/Mage/Page/etc/config.xml index f70bc57f..1d0457e7 100644 --- a/app/code/core/Mage/Page/etc/config.xml +++ b/app/code/core/Mage/Page/etc/config.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Page * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Page/etc/system.xml b/app/code/core/Mage/Page/etc/system.xml index c2803245..a6fec77f 100644 --- a/app/code/core/Mage/Page/etc/system.xml +++ b/app/code/core/Mage/Page/etc/system.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Core * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> @@ -156,7 +156,7 @@ 1 1 - + This will be displayed just before body closing tag textarea diff --git a/app/code/core/Mage/Paybox/Block/System/Error.php b/app/code/core/Mage/Paybox/Block/System/Error.php index 78ea7bc8..c3383675 100644 --- a/app/code/core/Mage/Paybox/Block/System/Error.php +++ b/app/code/core/Mage/Paybox/Block/System/Error.php @@ -34,25 +34,13 @@ */ class Mage_Paybox_Block_System_Error extends Mage_Core_Block_Template { - protected $_pbxErrorsDesc = array( - '-1' => Mage::helper('paybox')->__('Error in reading the parameters via stdin (POST method) (error in http reception)'), - '-2' => Mage::helper('paybox')->__('Error in memory allocation. Not enough memory available on the trader\'s server'), - '-3' => Mage::helper('paybox')->__('Error in reading the parameters QUERY_STRING or CONTENT_LENGTH. (http error)'), - '-4' => Mage::helper('paybox')->__('PBX_RETOUR, PBX_ANNULE, PBX_REFUSE or PBX_EFFECTUE are too long (<150 characters)'), - '-5' => Mage::helper('paybox')->__('Error in opening the file (if PBX_MODE contains 3) : local file non-existent, not found or access error'), - '-6' => Mage::helper('paybox')->__('Error in file format (if PBX_MODE contains 3) : local file badly formed, empty or lines are badly formatted'), - '-7' => Mage::helper('paybox')->__('A compulsory variable is missing (PBX_SITE, PBX_RANG, PBX_IDENTIFIANT, PBX_TOTAL, PBX_CMD, etc.)'), - '-8' => Mage::helper('paybox')->__('One of the numerical variables contains a non-numerical character (site, rank, identifier, amount, currency etc.)'), - '-9' => Mage::helper('paybox')->__('PBX_SITE contains a site number which does not consist of exactly 7 characters'), - '-10' => Mage::helper('paybox')->__('PBX_RANG contains a rank number which does not consist of exactly 2 characters'), - '-11' => Mage::helper('paybox')->__('PBX_TOTAL has more than 10 or fewer than 3 numerical characters'), - '-12' => Mage::helper('paybox')->__('PBX_LANGUE or PBX_DEVISE contains a code which does not contain exactly 3 characters'), - '-13' => Mage::helper('paybox')->__('PBX_CMD is empty or contains a reference longer than 250 characters'), - '-14' => '', - '-15' => '', - '-16' => Mage::helper('paybox')->__('PBX_PORTEUR does not contain a valid e-mail address'), - '-17' => Mage::helper('paybox')->__('Error of coherence (multi-baskets) : Reserved Future Usage'), - ); + + /** + * Error messages desciptions + * + * @var array + */ + protected $_pbxErrorsDesc; /** * Enter description here... @@ -66,16 +54,40 @@ public function getCheckout() public function getErrorMessage() { - $msg = $this->_pbxErrorsDesc[$this->getCheckout()->getPayboxErrorNumber()]; + if (empty($this->_pbxErrorsDesc)) { + $this->_pbxErrorsDesc = array( + '-1' => 'Error in reading the parameters via stdin (POST method) (error in http reception)', + '-2' => 'Error in memory allocation. Not enough memory available on the trader\'s server', + '-3' => 'Error in reading the parameters QUERY_STRING or CONTENT_LENGTH. (http error)', + '-4' => 'PBX_RETOUR, PBX_ANNULE, PBX_REFUSE or PBX_EFFECTUE are too long (<150 characters)', + '-5' => 'Error in opening the file (if PBX_MODE contains 3) : local file non-existent, not found or access error', + '-6' => 'Error in file format (if PBX_MODE contains 3) : local file badly formed, empty or lines are badly formatted', + '-7' => 'A compulsory variable is missing (PBX_SITE, PBX_RANG, PBX_IDENTIFIANT, PBX_TOTAL, PBX_CMD, etc.)', + '-8' => 'One of the numerical variables contains a non-numerical character (site, rank, identifier, amount, currency etc.)', + '-9' => 'PBX_SITE contains a site number which does not consist of exactly 7 characters', + '-10' => 'PBX_RANG contains a rank number which does not consist of exactly 2 characters', + '-11' => 'PBX_TOTAL has more than 10 or fewer than 3 numerical characters', + '-12' => 'PBX_LANGUE or PBX_DEVISE contains a code which does not contain exactly 3 characters', + '-13' => 'PBX_CMD is empty or contains a reference longer than 250 characters', + '-14' => '', + '-15' => '', + '-16' => 'PBX_PORTEUR does not contain a valid e-mail address', + '-17' => 'Error of coherence (multi-baskets) : Reserved Future Usage', + ); + } + $msg = Mage::helper('paybox')->__($this->_pbxErrorsDesc[$this->getCheckout()->getPayboxErrorNumber()]); $this->getCheckout()->unsPayboxErrorNumber(); return $msg; } /** * Get continue shopping url + * + * @return string */ public function getContinueShoppingUrl() { return Mage::getUrl('checkout/cart', array('_secure' => true)); } -} \ No newline at end of file + +} diff --git a/app/code/core/Mage/Paybox/etc/config.xml b/app/code/core/Mage/Paybox/etc/config.xml index 8d656e85..a8407c18 100644 --- a/app/code/core/Mage/Paybox/etc/config.xml +++ b/app/code/core/Mage/Paybox/etc/config.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Paybox * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Paybox/etc/currency.xml b/app/code/core/Mage/Paybox/etc/currency.xml index 978ab73a..7f8fc200 100644 --- a/app/code/core/Mage/Paybox/etc/currency.xml +++ b/app/code/core/Mage/Paybox/etc/currency.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Paybox * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Paybox/etc/system.xml b/app/code/core/Mage/Paybox/etc/system.xml index 9ebc2221..55d7545c 100644 --- a/app/code/core/Mage/Paybox/etc/system.xml +++ b/app/code/core/Mage/Paybox/etc/system.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Paybox * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> @@ -99,7 +99,7 @@ 1 0 - + Only if you HTML From mode selected select @@ -109,7 +109,7 @@ 1 0 - + Only if you HTML From mode selected text @@ -118,7 +118,7 @@ 1 0 - + Only if you HTML From mode selected text @@ -127,7 +127,7 @@ 1 0 - + Only if you HTML From mode selected image @@ -139,7 +139,7 @@ 1 0 - + Only if you HTML From mode selected text diff --git a/app/code/core/Mage/Paygate/etc/config.xml b/app/code/core/Mage/Paygate/etc/config.xml index 32b8db38..5db0e60f 100644 --- a/app/code/core/Mage/Paygate/etc/config.xml +++ b/app/code/core/Mage/Paygate/etc/config.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Paygate * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Paygate/etc/system.xml b/app/code/core/Mage/Paygate/etc/system.xml index e4c42ff3..cb6823c5 100644 --- a/app/code/core/Mage/Paygate/etc/system.xml +++ b/app/code/core/Mage/Paygate/etc/system.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Payment * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> @@ -198,7 +198,7 @@ - + text 30 1 diff --git a/app/code/core/Mage/Payment/Helper/Data.php b/app/code/core/Mage/Payment/Helper/Data.php index 9ba4cf77..535eb4bb 100644 --- a/app/code/core/Mage/Payment/Helper/Data.php +++ b/app/code/core/Mage/Payment/Helper/Data.php @@ -87,6 +87,7 @@ public function getStoreMethods($store=null, $quote=null) $sortOrder = (int)Mage::getStoreConfig($prefix.'sort_order', $store); $methodInstance->setSortOrder($sortOrder); + $methodInstance->setStore($store); // while (isset($res[$sortOrder])) { // $sortOrder++; // } diff --git a/app/code/core/Mage/Payment/Model/Method/Free.php b/app/code/core/Mage/Payment/Model/Method/Free.php index c44f6e24..d7add27d 100644 --- a/app/code/core/Mage/Payment/Model/Method/Free.php +++ b/app/code/core/Mage/Payment/Model/Method/Free.php @@ -45,12 +45,12 @@ public function isAvailable($quote=null) /* @var $quote Mage_Sales_Model_Quote */ $totals = $quote->getTotals(); - if( !isset($totals['grand_total']) ) { + if (!isset($totals['grand_total'])) { return false; } $grandTotal = $totals['grand_total']; - if( $grandTotal->getValue() == 0 ) { + if (Mage::app()->getStore()->roundPrice($grandTotal->getValue()) == 0) { return true; } diff --git a/app/code/core/Mage/Payment/etc/config.xml b/app/code/core/Mage/Payment/etc/config.xml index 825945db..8a6b4a43 100644 --- a/app/code/core/Mage/Payment/etc/config.xml +++ b/app/code/core/Mage/Payment/etc/config.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Payment * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Payment/etc/system.xml b/app/code/core/Mage/Payment/etc/system.xml index 494726d7..f57e1c68 100644 --- a/app/code/core/Mage/Payment/etc/system.xml +++ b/app/code/core/Mage/Payment/etc/system.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Payment * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Paypal/Block/Standard/Redirect.php b/app/code/core/Mage/Paypal/Block/Standard/Redirect.php index abade99d..cf9f10f4 100644 --- a/app/code/core/Mage/Paypal/Block/Standard/Redirect.php +++ b/app/code/core/Mage/Paypal/Block/Standard/Redirect.php @@ -16,7 +16,7 @@ protected function _toHtml() $form->addField($field, 'hidden', array('name'=>$field, 'value'=>$value)); } $html = ''; - $html.= $this->__('You will be redirected to paypal in a few seconds.'); + $html.= $this->__('You will be redirected to Paypal in a few seconds.'); $html.= $form->toHtml(); $html.= ''; $html.= ''; diff --git a/app/code/core/Mage/Paypal/Model/Api/Nvp.php b/app/code/core/Mage/Paypal/Model/Api/Nvp.php index 8b495ef8..657d7745 100644 --- a/app/code/core/Mage/Paypal/Model/Api/Nvp.php +++ b/app/code/core/Mage/Paypal/Model/Api/Nvp.php @@ -31,6 +31,11 @@ */ class Mage_Paypal_Model_Api_Nvp extends Mage_Paypal_Model_Api_Abstract { + public function getPageStyle() + { + return $this->getConfigData('page_style'); + } + public function getApiEndpoint() { if (!$this->getData('api_endpoint')) { @@ -89,6 +94,13 @@ public function callSetExpressCheckout() 'CANCELURL' => $this->getCancelUrl(), 'INVNUM' => $this->getInvNum() ); + + if ($this->getPageStyle()) { + $nvpArr = array_merge($nvpArr, array( + 'PAGESTYLE' => $this->getPageStyle() + )); + } + $this->setUserAction(self::USER_ACTION_CONTINUE); // for mark SetExpressCheckout API call @@ -259,7 +271,7 @@ public function callDoDirectPayment() 'LASTNAME' => $a->getLastname(), 'STREET' => $a->getStreet(1), 'CITY' => $a->getCity(), - 'STATE' => $a->getRegionCode(), + 'STATE' => ($a->getRegionCode() ? $a->getRegionCode() : $a->getRegion()), 'ZIP' => $a->getPostcode(), 'COUNTRYCODE' => 'US', // only US supported for direct payment 'EMAIL' => $this->getEmail(), diff --git a/app/code/core/Mage/Paypal/Model/Express.php b/app/code/core/Mage/Paypal/Model/Express.php index 2c5026b3..d5c72c99 100644 --- a/app/code/core/Mage/Paypal/Model/Express.php +++ b/app/code/core/Mage/Paypal/Model/Express.php @@ -198,7 +198,7 @@ public function getPaymentAction() public function shortcutSetExpressCheckout() { - $this->getQuote()->reserveOrderId(); + $this->getQuote()->reserveOrderId()->save(); $this->getApi() ->setPaymentType($this->getPaymentAction()) ->setAmount($this->getQuote()->getBaseGrandTotal()) diff --git a/app/code/core/Mage/Paypal/etc/config.xml b/app/code/core/Mage/Paypal/etc/config.xml index a1a13cdc..c7216ef5 100644 --- a/app/code/core/Mage/Paypal/etc/config.xml +++ b/app/code/core/Mage/Paypal/etc/config.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Paypal * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Paypal/etc/system.xml b/app/code/core/Mage/Paypal/etc/system.xml index c567943e..4381717b 100644 --- a/app/code/core/Mage/Paypal/etc/system.xml +++ b/app/code/core/Mage/Paypal/etc/system.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Paypal * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> @@ -30,7 +30,7 @@ - + text 101 1 @@ -110,7 +110,7 @@ - + text 101 1 @@ -181,7 +181,7 @@ - + text 102 1 @@ -281,7 +281,7 @@ 0 - + text 1 1 @@ -315,6 +315,14 @@ 1 0 + + + text + 4 + 1 + 1 + 1 + text @@ -358,7 +366,7 @@ 1 0 - + 100 1 diff --git a/app/code/core/Mage/PaypalUk/etc/config.xml b/app/code/core/Mage/PaypalUk/etc/config.xml index 4771759e..92a3f031 100644 --- a/app/code/core/Mage/PaypalUk/etc/config.xml +++ b/app/code/core/Mage/PaypalUk/etc/config.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_PaypalUk * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/PaypalUk/etc/system.xml b/app/code/core/Mage/PaypalUk/etc/system.xml index 510c074c..3cde9082 100644 --- a/app/code/core/Mage/PaypalUk/etc/system.xml +++ b/app/code/core/Mage/PaypalUk/etc/system.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_PaypalUk * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> @@ -30,7 +30,7 @@ - + text 150 1 @@ -110,7 +110,7 @@ - + text 150 1 @@ -185,7 +185,7 @@ - + text 1 1 diff --git a/app/code/core/Mage/Poll/etc/config.xml b/app/code/core/Mage/Poll/etc/config.xml index b8b41a19..96432d60 100644 --- a/app/code/core/Mage/Poll/etc/config.xml +++ b/app/code/core/Mage/Poll/etc/config.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Poll * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Poll/etc/system.xml b/app/code/core/Mage/Poll/etc/system.xml index aff3d485..8d7298b7 100644 --- a/app/code/core/Mage/Poll/etc/system.xml +++ b/app/code/core/Mage/Poll/etc/system.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Cms * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/ProductAlert/etc/config.xml b/app/code/core/Mage/ProductAlert/etc/config.xml index d554918c..fe3555f2 100644 --- a/app/code/core/Mage/ProductAlert/etc/config.xml +++ b/app/code/core/Mage/ProductAlert/etc/config.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_ProductAlert * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/ProductAlert/etc/system.xml b/app/code/core/Mage/ProductAlert/etc/system.xml index b4749ed1..0924faae 100644 --- a/app/code/core/Mage/ProductAlert/etc/system.xml +++ b/app/code/core/Mage/ProductAlert/etc/system.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_ProductAlert * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Protx/Model/Standard.php b/app/code/core/Mage/Protx/Model/Standard.php index c8d0f342..ea7f270f 100644 --- a/app/code/core/Mage/Protx/Model/Standard.php +++ b/app/code/core/Mage/Protx/Model/Standard.php @@ -153,8 +153,8 @@ protected function getFormattedCart () $resultParts[] = $tax; $resultParts[] = $costPlusTax; $resultParts[] = $totalCostPlusTax; + $totalLines++; //counting actual formatted items } - $totalLines = count($items); } // add delivery @@ -213,7 +213,7 @@ protected function getCrypted () $queryPairs['VendorEMail'] = ''; $queryPairs['eMailMessage'] = ''; - $queryPairs['BillingAddress'] = $billing->getFormated(); + $queryPairs['BillingAddress'] = $billing->format('oneline'); $queryPairs['BillingPostCode'] = $billing->getPostcode(); if ($shipping) { @@ -288,6 +288,10 @@ protected function simpleXOR ($string) $result = ''; $cryptKey = $this->getConfig()->getCryptKey(); + if (!$cryptKey) { + return $string; + } + // Initialise key array $keyList = array(); diff --git a/app/code/core/Mage/Protx/etc/config.xml b/app/code/core/Mage/Protx/etc/config.xml index ec3cd3ee..2274dee2 100644 --- a/app/code/core/Mage/Protx/etc/config.xml +++ b/app/code/core/Mage/Protx/etc/config.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Protx * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Protx/etc/system.xml b/app/code/core/Mage/Protx/etc/system.xml index a19306ad..04fdc8ec 100644 --- a/app/code/core/Mage/Protx/etc/system.xml +++ b/app/code/core/Mage/Protx/etc/system.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Protx * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> @@ -63,7 +63,7 @@ 1 0 - + Store name will be used if left empty text diff --git a/app/code/core/Mage/Rating/etc/config.xml b/app/code/core/Mage/Rating/etc/config.xml index b9ed5f51..67e1cd16 100644 --- a/app/code/core/Mage/Rating/etc/config.xml +++ b/app/code/core/Mage/Rating/etc/config.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Rating * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Reports/Block/Product/Abstract.php b/app/code/core/Mage/Reports/Block/Product/Abstract.php new file mode 100644 index 00000000..800038f1 --- /dev/null +++ b/app/code/core/Mage/Reports/Block/Product/Abstract.php @@ -0,0 +1,86 @@ +hasData('page_size')) { + return $this->getData('page_size'); + } + return 5; + } + + /** + * Obtain product ids, that must not be included in collection + * @return array + */ + protected function _getProductsToSkip() + { + return array(); + } + + /** + * Get products collection and apply recent events log to it + * + * @return Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection + */ + protected function _getRecentProductsCollection() + { + // get products collection and apply status and visibility filter + $collection = $this->_addProductAttributesAndPrices(Mage::getModel('catalog/product')->getCollection()) + ->addAttributeToSelect(Mage::getSingleton('catalog/config')->getProductAttributes()) + ->addUrlRewrite() + ->setPageSize($this->getPageSize()) + ->setCurPage(1) + ; + Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($collection); + Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($collection); + + // apply events log to collection with required parameters + $skip = $this->_getProductsToSkip(); + $subtype = 0; + if (Mage::getSingleton('customer/session')->isLoggedIn()) { + $subjectId = Mage::getSingleton('customer/session')->getCustomer()->getId(); + } else { + $subjectId = Mage::getSingleton('log/visitor')->getId(); + $subtype = 1; + } + Mage::getResourceSingleton('reports/event')->applyLogToCollection($collection, $this->_eventTypeId, $subjectId, $subtype, $skip); + + foreach ($collection as $product) { + $product->setDoNotUseCategoryId(true); + } + return $collection; + } +} diff --git a/app/code/core/Mage/Reports/Block/Product/Compared.php b/app/code/core/Mage/Reports/Block/Product/Compared.php index 796f72b5..cc75476b 100644 --- a/app/code/core/Mage/Reports/Block/Product/Compared.php +++ b/app/code/core/Mage/Reports/Block/Product/Compared.php @@ -32,66 +32,57 @@ * @author Magento Core Team */ -class Mage_Reports_Block_Product_Compared extends Mage_Catalog_Block_Product_Abstract +class Mage_Reports_Block_Product_Compared extends Mage_Reports_Block_Product_Abstract { - protected function _hasComparedProductsBefore() - { - return Mage::getSingleton('reports/session')->getData('compared_products'); - } + const XML_PATH_RECENTLY_COMPARED_COUNT = 'catalog/recently_products/compared_count'; + + protected $_eventTypeId = Mage_Reports_Model_Event::EVENT_PRODUCT_COMPARE; - public function __construct() + /** + * Retrieve page size (count) + * + * @return int + */ + protected function getPageSize() { - parent::__construct(); - if ($this->_hasComparedProductsBefore() === false) { - return $this; + if ($this->hasData('page_size')) { + return $this->getData('page_size'); } -// $this->setTemplate('reports/product_compared.phtml'); + return Mage::getStoreConfig(self::XML_PATH_RECENTLY_COMPARED_COUNT); + } - $ignore = array(); + protected function _getProductsToSkip() + { + $ids = array(); foreach (Mage::helper('catalog/product_compare')->getItemCollection() as $_item) { - $ignore[] = $_item->getId(); + $ids[] = $_item->getId(); } - if (($product = Mage::registry('product')) && $product->getId()) { - $ignore[] = $product->getId(); + $ids[] = $product->getId(); } + return $ids; + } - if (Mage::getSingleton('customer/session')->isLoggedIn()) { - $customer = Mage::getSingleton('customer/session')->getCustomer(); - $subjectId = $customer->getId(); - $subtype = 0; - } else { - $subjectId = Mage::getSingleton('log/visitor')->getId(); - $subtype = 1; - } - $collection = Mage::getModel('reports/event') - ->getCollection() - ->addRecentlyFiler(3, $subjectId, $subtype, $ignore); - $productIds = array(); - foreach ($collection as $event) { - $productIds[] = $event->getObjectId(); + protected function _hasComparedProductsBefore() + { + return Mage::getSingleton('reports/session')->getData('compared_products'); + } + + protected function _toHtml() + { + if ($this->_hasComparedProductsBefore() === false) { + return ''; } - unset($collection); + $collection = $this->_getRecentProductsCollection(); + $hasProducts = (bool)count($collection); if (is_null($this->_hasComparedProductsBefore())) { - Mage::getSingleton('reports/session')->setData('compared_products', count($productIds) > 0); + Mage::getSingleton('reports/session')->setData('compared_products', $hasProducts); } - - $productCollection = null; - if ($productIds) { - $productCollection = Mage::getModel('catalog/product') - ->getCollection() - ->addAttributeToSelect(Mage::getSingleton('catalog/config')->getProductAttributes()) - ->addUrlRewrite() - ->addIdFilter($productIds); - Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($productCollection); - Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($productCollection); - $productCollection->setPageSize(5)->setCurPage(1)->load(); - - foreach ($productCollection as $product) { - $product->setDoNotUseCategoryId(true); - } + if ($hasProducts) { + $this->setRecentlyComparedProducts($collection); } - $this->setRecentlyComparedProducts($productCollection); + + return parent::_toHtml(); } } \ No newline at end of file diff --git a/app/code/core/Mage/Reports/Block/Product/Viewed.php b/app/code/core/Mage/Reports/Block/Product/Viewed.php index d7439fee..7ec81fb8 100644 --- a/app/code/core/Mage/Reports/Block/Product/Viewed.php +++ b/app/code/core/Mage/Reports/Block/Product/Viewed.php @@ -32,62 +32,54 @@ * @author Magento Core Team */ -class Mage_Reports_Block_Product_Viewed extends Mage_Catalog_Block_Product_Abstract +class Mage_Reports_Block_Product_Viewed extends Mage_Reports_Block_Product_Abstract { - protected function _hasViewedProductsBefore() - { - return Mage::getSingleton('reports/session')->getData('viewed_products'); - } + const XML_PATH_RECENTLY_VIEWED_COUNT = 'catalog/recently_products/viewed_count'; + + protected $_eventTypeId = Mage_Reports_Model_Event::EVENT_PRODUCT_VIEW; - public function __construct() + /** + * Retrieve page size (count) + * + * @return int + */ + protected function getPageSize() { - parent::__construct(); - if ($this->_hasViewedProductsBefore() === false) { - return $this; + if ($this->hasData('page_size')) { + return $this->getData('page_size'); } -// $this->setTemplate('reports/product_viewed.phtml'); + return Mage::getStoreConfig(self::XML_PATH_RECENTLY_VIEWED_COUNT); + } - $ignore = null; + protected function _getProductsToSkip() + { + $ids = array(); if (($product = Mage::registry('product')) && $product->getId()) { - $ignore = $product->getId(); + $ids = (int)$product->getId(); } + return $ids; + } - if (Mage::getSingleton('customer/session')->isLoggedIn()) { - $customer = Mage::getSingleton('customer/session')->getCustomer(); - $subjectId = $customer->getId(); - $subtype = 0; - } else { - $subjectId = Mage::getSingleton('log/visitor')->getId(); - $subtype = 1; - } - $collection = Mage::getModel('reports/event') - ->getCollection() - ->addRecentlyFiler(Mage_Reports_Model_Event::EVENT_PRODUCT_VIEW, $subjectId, $subtype, $ignore); - $productIds = array(); - foreach ($collection as $event) { - $productIds[] = $event->getObjectId(); + protected function _hasViewedProductsBefore() + { + return Mage::getSingleton('reports/session')->getData('viewed_products'); + } + + protected function _toHtml() + { + if ($this->_hasViewedProductsBefore() === false) { + return ''; } - unset($collection); + $collection = $this->_getRecentProductsCollection(); + $hasProducts = (bool)count($collection); if (is_null($this->_hasViewedProductsBefore())) { - Mage::getSingleton('reports/session')->setData('viewed_products', count($productIds) > 0); + Mage::getSingleton('reports/session')->setData('viewed_products', $hasProducts); } - - $productCollection = null; - if ($productIds) { - $productCollection = Mage::getModel('catalog/product') - ->getCollection() - ->addAttributeToSelect(Mage::getSingleton('catalog/config')->getProductAttributes()) - ->addIdFilter($productIds) - ->addUrlRewrite(); - Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($productCollection); - Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($productCollection); - $productCollection->setPageSize(5)->setCurPage(1)->load(); - - foreach ($productCollection as $product) { - $product->setDoNotUseCategoryId(true); - } + if ($hasProducts) { + $this->setRecentlyViewedProducts($collection); } - $this->setRecentlyViewedProducts($productCollection); + + return parent::_toHtml(); } -} \ No newline at end of file +} diff --git a/app/code/core/Mage/Reports/Model/Event.php b/app/code/core/Mage/Reports/Model/Event.php index 8f72f2d5..83a1e21e 100644 --- a/app/code/core/Mage/Reports/Model/Event.php +++ b/app/code/core/Mage/Reports/Model/Event.php @@ -65,4 +65,15 @@ public function updateCustomerType($visitorId, $customerId, $types = null) $this->getResource()->updateCustomerType($this, $visitorId, $customerId, $types); return $this; } + + /** + * Clean events (visitors) + * + * @return Mage_Reports_Model_Event + */ + public function clean() + { + $this->getResource()->clean($this); + return $this; + } } \ No newline at end of file diff --git a/app/code/core/Mage/Reports/Model/Event/Observer.php b/app/code/core/Mage/Reports/Model/Event/Observer.php index 937a2c4c..e4f1546b 100644 --- a/app/code/core/Mage/Reports/Model/Event/Observer.php +++ b/app/code/core/Mage/Reports/Model/Event/Observer.php @@ -127,4 +127,19 @@ public function wishlistShare(Varien_Event_Observer $observer) $observer->getEvent()->getWishlist()->getId() ); } + + /** + * event clean + * + * @param Varien_Event_Observer $observer + * @return Mage_Reports_Model_Event_Observer + */ + public function eventClean(Varien_Event_Observer $observer) + { + $event = Mage::getModel('reports/event'); + /* @var $event Mage_Reports_Model_Event */ + $event->clean(); + + return $this; + } } \ No newline at end of file diff --git a/app/code/core/Mage/Reports/Model/Mysql4/Event.php b/app/code/core/Mage/Reports/Model/Mysql4/Event.php index d7c56e60..03135b71 100644 --- a/app/code/core/Mage/Reports/Model/Mysql4/Event.php +++ b/app/code/core/Mage/Reports/Model/Mysql4/Event.php @@ -53,4 +53,112 @@ public function updateCustomerType(Mage_Reports_Model_Event $model, $visitorId, } return $this; } + + /** + * Add events log to a collection + * The collection id field is used without corellation, so it must be unique. + * DESC ordering by event will be added to the collection + * + * @param Varien_Data_Collection_Db $collection + * @param int $eventTypeId + * @param int $eventSubjectId + * @param int $subtype + * @param array $skipIds + */ + public function applyLogToCollection(Varien_Data_Collection_Db $collection, $eventTypeId, $eventSubjectId, $subtype, $skipIds = array()) + { + $idFieldName = $collection->getResource()->getIdFieldName(); + + $derivedSelect = $this->getReadConnection()->select() + ->from($this->getTable('reports/event'), array('event_id' => new Zend_Db_Expr('MAX(event_id)'), 'object_id')) + ->where('event_type_id=?', (int)$eventTypeId) + ->where('subject_id=?', (int)$eventSubjectId) + ->where('subtype=?', (int)$subtype) + ->where('store_id IN(?)', $this->getCurrentStoreIds()) + ->group('object_id') + ; + if ($skipIds) { + if (!is_array($skipIds)) { + $skipIds = array((int)$skipIds); + } + $derivedSelect->where('object_id NOT IN(?)', $skipIds); + } + + $collection->getSelect() + ->joinInner(array('evt' => new Zend_Db_Expr("({$derivedSelect})")), "`{$idFieldName}`=evt.object_id", array()) + ->order('evt.event_id DESC'); + } + + /** + * Obtain all current store ids, depending on configuration + * + * @param array $predefinedStoreIds + * @return array + */ + public function getCurrentStoreIds(array $predefinedStoreIds = null) + { + $stores = array(); + // get all or specified stores + if (Mage::app()->getStore()->getId() == 0) { + if (null !== $predefinedStoreIds) { + $stores = $predefinedStoreIds; + } + else { + foreach (Mage::app()->getStores() as $store) { + $stores[] = $store->getId(); + } + } + } + // get all stores, required by configuration in current store scope + else { + switch (Mage::getStoreConfig('catalog/recently_products/scope')) { + case 'website': + $resourceStore = Mage::app()->getStore()->getWebsite()->getStores(); + break; + case 'group': + $resourceStore = Mage::app()->getStore()->getGroup()->getStores(); + break; + default: + $resourceStore = array(Mage::app()->getStore()); + break; + } + + foreach ($resourceStore as $store) { + $stores[] = $store->getId(); + } + } + foreach ($stores as $key => $store) { + $stores[$key] = (int)$store; + } + return $stores; + } + + /** + * Clean report event table + */ + public function clean(Mage_Reports_Model_Event $object) + { + while (true) { + $select = $this->_getReadAdapter()->select() + ->from(array('event_table' => $this->getMainTable()), array('event_id')) + ->joinLeft( + array('visitor_table' => $this->getTable('log/visitor')), + 'event_table.subject_id = visitor_table.visitor_id', + array()) + ->where('visitor_table.visitor_id IS NULL') + ->where('event_table.subtype=?', 1) + ->limit(1000); + $eventIds = $this->_getReadAdapter()->fetchCol($select); + + if (!$eventIds) { + break; + } + + $this->_getWriteAdapter()->delete( + $this->getMainTable(), + $this->_getWriteAdapter()->quoteInto('event_id IN(?)', $eventIds) + ); + } + return $this; + } } \ No newline at end of file diff --git a/app/code/core/Mage/Reports/Model/Mysql4/Event/Collection.php b/app/code/core/Mage/Reports/Model/Mysql4/Event/Collection.php index 7aa6df45..9b095bfd 100644 --- a/app/code/core/Mage/Reports/Model/Mysql4/Event/Collection.php +++ b/app/code/core/Mage/Reports/Model/Mysql4/Event/Collection.php @@ -70,34 +70,7 @@ public function addStoreFilter(array $storeIds) */ public function addRecentlyFiler($typeId, $subjectId, $subtype = 0, $ignore = null, $limit = 15) { - $stores = array(); - if (Mage::app()->getStore()->getId() == 0) { - if (!is_null($this->_storeIds)) { - $stores = $this->_storeIds; - } - else { - foreach (Mage::app()->getStores() as $store) { - $stores[] = $store->getId(); - } - } - } - else { - switch (Mage::getStoreConfig('catalog/recently_products/scope')) { - case 'website': - $resourceStore = Mage::app()->getStore()->getWebsite()->getStores(); - break; - case 'group': - $resourceStore = Mage::app()->getStore()->getGroup()->getStores(); - break; - default: - $resourceStore = array(Mage::app()->getStore()); - break; - } - - foreach ($resourceStore as $store) { - $stores[] = $store->getId(); - } - } + $stores = $this->getResource()->getCurrentStoreIds($this->_storeIds); $this->_select ->where('event_type_id=?', $typeId) ->where('subject_id=?', $subjectId) diff --git a/app/code/core/Mage/Reports/Model/Mysql4/Product/Collection.php b/app/code/core/Mage/Reports/Model/Mysql4/Product/Collection.php index 6906a5a0..2307a6f6 100644 --- a/app/code/core/Mage/Reports/Model/Mysql4/Product/Collection.php +++ b/app/code/core/Mage/Reports/Model/Mysql4/Product/Collection.php @@ -34,9 +34,24 @@ class Mage_Reports_Model_Mysql4_Product_Collection extends Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection { + const SELECT_COUNT_SQL_TYPE_CART = 1; + protected $_productEntityId; protected $_productEntityTableName; protected $_productEntityTypeId; + protected $_selectCountSqlType = 0; + + /** + * Set Type for COUNT SQL Select + * + * @param int $type + * @return Mage_Reports_Model_Mysql4_Product_Collection + */ + public function setSelectCountSqlType($type) + { + $this->_selectCountSqlType = $type; + return $this; + } public function setProductEntityId($value) { @@ -100,6 +115,18 @@ protected function _joinFields() public function getSelectCountSql() { + if ($this->_selectCountSqlType == self::SELECT_COUNT_SQL_TYPE_CART) { + $countSelect = clone $this->getSelect(); + $countSelect->reset() + ->from(array('quote_item_table' => $this->getTable('sales/quote_item')), 'COUNT(DISTINCT quote_item_table.product_id)') + ->join( + array('quote_table' => $this->getTable('sales/quote')), + 'quote_table.entity_id = quote_item_table.quote_id AND quote_table.is_active = 1', + array() + ); + return $countSelect->__toString(); + } + $countSelect = clone $this->getSelect(); $countSelect->reset(Zend_Db_Select::ORDER); $countSelect->reset(Zend_Db_Select::LIMIT_COUNT); diff --git a/app/code/core/Mage/Reports/Model/Totals.php b/app/code/core/Mage/Reports/Model/Totals.php index 78453e31..4402d2fc 100644 --- a/app/code/core/Mage/Reports/Model/Totals.php +++ b/app/code/core/Mage/Reports/Model/Totals.php @@ -1,4 +1,3 @@ - - 0.7.6 + 0.7.7 @@ -144,6 +144,15 @@
+ + + + singleton + reports/event_observer + eventClean + + +
@@ -428,6 +437,8 @@ website + 5 + 5 diff --git a/app/code/core/Mage/Reports/etc/system.xml b/app/code/core/Mage/Reports/etc/system.xml index 88d42643..85a7c2df 100644 --- a/app/code/core/Mage/Reports/etc/system.xml +++ b/app/code/core/Mage/Reports/etc/system.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_ProductAlert * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> @@ -46,6 +46,22 @@ 1 0 + + + text + 20 + 1 + 1 + 1 + + + + text + 30 + 1 + 1 + 1 + diff --git a/app/code/core/Mage/Reports/sql/reports_setup/mysql4-upgrade-0.7.5-0.7.7.php b/app/code/core/Mage/Reports/sql/reports_setup/mysql4-upgrade-0.7.5-0.7.7.php new file mode 100644 index 00000000..de568174 --- /dev/null +++ b/app/code/core/Mage/Reports/sql/reports_setup/mysql4-upgrade-0.7.5-0.7.7.php @@ -0,0 +1,57 @@ + + */ + +$installer = $this; +/* @var $installer Mage_Core_Model_Resource_Setup */ + +$installer->startSetup(); + +$oldLayout = $installer->getConnection()->fetchOne("SELECT layout_update_xml FROM {$installer->getTable('cms_page')} WHERE `identifier`='home' LIMIT 1"); +header('Content-Type: text/plain'); +$newLayout = str_replace(array( + '', + '', + '', + ), array( + 'bundlebundle/catalog_product_price', + 'bundlebundle/catalog_product_price', + 'bundlebundle/catalog_product_price', + ), $oldLayout +); + +$installer->run(sprintf("UPDATE {$installer->getTable('cms_page')} SET `layout_update_xml` = %s WHERE `identifier`='home';", + $installer->getConnection()->quote($newLayout) +)); + +$installer->endSetup(); diff --git a/app/code/core/Mage/Review/Helper/Data.php b/app/code/core/Mage/Review/Helper/Data.php index 50310bc7..7d53e709 100644 --- a/app/code/core/Mage/Review/Helper/Data.php +++ b/app/code/core/Mage/Review/Helper/Data.php @@ -31,7 +31,14 @@ */ class Mage_Review_Helper_Data extends Mage_Core_Helper_Abstract { - function getDetail($origDetail){ + const XML_REVIEW_GUETS_ALLOW = 'catalog/review/allow_guest'; + + public function getDetail($origDetail){ return nl2br(Mage::helper('core/string')->truncate($origDetail, 50)); } + + public function getIsGuestAllowToWrite() + { + return Mage::getStoreConfigFlag(self::XML_REVIEW_GUETS_ALLOW); + } } diff --git a/app/code/core/Mage/Review/Model/Mysql4/Review/Product/Collection.php b/app/code/core/Mage/Review/Model/Mysql4/Review/Product/Collection.php index 37ec87be..c0ee0d26 100644 --- a/app/code/core/Mage/Review/Model/Mysql4/Review/Product/Collection.php +++ b/app/code/core/Mage/Review/Model/Mysql4/Review/Product/Collection.php @@ -152,7 +152,7 @@ protected function _joinFields() * * @return array */ - public function getAllIds() + public function getAllIds($limit=null, $offset=null) { $idsSelect = clone $this->getSelect(); $idsSelect->reset(Zend_Db_Select::ORDER); diff --git a/app/code/core/Mage/Review/controllers/ProductController.php b/app/code/core/Mage/Review/controllers/ProductController.php index ec983574..e227e3e6 100644 --- a/app/code/core/Mage/Review/controllers/ProductController.php +++ b/app/code/core/Mage/Review/controllers/ProductController.php @@ -29,10 +29,33 @@ * * @category Mage * @package Mage_Review - * @author Magento Core Team + * @author Magento Core Team */ class Mage_Review_ProductController extends Mage_Core_Controller_Front_Action { + + public function preDispatch() + { + parent::preDispatch(); + + $allowGuest = Mage::helper('review')->getIsGuestAllowToWrite(); + if (!$this->getRequest()->isDispatched()) { + return; + } + + $action = $this->getRequest()->getActionName(); + if (!$allowGuest && $action == 'post' && $this->getRequest()->isPost()) { + if (!Mage::getSingleton('customer/session')->isLoggedIn()) { + $this->setFlag('', self::FLAG_NO_DISPATCH, true); + Mage::getSingleton('customer/session')->setBeforeAuthUrl(Mage::getUrl('*/*/*', array('_current' => true))); + Mage::getSingleton('review/session')->setFormData($this->getRequest()->getPost()) + ->setRedirectUrl($this->_getRefererUrl()); + $this->_redirectUrl(Mage::helper('customer')->getLoginUrl()); + } + } + + return $this; + } /** * Initialize and check product * @@ -65,8 +88,15 @@ protected function _initProduct() public function postAction() { - $data = $this->getRequest()->getPost(); - $rating = $this->getRequest()->getParam('ratings', array()); + if ($data = Mage::getSingleton('review/session')->getFormData(true)) { + $rating = array(); + if (isset($data['ratings']) && is_array($data['ratings'])) { + $rating = $data['ratings']; + } + } else { + $data = $this->getRequest()->getPost(); + $rating = $this->getRequest()->getParam('ratings', array()); + } if (($product = $this->_initProduct()) && !empty($data)) { $session = Mage::getSingleton('core/session'); @@ -114,6 +144,10 @@ public function postAction() } } + if ($redirectUrl = Mage::getSingleton('review/session')->getRedirectUrl(true)) { + $this->_redirectUrl($redirectUrl); + return; + } $this->_redirectReferer(); } diff --git a/app/code/core/Mage/Review/etc/config.xml b/app/code/core/Mage/Review/etc/config.xml index feaf204c..716cae63 100644 --- a/app/code/core/Mage/Review/etc/config.xml +++ b/app/code/core/Mage/Review/etc/config.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Review * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> @@ -153,4 +153,11 @@ + + + + 1 + + + diff --git a/app/code/core/Mage/Review/etc/system.xml b/app/code/core/Mage/Review/etc/system.xml new file mode 100644 index 00000000..b047c7c3 --- /dev/null +++ b/app/code/core/Mage/Review/etc/system.xml @@ -0,0 +1,54 @@ + + + + + + + + + text + 100 + 1 + 1 + 0 + + + + select + adminhtml/system_config_source_yesno + 1 + 1 + 1 + 0 + + + + + + + \ No newline at end of file diff --git a/app/code/core/Mage/Rss/Block/Catalog/NotifyStock.php b/app/code/core/Mage/Rss/Block/Catalog/NotifyStock.php index 0a70ea39..290fcfff 100644 --- a/app/code/core/Mage/Rss/Block/Catalog/NotifyStock.php +++ b/app/code/core/Mage/Rss/Block/Catalog/NotifyStock.php @@ -55,15 +55,18 @@ protected function _toHtml() ); $rssObj->_addHeader($data); - $stockItemWhere = "({{table}}.low_stock_date is not null) and ({{table}}.low_stock_date>'0000-00-00')"; + $_configManageStock = (int)Mage::getStoreConfigFlag(Mage_CatalogInventory_Model_Stock_Item::XML_PATH_MANAGE_STOCK); + $stockItemWhere = "({{table}}.low_stock_date is not null) " + . " and ({{table}}.low_stock_date>'0000-00-00') " + . " and IF({{table}}.use_config_manage_stock=1," . $_configManageStock . ",{{table}}.manage_stock)=1"; $product = Mage::getModel('catalog/product'); $collection = $product->getCollection() + ->addAttributeToSelect('name', true) ->addAttributeToSelect('name', true) ->joinTable('cataloginventory/stock_item', 'product_id=entity_id', array('qty'=>'qty', 'notify_stock_qty'=>'notify_stock_qty', 'use_config' => 'use_config_notify_stock_qty','low_stock_date' => 'low_stock_date'), $stockItemWhere, 'inner') ->setOrder('low_stock_date') ; - $_globalNotifyStockQty = (float) Mage::getStoreConfig(Mage_CatalogInventory_Model_Stock_Item::XML_PATH_NOTIFY_STOCK_QTY); /* diff --git a/app/code/core/Mage/Rss/Helper/Data.php b/app/code/core/Mage/Rss/Helper/Data.php index 26478133..6609673a 100644 --- a/app/code/core/Mage/Rss/Helper/Data.php +++ b/app/code/core/Mage/Rss/Helper/Data.php @@ -65,51 +65,12 @@ public function authAdmin($path) public function authValidate($headers=null) { - if(!is_null($headers)) { - $_SERVER = $headers; - } - - $user = ''; - $pass = ''; - // moshe's fix for CGI - if (empty($_SERVER['HTTP_AUTHORIZATION'])) { - foreach ($_SERVER as $k=>$v) { - if (substr($k, -18)==='HTTP_AUTHORIZATION' && !empty($v)) { - $_SERVER['HTTP_AUTHORIZATION'] = $v; - break; - } - } - } - - if (isset($_SERVER['PHP_AUTH_USER']) && isset($_SERVER['PHP_AUTH_PW'])) { - $user = $_SERVER['PHP_AUTH_USER']; - $pass = $_SERVER['PHP_AUTH_PW']; - } - // IIS Note:: For HTTP Authentication to work with IIS, - // the PHP directive cgi.rfc2616_headers must be set to 0 (the default value). - elseif (!empty($_SERVER['HTTP_AUTHORIZATION'])) { - $auth = $_SERVER['HTTP_AUTHORIZATION']; - list($user, $pass) = explode(':', base64_decode(substr($auth, strpos($auth, " ") + 1))); - } - elseif (!empty($_SERVER['Authorization'])) { - $auth = $_SERVER['Authorization']; - list($user, $pass) = explode(':', base64_decode(substr($auth, strpos($auth, " ") + 1))); - } - - if(!$user || !$pass) { - $this->authFailed(); - } - - return array($user, $pass); + $userPass = Mage::helper('core/http')->authValidate($headers); + return $userPass; } public function authFailed() { - Mage::app()->getResponse() - ->setHeader('HTTP/1.1','401 Unauthorized') - ->setHeader('WWW-Authenticate','Basic realm="RSS Feeds"') - ->setBody('

401 Unauthorized

') - ->sendResponse(); - exit; + Mage::helper('core/http')->authFailed(); } } \ No newline at end of file diff --git a/app/code/core/Mage/Rss/etc/config.xml b/app/code/core/Mage/Rss/etc/config.xml index 63eb8004..1d4210de 100644 --- a/app/code/core/Mage/Rss/etc/config.xml +++ b/app/code/core/Mage/Rss/etc/config.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Rss * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> @@ -46,7 +46,7 @@ - + @@ -68,6 +68,13 @@ + + + + rss.xml + + + diff --git a/app/code/core/Mage/Rss/etc/system.xml b/app/code/core/Mage/Rss/etc/system.xml index e97aab59..80422c5e 100644 --- a/app/code/core/Mage/Rss/etc/system.xml +++ b/app/code/core/Mage/Rss/etc/system.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Rss * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Rule/Block/Editable.php b/app/code/core/Mage/Rule/Block/Editable.php index 72f0eab4..b6ca8287 100644 --- a/app/code/core/Mage/Rule/Block/Editable.php +++ b/app/code/core/Mage/Rule/Block/Editable.php @@ -38,11 +38,11 @@ public function render(Varien_Data_Form_Element_Abstract $element) $valueName = Mage::helper('core/string')->truncate($valueName, 30); } if ($element->getShowAsText()) { - $html = ' '; + $html = ' '; $html.= htmlspecialchars($valueName).' '; } else { - $html = ' '; + $html = ' getParamId() ? ' id="' . $element->getParamId() . '"' : '') . '>'; $html.= ''; diff --git a/app/code/core/Mage/Rule/Block/Newchild.php b/app/code/core/Mage/Rule/Block/Newchild.php index acbbe7d5..fbcbd8d3 100644 --- a/app/code/core/Mage/Rule/Block/Newchild.php +++ b/app/code/core/Mage/Rule/Block/Newchild.php @@ -25,12 +25,12 @@ */ -class Mage_Rule_Block_Newchild extends Mage_Core_Block_Abstract +class Mage_Rule_Block_Newchild extends Mage_Core_Block_Abstract implements Varien_Data_Form_Element_Renderer_Interface { public function render(Varien_Data_Form_Element_Abstract $element) { - $html = ' '; + $html = ' getParamId() ? ' id="' . $element->getParamId() . '"' : '') . '>'; $html.= ''; $html.= $element->getValueName(); $html.= ''; diff --git a/app/code/core/Mage/Rule/Model/Condition/Abstract.php b/app/code/core/Mage/Rule/Model/Condition/Abstract.php index f4ebbb9b..9195f75a 100644 --- a/app/code/core/Mage/Rule/Model/Condition/Abstract.php +++ b/app/code/core/Mage/Rule/Model/Condition/Abstract.php @@ -210,8 +210,9 @@ public function getValueParsed() public function getValue() { if ($this->getInputType()=='date' && !$this->getIsValueParsed()) { - $date = Mage::getSingleton('core/date')->gmtDate('Y-m-d', $this->getData('value')); - $this->setValue($date); + // date format intentionally hard-coded + $this->setValue(Mage::app()->getLocale()->date($this->getData('value'), Varien_Date::DATE_INTERNAL_FORMAT, null, false) + ->toString(Varien_Date::DATE_INTERNAL_FORMAT)); $this->setIsValueParsed(true); } return $this->getData('value'); @@ -224,10 +225,6 @@ public function getValueName() return '...'; } - if ($this->getInputType()=='date') { - return Mage::helper('core')->formatDate($value); - } - $options = $this->getValueSelectOptions(); if (!empty($options)) { foreach ($options as $o) { @@ -278,10 +275,11 @@ public function asHtmlRecursive() public function getTypeElement() { - return $this->getForm()->addField($this->getPrefix().':'.$this->getId().':type', 'hidden', array( + return $this->getForm()->addField($this->getPrefix().'__'.$this->getId().'__type', 'hidden', array( 'name'=>'rule['.$this->getPrefix().']['.$this->getId().'][type]', 'value'=>$this->getType(), 'no_span'=>true, + 'class' => 'hidden', )); } @@ -298,7 +296,7 @@ public function getAttributeElement() break; } } - return $this->getForm()->addField($this->getPrefix().':'.$this->getId().':attribute', 'select', array( + return $this->getForm()->addField($this->getPrefix().'__'.$this->getId().'__attribute', 'select', array( 'name'=>'rule['.$this->getPrefix().']['.$this->getId().'][attribute]', 'values'=>$this->getAttributeSelectOptions(), 'value'=>$this->getAttribute(), @@ -319,7 +317,7 @@ public function getOperatorElement() break; } } - return $this->getForm()->addField($this->getPrefix().':'.$this->getId().':operator', 'select', array( + return $this->getForm()->addField($this->getPrefix().'__'.$this->getId().'__operator', 'select', array( 'name'=>'rule['.$this->getPrefix().']['.$this->getId().'][operator]', 'values'=>$this->getOperatorSelectOptions(), 'value'=>$this->getOperator(), @@ -353,21 +351,22 @@ public function getValueElementRenderer() public function getValueElement() { - $value = $this->getData('value'); + $elementParams = array( + 'name' => 'rule['.$this->getPrefix().']['.$this->getId().'][value]', + 'value' => $this->getValue(), + 'values' => $this->getValueSelectOptions(), + 'value_name' => $this->getValueName(), + 'after_element_html' => $this->getValueAfterElementHtml(), + 'explicit_apply' => $this->getExplicitApply(), + ); if ($this->getInputType()=='date') { - $value = $this->getValueName(); + // date format intentionally hard-coded + $elementParams['input_format'] = Varien_Date::DATE_INTERNAL_FORMAT; + $elementParams['format'] = Varien_Date::DATE_INTERNAL_FORMAT; } - - return $this->getForm()->addField($this->getPrefix().':'.$this->getId().':value', + return $this->getForm()->addField($this->getPrefix().'__'.$this->getId().'__value', $this->getValueElementType(), - array( - 'name'=>'rule['.$this->getPrefix().']['.$this->getId().'][value]', - 'value'=>$value, - 'values'=>$this->getValueSelectOptions(), - 'value_name'=>$this->getValueName(), - 'after_element_html'=>$this->getValueAfterElementHtml(), - 'explicit_apply'=>$this->getExplicitApply(), - ) + $elementParams )->setRenderer($this->getValueElementRenderer()); } diff --git a/app/code/core/Mage/Rule/Model/Condition/Combine.php b/app/code/core/Mage/Rule/Model/Condition/Combine.php index 5585b31b..ead83c17 100644 --- a/app/code/core/Mage/Rule/Model/Condition/Combine.php +++ b/app/code/core/Mage/Rule/Model/Condition/Combine.php @@ -54,11 +54,11 @@ public function loadAggregatorOptions() public function getAggregatorSelectOptions() { - $opt = array(); - foreach ($this->getAggregatorOption() as $k=>$v) { - $opt[] = array('value'=>$k, 'label'=>$v); - } - return $opt; + $opt = array(); + foreach ($this->getAggregatorOption() as $k=>$v) { + $opt[] = array('value'=>$k, 'label'=>$v); + } + return $opt; } public function getAggregatorName() @@ -74,12 +74,12 @@ public function getAggregatorElement() break; } } - return $this->getForm()->addField($this->getPrefix().':'.$this->getId().':aggregator', 'select', array( - 'name'=>'rule['.$this->getPrefix().']['.$this->getId().'][aggregator]', - 'values'=>$this->getAggregatorSelectOptions(), - 'value'=>$this->getAggregator(), - 'value_name'=>$this->getAggregatorName(), - ))->setRenderer(Mage::getBlockSingleton('rule/editable')); + return $this->getForm()->addField($this->getPrefix().'__'.$this->getId().'__aggregator', 'select', array( + 'name'=>'rule['.$this->getPrefix().']['.$this->getId().'][aggregator]', + 'values'=>$this->getAggregatorSelectOptions(), + 'value'=>$this->getAggregator(), + 'value_name'=>$this->getAggregatorName(), + ))->setRenderer(Mage::getBlockSingleton('rule/editable')); } /* end aggregator methods */ @@ -102,7 +102,7 @@ public function addCondition($condition) $conditions[] = $condition; if (!$condition->getId()) { - $condition->setId($this->getId().'.'.sizeof($conditions)); + $condition->setId($this->getId().'--'.sizeof($conditions)); } $this->setData($this->getPrefix(), $conditions); @@ -191,29 +191,29 @@ public function loadXml($xml) public function asHtml() { - $html = $this->getTypeElement()->getHtml(). - Mage::helper('rule')->__("If %s of these conditions are %s:", - $this->getAggregatorElement()->getHtml(), - $this->getValueElement()->getHtml() - ); - if ($this->getId()!='1') { - $html.= $this->getRemoveLinkHtml(); - } - return $html; + $html = $this->getTypeElement()->getHtml(). + Mage::helper('rule')->__("If %s of these conditions are %s:", + $this->getAggregatorElement()->getHtml(), + $this->getValueElement()->getHtml() + ); + if ($this->getId()!='1') { + $html.= $this->getRemoveLinkHtml(); + } + return $html; } public function getNewChildElement() { - return $this->getForm()->addField($this->getPrefix().':'.$this->getId().':new_child', 'select', array( - 'name'=>'rule['.$this->getPrefix().']['.$this->getId().'][new_child]', - 'values'=>$this->getNewChildSelectOptions(), - 'value_name'=>$this->getNewChildName(), - ))->setRenderer(Mage::getBlockSingleton('rule/newchild')); + return $this->getForm()->addField($this->getPrefix().'__'.$this->getId().'__new_child', 'select', array( + 'name'=>'rule['.$this->getPrefix().']['.$this->getId().'][new_child]', + 'values'=>$this->getNewChildSelectOptions(), + 'value_name'=>$this->getNewChildName(), + ))->setRenderer(Mage::getBlockSingleton('rule/newchild')); } public function asHtmlRecursive() { - $html = $this->asHtml().'
    '; + $html = $this->asHtml().'
      '; foreach ($this->getConditions() as $cond) { $html .= '
    • '.$cond->asHtmlRecursive().'
    • '; } @@ -238,17 +238,19 @@ public function asStringRecursive($level=0) public function validate(Varien_Object $object) { - if (!$this->getConditions()) { - return true; - } + if (!$this->getConditions()) { + return true; + } + + $all = $this->getAggregator() === 'all'; + $true = (bool)$this->getValue(); - $all = $this->getAggregator()==='all'; - $true = (bool)$this->getValue(); foreach ($this->getConditions() as $cond) { $validated = $cond->validate($object); - if ($all && $validated!==$true) { + + if ($all && $validated !== $true) { return false; - } elseif (!$all && $validated===$true) { + } elseif (!$all && $validated === $true) { return true; } } diff --git a/app/code/core/Mage/Rule/Model/Rule.php b/app/code/core/Mage/Rule/Model/Rule.php index 6ca3ab24..c2eeed84 100644 --- a/app/code/core/Mage/Rule/Model/Rule.php +++ b/app/code/core/Mage/Rule/Model/Rule.php @@ -24,7 +24,6 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ - class Mage_Rule_Model_Rule extends Mage_Core_Model_Abstract { protected $_conditions; @@ -33,7 +32,7 @@ class Mage_Rule_Model_Rule extends Mage_Core_Model_Abstract protected function _construct() { - $this->_init('rule/rule'); + $this->_init('rule/rule'); parent::_construct(); } @@ -59,6 +58,11 @@ public function setConditions($conditions) return $this; } + /** + * Retrieve Condition model + * + * @return Mage_SalesRule_Model_Rule_Condition_Abstract + */ public function getConditions() { if (empty($this->_conditions)) { @@ -130,39 +134,39 @@ public function asHtml() public function loadPost(array $rule) { $arr = $this->_convertFlatToRecursive($rule); - if (isset($arr['conditions'])) { - $this->getConditions()->loadArray($arr['conditions'][1]); - } - if (isset($arr['actions'])) { - $this->getActions()->loadArray($arr['actions'][1]); - } + if (isset($arr['conditions'])) { + $this->getConditions()->loadArray($arr['conditions'][1]); + } + if (isset($arr['actions'])) { + $this->getActions()->loadArray($arr['actions'][1]); + } - return $this; + return $this; } protected function _convertFlatToRecursive(array $rule) { - $arr = array(); - foreach ($rule as $key=>$value) { - if (($key==='conditions' || $key==='actions') && is_array($value)) { - foreach ($value as $id=>$data) { - $path = explode('.', $id); - $node =& $arr; - for ($i=0, $l=sizeof($path); $i<$l; $i++) { - if (!isset($node[$key][$path[$i]])) { - $node[$key][$path[$i]] = array(); - } - $node =& $node[$key][$path[$i]]; - } - foreach ($data as $k=>$v) { - $node[$k] = $v; - } - } - } else { - $this->setData($key, $value); - } - } - return $arr; + $arr = array(); + foreach ($rule as $key=>$value) { + if (($key==='conditions' || $key==='actions') && is_array($value)) { + foreach ($value as $id=>$data) { + $path = explode('--', $id); + $node =& $arr; + for ($i=0, $l=sizeof($path); $i<$l; $i++) { + if (!isset($node[$key][$path[$i]])) { + $node[$key][$path[$i]] = array(); + } + $node =& $node[$key][$path[$i]]; + } + foreach ($data as $k=>$v) { + $node[$k] = $v; + } + } + } else { + $this->setData($key, $value); + } + } + return $arr; } /** @@ -204,10 +208,10 @@ public function afterLoad() protected function _afterLoad() { parent::_afterLoad(); - $conditionsArr = unserialize($this->getConditionsSerialized()); - if (!empty($conditionsArr) && is_array($conditionsArr)) { + $conditionsArr = unserialize($this->getConditionsSerialized()); + if (!empty($conditionsArr) && is_array($conditionsArr)) { $this->getConditions()->loadArray($conditionsArr); - } + } $actionsArr = unserialize($this->getActionsSerialized()); if (!empty($actionsArr) && is_array($actionsArr)) { @@ -223,6 +227,19 @@ protected function _afterLoad() protected function _beforeSave() { + // check if discount amount > 0 + if ((int)$this->getDiscountAmount() < 0) { + Mage::throwException(Mage::helper('rule')->__('Invalid discount amount.')); + } + + // convert dates into Zend_Date and hope it will validate 'em + foreach (array('from_date', 'to_date') as $dateType) { + if ($date = $this->getData($dateType)) { + $format = Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT); + $this->setData($dateType, Mage::app()->getLocale()->date($date, $format, null, false)); + } + } + if ($this->getConditions()) { $this->setConditionsSerialized(serialize($this->getConditions()->asArray())); $this->unsConditions(); diff --git a/app/code/core/Mage/Rule/etc/config.xml b/app/code/core/Mage/Rule/etc/config.xml index e92ee8e4..22d56009 100644 --- a/app/code/core/Mage/Rule/etc/config.xml +++ b/app/code/core/Mage/Rule/etc/config.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Rule * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Sales/Helper/Data.php b/app/code/core/Mage/Sales/Helper/Data.php index c0908abb..520cb3ef 100644 --- a/app/code/core/Mage/Sales/Helper/Data.php +++ b/app/code/core/Mage/Sales/Helper/Data.php @@ -43,4 +43,50 @@ public function checkQuoteAmount(Mage_Sales_Model_Quote $quote, $amount) } return $this; } + + public function canSendNewOrderConfirmationEmail($store = null) + { + return Mage::getStoreConfigFlag(Mage_Sales_Model_Order::XML_PATH_EMAIL_ENABLED, $store); + } + + public function canSendNewOrderEmail($store = null) + { + return $this->canSendNewOrderConfirmationEmail($store); + } + + public function canSendOrderCommentEmail($store = null) + { + return Mage::getStoreConfigFlag(Mage_Sales_Model_Order::XML_PATH_UPDATE_EMAIL_ENABLED, $store); + } + + public function canSendNewShipmentEmail($store = null) + { + return Mage::getStoreConfigFlag(Mage_Sales_Model_Order_Shipment::XML_PATH_EMAIL_ENABLED, $store); + } + + public function canSendShipmentCommentEmail($store = null) + { + return Mage::getStoreConfigFlag(Mage_Sales_Model_Order_Shipment::XML_PATH_UPDATE_EMAIL_ENABLED, $store); + } + + public function canSendNewInvoiceEmail($store = null) + { + return Mage::getStoreConfigFlag(Mage_Sales_Model_Order_Invoice::XML_PATH_EMAIL_ENABLED, $store); + } + + public function canSendInvoiceCommentEmail($store = null) + { + return Mage::getStoreConfigFlag(Mage_Sales_Model_Order_Invoice::XML_PATH_UPDATE_EMAIL_ENABLED, $store); + } + + public function canSendNewCreditmemoEmail($store = null) + { + return Mage::getStoreConfigFlag(Mage_Sales_Model_Order_Creditmemo::XML_PATH_EMAIL_ENABLED, $store); + } + + public function canSendCreditmemoCommentEmail($store = null) + { + return Mage::getStoreConfigFlag(Mage_Sales_Model_Order_Creditmemo::XML_PATH_UPDATE_EMAIL_ENABLED, $store); + } + } \ No newline at end of file diff --git a/app/code/core/Mage/Sales/Model/Mysql4/Order.php b/app/code/core/Mage/Sales/Model/Mysql4/Order.php index b4c85ce6..7d9d2a53 100644 --- a/app/code/core/Mage/Sales/Model/Mysql4/Order.php +++ b/app/code/core/Mage/Sales/Model/Mysql4/Order.php @@ -43,4 +43,29 @@ public function __construct() $write = $resource->getConnection('sales_write'); $this->setConnection($read, $write); } -} \ No newline at end of file + + /** + * Count existent products of order items by specified product types + * + * @param int $orderId + * @param array $productTypeIds + * @param bool $isProductTypeIn + * @return array + */ + public function aggregateProductsByTypes($orderId, $productTypeIds = array(), $isProductTypeIn = false) + { + $select = $this->getReadConnection()->select() + ->from(array('o' => $this->getTable('sales/order_item')), new Zend_Db_Expr('o.product_type, COUNT(*)')) + ->joinInner(array('p' => $this->getTable('catalog/product')), 'o.product_id=p.entity_id', array()) + ->where('o.order_id=?', $orderId) + ->group('(1)') + ; + if ($productTypeIds) { + $select->where($this->getReadConnection()->quoteInto( + sprintf('(o.product_type %s (?))', ($isProductTypeIn ? 'IN' : 'NOT IN')), + $productTypeIds + )); + } + return $this->getReadConnection()->fetchPairs($select); + } +} diff --git a/app/code/core/Mage/Sales/Model/Mysql4/Order/Item/Collection.php b/app/code/core/Mage/Sales/Model/Mysql4/Order/Item/Collection.php index 366a4f15..1305a1bd 100644 --- a/app/code/core/Mage/Sales/Model/Mysql4/Order/Item/Collection.php +++ b/app/code/core/Mage/Sales/Model/Mysql4/Order/Item/Collection.php @@ -93,4 +93,33 @@ public function addIdFilter($item) } return $this; } + + /** + * Filter collection by specified product types + * + * @param array $typeIds + * @return Mage_Sales_Model_Mysql4_Order_Item_Collection + */ + public function filterByTypes($typeIds) + { + $this->addFieldToFilter('product_type', array('in' => $typeIds)); + return $this; + } + + /** + * Filter collection by parent_item_id + * + * @param int $parentId + * @return Mage_Sales_Model_Mysql4_Order_Item_Collection + */ + public function filterByParent($parentId = null) + { + if (empty($parentId)) { + $this->addFieldToFilter('parent_item_id', array('null' => true)); + } + else { + $this->addFieldToFilter('parent_item_id', $parentId); + } + return $this; + } } \ No newline at end of file diff --git a/app/code/core/Mage/Sales/Model/Mysql4/Quote.php b/app/code/core/Mage/Sales/Model/Mysql4/Quote.php index ad4f62db..6a03a2e8 100644 --- a/app/code/core/Mage/Sales/Model/Mysql4/Quote.php +++ b/app/code/core/Mage/Sales/Model/Mysql4/Quote.php @@ -109,4 +109,19 @@ public function isOrderIncrementIdUsed($orderIncrementId) { return false; } -} \ No newline at end of file + /** + * Mark quotes - that depend on catalog price rules - to be recollected on demand + * + */ + public function markQuotesRecollectOnCatalogRules() + { + $this->_getWriteAdapter()->query(" + UPDATE {$this->getTable('sales/quote')} SET trigger_recollect = 1 + WHERE entity_id IN ( + SELECT DISTINCT quote_id + FROM {$this->getTable('sales/quote_item')} + WHERE product_id IN (SELECT DISTINCT product_id FROM {$this->getTable('catalogrule/rule_product_price')}) + )" + ); + } +} diff --git a/app/code/core/Mage/Sales/Model/Mysql4/Setup.php b/app/code/core/Mage/Sales/Model/Mysql4/Setup.php index 68c6af33..9a35eb84 100644 --- a/app/code/core/Mage/Sales/Model/Mysql4/Setup.php +++ b/app/code/core/Mage/Sales/Model/Mysql4/Setup.php @@ -143,6 +143,7 @@ public function getDefaultEntities() 'customer_note_notify' => array('type'=>'static'), 'customer_is_guest' => array('type'=>'static'), 'customer_taxvat' => array('type'=>'static'), + 'customer_dob' => array('type'=>'static'), ), ), @@ -438,6 +439,7 @@ public function getDefaultEntities() 'customer_is_guest' => array('type'=>'int', 'visible'=>false), 'email_sent' => array('type'=>'int', 'visible'=>false), 'customer_taxvat' => array('type'=>'varchar', 'visible'=>false), + 'customer_dob' => array('type'=>'datetime', 'backend'=>'eav/entity_attribute_backend_datetime'), ), ), 'order_address' => array( diff --git a/app/code/core/Mage/Sales/Model/Observer.php b/app/code/core/Mage/Sales/Model/Observer.php index c04f6708..9e72691c 100644 --- a/app/code/core/Mage/Sales/Model/Observer.php +++ b/app/code/core/Mage/Sales/Model/Observer.php @@ -73,4 +73,14 @@ public function substractQtyFromQuotes($observer) $quoteItem->save(); } } + + /** + * When applying a catalog price rule, make related quotes recollect on demand + * + * @param object $observer + */ + public function markQuotesRecollectOnCatalogRules($observer) + { + Mage::getResourceSingleton('sales/quote')->markQuotesRecollectOnCatalogRules(); + } } \ No newline at end of file diff --git a/app/code/core/Mage/Sales/Model/Order.php b/app/code/core/Mage/Sales/Model/Order.php index f02217ad..935108ea 100644 --- a/app/code/core/Mage/Sales/Model/Order.php +++ b/app/code/core/Mage/Sales/Model/Order.php @@ -46,12 +46,14 @@ class Mage_Sales_Model_Order extends Mage_Core_Model_Abstract const XML_PATH_EMAIL_IDENTITY = 'sales_email/order/identity'; const XML_PATH_EMAIL_COPY_TO = 'sales_email/order/copy_to'; const XML_PATH_EMAIL_COPY_METHOD = 'sales_email/order/copy_method'; + const XML_PATH_EMAIL_ENABLED = 'sales_email/order/enabled'; const XML_PATH_UPDATE_EMAIL_TEMPLATE = 'sales_email/order_comment/template'; const XML_PATH_UPDATE_EMAIL_GUEST_TEMPLATE = 'sales_email/order_comment/guest_template'; const XML_PATH_UPDATE_EMAIL_IDENTITY = 'sales_email/order_comment/identity'; const XML_PATH_UPDATE_EMAIL_COPY_TO = 'sales_email/order_comment/copy_to'; const XML_PATH_UPDATE_EMAIL_COPY_METHOD = 'sales_email/order_comment/copy_method'; + const XML_PATH_UPDATE_EMAIL_ENABLED = 'sales_email/order_comment/enabled'; /** * Order states @@ -566,6 +568,10 @@ public function getShippingCarrier() */ public function sendNewOrderEmail() { + if (!Mage::helper('sales')->canSendNewOrderEmail($this->getStore()->getId())) { + return $this; + } + $translate = Mage::getSingleton('core/translate'); /* @var $translate Mage_Core_Model_Translate */ $translate->setTranslateInline(false); @@ -633,6 +639,10 @@ public function sendNewOrderEmail() */ public function sendOrderUpdateEmail($notifyCustomer=true, $comment='') { + if (!Mage::helper('sales')->canSendOrderCommentEmail($this->getStore()->getId())) { + return $this; + } + $copyTo = $this->_getEmails(self::XML_PATH_UPDATE_EMAIL_COPY_TO); $copyMethod = Mage::getStoreConfig(self::XML_PATH_UPDATE_EMAIL_COPY_METHOD, $this->getStoreId()); if (!$notifyCustomer && !$copyTo) { @@ -754,11 +764,17 @@ public function addAddress(Mage_Sales_Model_Order_Address $address) return $this; } - public function getItemsCollection() + public function getItemsCollection($filterByTypes = array(), $nonChildrenOnly = false) { if (is_null($this->_items)) { $this->_items = Mage::getResourceModel('sales/order_item_collection') ->setOrderFilter($this->getId()); + if ($filterByTypes) { + $this->_items->filterByTypes($filterByTypes); + } + if ($nonChildrenOnly) { + $this->_items->filterByParent(); + } if ($this->getId()) { foreach ($this->_items as $item) { @@ -785,6 +801,8 @@ public function getItemsRandomCollection($limit=1) ->getCollection() ->addIdFilter($products) ->load(); + Mage::getSingleton('catalog/product_visibility') + ->addVisibleInSiteFilterToCollection($productsCollection); foreach ($collection as $item) { $item->setProduct($productsCollection->getItemById($item->getProductId())); } @@ -1242,6 +1260,16 @@ public function getCreatedAtFormated($format) return Mage::getBlockSingleton('core/text')->formatDate($this->getCreatedAt(), $format); } + /** + * Retrieve created at store date object + * + * @return Zend_Date + */ + public function getCreatedAtDate() + { + return Mage::app()->getLocale()->storeDate($this->getStore(), $this->getCreatedAt(), true); + } + public function getEmailCustomerNote() { if ($this->getCustomerNoteNotify()) { diff --git a/app/code/core/Mage/Sales/Model/Order/Api.php b/app/code/core/Mage/Sales/Model/Order/Api.php index 8b7fdc87..f2c573fa 100644 --- a/app/code/core/Mage/Sales/Model/Order/Api.php +++ b/app/code/core/Mage/Sales/Model/Order/Api.php @@ -36,7 +36,6 @@ class Mage_Sales_Model_Order_Api extends Mage_Sales_Model_Api_Resource public function __construct() { $this->_attributesMap['order'] = array('order_id' => 'entity_id'); - $this->_attributesMap['order_item'] = array('item_id' => 'entity_id'); $this->_attributesMap['order_address'] = array('address_id' => 'entity_id'); $this->_attributesMap['order_payment'] = array('payment_id' => 'entity_id'); diff --git a/app/code/core/Mage/Sales/Model/Order/Creditmemo.php b/app/code/core/Mage/Sales/Model/Order/Creditmemo.php index f7f15dde..6d551093 100644 --- a/app/code/core/Mage/Sales/Model/Order/Creditmemo.php +++ b/app/code/core/Mage/Sales/Model/Order/Creditmemo.php @@ -36,12 +36,14 @@ class Mage_Sales_Model_Order_Creditmemo extends Mage_Core_Model_Abstract const XML_PATH_EMAIL_IDENTITY = 'sales_email/creditmemo/identity'; const XML_PATH_EMAIL_COPY_TO = 'sales_email/creditmemo/copy_to'; const XML_PATH_EMAIL_COPY_METHOD = 'sales_email/creditmemo/copy_method'; + const XML_PATH_EMAIL_ENABLED = 'sales_email/creditmemo/enabled'; const XML_PATH_UPDATE_EMAIL_TEMPLATE = 'sales_email/creditmemo_comment/template'; const XML_PATH_UPDATE_EMAIL_GUEST_TEMPLATE = 'sales_email/creditmemo_comment/guest_template'; const XML_PATH_UPDATE_EMAIL_IDENTITY = 'sales_email/creditmemo_comment/identity'; const XML_PATH_UPDATE_EMAIL_COPY_TO = 'sales_email/creditmemo_comment/copy_to'; const XML_PATH_UPDATE_EMAIL_COPY_METHOD = 'sales_email/creditmemo_comment/copy_method'; + const XML_PATH_UPDATE_EMAIL_ENABLED = 'sales_email/creditmemo_comment/enabled'; protected static $_states; @@ -279,6 +281,13 @@ public function refund() $this->getOrder()->getShippingRefunded()+$this->getShippingAmount() ); + $this->getOrder()->setBaseShippingTaxRefunded( + $this->getOrder()->getBaseShippingTaxRefunded()+$this->getBaseShippingTaxAmount() + ); + $this->getOrder()->setShippingTaxRefunded( + $this->getOrder()->getShippingTaxRefunded()+$this->getShippingTaxAmount() + ); + $this->getOrder()->setAdjustmentPositive( $this->getOrder()->getAdjustmentPositive()+$this->getAdjustmentPositive() ); @@ -515,6 +524,10 @@ public function getCommentsCollection($reload=false) */ public function sendEmail($notifyCustomer=true, $comment='') { + if (!Mage::helper('sales')->canSendNewCreditmemoEmail($this->getOrder()->getStore()->getId())) { + return $this; + } + $currentDesign = Mage::getDesign()->setAllGetOld(array( 'package' => Mage::getStoreConfig('design/package/name', $this->getStoreId()), 'store' => $this->getStoreId() @@ -598,6 +611,10 @@ public function sendEmail($notifyCustomer=true, $comment='') */ public function sendUpdateEmail($notifyCustomer=true, $comment='') { + if (!Mage::helper('sales')->canSendCreditmemoCommentEmail($this->getOrder()->getStore()->getId())) { + return $this; + } + $currentDesign = Mage::getDesign()->setAllGetOld(array( 'package' => Mage::getStoreConfig('design/package/name', $this->getStoreId()), )); diff --git a/app/code/core/Mage/Sales/Model/Order/Creditmemo/Total/Tax.php b/app/code/core/Mage/Sales/Model/Order/Creditmemo/Total/Tax.php index 1bd3c4ee..435678d8 100644 --- a/app/code/core/Mage/Sales/Model/Order/Creditmemo/Total/Tax.php +++ b/app/code/core/Mage/Sales/Model/Order/Creditmemo/Total/Tax.php @@ -29,8 +29,10 @@ class Mage_Sales_Model_Order_Creditmemo_Total_Tax extends Mage_Sales_Model_Order { public function collect(Mage_Sales_Model_Order_Creditmemo $creditmemo) { - $totalTax = 0; - $baseTotalTax = 0; + $shippingTaxAmount = 0; + $baseShippingTaxAmount = 0; + $totalTax = 0; + $baseTotalTax = 0; foreach ($creditmemo->getAllItems() as $item) { if ($item->getOrderItem()->isDummy()) { @@ -62,14 +64,28 @@ public function collect(Mage_Sales_Model_Order_Creditmemo $creditmemo) $creditmemo->setShippingTaxAmount($invoice->getShippingTaxAmount()); $creditmemo->setBaseShippingTaxAmount($invoice->getBaseShippingTaxAmount()); } else { - $totalTax += $creditmemo->getShippingTaxAmount(); - $baseTotalTax += $creditmemo->getBaseShippingTaxAmount(); + $shippingAmount = $creditmemo->getOrder()->getBaseShippingAmount(); + $shippingRefundedAmount = $creditmemo->getOrder()->getBaseShippingRefunded(); + + $shippingTaxAmount = 0; + $baseShippingTaxAmount = 0; + + if (($shippingAmount - $shippingRefundedAmount) > $creditmemo->getShippingAmount()) { + $shippingTaxAmount = $creditmemo->getShippingAmount()*($creditmemo->getOrder()->getShippingTaxAmount()/$shippingAmount); + $baseShippingTaxAmount = $creditmemo->getBaseShippingAmount()*($creditmemo->getOrder()->getBaseShippingTaxAmount()/$shippingAmount); + $shippingTaxAmount = $creditmemo->getStore()->roundPrice($shippingTaxAmount); + $baseShippingTaxAmount = $creditmemo->getStore()->roundPrice($baseShippingTaxAmount); + } elseif (($shippingAmount - $shippingRefundedAmount) == $creditmemo->getShippingAmount()) { + $shippingTaxAmount = $creditmemo->getOrder()->getShippingTaxAmount() - $creditmemo->getOrder()->getShippingTaxRefunded(); + $baseShippingTaxAmount = $creditmemo->getOrder()->getBaseShippingTaxAmount() - $creditmemo->getOrder()->getBaseShippingTaxRefunded(); + } + $totalTax += $shippingTaxAmount; + $baseTotalTax += $baseShippingTaxAmount; } - $totalTax = $totalTax - $creditmemo->getOrder()->getTaxRefunded(); - $baseTotalTax = $baseTotalTax - $creditmemo->getOrder()->getBaseTaxRefunded(); + $tmpBaseTotalTax = $baseTotalTax - ($creditmemo->getOrder()->getBaseTaxRefunded() - $creditmemo->getOrder()->getBaseShippingTaxRefunded()); - if ($baseTotalTax<0) { + if ($tmpBaseTotalTax<0) { $baseTotalTax = 0; $totalTax = 0; } @@ -77,6 +93,9 @@ public function collect(Mage_Sales_Model_Order_Creditmemo $creditmemo) $creditmemo->setTaxAmount($totalTax); $creditmemo->setBaseTaxAmount($baseTotalTax); + $creditmemo->setShippingTaxAmount($shippingTaxAmount); + $creditmemo->setBaseShippingTaxAmount($baseShippingTaxAmount); + $creditmemo->setGrandTotal($creditmemo->getGrandTotal() + $totalTax); $creditmemo->setBaseGrandTotal($creditmemo->getBaseGrandTotal() + $baseTotalTax); return $this; diff --git a/app/code/core/Mage/Sales/Model/Order/Invoice.php b/app/code/core/Mage/Sales/Model/Order/Invoice.php index 0e8186c2..63a0665d 100644 --- a/app/code/core/Mage/Sales/Model/Order/Invoice.php +++ b/app/code/core/Mage/Sales/Model/Order/Invoice.php @@ -43,12 +43,14 @@ class Mage_Sales_Model_Order_Invoice extends Mage_Core_Model_Abstract const XML_PATH_EMAIL_IDENTITY = 'sales_email/invoice/identity'; const XML_PATH_EMAIL_COPY_TO = 'sales_email/invoice/copy_to'; const XML_PATH_EMAIL_COPY_METHOD = 'sales_email/invoice/copy_method'; + const XML_PATH_EMAIL_ENABLED = 'sales_email/invoice/enabled'; const XML_PATH_UPDATE_EMAIL_TEMPLATE = 'sales_email/invoice_comment/template'; const XML_PATH_UPDATE_EMAIL_GUEST_TEMPLATE = 'sales_email/invoice_comment/guest_template'; const XML_PATH_UPDATE_EMAIL_IDENTITY = 'sales_email/invoice_comment/identity'; const XML_PATH_UPDATE_EMAIL_COPY_TO = 'sales_email/invoice_comment/copy_to'; const XML_PATH_UPDATE_EMAIL_COPY_METHOD = 'sales_email/invoice_comment/copy_method'; + const XML_PATH_UPDATE_EMAIL_ENABLED = 'sales_email/invoice_comment/enabled'; protected static $_states; @@ -243,7 +245,13 @@ public function capture() */ public function pay() { - $this->setState(self::STATE_PAID); + $invoiceState = self::STATE_PAID; + if ($this->getOrder()->getPayment()->hasForcedState()) { + $invoiceState = $this->getOrder()->getPayment()->getForcedState(); + } + + $this->setState($invoiceState); + $this->getOrder()->getPayment()->pay($this); $this->getOrder()->setTotalPaid( $this->getOrder()->getTotalPaid()+$this->getGrandTotal() @@ -274,7 +282,6 @@ public function void() */ public function cancel() { - $this->setState(self::STATE_CANCELED); $this->getOrder()->getPayment()->cancelInvoice($this); foreach ($this->getAllItems() as $item) { $item->cancel(); @@ -298,6 +305,7 @@ public function cancel() $this->getOrder()->getBaseTotalInvoiced()-$this->getBaseGrandTotal() ); } + $this->setState(self::STATE_CANCELED); $this->getOrder()->setState(Mage_Sales_Model_Order::STATE_PROCESSING, true); Mage::dispatchEvent('sales_order_invoice_cancel', array($this->_eventObject=>$this)); return $this; @@ -531,6 +539,10 @@ public function getCommentsCollection($reload=false) */ public function sendEmail($notifyCustomer=true, $comment='') { + if (!Mage::helper('sales')->canSendNewInvoiceEmail($this->getOrder()->getStore()->getId())) { + return $this; + } + $currentDesign = Mage::getDesign()->setAllGetOld(array( 'package' => Mage::getStoreConfig('design/package/name', $this->getStoreId()), 'store' => $this->getStoreId() @@ -613,6 +625,10 @@ public function sendEmail($notifyCustomer=true, $comment='') */ public function sendUpdateEmail($notifyCustomer=true, $comment='') { + if (!Mage::helper('sales')->canSendInvoiceCommentEmail($this->getOrder()->getStore()->getId())) { + return $this; + } + $currentDesign = Mage::getDesign()->setAllGetOld(array( 'package' => Mage::getStoreConfig('design/package/name', $this->getStoreId()), )); diff --git a/app/code/core/Mage/Sales/Model/Order/Pdf/Abstract.php b/app/code/core/Mage/Sales/Model/Order/Pdf/Abstract.php index e6013764..1c2958d3 100644 --- a/app/code/core/Mage/Sales/Model/Order/Pdf/Abstract.php +++ b/app/code/core/Mage/Sales/Model/Order/Pdf/Abstract.php @@ -112,13 +112,12 @@ public function getAlignCenter($string, $x, $columnWidth, Zend_Pdf_Resource_Font return $x + round(($columnWidth - $width) / 2); } - protected function insertLogo(&$page) + protected function insertLogo(&$page, $store = null) { - $image = Mage::getStoreConfig('sales/identity/logo'); + $image = Mage::getStoreConfig('sales/identity/logo', $store); if ($image) { - $image = Mage::getStoreConfig('system/filesystem/media') . '/sales/store/logo/' . $image; + $image = Mage::getStoreConfig('system/filesystem/media', $store) . '/sales/store/logo/' . $image; if (is_file($image)) { - $image = Zend_Pdf_Image::imageWithPath($image); $page->drawImage($image, 25, 800, 125, 825); } @@ -126,7 +125,7 @@ protected function insertLogo(&$page) //return $page; } - protected function insertAddress(&$page) + protected function insertAddress(&$page, $store = null) { $page->setFillColor(new Zend_Pdf_Color_GrayScale(0)); $this->_setFontRegular($page, 5); @@ -137,7 +136,7 @@ protected function insertAddress(&$page) $page->setLineWidth(0); $this->y = 820; - foreach (explode("\n", Mage::getStoreConfig('sales/identity/address')) as $value){ + foreach (explode("\n", Mage::getStoreConfig('sales/identity/address', $store)) as $value){ if ($value!=='') { $page->drawText(trim(strip_tags($value)), 130, $this->y, 'UTF-8'); $this->y -=7; @@ -146,9 +145,29 @@ protected function insertAddress(&$page) //return $page; } - protected function insertOrder(&$page, $order, $putOrderId = true) + /** + * Format address + * + * @param string $address + * @return array + */ + protected function _formatAddress($address) { + $return = array(); + foreach (split("\|", $address) as $str) { + foreach (Mage::helper('core/string')->str_split($str, 65, true, true) as $part) { + if (empty($part)) { + continue; + } + $return[] = $part; + } + } + return $return; + } + protected function insertOrder(&$page, $order, $putOrderId = true) + { + /* @var $order Mage_Sales_Model_Order */ $page->setFillColor(new Zend_Pdf_Color_GrayScale(0.5)); $page->drawRectangle(25, 790, 570, 755); @@ -172,7 +191,7 @@ protected function insertOrder(&$page, $order, $putOrderId = true) /* Calculate blocks info */ /* Billing Address */ - $billingAddress = explode('|', $order->getBillingAddress()->format('pdf')); + $billingAddress = $this->_formatAddress($order->getBillingAddress()->format('pdf')); /* Payment */ $paymentInfo = Mage::helper('payment')->getInfoBlock($order->getPayment()) @@ -189,7 +208,8 @@ protected function insertOrder(&$page, $order, $putOrderId = true) /* Shipping Address and Method */ if (!$order->getIsVirtual()) { /* Shipping Address */ - $shippingAddress = explode('|', $order->getShippingAddress()->format('pdf')); + $shippingAddress = $this->_formatAddress($order->getShippingAddress()->format('pdf')); + $shippingMethod = $order->getShippingDescription(); } @@ -205,16 +225,16 @@ protected function insertOrder(&$page, $order, $putOrderId = true) } if (!$order->getIsVirtual()) { - $y = 730-max(count($billingAddress), count($shippingAddress))*10+5; + $y = 730 - (max(count($billingAddress), count($shippingAddress)) * 10 + 5); } else { - $y = 730-count($billingAddress)*10 + 5; + $y = 730 - (count($billingAddress) * 10 + 5); } $page->setFillColor(new Zend_Pdf_Color_GrayScale(1)); $page->drawRectangle(25, 730, 570, $y); $page->setFillColor(new Zend_Pdf_Color_GrayScale(0)); - $this->_setFontRegular($page); + $this->_setFontRegular($page); $this->y = 720; foreach ($billingAddress as $value){ @@ -296,16 +316,16 @@ protected function insertOrder(&$page, $order, $putOrderId = true) $this->_setFontRegular($page, 6); foreach ($order->getTracksCollection() as $track) { - $CarrierCode = $track->getCarrierCode(); - if ($CarrierCode!='custom') - { - $carrier = Mage::getSingleton('shipping/config')->getCarrierInstance($CarrierCode); - $carrierTitle = $carrier->getConfigData('title'); - } - else - { - $carrierTitle = Mage::helper('sales')->__('Custom Value'); - } + $CarrierCode = $track->getCarrierCode(); + if ($CarrierCode!='custom') + { + $carrier = Mage::getSingleton('shipping/config')->getCarrierInstance($CarrierCode); + $carrierTitle = $carrier->getConfigData('title'); + } + else + { + $carrierTitle = Mage::helper('sales')->__('Custom Value'); + } $truncatedCarrierTitle = substr($carrierTitle, 0, 35) . (strlen($carrierTitle) > 35 ? '...' : ''); $truncatedTitle = substr($track->getTitle(), 0, 45) . (strlen($track->getTitle()) > 45 ? '...' : ''); diff --git a/app/code/core/Mage/Sales/Model/Order/Pdf/Creditmemo.php b/app/code/core/Mage/Sales/Model/Order/Pdf/Creditmemo.php index 795c8a99..6d3cc736 100644 --- a/app/code/core/Mage/Sales/Model/Order/Pdf/Creditmemo.php +++ b/app/code/core/Mage/Sales/Model/Order/Pdf/Creditmemo.php @@ -47,13 +47,13 @@ public function getPdf($creditmemos = array()) $page = $pdf->newPage(Zend_Pdf_Page::SIZE_A4); $pdf->pages[] = $page; - $order = $creditmemo->getOrder(); + $order = $creditmemo->getOrder(); /* Add image */ - $this->insertLogo($page); + $this->insertLogo($page, $creditmemo->getStore()); /* Add address */ - $this->insertAddress($page); + $this->insertAddress($page, $creditmemo->getStore()); /* Add head */ $this->insertOrder($page, $order, Mage::getStoreConfigFlag(self::XML_PATH_SALES_PDF_CREDITMEMO_PUT_ORDER_ID, $order->getStoreId())); diff --git a/app/code/core/Mage/Sales/Model/Order/Pdf/Invoice.php b/app/code/core/Mage/Sales/Model/Order/Pdf/Invoice.php index 42a92e48..dc4d993a 100644 --- a/app/code/core/Mage/Sales/Model/Order/Pdf/Invoice.php +++ b/app/code/core/Mage/Sales/Model/Order/Pdf/Invoice.php @@ -50,10 +50,10 @@ public function getPdf($invoices = array()) $order = $invoice->getOrder(); /* Add image */ - $this->insertLogo($page); + $this->insertLogo($page, $invoice->getStore()); /* Add address */ - $this->insertAddress($page); + $this->insertAddress($page, $invoice->getStore()); /* Add head */ $this->insertOrder($page, $order, Mage::getStoreConfigFlag(self::XML_PATH_SALES_PDF_INVOICE_PUT_ORDER_ID, $order->getStoreId())); diff --git a/app/code/core/Mage/Sales/Model/Order/Pdf/Shipment.php b/app/code/core/Mage/Sales/Model/Order/Pdf/Shipment.php index 041edfff..83aefa46 100644 --- a/app/code/core/Mage/Sales/Model/Order/Pdf/Shipment.php +++ b/app/code/core/Mage/Sales/Model/Order/Pdf/Shipment.php @@ -49,10 +49,10 @@ public function getPdf($shipments = array()) $order = $shipment->getOrder(); /* Add image */ - $this->insertLogo($page); + $this->insertLogo($page, $shipment->getStore()); /* Add address */ - $this->insertAddress($page); + $this->insertAddress($page, $shipment->getStore()); /* Add head */ $this->insertOrder($page, $order, Mage::getStoreConfigFlag(self::XML_PATH_SALES_PDF_SHIPMENT_PUT_ORDER_ID, $order->getStoreId())); diff --git a/app/code/core/Mage/Sales/Model/Order/Shipment.php b/app/code/core/Mage/Sales/Model/Order/Shipment.php index 901b6bc0..11dc6c57 100644 --- a/app/code/core/Mage/Sales/Model/Order/Shipment.php +++ b/app/code/core/Mage/Sales/Model/Order/Shipment.php @@ -34,12 +34,14 @@ class Mage_Sales_Model_Order_Shipment extends Mage_Core_Model_Abstract const XML_PATH_EMAIL_IDENTITY = 'sales_email/shipment/identity'; const XML_PATH_EMAIL_COPY_TO = 'sales_email/shipment/copy_to'; const XML_PATH_EMAIL_COPY_METHOD = 'sales_email/shipment/copy_method'; + const XML_PATH_EMAIL_ENABLED = 'sales_email/shipment/enabled'; const XML_PATH_UPDATE_EMAIL_TEMPLATE = 'sales_email/shipment_comment/template'; const XML_PATH_UPDATE_EMAIL_GUEST_TEMPLATE = 'sales_email/shipment_comment/guest_template'; const XML_PATH_UPDATE_EMAIL_IDENTITY = 'sales_email/shipment_comment/identity'; const XML_PATH_UPDATE_EMAIL_COPY_TO = 'sales_email/shipment_comment/copy_to'; const XML_PATH_UPDATE_EMAIL_COPY_METHOD = 'sales_email/shipment_comment/copy_method'; + const XML_PATH_UPDATE_EMAIL_ENABLED = 'sales_email/shipment_comment/enabled'; protected $_items; protected $_tracks; @@ -292,6 +294,10 @@ public function getCommentsCollection($reload=false) */ public function sendEmail($notifyCustomer=true, $comment='') { + if (!Mage::helper('sales')->canSendNewShipmentEmail($this->getOrder()->getStore()->getId())) { + return $this; + } + $currentDesign = Mage::getDesign()->setAllGetOld(array( 'package' => Mage::getStoreConfig('design/package/name', $this->getStoreId()), 'store' => $this->getStoreId() @@ -373,6 +379,10 @@ public function sendEmail($notifyCustomer=true, $comment='') */ public function sendUpdateEmail($notifyCustomer = true, $comment='') { + if (!Mage::helper('sales')->canSendShipmentCommentEmail($this->getOrder()->getStore()->getId())) { + return $this; + } + $currentDesign = Mage::getDesign()->setAllGetOld(array( 'package' => Mage::getStoreConfig('design/package/name', $this->getStoreId()), )); @@ -468,4 +478,14 @@ protected function _beforeDelete() $this->_protectFromNonAdmin(); return parent::_beforeDelete(); } + + /** + * Retrieve store model instance + * + * @return Mage_Core_Model_Store + */ + public function getStore() + { + return $this->getOrder()->getStore(); + } } diff --git a/app/code/core/Mage/Sales/Model/Quote.php b/app/code/core/Mage/Sales/Model/Quote.php index d67a3896..919dbe5b 100644 --- a/app/code/core/Mage/Sales/Model/Quote.php +++ b/app/code/core/Mage/Sales/Model/Quote.php @@ -658,7 +658,7 @@ public function addProduct(Mage_Catalog_Model_Product $product, $request=null) } /** - * We specify qty after we know about parent (for stocj) + * We specify qty after we know about parent (for stock) */ $item->addQty($candidate->getCartQty()); @@ -881,10 +881,6 @@ public function collectTotals() $this->setVirtualItemsQty(0); foreach ($this->getAllVisibleItems() as $item) { - //if ($item->getProduct()->getIsVirtual()) { - // $this->setVirtualItemsQty($this->getVirtualItemsQty() + $item->getQty()); - //} - if ($item->getParentItem()) { continue; } @@ -894,20 +890,18 @@ public function collectTotals() if ($child->getProduct()->getIsVirtual()) { $this->setVirtualItemsQty($this->getVirtualItemsQty() + $child->getQty()*$item->getQty()); } - $this->setItemsCount($this->getItemsCount()+1); - $this->setItemsQty((float) $this->getItemsQty()+$child->getQty()*$item->getQty()); - } - } else { - if ($item->getProduct()->getIsVirtual()) { - $this->setVirtualItemsQty($this->getVirtualItemsQty() + $item->getQty()); } - $this->setItemsCount($this->getItemsCount()+1); - $this->setItemsQty((float) $this->getItemsQty()+$item->getQty()); } - //$this->setItemsCount($this->getItemsCount()+1); - //$this->setItemsQty((float) $this->getItemsQty()+$item->getQty()); + if ($item->getProduct()->getIsVirtual()) { + $this->setVirtualItemsQty($this->getVirtualItemsQty() + $item->getQty()); + } + $this->setItemsCount($this->getItemsCount()+1); + $this->setItemsQty((float) $this->getItemsQty()+$item->getQty()); } + + $this->setData('trigger_recollect', 0); + return $this; } @@ -974,13 +968,35 @@ public function reserveOrderId() return $this; } - public function validateMinimumAmount() + public function validateMinimumAmount($multishipping = false) { - foreach ($this->getAllAddresses() as $address) { - if (!$address->validateMinimumAmount()) { + $storeId = $this->getStoreId(); + $minOrderActive = Mage::getStoreConfigFlag('sales/minimum_order/active', $storeId); + $minOrderMulti = Mage::getStoreConfigFlag('sales/minimum_order/multi_address', $storeId); + + if (!$minOrderActive) { + return true; + } + + if ($multishipping && !$minOrderMulti) { + $baseTotal = 0; + foreach ($this->getAllAddresses() as $address) { + /* @var $address Mage_Sales_Model_Quote_Address */ + $baseTotal += $address->getBaseSubtotalWithDiscount(); + } + + if ($baseTotal < Mage::getStoreConfig('sales/minimum_order/amount', $storeId)) { return false; } } + else { + foreach ($this->getAllAddresses() as $address) { + /* @var $address Mage_Sales_Model_Quote_Address */ + if (!$address->validateMinimumAmount()) { + return false; + } + } + } return true; } @@ -1076,4 +1092,18 @@ public function merge(Mage_Sales_Model_Quote $quote) } return $this; } -} \ No newline at end of file + + /** + * Trigger collect totals after loading, if required + * + * @return Mage_Sales_Model_Quote + */ + protected function _afterLoad() + { + // collect totals and save me, if required + if (1 == $this->getData('trigger_recollect')) { + $this->collectTotals()->save(); + } + return parent::_afterLoad(); + } +} diff --git a/app/code/core/Mage/Sales/Model/Quote/Address.php b/app/code/core/Mage/Sales/Model/Quote/Address.php index edb172b2..7bfc09f5 100644 --- a/app/code/core/Mage/Sales/Model/Quote/Address.php +++ b/app/code/core/Mage/Sales/Model/Quote/Address.php @@ -608,15 +608,20 @@ public function __clone() public function validateMinimumAmount() { - if ($this->getAddressType()!=self::TYPE_SHIPPING) { - return true; - } $storeId = $this->getQuote()->getStoreId(); if (!Mage::getStoreConfigFlag('sales/minimum_order/active', $storeId)) { return true; } + + if ($this->getQuote()->getIsVirtual() && $this->getAddressType() == self::TYPE_SHIPPING) { + return true; + } + elseif (!$this->getQuote()->getIsVirtual() && $this->getAddressType() != self::TYPE_SHIPPING) { + return true; + } + $amount = Mage::getStoreConfig('sales/minimum_order/amount', $storeId); - if ($this->getBaseSubtotalWithDiscount()<$amount) { + if ($this->getBaseSubtotalWithDiscount() < $amount) { return false; } return true; diff --git a/app/code/core/Mage/Sales/Model/Quote/Item.php b/app/code/core/Mage/Sales/Model/Quote/Item.php index f80ceb85..a286e1d3 100644 --- a/app/code/core/Mage/Sales/Model/Quote/Item.php +++ b/app/code/core/Mage/Sales/Model/Quote/Item.php @@ -100,8 +100,15 @@ public function addQty($qty) { $oldQty = $this->getQty(); $qty = $this->_prepareQty($qty); - $this->setQtyToAdd($qty); - $this->setQty($oldQty+$qty); + + /** + * We can't modify quontity of existing items which have parent + * This qty declared just once duering add process and is not editable + */ + if (!$this->getParentItem() || !$this->getId()) { + $this->setQtyToAdd($qty); + $this->setQty($oldQty+$qty); + } return $this; } diff --git a/app/code/core/Mage/Sales/Model/Quote/Item/Abstract.php b/app/code/core/Mage/Sales/Model/Quote/Item/Abstract.php index 12e165f3..4135959e 100644 --- a/app/code/core/Mage/Sales/Model/Quote/Item/Abstract.php +++ b/app/code/core/Mage/Sales/Model/Quote/Item/Abstract.php @@ -37,6 +37,11 @@ abstract class Mage_Sales_Model_Quote_Item_Abstract extends Mage_Core_Model_Abst protected $_children = array(); protected $_messages = array(); + /** + * Retrieve Quote instance + * + * @return Mage_Sales_Model_Quote + */ abstract function getQuote(); protected function _beforeSave() @@ -200,10 +205,10 @@ public function calcRowTotal() if ($this->getParentItem()) { $qty = $qty*$this->getParentItem()->getQty(); } - + if ($rowTotal = $this->getRowTotalExcTax()) { - $baseTotal = $rowTotal; - $total = $this->getStore()->convertPrice($baseTotal); + $baseTotal = $rowTotal; + $total = $this->getStore()->convertPrice($baseTotal); } else { $total = $this->getCalculationPrice()*$qty; @@ -239,7 +244,6 @@ public function calcTaxAmount() $this->setTaxAmount($store->roundPrice($rowTotal * $taxPercent)); $this->setBaseTaxAmount($store->roundPrice($rowBaseTotal * $taxPercent)); - $rowTotal = $this->getRowTotal(); $rowBaseTotal = $this->getBaseRowTotal(); $this->setTaxBeforeDiscount($store->roundPrice($rowTotal * $taxPercent)); @@ -253,8 +257,8 @@ public function calcTaxAmount() $totalTax -= $this->getDiscountAmount()*($this->getTaxPercent()/100); $totalBaseTax -= $this->getBaseDiscountAmount()*($this->getTaxPercent()/100); - $this->setBaseTaxAmount($totalBaseTax); - $this->setTaxAmount($totalTax); + $this->setBaseTaxAmount($store->roundPrice($totalBaseTax)); + $this->setTaxAmount($store->roundPrice($totalTax)); } } } @@ -303,11 +307,15 @@ public function getCalculationPrice() public function getBaseCalculationPrice() { if (!$this->hasBaseCalculationPrice()) { - if ($price = (float) $this->getCustomPrice()) { - $rate = $this->getStore()->convertPrice($price) / $price; - $price = $price / $rate; - } - else { + if ($this->hasCustomPrice()) { + if ($price = (float) $this->getCustomPrice()) { + $rate = $this->getStore()->convertPrice($price) / $price; + $price = $price / $rate; + } + else { + $price = $this->getCustomPrice(); + } + } else { $price = $this->getPrice(); } $this->setBaseCalculationPrice($price); @@ -425,20 +433,20 @@ protected function _calculatePrice($value, $saveTaxes = true) if ($this->getParentItem()) { $qty = $qty*$this->getParentItem()->getQty(); } - + if (Mage::helper('tax')->displayCartPriceInclTax($store)) { $rowTotal = $value*$qty; - $rowTotalExcTax = Mage::helper('tax')->getPrice($this->getProduct()->setTaxPercent(null), $rowTotal, false, $sAddress, $bAddress, $this->getQuote()->getCustomerTaxClassId(), $store); - $rowTotalIncTax = Mage::helper('tax')->getPrice($this->getProduct()->setTaxPercent(null), $rowTotal, true, $sAddress, $bAddress, $this->getQuote()->getCustomerTaxClassId(), $store); - $totalBaseTax = $rowTotalIncTax-$rowTotalExcTax; - $this->setRowTotalExcTax($rowTotalExcTax); + $rowTotalExcTax = Mage::helper('tax')->getPrice($this->getProduct()->setTaxPercent(null), $rowTotal, false, $sAddress, $bAddress, $this->getQuote()->getCustomerTaxClassId(), $store); + $rowTotalIncTax = Mage::helper('tax')->getPrice($this->getProduct()->setTaxPercent(null), $rowTotal, true, $sAddress, $bAddress, $this->getQuote()->getCustomerTaxClassId(), $store); + $totalBaseTax = $rowTotalIncTax-$rowTotalExcTax; + $this->setRowTotalExcTax($rowTotalExcTax); } else { $taxAmount = $priceIncludingTax - $priceExcludingTax; $this->setTaxPercent($this->getProduct()->getTaxPercent()); $totalBaseTax = $taxAmount*$qty; } - + $totalTax = $this->getStore()->convertPrice($totalBaseTax); $this->setTaxBeforeDiscount($totalTax); $this->setBaseTaxBeforeDiscount($totalBaseTax); diff --git a/app/code/core/Mage/Sales/etc/api.xml b/app/code/core/Mage/Sales/etc/api.xml index 7ab450f9..839b010c 100644 --- a/app/code/core/Mage/Sales/etc/api.xml +++ b/app/code/core/Mage/Sales/etc/api.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. diff --git a/app/code/core/Mage/Sales/etc/config.xml b/app/code/core/Mage/Sales/etc/config.xml index a8f07634..329b036c 100644 --- a/app/code/core/Mage/Sales/etc/config.xml +++ b/app/code/core/Mage/Sales/etc/config.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,13 +22,13 @@ * @category Mage * @package Mage_Sales * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - 0.9.20 + 0.9.26 @@ -308,6 +308,7 @@ customer_group_id customer_tax_class_id customer_taxvat + customer_dob @@ -433,7 +434,7 @@ - sales/creditmemo_update.html + sales/creditmemo_update_guest.html html @@ -770,6 +771,24 @@ + + + + singleton + sales/observer + markQuotesRecollectOnCatalogRules + + + + + + + singleton + sales/observer + markQuotesRecollectOnCatalogRules + + + @@ -796,48 +815,56 @@ + 1 sales_email_order_guest_template sales bcc + 1 sales_email_order_comment_guest_template sales bcc + 1 sales_email_invoice_guest_template sales bcc + 1 sales_email_invoice_comment_guest_template sales bcc + 1 sales_email_shipment_guest_template sales bcc + 1 sales_email_shipment_comment_guest_template sales bcc + 1 sales_email_creditmemo_guest_template sales bcc + 1 sales_email_creditmemo_comment_guest_template sales diff --git a/app/code/core/Mage/Sales/etc/system.xml b/app/code/core/Mage/Sales/etc/system.xml index c01e610e..bfe15434 100644 --- a/app/code/core/Mage/Sales/etc/system.xml +++ b/app/code/core/Mage/Sales/etc/system.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_GiftMessage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> @@ -119,7 +119,7 @@ 1 1 - + image adminhtml/system_config_backend_image_pdf @@ -131,7 +131,7 @@ 1 Default logo, will be used in PDF and HTML documents.<br />(jpeg, tiff, png) - + image adminhtml/system_config_backend_image @@ -243,6 +243,15 @@ 1 1 + + + select + adminhtml/system_config_source_yesno + 0 + 1 + 1 + 1 + select @@ -299,6 +308,15 @@ 1 1 + + + select + adminhtml/system_config_source_yesno + 0 + 1 + 1 + 1 + select @@ -355,6 +373,15 @@ 1 1 + + + select + adminhtml/system_config_source_yesno + 0 + 1 + 1 + 1 + select @@ -410,6 +437,15 @@ 1 1 + + + select + adminhtml/system_config_source_yesno + 0 + 1 + 1 + 1 + select @@ -466,6 +502,15 @@ 1 1 + + + select + adminhtml/system_config_source_yesno + 0 + 1 + 1 + 1 + select @@ -521,6 +566,15 @@ 1 1 + + + select + adminhtml/system_config_source_yesno + 0 + 1 + 1 + 1 + select @@ -577,6 +631,15 @@ 1 1 + + + select + adminhtml/system_config_source_yesno + 0 + 1 + 1 + 1 + select @@ -632,6 +695,15 @@ 1 1 + + + select + adminhtml/system_config_source_yesno + 0 + 1 + 1 + 1 + select diff --git a/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.9.20-0.9.21.php b/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.9.20-0.9.21.php new file mode 100644 index 00000000..dcb9f0f4 --- /dev/null +++ b/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.9.20-0.9.21.php @@ -0,0 +1,39 @@ +startSetup(); + +$installer->getConnection()->addColumn( + $installer->getTable('sales_flat_quote'), + 'trigger_recollect', + 'tinyint(1) NOT NULL DEFAULT 0' +); +// no need to add attribute to the flat quote - it will be ignored + +$installer->endSetup(); diff --git a/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.9.21-0.9.22.php b/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.9.21-0.9.22.php new file mode 100644 index 00000000..b49f75eb --- /dev/null +++ b/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.9.21-0.9.22.php @@ -0,0 +1,35 @@ +startSetup(); + +$installer->addAttribute('order', 'payment_authorization_amount', array('type'=>'decimal')); +$installer->addAttribute('order', 'payment_authorization_expiration', array('type'=>'int')); + +$installer->endSetup(); \ No newline at end of file diff --git a/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.9.22-0.9.23.php b/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.9.22-0.9.23.php new file mode 100644 index 00000000..dc4556c7 --- /dev/null +++ b/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.9.22-0.9.23.php @@ -0,0 +1,36 @@ +getConnection(); +/* @var $conn Varien_Db_Adapter_Pdo_Mysql */ + +$conn->addColumn($installer->getTable('sales_flat_quote'), 'customer_dob', 'datetime after customer_suffix'); +$installer->addAttribute('quote', 'customer_dob', array('type'=>'static', 'backend'=>'eav/entity_attribute_backend_datetime')); + +$installer->addAttribute('order', 'customer_dob', array('type'=>'datetime', 'backend'=>'eav/entity_attribute_backend_datetime')); diff --git a/skin/frontend/default/blue/css/ie7.css b/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.9.23-0.9.24.php similarity index 74% rename from skin/frontend/default/blue/css/ie7.css rename to app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.9.23-0.9.24.php index 30a68749..7af50c96 100644 --- a/skin/frontend/default/blue/css/ie7.css +++ b/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.9.23-0.9.24.php @@ -1,22 +1,31 @@ -/** - * 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) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ \ No newline at end of file +addAttribute('invoice', 'email_sent', array('type'=>'int')); +$installer->addAttribute('shipment', 'email_sent', array('type'=>'int')); \ No newline at end of file diff --git a/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.9.24-0.9.25.php b/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.9.24-0.9.25.php new file mode 100644 index 00000000..cf922120 --- /dev/null +++ b/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.9.24-0.9.25.php @@ -0,0 +1,34 @@ +getConnection()->addColumn($this->getTable('sales_order'), 'shipping_tax_refunded', 'decimal(12,4) NULL'); +$installer->getConnection()->addColumn($this->getTable('sales_order'), 'base_shipping_tax_refunded', 'decimal(12,4) NULL'); + +$installer->addAttribute('order', 'shipping_tax_refunded', array('type'=>'static')); +$installer->addAttribute('order', 'base_shipping_tax_refunded', array('type'=>'static')); \ No newline at end of file diff --git a/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.9.25-0.9.26.php b/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.9.25-0.9.26.php new file mode 100644 index 00000000..cad2f50a --- /dev/null +++ b/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.9.25-0.9.26.php @@ -0,0 +1,41 @@ +run(" +DELETE FROM `{$this->getTable('sales_order_tax')}` +WHERE `order_id` NOT IN ( + SELECT `entity_id` FROM `{$this->getTable('sales_order')}` +) +"); + +$installer->getConnection()->addConstraint( + 'FK_SALES_ORDER_TAX_ORDER', + $this->getTable('sales_order_tax'), 'order_id', + $this->getTable('sales_order'), 'entity_id' +); diff --git a/app/code/core/Mage/SalesRule/Model/Mysql4/Rule.php b/app/code/core/Mage/SalesRule/Model/Mysql4/Rule.php index 0a14bf69..8342ea11 100644 --- a/app/code/core/Mage/SalesRule/Model/Mysql4/Rule.php +++ b/app/code/core/Mage/SalesRule/Model/Mysql4/Rule.php @@ -34,85 +34,23 @@ protected function _construct() public function _beforeSave(Mage_Core_Model_Abstract $object) { - $startDate = $object->getFromDate(); - if ($startDate=='') { - $startDate = Mage::getModel('core/date')->gmtDate(); + if (!$object->getFromDate()) { + $object->setFromDate(new Zend_Date(Mage::getModel('core/date')->gmtTimestamp())); } - $object->setFromDate($this->formatDate($startDate)); - $object->setToDate($this->formatDate($object->getToDate())); - if (!$object->getDiscountQty()) { - $object->setDiscountQty(new Zend_Db_Expr('NULL')); - } - parent::_beforeSave($object); - } - - public function updateRuleProductData(Mage_SalesRule_Model_Rule $rule) - { -// foreach ($rule->getActions()->getActions() as $action) { -// break; -// } - - $ruleId = $rule->getId(); - - $read = $this->_getReadAdapter(); - $write = $this->_getWriteAdapter(); - - $write->delete($this->getTable('salesrule/rule_product'), $write->quoteInto('rule_id=?', $ruleId)); + $object->setFromDate($object->getFromDate()->toString(Varien_Date::DATETIME_INTERNAL_FORMAT)); - if (!$rule->getIsActive()) { - return $this; + if (!$object->getToDate()) { + $object->setToDate(new Zend_Db_Expr('NULL')); } - - if ($rule->getUsesPerCoupon()>0) { - $usedPerCoupon = $read->fetchOne('select count(*) from '.$this->getTable('salesrule/rule_customer').' where rule_id=?', $ruleId); - if ($usedPerCoupon>=$rule->getUsesPerCoupon()) { - return $this; - } + else { + $object->setToDate($object->getToDate()->toString(Varien_Date::DATETIME_INTERNAL_FORMAT)); } - $productIds = explode(',', $rule->getProductIds()); - $websiteIds = explode(',', $rule->getWebsiteIds()); - $customerGroupIds = explode(',', $rule->getCustomerGroupIds()); - - $fromTime = strtotime($rule->getFromDate()); - $toTime = strtotime($rule->getToDate()); - if ($toTime) - $toTime += 86400; - - $couponCode = $rule->getCouponCode() ? "'".$rule->getCouponCode()."'" : 'NULL'; - $sortOrder = (int)$rule->getSortOrder(); - - $rows = array(); - $header = 'replace into '.$this->getTable('salesrule/rule_product').' (rule_id, from_time, to_time, website_id, customer_group_id, product_id, coupon_code, sort_order) values '; - try { - $write->beginTransaction(); - - foreach ($productIds as $productId) { - foreach ($websiteIds as $websiteId) { - foreach ($customerGroupIds as $customerGroupId) { - $rows[] = "('$ruleId', '$fromTime', '$toTime', '$websiteId', '$customerGroupId', '$productId', $couponCode, '$sortOrder')"; - if (sizeof($rows)==100) { - $sql = $header.join(',', $rows); - $write->query($sql); - $rows = array(); - } - } - } - } - if (!empty($rows)) { - $sql = $header.join(',', $rows); - $write->query($sql); - } - - $write->commit(); - } catch (Exception $e) { - - $write->rollback(); - throw $e; - + if (!$object->getDiscountQty()) { + $object->setDiscountQty(new Zend_Db_Expr('NULL')); } - return $this; + parent::_beforeSave($object); } public function getCustomerUses($rule, $customerId) diff --git a/app/code/core/Mage/SalesRule/Model/Observer.php b/app/code/core/Mage/SalesRule/Model/Observer.php index df87cd15..9ab232c4 100644 --- a/app/code/core/Mage/SalesRule/Model/Observer.php +++ b/app/code/core/Mage/SalesRule/Model/Observer.php @@ -56,26 +56,22 @@ public function sales_order_afterPlace($observer) $ruleIds = explode(',', $order->getAppliedRuleIds()); $ruleIds = array_unique($ruleIds); - // create rule and customer rule models - $rule = Mage::getModel('salesrule/rule'); $ruleCustomer = null; $customerId = $order->getCustomerId(); - if ($customerId) { - $ruleCustomer = Mage::getModel('salesrule/rule_customer'); - } // use each rule (and apply to customer, if applicable) foreach ($ruleIds as $ruleId) { if (!$ruleId) { continue; } - + $rule = Mage::getModel('salesrule/rule'); $rule->load($ruleId); if ($rule->getId()) { $rule->setTimesUsed($rule->getTimesUsed() + 1); $rule->save(); - if ($ruleCustomer) { + if ($customerId) { + $ruleCustomer = Mage::getModel('salesrule/rule_customer'); $ruleCustomer->loadByCustomerRule($customerId, $ruleId); if ($ruleCustomer->getId()) { 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 a39ab2c2..1299a9e5 100644 --- a/app/code/core/Mage/SalesRule/Model/Rule/Condition/Address.php +++ b/app/code/core/Mage/SalesRule/Model/Rule/Condition/Address.php @@ -106,12 +106,23 @@ public function getValueSelectOptions() return $this->getData('value_select_options'); } + /** + * Validate Address Rule Condition + * + * @param Varien_Object $object + * @return bool + */ public function validate(Varien_Object $object) { - switch ($this->getAttribute()) { - default: - $obj = $object->getQuote()->getShippingAddress(); + $address = $object; + if (!$address instanceof Mage_Sales_Model_Quote_Address) { + if ($object->getQuote()->isVirtual()) { + $address = $object->getQuote()->getBillingAddress(); + } + else { + $address = $object->getQuote()->getShippingAddress(); + } } - return parent::validate($obj); + return parent::validate($address); } } diff --git a/app/code/core/Mage/SalesRule/Model/Rule/Condition/Product.php b/app/code/core/Mage/SalesRule/Model/Rule/Condition/Product.php index e7edcbd9..ebcdc25a 100644 --- a/app/code/core/Mage/SalesRule/Model/Rule/Condition/Product.php +++ b/app/code/core/Mage/SalesRule/Model/Rule/Condition/Product.php @@ -36,14 +36,20 @@ protected function _addSpecialAttributes(array &$attributes) $attributes['quote_item_row_total'] = Mage::helper('salesrule')->__('Row total in cart'); } + /** + * Validate Product Rule Condition + * + * @param Varien_Object $object + * @return bool + */ public function validate(Varien_Object $object) { - $product = Mage::getModel('catalog/product') - ->load($object->getProductId()) - ->setQuoteItemQty($object->getQty()) - ->setQuoteItemPrice($object->getPrice()) - ->setQuoteItemRowTotal($object->getRowTotal()); + $product = Mage::getModel('catalog/product') + ->load($object->getProductId()) + ->setQuoteItemQty($object->getQty()) + ->setQuoteItemPrice($object->getPrice()) + ->setQuoteItemRowTotal($object->getRowTotal()); - return parent::validate($product); + return parent::validate($product); } } diff --git a/app/code/core/Mage/SalesRule/Model/Validator.php b/app/code/core/Mage/SalesRule/Model/Validator.php index 91dab967..b396ca6b 100644 --- a/app/code/core/Mage/SalesRule/Model/Validator.php +++ b/app/code/core/Mage/SalesRule/Model/Validator.php @@ -1,84 +1,109 @@ + */ class Mage_SalesRule_Model_Validator extends Mage_Core_Model_Abstract { + /** + * Rule source collection + * + * @var Mage_SalesRule_Model_Mysql4_Rule_Collection + */ protected $_rules; - protected function _construct() - { + protected function _construct() + { parent::_construct(); - $this->_init('salesrule/validator'); - } + $this->_init('salesrule/validator'); + } - public function init($websiteId, $customerGroupId, $couponCode) - { - $this->setWebsiteId($websiteId) - ->setCustomerGroupId($customerGroupId) - ->setCouponCode($couponCode); + /** + * Init validator + * + * @param int $websiteId + * @param int $customerGroupId + * @param string $couponCode + * @return Mage_SalesRule_Model_Validator + */ + public function init($websiteId, $customerGroupId, $couponCode) + { + $this->setWebsiteId($websiteId) + ->setCustomerGroupId($customerGroupId) + ->setCouponCode($couponCode); - $this->_rules = Mage::getResourceModel('salesrule/rule_collection') - ->setValidationFilter($websiteId, $customerGroupId, $couponCode) - ->load(); + $this->_rules = Mage::getResourceModel('salesrule/rule_collection') + ->setValidationFilter($websiteId, $customerGroupId, $couponCode) + ->load(); - return $this; - } + return $this; + } - public function process(Mage_Sales_Model_Quote_Item_Abstract $item) - { - $item->setFreeShipping(false); - $item->setDiscountAmount(0); - $item->setBaseDiscountAmount(0); - $item->setDiscountPercent(0); + public function process(Mage_Sales_Model_Quote_Item_Abstract $item) + { + $item->setFreeShipping(false); + $item->setDiscountAmount(0); + $item->setBaseDiscountAmount(0); + $item->setDiscountPercent(0); - $quote = $item->getQuote(); + $quote = $item->getQuote(); - $address = $item->getAddress(); - if (!$address) { - $address = $item->getQuote()->getShippingAddress(); - } + if ($quote->isVirtual()) { + $address = $quote->getBillingAddress(); + } + else { + $address = $quote->getShippingAddress(); + } - $customerId = $quote->getCustomerId(); + $customerId = $quote->getCustomerId(); $ruleCustomer = Mage::getModel('salesrule/rule_customer'); - $appliedRuleIds = array(); + $appliedRuleIds = array(); - foreach ($this->_rules as $rule) { + foreach ($this->_rules as $rule) { + /* @var $rule Mage_SalesRule_Model_Rule */ /** * already tried to validate and failed */ - if ($rule->getIsValid()===false) { - continue; - } + if ($rule->getIsValid() === false) { + continue; + } - if ($rule->getIsValid()!==true) { - /** - * too many times used in general - */ - if ($rule->getUsesPerCoupon() && ($rule->getTimesUsed() >= $rule->getUsesPerCoupon())) { + if ($rule->getIsValid() !== true) { + /** + * too many times used in general + */ + if ($rule->getUsesPerCoupon() && ($rule->getTimesUsed() >= $rule->getUsesPerCoupon())) { $rule->setIsValid(false); continue; } @@ -98,98 +123,98 @@ public function process(Mage_Sales_Model_Quote_Item_Abstract $item) /** * quote does not meet rule's conditions */ - if (!$rule->validate($address)) { - $rule->setIsValid(false); - continue; - } + if (!$rule->validate($address)) { + $rule->setIsValid(false); + continue; + } /** * passed all validations, remember to be valid */ - $rule->setIsValid(true); - } + $rule->setIsValid(true); + } - /** - * although the rule is valid, this item is not marked for action - */ - if (!$rule->getActions()->validate($item)) { - continue; - } + /** + * although the rule is valid, this item is not marked for action + */ + if (!$rule->getActions()->validate($item)) { + continue; + } $qty = $item->getQty(); if ($item->getParentItem()) { $qty*= $item->getParentItem()->getQty(); } - $qty = $rule->getDiscountQty() ? min($qty, $rule->getDiscountQty()) : $qty; - $rulePercent = min(100, $rule->getDiscountAmount()); + $qty = $rule->getDiscountQty() ? min($qty, $rule->getDiscountQty()) : $qty; + $rulePercent = min(100, $rule->getDiscountAmount()); $discountAmount = 0; $baseDiscountAmount = 0; - switch ($rule->getSimpleAction()) { - case 'to_percent': - $rulePercent = max(0, 100-$rule->getDiscountAmount()); - //no break; + switch ($rule->getSimpleAction()) { + case 'to_percent': + $rulePercent = max(0, 100-$rule->getDiscountAmount()); + //no break; - case 'by_percent': - if ($step = $rule->getDiscountStep()) { - $qty = floor($qty/$step)*$step; - } - $discountAmount = ($qty*$item->getCalculationPrice() - $item->getDiscountAmount()) * $rulePercent/100; - $baseDiscountAmount= ($qty*$item->getBaseCalculationPrice() - $item->getBaseDiscountAmount()) * $rulePercent/100; + case 'by_percent': + if ($step = $rule->getDiscountStep()) { + $qty = floor($qty/$step)*$step; + } + $discountAmount = ($qty*$item->getCalculationPrice() - $item->getDiscountAmount()) * $rulePercent/100; + $baseDiscountAmount= ($qty*$item->getBaseCalculationPrice() - $item->getBaseDiscountAmount()) * $rulePercent/100; - if (!$rule->getDiscountQty() || $rule->getDiscountQty()>$qty) { - $discountPercent = min(100, $item->getDiscountPercent()+$rulePercent); - $item->setDiscountPercent($discountPercent); - } - break; + if (!$rule->getDiscountQty() || $rule->getDiscountQty()>$qty) { + $discountPercent = min(100, $item->getDiscountPercent()+$rulePercent); + $item->setDiscountPercent($discountPercent); + } + break; - case 'to_fixed': - $quoteAmount = $quote->getStore()->convertPrice($rule->getDiscountAmount()); + case 'to_fixed': + $quoteAmount = $quote->getStore()->convertPrice($rule->getDiscountAmount()); $discountAmount = $qty*($item->getCalculationPrice()-$quoteAmount); $baseDiscountAmount= $qty*($item->getBaseCalculationPrice()-$rule->getDiscountAmount()); - break; + break; - case 'by_fixed': - if ($step = $rule->getDiscountStep()) { - $qty = floor($qty/$step)*$step; - } - $quoteAmount = $quote->getStore()->convertPrice($rule->getDiscountAmount()); - $discountAmount = $qty*$quoteAmount; - $baseDiscountAmount= $qty*$rule->getDiscountAmount(); - break; + case 'by_fixed': + if ($step = $rule->getDiscountStep()) { + $qty = floor($qty/$step)*$step; + } + $quoteAmount = $quote->getStore()->convertPrice($rule->getDiscountAmount()); + $discountAmount = $qty*$quoteAmount; + $baseDiscountAmount= $qty*$rule->getDiscountAmount(); + break; - case 'cart_fixed': - $cartRules = $address->getCartFixedRules(); - if (!isset($cartRules[$rule->getId()])) { - $cartRules[$rule->getId()] = $rule->getDiscountAmount(); - } - if ($cartRules[$rule->getId()] > 0) { - $quoteAmount = $quote->getStore()->convertPrice($cartRules[$rule->getId()]); - $discountAmount = min($item->getRowTotal(), $quoteAmount); - $baseDiscountAmount = min($item->getBaseRowTotal(), $cartRules[$rule->getId()]); - $cartRules[$rule->getId()] -= $baseDiscountAmount; - } - $address->setCartFixedRules($cartRules); - break; + case 'cart_fixed': + $cartRules = $address->getCartFixedRules(); + if (!isset($cartRules[$rule->getId()])) { + $cartRules[$rule->getId()] = $rule->getDiscountAmount(); + } + if ($cartRules[$rule->getId()] > 0) { + $quoteAmount = $quote->getStore()->convertPrice($cartRules[$rule->getId()]); + $discountAmount = min($item->getRowTotal(), $quoteAmount); + $baseDiscountAmount = min($item->getBaseRowTotal(), $cartRules[$rule->getId()]); + $cartRules[$rule->getId()] -= $baseDiscountAmount; + } + $address->setCartFixedRules($cartRules); + break; - case 'buy_x_get_y': - $x = $rule->getDiscountStep(); - $y = $rule->getDiscountAmount(); - if (!$x || $y>=$x) { - break; - } - $buy = 0; $free = 0; - while ($buy+$free<$qty) { - $buy += $x; - if ($buy+$free>=$qty) { - break; - } - $free += min($y, $qty-$buy-$free); - if ($buy+$free>=$qty) { - break; - } - } - $discountAmount = $free*$item->getCalculationPrice(); - $baseDiscountAmount= $free*$item->getBaseCalculationPrice(); - break; - } + case 'buy_x_get_y': + $x = $rule->getDiscountStep(); + $y = $rule->getDiscountAmount(); + if (!$x || $y>=$x) { + break; + } + $buy = 0; $free = 0; + while ($buy+$free<$qty) { + $buy += $x; + if ($buy+$free>=$qty) { + break; + } + $free += min($y, $qty-$buy-$free); + if ($buy+$free>=$qty) { + break; + } + } + $discountAmount = $free*$item->getCalculationPrice(); + $baseDiscountAmount= $free*$item->getBaseCalculationPrice(); + break; + } $result = new Varien_Object(array( 'discount_amount' => $discountAmount, @@ -215,44 +240,44 @@ public function process(Mage_Sales_Model_Quote_Item_Abstract $item) $item->setDiscountAmount($discountAmount); $item->setBaseDiscountAmount($baseDiscountAmount); - switch ($rule->getSimpleFreeShipping()) { - case Mage_SalesRule_Model_Rule::FREE_SHIPPING_ITEM: - $item->setFreeShipping($rule->getDiscountQty() ? $rule->getDiscountQty() : true); - break; + switch ($rule->getSimpleFreeShipping()) { + case Mage_SalesRule_Model_Rule::FREE_SHIPPING_ITEM: + $item->setFreeShipping($rule->getDiscountQty() ? $rule->getDiscountQty() : true); + break; - case Mage_SalesRule_Model_Rule::FREE_SHIPPING_ADDRESS: - $address->setFreeShipping(true); - break; - } + case Mage_SalesRule_Model_Rule::FREE_SHIPPING_ADDRESS: + $address->setFreeShipping(true); + break; + } - $appliedRuleIds[$rule->getRuleId()] = $rule->getRuleId(); + $appliedRuleIds[$rule->getRuleId()] = $rule->getRuleId(); - if ($rule->getCouponCode() && ($rule->getCouponCode() == $this->getCouponCode())) { + if ($rule->getCouponCode() && ($rule->getCouponCode() == $this->getCouponCode())) { $address->setCouponCode($this->getCouponCode()); - } + } - if ($rule->getStopRulesProcessing()) { - break; - } - } - $item->setAppliedRuleIds(join(',',$appliedRuleIds)); - $address->setAppliedRuleIds($this->mergeIds($address->getAppliedRuleIds(), $appliedRuleIds)); - $quote->setAppliedRuleIds($this->mergeIds($quote->getAppliedRuleIds(), $appliedRuleIds)); - return $this; - } + if ($rule->getStopRulesProcessing()) { + break; + } + } + $item->setAppliedRuleIds(join(',',$appliedRuleIds)); + $address->setAppliedRuleIds($this->mergeIds($address->getAppliedRuleIds(), $appliedRuleIds)); + $quote->setAppliedRuleIds($this->mergeIds($quote->getAppliedRuleIds(), $appliedRuleIds)); + return $this; + } - public function mergeIds($a1, $a2, $asString=true) - { - if (!is_array($a1)) { - $a1 = empty($a1) ? array() : explode(',', $a1); - } - if (!is_array($a2)) { - $a2 = empty($a2) ? array() : explode(',', $a2); - } - $a = array_unique(array_merge($a1, $a2)); - if ($asString) { - $a = implode(',', $a); - } - return $a; - } + public function mergeIds($a1, $a2, $asString=true) + { + if (!is_array($a1)) { + $a1 = empty($a1) ? array() : explode(',', $a1); + } + if (!is_array($a2)) { + $a2 = empty($a2) ? array() : explode(',', $a2); + } + $a = array_unique(array_merge($a1, $a2)); + if ($asString) { + $a = implode(',', $a); + } + return $a; + } } diff --git a/app/code/core/Mage/SalesRule/etc/config.xml b/app/code/core/Mage/SalesRule/etc/config.xml index 663acea8..48c8d2b9 100644 --- a/app/code/core/Mage/SalesRule/etc/config.xml +++ b/app/code/core/Mage/SalesRule/etc/config.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,13 +22,13 @@ * @category Mage * @package Mage_SalesRule * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - 0.7.6 + 0.7.7 diff --git a/app/code/core/Mage/SalesRule/sql/salesrule_setup/mysql4-upgrade-0.7.6-0.7.7.php b/app/code/core/Mage/SalesRule/sql/salesrule_setup/mysql4-upgrade-0.7.6-0.7.7.php new file mode 100644 index 00000000..73417854 --- /dev/null +++ b/app/code/core/Mage/SalesRule/sql/salesrule_setup/mysql4-upgrade-0.7.6-0.7.7.php @@ -0,0 +1,41 @@ +startSetup(); + +$installer->getConnection()->changeColumn($this->getTable('salesrule'), + 'conditions_serialized', 'conditions_serialized', + 'mediumtext CHARACTER SET utf8 NOT NULL' +); +$installer->getConnection()->changeColumn($this->getTable('salesrule'), + 'actions_serialized', 'actions_serialized', + 'mediumtext CHARACTER SET utf8 NOT NULL' +); + +$installer->endSetup(); diff --git a/app/code/core/Mage/Sendfriend/etc/config.xml b/app/code/core/Mage/Sendfriend/etc/config.xml index a41be5b6..76d2fd2e 100644 --- a/app/code/core/Mage/Sendfriend/etc/config.xml +++ b/app/code/core/Mage/Sendfriend/etc/config.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Sendfriend * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Sendfriend/etc/system.xml b/app/code/core/Mage/Sendfriend/etc/system.xml index 1dff389b..9d31c7c7 100644 --- a/app/code/core/Mage/Sendfriend/etc/system.xml +++ b/app/code/core/Mage/Sendfriend/etc/system.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Sendfriend * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> @@ -34,7 +34,7 @@ 120 1 1 - 0 + 1 @@ -42,7 +42,7 @@ 1 1 1 - 0 + 1 diff --git a/app/code/core/Mage/Shipping/Model/Carrier/Flatrate.php b/app/code/core/Mage/Shipping/Model/Carrier/Flatrate.php index d1c4e60a..ad8adb0b 100644 --- a/app/code/core/Mage/Shipping/Model/Carrier/Flatrate.php +++ b/app/code/core/Mage/Shipping/Model/Carrier/Flatrate.php @@ -51,25 +51,25 @@ public function collectRates(Mage_Shipping_Model_Rate_Request $request) return false; } + $freeBoxes = 0; + if ($request->getAllItems()) { + foreach ($request->getAllItems() as $item) { + if ($item->getFreeShipping() && !$item->getProduct()->getTypeInstance()->isVirtual()) { + $freeBoxes+=$item->getQty(); + } + } + } + $this->setFreeBoxes($freeBoxes); + $result = Mage::getModel('shipping/rate_result'); if ($this->getConfigData('type') == 'O') { // per order $shippingPrice = $this->getConfigData('price'); } elseif ($this->getConfigData('type') == 'I') { // per item - $shippingPrice = $request->getPackageQty() * $this->getConfigData('price'); - - if ($request->getAllItems()) { - foreach ($request->getAllItems() as $item) { - if ($item->getFreeShipping() && !$item->getProduct()->getTypeInstance()->isVirtual()) { - $shippingPrice -= $item->getQty() * $this->getConfigData('price'); - } - } - } + $shippingPrice = ($request->getPackageQty() * $this->getConfigData('price')) - ($this->getFreeBoxes() * $this->getConfigData('price')); } else { $shippingPrice = false; } - - $shippingPrice = $this->getFinalPriceWithHandlingFee($shippingPrice); if ($shippingPrice !== false) { @@ -81,10 +81,11 @@ public function collectRates(Mage_Shipping_Model_Rate_Request $request) $method->setMethod('flatrate'); $method->setMethodTitle($this->getConfigData('name')); - if ($request->getFreeShipping() === true) { + if ($request->getFreeShipping() === true || $request->getPackageQty() == $this->getFreeBoxes()) { $shippingPrice = '0.00'; } + $method->setPrice($shippingPrice); $method->setCost($shippingPrice); diff --git a/app/code/core/Mage/Shipping/etc/config.xml b/app/code/core/Mage/Shipping/etc/config.xml index 5e8e274f..f40a39ce 100644 --- a/app/code/core/Mage/Shipping/etc/config.xml +++ b/app/code/core/Mage/Shipping/etc/config.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Shipping * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Shipping/etc/system.xml b/app/code/core/Mage/Shipping/etc/system.xml index a84f13d6..858e5bdb 100644 --- a/app/code/core/Mage/Shipping/etc/system.xml +++ b/app/code/core/Mage/Shipping/etc/system.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Shipping * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Sitemap/Model/Mysql4/Cms/Page.php b/app/code/core/Mage/Sitemap/Model/Mysql4/Cms/Page.php index d6881d53..73120fbd 100644 --- a/app/code/core/Mage/Sitemap/Model/Mysql4/Cms/Page.php +++ b/app/code/core/Mage/Sitemap/Model/Mysql4/Cms/Page.php @@ -57,6 +57,7 @@ public function getCollection($storeId) 'main_table.page_id=store_table.page_id', array() ) + ->where('main_table.is_active=1') ->where('store_table.store_id IN(?)', array(0, $storeId)); $query = $this->_getWriteAdapter()->query($select); while ($row = $query->fetch()) { diff --git a/app/code/core/Mage/Sitemap/Model/Sitemap.php b/app/code/core/Mage/Sitemap/Model/Sitemap.php index 8156b2a9..e5883a68 100644 --- a/app/code/core/Mage/Sitemap/Model/Sitemap.php +++ b/app/code/core/Mage/Sitemap/Model/Sitemap.php @@ -68,19 +68,19 @@ protected function _beforeSave() } if (!$io->isWriteable($realPath)) { - Mage::throwException(Mage::helper('sitemap')->__('Please make sure that "%s" is writable by web-sebver.', $this->getSitemapPath())); + Mage::throwException(Mage::helper('sitemap')->__('Please make sure that "%s" is writable by web-server.', $this->getSitemapPath())); } /** * Check allow filename */ if (!preg_match('#^[a-zA-Z0-9_\.]+$#', $this->getSitemapFilename())) { - Mage::throwException(Mage::helper('sitemap')->__('Please use only letters (a-z or A-Z), numbers (0-9) or underscore (_) only in the filename. No spaces or other characters are allowed.')); + Mage::throwException(Mage::helper('sitemap')->__('Please use only letters (a-z or A-Z), numbers (0-9) or underscore (_) in the filename. No spaces or other characters are allowed.')); } if (!preg_match('#\.xml$#', $this->getSitemapFilename())) { $this->setSitemapFilename($this->getSitemapFilename() . '.xml'); } - $this->setSitemapPath(rtrim(str_replace(Mage::getBaseDir(), '', $realPath), '/') . '/'); + $this->setSitemapPath(rtrim(str_replace(str_replace('\\', '/', Mage::getBaseDir()), '', $realPath), '/') . '/'); return parent::_beforeSave(); } @@ -99,11 +99,21 @@ protected function getPath() return $this->_filePath; } + /** + * Generate XML file + * + * @return Mage_Sitemap_Model_Sitemap + */ public function generateXml() { $io = new Varien_Io_File(); $io->setAllowCreateFolders(true); $io->open(array('path' => $this->getPath())); + + if ($io->fileExists($this->getSitemapFilename()) && !$io->isWriteable($this->getSitemapFilename())) { + Mage::throwException(Mage::helper('sitemap')->__('File "%s" cannot be saved. Please, make sure the directory "%s" is writeable by web server.', $this->getSitemapFilename(), $this->getPath())); + } + $io->streamOpen($this->getSitemapFilename()); $io->streamWrite('' . "\n"); diff --git a/app/code/core/Mage/Sitemap/etc/config.xml b/app/code/core/Mage/Sitemap/etc/config.xml index 9ab195ac..e8c12351 100644 --- a/app/code/core/Mage/Sitemap/etc/config.xml +++ b/app/code/core/Mage/Sitemap/etc/config.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Sitemap * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Sitemap/etc/system.xml b/app/code/core/Mage/Sitemap/etc/system.xml index ed3f77c7..646b40f4 100644 --- a/app/code/core/Mage/Sitemap/etc/system.xml +++ b/app/code/core/Mage/Sitemap/etc/system.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Sitemap * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Strikeiron/etc/config.xml b/app/code/core/Mage/Strikeiron/etc/config.xml index 2d1d932a..d5ade6bd 100644 --- a/app/code/core/Mage/Strikeiron/etc/config.xml +++ b/app/code/core/Mage/Strikeiron/etc/config.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Strikeiron * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Strikeiron/etc/system.xml b/app/code/core/Mage/Strikeiron/etc/system.xml index dbb6ef59..99fb4f06 100644 --- a/app/code/core/Mage/Strikeiron/etc/system.xml +++ b/app/code/core/Mage/Strikeiron/etc/system.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Sitemap * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> @@ -255,10 +255,9 @@ 1 1 - + - If type is complete and zip code belongs to multiple tax rates, - choose to charge minimum tax rate or maximum tax rate. + If type is complete and zip code belongs to multiple tax rates, choose to charge minimum tax rate or maximum tax rate. select strikeiron/source_salestaxminmax 4 diff --git a/app/code/core/Mage/Tag/controllers/CustomerController.php b/app/code/core/Mage/Tag/controllers/CustomerController.php index ed158da6..978838ce 100644 --- a/app/code/core/Mage/Tag/controllers/CustomerController.php +++ b/app/code/core/Mage/Tag/controllers/CustomerController.php @@ -66,7 +66,7 @@ public function indexAction() $block->setRefererUrl($this->_getRefererUrl()); } - $this->getLayout()->getBlock('head')->setTitle($this->__('My Tags')); + $this->getLayout()->getBlock('head')->setTitle(Mage::helper('tag')->__('My Tags')); $this->renderLayout(); } @@ -86,7 +86,7 @@ public function viewAction() } $this->_initLayoutMessages('checkout/session'); - $this->getLayout()->getBlock('head')->setTitle($this->__('My Tags')); + $this->getLayout()->getBlock('head')->setTitle(Mage::helper('tag')->__('My Tags')); $this->renderLayout(); } else { @@ -127,11 +127,11 @@ public function removeAction() $model = Mage::registry('tagModel'); $model->deactivate(); $tag = Mage::getModel('tag/tag')->load($tagId)->aggregate(); - Mage::getSingleton('tag/session')->addSuccess($this->__('You tag was successfully deleted')); + Mage::getSingleton('tag/session')->addSuccess(Mage::helper('tag')->__('Your tag was successfully deleted')); $this->getResponse()->setRedirect(Mage::getUrl('*/*/')); return; } catch (Exception $e) { - Mage::getSingleton('tag/session')->addError($this->__('Unable to remove tag. Please, try again later.')); + Mage::getSingleton('tag/session')->addError(Mage::helper('tag')->__('Unable to remove tag. Please, try again later.')); } } else { @@ -151,7 +151,7 @@ public function saveAction() $tagName = (string) $this->getRequest()->getPost('tagName'); if (strlen($tagName) === 0) { - Mage::getSingleton('tag/session')->addError($this->__('Tag can\'t be empty.')); + Mage::getSingleton('tag/session')->addError(Mage::helper('tag')->__('Tag can\'t be empty.')); $this->_redirect('*/*/edit', array('tagId'=>$tagId)); return; } @@ -174,7 +174,7 @@ public function saveAction() } else { $isNew = true; - $message= $this->__('Thank you. Your tag has been accepted for moderation.'); + $message= Mage::helper('tag')->__('Thank you. Your tag has been accepted for moderation.'); $status = $tagModel->getPendingStatus(); } @@ -210,13 +210,13 @@ public function saveAction() $tagModel->aggregate(); $this->getResponse()->setRedirect(Mage::getUrl('*/*/')); } - $message = ($message) ? $message : $this->__('You tag was successfully saved'); + $message = ($message) ? $message : Mage::helper('tag')->__('Your tag was successfully saved'); Mage::getSingleton('tag/session')->addSuccess($message); $this->_redirect('*/*/'); return; } catch (Exception $e) { Mage::getSingleton('tag/session')->addError( - $this->__('Unable to save your tag. Please, try again later.') + Mage::helper('tag')->__('Unable to save your tag. Please, try again later.') ); } } diff --git a/app/code/core/Mage/Tag/controllers/IndexController.php b/app/code/core/Mage/Tag/controllers/IndexController.php index 3196a253..d9eb3f48 100644 --- a/app/code/core/Mage/Tag/controllers/IndexController.php +++ b/app/code/core/Mage/Tag/controllers/IndexController.php @@ -39,7 +39,7 @@ public function saveAction() if(!Mage::getSingleton('customer/session')->authenticate($this)) { return; } - $tagName = (string) $this->getRequest()->getQuery('tagName'); + $tagName = (string) $this->getRequest()->getQuery('productTagName'); $productId = (int)$this->getRequest()->getParam('product'); if(strlen($tagName) && $productId) { @@ -47,7 +47,7 @@ public function saveAction() $product = Mage::getModel('catalog/product') ->load($productId); if(!$product->getId()){ - $session->addError($this->__('Unable to save tag(s)')); + $session->addError(Mage::helper('tag')->__('Unable to save tag(s)')); } else { try { $customerId = Mage::getSingleton('customer/session')->getCustomerId(); @@ -68,7 +68,7 @@ public function saveAction() $tagModel->loadByName($tagName); if ($tagModel->getId()) { $status = $tagModel->getStatus(); - $session->addNotice($this->__('Tag "%s" has already been added to the product' ,$tagName)); + $session->addNotice(Mage::helper('tag')->__('Tag "%s" has already been added to the product' ,$tagName)); } else { $status = $tagModel->getPendingStatus(); @@ -103,10 +103,10 @@ public function saveAction() } } if ($newCount > 0) { - $session->addSuccess($this->__('%s tag(s) have been accepted for moderation', $newCount)); + $session->addSuccess(Mage::helper('tag')->__('%s tag(s) have been accepted for moderation', $newCount)); } } catch (Exception $e) { - $session->addError($this->__('Unable to save tag(s)')); + $session->addError(Mage::helper('tag')->__('Unable to save tag(s)')); } } } diff --git a/app/code/core/Mage/Tag/etc/config.xml b/app/code/core/Mage/Tag/etc/config.xml index e3143310..7d8d837f 100644 --- a/app/code/core/Mage/Tag/etc/config.xml +++ b/app/code/core/Mage/Tag/etc/config.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Tag * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Tax/etc/config.xml b/app/code/core/Mage/Tax/etc/config.xml index 167be6b8..72ba9eea 100644 --- a/app/code/core/Mage/Tax/etc/config.xml +++ b/app/code/core/Mage/Tax/etc/config.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Tax * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Tax/etc/system.xml b/app/code/core/Mage/Tax/etc/system.xml index 1effaf1c..ac90135a 100644 --- a/app/code/core/Mage/Tax/etc/system.xml +++ b/app/code/core/Mage/Tax/etc/system.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_GiftMessage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Usa/Model/Shipping/Carrier/Dhl.php b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Dhl.php index 1771819b..03eee34c 100644 --- a/app/code/core/Mage/Usa/Model/Shipping/Carrier/Dhl.php +++ b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Dhl.php @@ -51,6 +51,18 @@ class Mage_Usa_Model_Shipping_Carrier_Dhl const SUCCESS_CODE = 203; + const ADDITIONAL_PROTECTION_ASSET = 'AP'; + const ADDITIONAL_PROTECTION_NOT_REQUIRED = 'NR'; + + const ADDITIONAL_PROTECTION_VALUE_CONFIG = 0; + const ADDITIONAL_PROTECTION_VALUE_SUBTOTAL = 1; + const ADDITIONAL_PROTECTION_VALUE_SUBTOTAL_WITH_DISCOUNT = 2; + + const ADDITIONAL_PROTECTION_ROUNDING_FLOOR = 0; + const ADDITIONAL_PROTECTION_ROUNDING_CEIL = 1; + const ADDITIONAL_PROTECTION_ROUNDING_ROUND = 2; + + public function collectRates(Mage_Shipping_Model_Rate_Request $request) { if (!$this->getConfigFlag('active')) { @@ -72,6 +84,8 @@ public function setRequest(Mage_Shipping_Model_Rate_Request $request) $r = new Varien_Object(); + $r->setStoreId($request->getStoreId()); + if ($request->getLimitMethod()) { $r->setService($request->getLimitMethod()); } @@ -258,18 +272,39 @@ protected function _setFreeMethodRequest($freeMethod) $r->setService($freeMethod); } +// protected function _getShipDate($includeSaturday=true) +// { +// $i = 0; +// $weekday = date('w'); +// /* +// * need to omit saturday and sunday +// * dhl will not work on sunday +// * 0 (for Sunday) through 6 (for Saturday) +// */ +// if (!$weekday || $weekday===0) $i += 1; +// elseif (!$includeSaturday && $weekday==6) $i += 2; +// return date('Y-m-d', strtotime("+$i day")); +// } - protected function _getShipDate($includeSaturday=true) + protected function _getShipDate($domestic=true) { - $i = 0; + if ($domestic) { + $days = explode(',', $this->getConfigData('shipment_days')); + } else { + $days = explode(',', $this->getConfigData('intl_shipment_days')); + } + + if (!$days) { + return date('Y-m-d'); + } + + $i=0; $weekday = date('w'); - /* - * need to omit saturday and sunday - * dhl will not work on sunday - * 0 (for Sunday) through 6 (for Saturday) - */ - if (!$weekday || $weekday===0) $i += 1; - elseif (!$includeSaturday && $weekday==6) $i += 2; + while(!in_array($weekday, $days) && $i < 10) { + $i++; + $weekday = date('w', strtotime("+$i day")); + } + return date('Y-m-d', strtotime("+$i day")); } @@ -299,7 +334,7 @@ protected function _getXmlQuotes() } else { $shipment = $xml->addChild('IntlShipment'); $shipKey=$r->getShippingIntlKey(); - $r->setShipDate($this->_getShipDate(false)); + $r->setShipDate($this->_getShipDate(false)); /* * For internation shippingment customsvalue must be posted */ @@ -310,19 +345,26 @@ protected function _getXmlQuotes() } else { foreach ($methods as $method) { $shipment = false; - $r->setService($method); + if (in_array($method, array_keys($this->getCode('special_express')))) { + $r->setService('E'); + $r->setExtendedService($this->getCode('special_express', $method)); + } else { + $r->setService($method); + $r->setExtendedService(null); + } if ($r->getDestCountryId() == self::USA_COUNTRY_ID && $method!=$internationcode) { $shipment = $xml->addChild('Shipment'); $shipKey=$r->getShippingKey(); $r->setShipDate($shipDate); }elseif($r->getDestCountryId() != self::USA_COUNTRY_ID && $method==$internationcode){ - $shipment = $xml->addChild('IntlShipment'); - $shipKey=$r->getShippingIntlKey(); - $r->setShipDate($this->_getShipDate(false)); - /* - * For internation shippingment customsvalue must be posted - */ - $shippingDuty = $shipment->addChild('Dutiable'); + $shipment = $xml->addChild('IntlShipment'); + $shipKey=$r->getShippingIntlKey(); + $r->setShipDate($this->_getShipDate(false)); + + /* + * For internation shippingment customsvalue must be posted + */ + $shippingDuty = $shipment->addChild('Dutiable'); $shippingDuty->addChild('DutiableFlag',($r->getDutiable()?'Y':'N')); $shippingDuty->addChild('CustomsValue',$r->getValue()); } @@ -361,6 +403,61 @@ protected function _getXmlQuotes() protected function _createShipmentXml($shipment,$shipKey) { $r = $this->_rawRequest; + + $store = Mage::app()->getStore($r->getStoreId()); + + $_haz = $this->getConfigFlag('hazardous_materials'); + + $_subtotal = $r->getValue(); + $_subtotalWithDiscount = $r->getValueWithDiscount(); + + $_width = max(0, (double) $this->getConfigData('default_width')); + $_height = max(0, (double) $this->getConfigData('default_height')); + $_length = max(0, (double) $this->getConfigData('default_length')); + + $_apEnabled = $this->getConfigFlag('additional_protection_enabled'); + $_apUseSubtotal = $this->getConfigData('additional_protection_use_subtotal'); + $_apConfigValue = max(0, (double) $this->getConfigData('additional_protection_value')); + $_apMinValue = max(0, (double) $this->getConfigData('additional_protection_min_value')); + $_apValueRounding = $this->getConfigData('additional_protection_rounding'); + + $apValue = 0; + $apCode = self::ADDITIONAL_PROTECTION_NOT_REQUIRED; + if ($_apEnabled) { + if ($_apMinValue <= $_subtotal) { + switch ($_apUseSubtotal) { + case self::ADDITIONAL_PROTECTION_VALUE_SUBTOTAL: + $apValue = $_subtotal; + break; + case self::ADDITIONAL_PROTECTION_VALUE_SUBTOTAL_WITH_DISCOUNT: + $apValue = $_subtotalWithDiscount; + break; + default: + case self::ADDITIONAL_PROTECTION_VALUE_CONFIG: + $apValue = $_apConfigValue; + break; + } + + if ($apValue) { + $apCode = self::ADDITIONAL_PROTECTION_ASSET; + + + switch ($_apValueRounding) { + case self::ADDITIONAL_PROTECTION_ROUNDING_CEIL: + $apValue = ceil($apValue); + break; + case self::ADDITIONAL_PROTECTION_ROUNDING_ROUND: + $apValue = round($apValue); + break; + default: + case self::ADDITIONAL_PROTECTION_ROUNDING_FLOOR: + $apValue = floor($apValue); + break; + } + } + } + } + $shipment->addAttribute('action', 'RateEstimate'); $shipment->addAttribute('version', '1.0'); @@ -374,6 +471,31 @@ protected function _createShipmentXml($shipment,$shipKey) $shipmentDetail->addChild('ShipmentType')->addChild('Code', $r->getShipmentType()); $shipmentDetail->addChild('Weight', $r->getWeight()); $shipmentDetail->addChild('ContentDesc', $r->getContentDesc()); + $additionalProtection = $shipmentDetail->addChild('AdditionalProtection'); + $additionalProtection->addChild('Code', $apCode); + $additionalProtection->addChild('Value', floor($apValue)); + + if ($_width && $_height && $_length) { + $dimensions = $shipmentDetail->addChild('Dimensions'); + $dimensions->addChild('Length', $_length); + $dimensions->addChild('Width', $_width); + $dimensions->addChild('Height', $_height); + } + + if ($_haz || ($r->getExtendedService())) { + $specialServices = $shipmentDetail->addChild('SpecialServices'); + } + + if ($_haz) { + $hazardousMaterials = $specialServices->addChild('SpecialService'); + $hazardousMaterials->addChild('Code', 'HAZ'); + } + + if ($r->getExtendedService()) { + $extendedService = $specialServices->addChild('SpecialService'); + $extendedService->addChild('Code', $r->getExtendedService()); + } + /* * R = Receiver (if receiver, need AccountNbr) @@ -384,6 +506,13 @@ protected function _createShipmentXml($shipment,$shipKey) $billing->addChild('Party')->addChild('Code', 'S'); $billing->addChild('DutyPaymentType',$r->getDutyPaymentType()); + /* + $cod = $billing->addChild('CODPayment'); + $cod->addChild('Code', 'P'); + $cod->addChild('Value', 100); + */ + + $receiverAddress = $shipment->addChild('Receiver')->addChild('Address'); $receiverAddress->addChild('Street', htmlspecialchars($r->getDestStreet()?$r->getDestStreet():'NA')); $receiverAddress->addChild('City', htmlspecialchars($r->getDestCity())); @@ -460,7 +589,9 @@ protected function _parseXmlResponse($response) $result->append($error); } - foreach($this->_dhlRates as $method => $data) { + foreach($this->_dhlRates as $rate) { + $method = $rate['service']; + $data = $rate['data']; $rate = Mage::getModel('shipping/rate_result_method'); $rate->setCarrier('dhl'); $rate->setCarrierTitle($this->getConfigData('title')); @@ -656,8 +787,8 @@ public function getCode($type, $code='') $codes = array( 'service'=>array( 'IE' => Mage::helper('usa')->__('International Express'), - //'E SAT' => Mage::helper('usa')->__('Express Saturday'), - //'E 10:30AM' => Mage::helper('usa')->__('Express 10:30 AM'), + 'E SAT' => Mage::helper('usa')->__('Express Saturday'), + 'E 10:30AM' => Mage::helper('usa')->__('Express 10:30 AM'), 'E' => Mage::helper('usa')->__('Express'), 'N' => Mage::helper('usa')->__('Next Afternoon'), 'S' => Mage::helper('usa')->__('Second Day Service'), @@ -680,6 +811,16 @@ public function getCode($type, $code='') '3' => Mage::helper('usa')->__('Third Party'), ), + 'special_express'=>array( + 'E SAT'=>'SAT', + 'E 10:30AM'=>'1030', + ), + + 'descr_to_service'=>array( + 'E SAT'=>'Saturday', + 'E 10:30AM'=>'10:30 A.M', + ), + ); @@ -722,6 +863,7 @@ protected function _addRate($shipXml) { $r = $this->_rawRequest; $services = $this->getCode('service'); + $regexps = $this->getCode('descr_to_service'); $desc=(string)$shipXml->EstimateDetail->ServiceLevelCommitment->Desc; $totalEstimate=(string)$shipXml->EstimateDetail->RateEstimate->TotalChargeEstimate; /* @@ -730,9 +872,18 @@ protected function _addRate($shipXml) */ if($desc && $totalEstimate){ $service = (string)$shipXml->EstimateDetail->Service->Code; + $description = (string)$shipXml->EstimateDetail->ServiceLevelCommitment->Desc; + if ($service == 'E') { + foreach ($regexps as $expService=>$exp) { + if (preg_match('/'.preg_quote($exp, '/').'/', $description)) { + $service = $expService; + } + } + } + $data['term'] = (isset($services[$service])?$services[$service]:$desc); $data['price_total'] = $this->getMethodPrice($totalEstimate, $service); - $this->_dhlRates[$service] = $data; + $this->_dhlRates[] = array('service'=>$service, 'data'=>$data); } } @@ -1018,4 +1169,22 @@ public function isStateProvinceRequired() { return true; } + + public function getAdditionalProtectionValueTypes() + { + return array( + self::ADDITIONAL_PROTECTION_VALUE_CONFIG=>Mage::helper('usa')->__('Configuration'), + self::ADDITIONAL_PROTECTION_VALUE_SUBTOTAL=>Mage::helper('usa')->__('Subtotal'), + self::ADDITIONAL_PROTECTION_VALUE_SUBTOTAL_WITH_DISCOUNT=>Mage::helper('usa')->__('Subtotal With Discount'), + ); + } + + public function getAdditionalProtectionRoundingTypes() + { + return array( + self::ADDITIONAL_PROTECTION_ROUNDING_FLOOR => Mage::helper('usa')->__('To lower'), + self::ADDITIONAL_PROTECTION_ROUNDING_CEIL => Mage::helper('usa')->__('To upper'), + self::ADDITIONAL_PROTECTION_ROUNDING_ROUND => Mage::helper('usa')->__('Round'), + ); + } } diff --git a/app/code/core/Mage/Usa/Model/Shipping/Carrier/Dhl/Source/Protection/Rounding.php b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Dhl/Source/Protection/Rounding.php new file mode 100644 index 00000000..1f5fc26b --- /dev/null +++ b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Dhl/Source/Protection/Rounding.php @@ -0,0 +1,39 @@ +getAdditionalProtectionRoundingTypes() as $k=>$v) { + $arr[] = array('value'=>$k, 'label'=>$v); + } + return $arr; + } +} diff --git a/app/code/core/Mage/Usa/Model/Shipping/Carrier/Dhl/Source/Protection/Value.php b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Dhl/Source/Protection/Value.php new file mode 100644 index 00000000..70b80149 --- /dev/null +++ b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Dhl/Source/Protection/Value.php @@ -0,0 +1,39 @@ +getAdditionalProtectionValueTypes() as $k=>$v) { + $arr[] = array('value'=>$k, 'label'=>$v); + } + return $arr; + } +} diff --git a/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex.php b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex.php index a89eeb09..9ae5f966 100644 --- a/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex.php +++ b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex.php @@ -287,7 +287,7 @@ protected function _getXmlQuotes() $declaredValue = $xml->addChild('DeclaredValue'); $declaredValue->addChild('Value', $r->getValue()); // $declaredValue->addChild('CurrencyCode', 'USD'); - $declaredValue->addChild('CurrencyCode', Mage::app()->getBaseCurrencyCode()); + $declaredValue->addChild('CurrencyCode', $this->getCurrencyCode()); if ($this->getConfigData('residence_delivery')) { $specialServices = $xml->addChild('SpecialServices'); @@ -541,6 +541,36 @@ public function getCode($type, $code='') } } + /** + * Return FeDex currency ISO code by Magento Base Currency Code + * + * @param none + * @return string 3-digit currency code + */ + public function getCurrencyCode () + { + $codes = array( + 'DOP' => 'RDD', // Dominican Peso + 'XCD' => 'ECD', // Caribbean Dollars + 'ARS' => 'ARN', // Argentina Peso + 'SGD' => 'SID', // Singapore Dollars + 'KRW' => 'WON', // South Korea Won + 'JMD' => 'JAD', // Jamaican Dollars + 'CHF' => 'SFR', // Swiss Francs + 'JPY' => 'JYE', // Japanese Yen + 'KWD' => 'KUD', // Kuwaiti Dinars + 'GBP' => 'UKL', // British Pounds + 'AED' => 'DHS', // UAE Dirhams + 'MXN' => 'NMP', // Mexican Pesos + 'UYU' => 'UYP', // Uruguay New Pesos + 'CLP' => 'CHP', // Chilean Pesos + 'TWD' => 'NTD', // New Taiwan Dollars + ); + $currencyCode = Mage::app()->getBaseCurrencyCode(); + return isset($codes[$currencyCode]) ? $codes[$currencyCode] : $currencyCode; + } + + public function getTracking($trackings) { $this->setTrackingReqeust(); diff --git a/app/code/core/Mage/Usa/Model/Shipping/Carrier/Usps.php b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Usps.php index 46e87dfb..e96e3971 100644 --- a/app/code/core/Mage/Usa/Model/Shipping/Carrier/Usps.php +++ b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Usps.php @@ -136,7 +136,7 @@ public function setRequest(Mage_Shipping_Model_Rate_Request $request) $weight = $this->getTotalNumOfBoxes($request->getPackageWeight()); $r->setWeightPounds(floor($weight)); - $r->setWeightOunces(floor(($weight-floor($weight))*16)); + $r->setWeightOunces(($weight-floor($weight))*16); if ($request->getFreeMethodWeight()!=$request->getPackageWeight()) { $r->setFreeMethodWeight($request->getFreeMethodWeight()); } @@ -383,9 +383,10 @@ public function getCode($type, $code='') 'Global Express Guaranteed Non-Document Rectangular' => 'EXPRESS', 'Global Express Guaranteed Non-Document Non-Rectangular' => 'EXPRESS', 'Express Mail International (EMS)' => 'EXPRESS', - 'Express Mail International (EMS) Flat Rate Envelope' => 'EXPRESS', + 'Express Mail International (EMS) Flat-Rate Envelope' => 'EXPRESS', 'Priority Mail International' => 'PRIORITY', - 'Priority Mail International Flat Rate Box' => 'PRIORITY', + 'Priority Mail International Flat-Rate Box' => 'PRIORITY', + 'Priority Mail International Large Flat-Rate Box' => 'PRIORITY' ), 'first_class_mail_type'=>array( @@ -396,8 +397,8 @@ public function getCode($type, $code='') 'container'=>array( 'VARIABLE' => Mage::helper('usa')->__('Variable'), - 'FLAT RATE BOX' => Mage::helper('usa')->__('Flat Rate Box'), - 'FLAT RATE ENVELOPE' => Mage::helper('usa')->__('Flat Rate Envelope'), + 'FLAT RATE BOX' => Mage::helper('usa')->__('Flat-Rate Box'), + 'FLAT RATE ENVELOPE' => Mage::helper('usa')->__('Flat-Rate Envelope'), 'RECTANGULAR' => Mage::helper('usa')->__('Rectangular'), 'NONRECTANGULAR' => Mage::helper('usa')->__('Non-rectangular'), ), diff --git a/app/code/core/Mage/Usa/etc/config.xml b/app/code/core/Mage/Usa/etc/config.xml index 4f05f3aa..d3c4694d 100644 --- a/app/code/core/Mage/Usa/etc/config.xml +++ b/app/code/core/Mage/Usa/etc/config.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Usa * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> @@ -107,7 +107,7 @@ 0 0 - E,N,S,G,IE + E,N,S,G,IE,E SAT,E 10:30AM Big Box R @@ -124,6 +124,9 @@ 150 F O + 1,2,3,4,5,6 + 1,2,3,4,5 + 0 @@ -173,14 +176,14 @@ 0 0 - First-Class,First-Class Mail Letter,First-Class Mail Flat,First-Class Mail Parcel,First-Class Mail International,Express Mail,Express Mail PO to PO,Priority Mail,Parcel Post,Express Mail Flat-Rate Envelope,Priority Mail Flat-Rate Box,Bound Printed Matter,Media Mail,Library Mail,Priority Mail Flat-Rate Envelope,Global Express Guaranteed,Global Express Guaranteed Non-Document Rectangular,Global Express Guaranteed Non-Document Non-Rectangular,Express Mail International (EMS),Express Mail International (EMS) Flat Rate Envelope,Priority Mail International,Priority Mail International Flat Rate Box + Bound Printed Matter,Express Mail,Express Mail Flat-Rate Envelope,Express Mail Flat-Rate Envelope Hold For Pickup,Express Mail Flat-Rate Envelope Sunday/Holiday Guarantee,Express Mail Hold For Pickup,Express Mail International (EMS),Express Mail International (EMS) Flat-Rate Envelope,Express Mail PO to PO,Express Mail Sunday/Holiday Guarantee,First Class Mail International Large Envelope,First Class Mail International Letters,First Class Mail International Package,First-Class,First-Class Mail,First-Class Mail Flat,First-Class Mail International,First-Class Mail Letter,First-Class Mail Parcel,Global Express Guaranteed,Global Express Guaranteed Non-Document Non-Rectangular,Global Express Guaranteed Non-Document Rectangular,Library Mail,Media Mail,Parcel Post,Priority Mail,Priority Mail Flat-Rate Box,Priority Mail Flat-Rate Envelope,Priority Mail International,Priority Mail International Flat-Rate Box,Priority Mail International Flat-Rate Envelope,Priority Mail International Large Flat-Rate Box,Priority Mail Large Flat-Rate Box,USPS GXG Envelopes VARIABLE http://production.shippingapis.com/ShippingAPI.dll true - First-Class,First-Class Mail Letter,First-Class Mail Flat,First-Class Mail Parcel,First-Class Mail International,Express Mail,Express Mail PO to PO,Priority Mail,Parcel Post,Express Mail Flat-Rate Envelope,Priority Mail Flat-Rate Box,Bound Printed Matter,Media Mail,Library Mail,Priority Mail Flat-Rate Envelope,Global Express Guaranteed,Global Express Guaranteed Non-Document Rectangular,Global Express Guaranteed Non-Document Non-Rectangular,Express Mail International (EMS),Express Mail International (EMS) Flat Rate Envelope,Priority Mail International,Priority Mail International Flat Rate Box + Bound Printed Matter,Express Mail,Express Mail Flat-Rate Envelope,Express Mail Flat-Rate Envelope Hold For Pickup,Express Mail Flat-Rate Envelope Sunday/Holiday Guarantee,Express Mail Hold For Pickup,Express Mail International (EMS),Express Mail International (EMS) Flat-Rate Envelope,Express Mail PO to PO,Express Mail Sunday/Holiday Guarantee,First Class Mail International Large Envelope,First Class Mail International Letters,First Class Mail International Package,First-Class,First-Class Mail,First-Class Mail Flat,First-Class Mail International,First-Class Mail Letter,First-Class Mail Parcel,Global Express Guaranteed,Global Express Guaranteed Non-Document Non-Rectangular,Global Express Guaranteed Non-Document Rectangular,Library Mail,Media Mail,Parcel Post,Priority Mail,Priority Mail Flat-Rate Box,Priority Mail Flat-Rate Envelope,Priority Mail International,Priority Mail International Flat-Rate Box,Priority Mail International Flat-Rate Envelope,Priority Mail International Large Flat-Rate Box,Priority Mail Large Flat-Rate Box,USPS GXG Envelopes usa/shipping_carrier_usps REGULAR United States Postal Service diff --git a/app/code/core/Mage/Usa/etc/system.xml b/app/code/core/Mage/Usa/etc/system.xml index d81c53e8..f836f7fb 100644 --- a/app/code/core/Mage/Usa/etc/system.xml +++ b/app/code/core/Mage/Usa/etc/system.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Usa * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> @@ -79,7 +79,7 @@ select adminhtml/system_config_source_enabledisable - 21 + 121 1 1 1 @@ -87,7 +87,7 @@ text - 22 + 122 1 1 1 @@ -115,7 +115,7 @@ select free-method usa/shipping_carrier_dhl_source_freemethod - 20 + 120 1 1 1 @@ -210,7 +210,7 @@ text - 100 + 200 1 1 1 @@ -226,7 +226,7 @@ select - 90 + 190 shipping-applicable-country adminhtml/system_config_source_shipping_allspecificcountries 1 @@ -236,7 +236,7 @@ multiselect - 91 + 191 adminhtml/system_config_source_country 1 1 @@ -259,6 +259,108 @@ 1 1 + + + + select + adminhtml/system_config_source_yesno + 130 + 1 + 1 + 1 + + + + text + 131 + 1 + 1 + 1 + + + + select + usa/shipping_carrier_dhl_source_protection_value + 132 + 1 + 1 + 1 + + + + Used only when 'Additional Protection Value' is set to 'Configuration'. Can contain only numeric amount. + text + 133 + 1 + 1 + 1 + + + + + select + usa/shipping_carrier_dhl_source_protection_rounding + 134 + 1 + 1 + 1 + + + + + select + adminhtml/system_config_source_yesno + 135 + 1 + 1 + 1 + + + + + text + 136 + 1 + 1 + 1 + + + + text + 137 + 1 + 1 + 1 + + + + text + 138 + 1 + 1 + 1 + + + + + multiselect + adminhtml/system_config_source_locale_weekdays + 139 + 1 + 1 + 1 + + + + + multiselect + adminhtml/system_config_source_locale_weekdays + 140 + 1 + 1 + 1 + + @@ -269,7 +371,7 @@ 1 1 - + text adminhtml/system_config_backend_encrypted @@ -277,6 +379,7 @@ 1 1 1 + Please make sure to use only digits here. No dashes are allowed. diff --git a/app/code/core/Mage/Wishlist/Block/Share/Email/Items.php b/app/code/core/Mage/Wishlist/Block/Share/Email/Items.php index 93b6c352..d235ab0c 100644 --- a/app/code/core/Mage/Wishlist/Block/Share/Email/Items.php +++ b/app/code/core/Mage/Wishlist/Block/Share/Email/Items.php @@ -55,7 +55,10 @@ public function getWishlist() ->addAttributeToSelect('image') ->addAttributeToSelect('small_image') //->addAttributeToFilter('store_id', array('in'=>Mage::registry('wishlist')->getSharedStoreIds())) - ->addStoreFilter() + ->addStoreFilter(); + Mage::getSingleton('catalog/product_visibility') + ->addVisibleInSiteFilterToCollection(Mage::registry('wishlist')->getProductCollection()); + Mage::registry('wishlist')->getProductCollection() ->load(); $this->_wishlistLoaded = true; @@ -66,12 +69,12 @@ public function getWishlist() public function getEscapedDescription(Varien_Object $item) { - return nl2br($this->htmlEscape($item->getDescription())); + return nl2br($this->htmlEscape($item->getWishlistItemDescription())); } public function hasDescription(Varien_Object $item) { - return trim($item->getDescription())!=''; + return trim($item->getWishlistItemDescription())!=''; } public function getFormatedDate($date) diff --git a/app/code/core/Mage/Wishlist/etc/config.xml b/app/code/core/Mage/Wishlist/etc/config.xml index f61a9215..86ef459f 100644 --- a/app/code/core/Mage/Wishlist/etc/config.xml +++ b/app/code/core/Mage/Wishlist/etc/config.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,13 +22,13 @@ * @category Mage * @package Mage_Wishlist * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - 0.7.3 + 0.7.4 diff --git a/app/code/core/Mage/Wishlist/etc/system.xml b/app/code/core/Mage/Wishlist/etc/system.xml index 9d6341ae..bb8e9756 100644 --- a/app/code/core/Mage/Wishlist/etc/system.xml +++ b/app/code/core/Mage/Wishlist/etc/system.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category Mage * @package Mage_Wishlist * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Wishlist/sql/wishlist_setup/mysql4-upgrade-0.7.2-0.7.4.php b/app/code/core/Mage/Wishlist/sql/wishlist_setup/mysql4-upgrade-0.7.2-0.7.4.php new file mode 100644 index 00000000..60a65ee2 --- /dev/null +++ b/app/code/core/Mage/Wishlist/sql/wishlist_setup/mysql4-upgrade-0.7.2-0.7.4.php @@ -0,0 +1,53 @@ + + */ + +$installer = $this; +/* @var $installer Mage_Core_Model_Resource_Setup */ + +$installer->startSetup(); + +$tableWishlist = $this->getTable('wishlist'); +$tableCustomers = $this->getTable('customer/entity'); + +$installer->run("DELETE FROM {$tableWishlist} WHERE customer_id NOT IN (SELECT entity_id FROM {$tableCustomers})"); + +$installer->run(" +ALTER TABLE {$tableWishlist} + ADD CONSTRAINT `FK_CUSTOMER` FOREIGN KEY (`customer_id`) + REFERENCES {$tableCustomers} (`entity_id`) + ON UPDATE CASCADE + ON DELETE CASCADE; +"); + +$installer->endSetup(); diff --git a/app/design/adminhtml/default/default/layout/bundle.xml b/app/design/adminhtml/default/default/layout/bundle.xml index b3fb2562..354c8b14 100644 --- a/app/design/adminhtml/default/default/layout/bundle.xml +++ b/app/design/adminhtml/default/default/layout/bundle.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage_Bundle * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> @@ -32,10 +32,16 @@ Layout handle for budle products --> - - + + + + + bundle_itemsbundle/adminhtml_catalog_product_edit_tab_bundle + bundle_itemscustomer_options diff --git a/app/design/adminhtml/default/default/layout/catalog.xml b/app/design/adminhtml/default/default/layout/catalog.xml index 9e097a59..aa9b1182 100644 --- a/app/design/adminhtml/default/default/layout/catalog.xml +++ b/app/design/adminhtml/default/default/layout/catalog.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> @@ -35,7 +35,7 @@ - + @@ -48,7 +48,7 @@ - + @@ -63,9 +63,8 @@ Layout handle for grouped products --> - - - + + superadminhtml/catalog_product_edit_tab_super_group @@ -73,11 +72,18 @@ Layout handle for grouped products Layout handle for configurable products --> - + + + + + + configurableadminhtml/catalog_product_edit_tab_super_config + configurablecustomer_options + diff --git a/app/design/adminhtml/default/default/layout/googleoptimizer.xml b/app/design/adminhtml/default/default/layout/googleoptimizer.xml new file mode 100644 index 00000000..b917096f --- /dev/null +++ b/app/design/adminhtml/default/default/layout/googleoptimizer.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + googleoptimizertab_googleoptimizer + + + + + + + + + + googleoptimizertab_googleoptimizer + + + + + + + diff --git a/app/design/adminhtml/default/default/layout/main.xml b/app/design/adminhtml/default/default/layout/main.xml index 66d3f810..0907aa98 100644 --- a/app/design/adminhtml/default/default/layout/main.xml +++ b/app/design/adminhtml/default/default/layout/main.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ @@ -68,7 +68,6 @@ Default layout, loads most of the pages - @@ -86,7 +85,6 @@ Default layout, loads most of the pages js_csscalendar/calendar-win2k-1.css jscalendar/calendar.js - jscalendar/lang/calendar-en.js jscalendar/calendar-setup.js jsextjs/ext-tree.jscan_load_ext_js @@ -95,6 +93,8 @@ Default layout, loads most of the pages js_cssextjs/resources/css/ytheme-magento.csscan_load_ext_js jsmage/adminhtml/rules.jscan_load_rules_js + + diff --git a/app/design/adminhtml/default/default/layout/rss.xml b/app/design/adminhtml/default/default/layout/rss.xml new file mode 100644 index 00000000..37c9789f --- /dev/null +++ b/app/design/adminhtml/default/default/layout/rss.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + diff --git a/app/design/adminhtml/default/default/layout/sales.xml b/app/design/adminhtml/default/default/layout/sales.xml index 598bb9dc..69d70737 100644 --- a/app/design/adminhtml/default/default/layout/sales.xml +++ b/app/design/adminhtml/default/default/layout/sales.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> @@ -111,7 +111,9 @@ qtyadminhtml/sales_items_column_qty nameadminhtml/sales_items_column_name - + + invoice + @@ -163,7 +165,9 @@ nameadminhtml/sales_items_column_name - + + shipment + @@ -216,7 +220,9 @@ qtyadminhtml/sales_items_column_qty nameadminhtml/sales_items_column_name - + + creditmemo + diff --git a/app/design/adminhtml/default/default/template/api/roleinfo.phtml b/app/design/adminhtml/default/default/template/api/roleinfo.phtml index fb8c311e..0b067f1a 100644 --- a/app/design/adminhtml/default/default/template/api/roleinfo.phtml +++ b/app/design/adminhtml/default/default/template/api/roleinfo.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
      diff --git a/app/design/adminhtml/default/default/template/api/roles.phtml b/app/design/adminhtml/default/default/template/api/roles.phtml index f298d712..6335d6d4 100644 --- a/app/design/adminhtml/default/default/template/api/roles.phtml +++ b/app/design/adminhtml/default/default/template/api/roles.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
      diff --git a/app/design/adminhtml/default/default/template/api/rolesedit.phtml b/app/design/adminhtml/default/default/template/api/rolesedit.phtml index 4e1b8a1e..2f5e2304 100644 --- a/app/design/adminhtml/default/default/template/api/rolesedit.phtml +++ b/app/design/adminhtml/default/default/template/api/rolesedit.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
      diff --git a/app/design/adminhtml/default/default/template/api/rolesusers.phtml b/app/design/adminhtml/default/default/template/api/rolesusers.phtml index 7e1e37bb..b7e700bc 100644 --- a/app/design/adminhtml/default/default/template/api/rolesusers.phtml +++ b/app/design/adminhtml/default/default/template/api/rolesusers.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>

      __('Role Users') ?>

      diff --git a/app/design/adminhtml/default/default/template/api/userinfo.phtml b/app/design/adminhtml/default/default/template/api/userinfo.phtml index ab6e5d47..20f77506 100644 --- a/app/design/adminhtml/default/default/template/api/userinfo.phtml +++ b/app/design/adminhtml/default/default/template/api/userinfo.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
      diff --git a/app/design/adminhtml/default/default/template/api/usernroles.phtml b/app/design/adminhtml/default/default/template/api/usernroles.phtml index 86167d87..eed389cf 100644 --- a/app/design/adminhtml/default/default/template/api/usernroles.phtml +++ b/app/design/adminhtml/default/default/template/api/usernroles.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
      diff --git a/app/design/adminhtml/default/default/template/api/userroles.phtml b/app/design/adminhtml/default/default/template/api/userroles.phtml index 19b186d5..f60979d5 100644 --- a/app/design/adminhtml/default/default/template/api/userroles.phtml +++ b/app/design/adminhtml/default/default/template/api/userroles.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
      diff --git a/app/design/adminhtml/default/default/template/api/users.phtml b/app/design/adminhtml/default/default/template/api/users.phtml index c8255c6c..3db7c2d8 100644 --- a/app/design/adminhtml/default/default/template/api/users.phtml +++ b/app/design/adminhtml/default/default/template/api/users.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
      diff --git a/app/design/adminhtml/default/default/template/backup/left.phtml b/app/design/adminhtml/default/default/template/backup/left.phtml index b8182ec1..7d939990 100644 --- a/app/design/adminhtml/default/default/template/backup/left.phtml +++ b/app/design/adminhtml/default/default/template/backup/left.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>

      __('Create Backup') ?>

      diff --git a/app/design/adminhtml/default/default/template/backup/list.phtml b/app/design/adminhtml/default/default/template/backup/list.phtml index 9cae2d32..b4f28da7 100644 --- a/app/design/adminhtml/default/default/template/backup/list.phtml +++ b/app/design/adminhtml/default/default/template/backup/list.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
      diff --git a/app/design/adminhtml/default/default/template/bundle/product/edit/bundle.phtml b/app/design/adminhtml/default/default/template/bundle/product/edit/bundle.phtml index 930a91f4..ccef589a 100644 --- a/app/design/adminhtml/default/default/template/bundle/product/edit/bundle.phtml +++ b/app/design/adminhtml/default/default/template/bundle/product/edit/bundle.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage_Bundle * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> \ No newline at end of file + +getChildHtml('googleoptimizer_js') ?> \ No newline at end of file diff --git a/app/design/adminhtml/default/default/template/catalog/category/edit/form.phtml b/app/design/adminhtml/default/default/template/catalog/category/edit/form.phtml index c6789b7a..763eb174 100644 --- a/app/design/adminhtml/default/default/template/catalog/category/edit/form.phtml +++ b/app/design/adminhtml/default/default/template/catalog/category/edit/form.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,14 +21,14 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
      - + - + diff --git a/app/design/adminhtml/default/default/template/catalog/form/renderer/googleoptimizer/import.phtml b/app/design/adminhtml/default/default/template/catalog/form/renderer/googleoptimizer/import.phtml new file mode 100644 index 00000000..3b165b93 --- /dev/null +++ b/app/design/adminhtml/default/default/template/catalog/form/renderer/googleoptimizer/import.phtml @@ -0,0 +1,55 @@ + +getElement()->getDisabled()) { + $_disabled = ' disabled="disabled"'; + } +?> + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/design/adminhtml/default/default/template/catalog/product.phtml b/app/design/adminhtml/default/default/template/catalog/product.phtml index 78d9238b..1d0efc1f 100644 --- a/app/design/adminhtml/default/default/template/catalog/product.phtml +++ b/app/design/adminhtml/default/default/template/catalog/product.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
      diff --git a/app/design/adminhtml/default/default/template/catalog/product/attribute/js.phtml b/app/design/adminhtml/default/default/template/catalog/product/attribute/js.phtml index 530d2a79..dbd85990 100644 --- a/app/design/adminhtml/default/default/template/catalog/product/attribute/js.phtml +++ b/app/design/adminhtml/default/default/template/catalog/product/attribute/js.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,10 +21,14 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/adminhtml/default/default/template/catalog/product/edit/options.phtml b/app/design/adminhtml/default/default/template/catalog/product/edit/options.phtml index ed598a3e..d299f1fd 100644 --- a/app/design/adminhtml/default/default/template/catalog/product/edit/options.phtml +++ b/app/design/adminhtml/default/default/template/catalog/product/edit/options.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
      diff --git a/app/design/adminhtml/default/default/template/catalog/product/edit/options/option.phtml b/app/design/adminhtml/default/default/template/catalog/product/edit/options/option.phtml index b079d9f3..e1b0dd55 100644 --- a/app/design/adminhtml/default/default/template/catalog/product/edit/options/option.phtml +++ b/app/design/adminhtml/default/default/template/catalog/product/edit/options/option.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getTemplatesHtml() ?> @@ -182,7 +182,7 @@ var productOptionType = { $(element.readAttribute('id')+'_'+group).show(); } else { - template = '
      '+template+'
      '; + template = '
      '+template+'
      getFieldId() ?>_'+data.id+'_previous_group').value = group; - template = '
      '+template+'
      '; + template = '
      '+template+'
      '; this.secondTemplate = new Template(template, this.templateSyntax); @@ -310,7 +310,6 @@ if($('option_panel')){ $('option_panel').remove(); } -//!!!!!!!! productOption.bindRemoveButtons(); if($('getAddButtonId() ?>')){ diff --git a/app/design/adminhtml/default/default/template/catalog/product/edit/options/type/date.phtml b/app/design/adminhtml/default/default/template/catalog/product/edit/options/type/date.phtml index 90f3b596..2c273cb7 100644 --- a/app/design/adminhtml/default/default/template/catalog/product/edit/options/type/date.phtml +++ b/app/design/adminhtml/default/default/template/catalog/product/edit/options/type/date.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> \ No newline at end of file diff --git a/app/design/adminhtml/default/default/template/googlebase/types/edit/attributes.phtml b/app/design/adminhtml/default/default/template/googlebase/types/edit/attributes.phtml new file mode 100644 index 00000000..97fc18d5 --- /dev/null +++ b/app/design/adminhtml/default/default/template/googlebase/types/edit/attributes.phtml @@ -0,0 +1,125 @@ + + +getAttributeSetSelected() ): ?> + + +
      +
      +

      __('Attributes') ?>

      +
      getAddButtonHtml() ?>
      +
      + +
      +
      +
      +
      + +getAttributesData()): ?> + + + + + __("Please, select Attribute Set and Google Item Type to load attributes") ?> + diff --git a/app/design/adminhtml/default/default/template/googleoptimizer/cms/edit/renderer/conversion.phtml b/app/design/adminhtml/default/default/template/googleoptimizer/cms/edit/renderer/conversion.phtml new file mode 100644 index 00000000..aab80cc5 --- /dev/null +++ b/app/design/adminhtml/default/default/template/googleoptimizer/cms/edit/renderer/conversion.phtml @@ -0,0 +1,72 @@ + +getElement()->getDisabled()) { + $_disabled = ' disabled="disabled"'; + } +?> +getStoreViews() as $_store) { +?> +
      + + + + + + + + \ No newline at end of file diff --git a/app/design/adminhtml/default/default/template/googleoptimizer/js.phtml b/app/design/adminhtml/default/default/template/googleoptimizer/js.phtml new file mode 100644 index 00000000..22ab0be9 --- /dev/null +++ b/app/design/adminhtml/default/default/template/googleoptimizer/js.phtml @@ -0,0 +1,177 @@ + + \ No newline at end of file diff --git a/app/design/adminhtml/default/default/template/ideal/advanced/info.phtml b/app/design/adminhtml/default/default/template/ideal/advanced/info.phtml index dc82e06e..a6e27171 100644 --- a/app/design/adminhtml/default/default/template/ideal/advanced/info.phtml +++ b/app/design/adminhtml/default/default/template/ideal/advanced/info.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage_Ideal * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getInfo()): ?> diff --git a/app/design/adminhtml/default/default/template/ideal/advanced/pdf/info.phtml b/app/design/adminhtml/default/default/template/ideal/advanced/pdf/info.phtml index 34d52dbe..3b6f17e4 100644 --- a/app/design/adminhtml/default/default/template/ideal/advanced/pdf/info.phtml +++ b/app/design/adminhtml/default/default/template/ideal/advanced/pdf/info.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage_Ideal * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getMethod()->getTitle() ?> diff --git a/app/design/adminhtml/default/default/template/login.phtml b/app/design/adminhtml/default/default/template/login.phtml index 91992717..17c74bb2 100644 --- a/app/design/adminhtml/default/default/template/login.phtml +++ b/app/design/adminhtml/default/default/template/login.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/adminhtml/default/default/template/media/editor.phtml b/app/design/adminhtml/default/default/template/media/editor.phtml index d8428cd0..f5b88512 100644 --- a/app/design/adminhtml/default/default/template/media/editor.phtml +++ b/app/design/adminhtml/default/default/template/media/editor.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> helper('adminhtml/media_js')->includeScript('lib/flex.js') ?> diff --git a/app/design/adminhtml/default/default/template/media/uploader.phtml b/app/design/adminhtml/default/default/template/media/uploader.phtml index acdef33d..9faadfd6 100644 --- a/app/design/adminhtml/default/default/template/media/uploader.phtml +++ b/app/design/adminhtml/default/default/template/media/uploader.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,16 +21,19 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> helper('adminhtml/media_js')->includeScript('lib/flex.js') ?> helper('adminhtml/media_js')->includeScript('mage/adminhtml/flexuploader.js') ?> helper('adminhtml/media_js')->getTranslatorScript() ?> + +
      - getBrowseButtonHtml() ?> - getUploadButtonHtml() ?> + + getBrowseButtonHtml() */ ?> + getUploadButtonHtml() */ ?> @@ -49,5 +52,7 @@
      \ No newline at end of file diff --git a/app/design/adminhtml/default/default/template/newsletter/problem/list.phtml b/app/design/adminhtml/default/default/template/newsletter/problem/list.phtml index 4b1d6b2a..2c537697 100644 --- a/app/design/adminhtml/default/default/template/newsletter/problem/list.phtml +++ b/app/design/adminhtml/default/default/template/newsletter/problem/list.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
      diff --git a/app/design/adminhtml/default/default/template/newsletter/queue/edit.phtml b/app/design/adminhtml/default/default/template/newsletter/queue/edit.phtml index ce019175..fc6ff818 100644 --- a/app/design/adminhtml/default/default/template/newsletter/queue/edit.phtml +++ b/app/design/adminhtml/default/default/template/newsletter/queue/edit.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
      diff --git a/app/design/adminhtml/default/default/template/newsletter/queue/list.phtml b/app/design/adminhtml/default/default/template/newsletter/queue/list.phtml index 98350160..9a00a4fd 100644 --- a/app/design/adminhtml/default/default/template/newsletter/queue/list.phtml +++ b/app/design/adminhtml/default/default/template/newsletter/queue/list.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
      diff --git a/app/design/adminhtml/default/default/template/newsletter/subscriber/list.phtml b/app/design/adminhtml/default/default/template/newsletter/subscriber/list.phtml index 4a083852..6b95632e 100644 --- a/app/design/adminhtml/default/default/template/newsletter/subscriber/list.phtml +++ b/app/design/adminhtml/default/default/template/newsletter/subscriber/list.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
      diff --git a/app/design/adminhtml/default/default/template/newsletter/template/edit.phtml b/app/design/adminhtml/default/default/template/newsletter/template/edit.phtml index c2514122..960b5934 100644 --- a/app/design/adminhtml/default/default/template/newsletter/template/edit.phtml +++ b/app/design/adminhtml/default/default/template/newsletter/template/edit.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
      diff --git a/app/design/adminhtml/default/default/template/newsletter/template/list.phtml b/app/design/adminhtml/default/default/template/newsletter/template/list.phtml index b0c526b5..2418871a 100644 --- a/app/design/adminhtml/default/default/template/newsletter/template/list.phtml +++ b/app/design/adminhtml/default/default/template/newsletter/template/list.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
      diff --git a/app/design/adminhtml/default/default/template/newsletter/template/preview.phtml b/app/design/adminhtml/default/default/template/newsletter/template/preview.phtml index 6085a571..81827ac7 100644 --- a/app/design/adminhtml/default/default/template/newsletter/template/preview.phtml +++ b/app/design/adminhtml/default/default/template/newsletter/template/preview.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/adminhtml/default/default/template/notification/toolbar.phtml b/app/design/adminhtml/default/default/template/notification/toolbar.phtml index 96c135ee..a67b57cf 100644 --- a/app/design/adminhtml/default/default/template/notification/toolbar.phtml +++ b/app/design/adminhtml/default/default/template/notification/toolbar.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category Mage * @package design_default * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> isShow()): ?> diff --git a/app/design/adminhtml/default/default/template/notification/window.phtml b/app/design/adminhtml/default/default/template/notification/window.phtml index 4bfab50a..0f2983e4 100644 --- a/app/design/adminhtml/default/default/template/notification/window.phtml +++ b/app/design/adminhtml/default/default/template/notification/window.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category Mage * @package design_default * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>

      diff --git a/app/design/adminhtml/default/default/template/page/head.phtml b/app/design/adminhtml/default/default/template/page/head.phtml index 7d13c80e..3025e3a7 100644 --- a/app/design/adminhtml/default/default/template/page/head.phtml +++ b/app/design/adminhtml/default/default/template/page/head.phtml @@ -27,3 +27,4 @@ helper('core/js')->getTranslatorScript() ?> +getChildHtml(''); \ No newline at end of file diff --git a/app/design/adminhtml/default/default/template/page/header.phtml b/app/design/adminhtml/default/default/template/page/header.phtml index f3739d7d..1755a48d 100644 --- a/app/design/adminhtml/default/default/template/page/header.phtml +++ b/app/design/adminhtml/default/default/template/page/header.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>

      diff --git a/app/design/adminhtml/default/default/template/page/js/calendar.phtml b/app/design/adminhtml/default/default/template/page/js/calendar.phtml new file mode 100644 index 00000000..8a203107 --- /dev/null +++ b/app/design/adminhtml/default/default/template/page/js/calendar.phtml @@ -0,0 +1,72 @@ + + + + + diff --git a/app/design/adminhtml/default/default/template/page/js/translate.phtml b/app/design/adminhtml/default/default/template/page/js/translate.phtml index 39400828..fe5ca97f 100644 --- a/app/design/adminhtml/default/default/template/page/js/translate.phtml +++ b/app/design/adminhtml/default/default/template/page/js/translate.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category Mage * @package Mage_Page * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ $_data = array( diff --git a/app/design/adminhtml/default/default/template/page/menu.phtml b/app/design/adminhtml/default/default/template/page/menu.phtml index cc84162d..aa650687 100644 --- a/app/design/adminhtml/default/default/template/page/menu.phtml +++ b/app/design/adminhtml/default/default/template/page/menu.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/adminhtml/default/default/template/paybox/adminhtml/cart/type/select.phtml b/app/design/adminhtml/default/default/template/paybox/adminhtml/cart/type/select.phtml index 40f34a89..2b4f54da 100644 --- a/app/design/adminhtml/default/default/template/paybox/adminhtml/cart/type/select.phtml +++ b/app/design/adminhtml/default/default/template/paybox/adminhtml/cart/type/select.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage_Paybox * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> __("Rating isn't Available") ?> diff --git a/app/design/adminhtml/default/default/template/rating/options.phtml b/app/design/adminhtml/default/default/template/rating/options.phtml index 8cbf8331..1796e01d 100644 --- a/app/design/adminhtml/default/default/template/rating/options.phtml +++ b/app/design/adminhtml/default/default/template/rating/options.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,11 +21,11 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -
      -

      __('Assigned Options') ?>

      +
      +

      __('Assigned Options') ?>

      diff --git a/app/design/adminhtml/default/default/template/rating/stars/detailed.phtml b/app/design/adminhtml/default/default/template/rating/stars/detailed.phtml index 058eace0..e3ab57b0 100644 --- a/app/design/adminhtml/default/default/template/rating/stars/detailed.phtml +++ b/app/design/adminhtml/default/default/template/rating/stars/detailed.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getRating() && $this->getRating()->getSize()): ?> diff --git a/app/design/adminhtml/default/default/template/rating/stars/summary.phtml b/app/design/adminhtml/default/default/template/rating/stars/summary.phtml index bc73c187..c84b4fbd 100644 --- a/app/design/adminhtml/default/default/template/rating/stars/summary.phtml +++ b/app/design/adminhtml/default/default/template/rating/stars/summary.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,12 +21,12 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getRatingSummary()->getCount()): ?>
      -
      +
      __("Rating isn't Available") ?> diff --git a/app/design/adminhtml/default/default/template/report/grid.phtml b/app/design/adminhtml/default/default/template/report/grid.phtml index 8a6cefb5..fbee31d4 100644 --- a/app/design/adminhtml/default/default/template/report/grid.phtml +++ b/app/design/adminhtml/default/default/template/report/grid.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> isShow()): ?> diff --git a/app/design/adminhtml/default/default/template/report/wishlist.phtml b/app/design/adminhtml/default/default/template/report/wishlist.phtml index 81209ab6..ee1de85c 100644 --- a/app/design/adminhtml/default/default/template/report/wishlist.phtml +++ b/app/design/adminhtml/default/default/template/report/wishlist.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
      diff --git a/app/design/adminhtml/default/default/template/review/add.phtml b/app/design/adminhtml/default/default/template/review/add.phtml index 2c5d4ddd..784c92a1 100644 --- a/app/design/adminhtml/default/default/template/review/add.phtml +++ b/app/design/adminhtml/default/default/template/review/add.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
      diff --git a/app/design/adminhtml/default/default/template/sales/items/column/name.phtml b/app/design/adminhtml/default/default/template/sales/items/column/name.phtml index dffd9164..1822c3d5 100644 --- a/app/design/adminhtml/default/default/template/sales/items/column/name.phtml +++ b/app/design/adminhtml/default/default/template/sales/items/column/name.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,12 +21,18 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> + + getItem()): ?>
      getName() ?>
      -
      helper('sales')->__('SKU') ?>: getSku() ?>
      +
      helper('sales')->__('SKU') ?>: ', Mage::helper('catalog')->splitSku($this->getSku())); ?>
      getOrderOptions()): ?>
      getOrderOptions() as $_option): ?> diff --git a/app/design/adminhtml/default/default/template/sales/items/column/qty.phtml b/app/design/adminhtml/default/default/template/sales/items/column/qty.phtml index b1376013..b5181d03 100644 --- a/app/design/adminhtml/default/default/template/sales/items/column/qty.phtml +++ b/app/design/adminhtml/default/default/template/sales/items/column/qty.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getItem()): ?> diff --git a/app/design/adminhtml/default/default/template/sales/items/renderer/default.phtml b/app/design/adminhtml/default/default/template/sales/items/renderer/default.phtml index cb5d49c3..a2284959 100644 --- a/app/design/adminhtml/default/default/template/sales/items/renderer/default.phtml +++ b/app/design/adminhtml/default/default/template/sales/items/renderer/default.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,12 +21,12 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getItem()->getName() ?> -
      helper('sales')->__('SKU') ?>: getItem()->getSku() ?>
      +
      helper('sales')->__('SKU') ?>: ', Mage::helper('catalog')->splitSku($this->getItem()->getSku())); ?>
      getOrderOptions()): ?>
        getOrderOptions() as $option): ?> diff --git a/app/design/adminhtml/default/default/template/sales/order/comments/view.phtml b/app/design/adminhtml/default/default/template/sales/order/comments/view.phtml index 24a0f4e5..f2583b28 100644 --- a/app/design/adminhtml/default/default/template/sales/order/comments/view.phtml +++ b/app/design/adminhtml/default/default/template/sales/order/comments/view.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getEntity()): ?> @@ -30,10 +30,12 @@ + canSendCommentEmail()): ?>
        +
        getChildHtml('submit_button') ?>
        diff --git a/app/design/adminhtml/default/default/template/sales/order/create/abstract.phtml b/app/design/adminhtml/default/default/template/sales/order/create/abstract.phtml index f7b1da55..4c2d6365 100644 --- a/app/design/adminhtml/default/default/template/sales/order/create/abstract.phtml +++ b/app/design/adminhtml/default/default/template/sales/order/create/abstract.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
        diff --git a/app/design/adminhtml/default/default/template/sales/order/create/billing/method/form.phtml b/app/design/adminhtml/default/default/template/sales/order/create/billing/method/form.phtml index a2bb9d08..348cc88c 100644 --- a/app/design/adminhtml/default/default/template/sales/order/create/billing/method/form.phtml +++ b/app/design/adminhtml/default/default/template/sales/order/create/billing/method/form.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> hasMethods()): ?> diff --git a/app/design/adminhtml/default/default/template/sales/order/create/comment.phtml b/app/design/adminhtml/default/default/template/sales/order/create/comment.phtml index 32dfb582..459f5d27 100644 --- a/app/design/adminhtml/default/default/template/sales/order/create/comment.phtml +++ b/app/design/adminhtml/default/default/template/sales/order/create/comment.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category adminhtml * @package default_default * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/adminhtml/default/default/template/sales/order/create/coupons/form.phtml b/app/design/adminhtml/default/default/template/sales/order/create/coupons/form.phtml index e128bf28..726317de 100644 --- a/app/design/adminhtml/default/default/template/sales/order/create/coupons/form.phtml +++ b/app/design/adminhtml/default/default/template/sales/order/create/coupons/form.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>

      getHeader() ?>

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

      getResetButtonHtml() ?> getCategoryId()): ?> diff --git a/app/design/adminhtml/default/default/template/catalog/category/tree.phtml b/app/design/adminhtml/default/default/template/catalog/category/tree.phtml index 8f665a24..75a74414 100644 --- a/app/design/adminhtml/default/default/template/catalog/category/tree.phtml +++ b/app/design/adminhtml/default/default/template/catalog/category/tree.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
      @@ -71,6 +71,10 @@ Ext.extend(Ext.tree.TreePanel.Enhanced, Ext.tree.TreePanel, { this.storeId = parameters['store_id']; + if ( this.storeId != 0) { + $('add_root_category_button').hide(); + } + if ((typeof parameters['root_visible']) != 'undefined') { this.rootVisible = parameters['root_visible']*1; } @@ -122,6 +126,14 @@ Ext.extend(Ext.tree.TreePanel.Enhanced, Ext.tree.TreePanel, { } } + if ( newStoreId==0 ) { + $('add_root_category_button').show(); + } + else { + $('add_root_category_button').hide(); + } + + if (this.cache[this.storeId]) { var hash = this.loader.buildHash(this.root); this.cache[this.storeId]['data'] = hash['children']; @@ -355,12 +367,46 @@ Ext.onReady(function() }); +function _recursTree( tree, valToDelete ) { + tree.each(function(item, index) { + if (item.id == valToDelete) { + tree = tree.without( item ); + } + else { + if (item.children) { + item.children = _recursTree(item.children, valToDelete); + if (item.children.size()==0) { + delete item.children; + } + } + } + + }); + return tree; +} + +function processTreeCache(valToDelete) { + var treeCache = this.tree.cache; + var str = ''; + for (store in treeCache) { + treeCache[store].data = _recursTree( treeCache[store].data, valToDelete); + } +} + function addNew(url, isRoot) { if (isRoot) { tree.currentNodeId = tree.root.id; } tree.addNodeTo = tree.currentNodeId; + + if (/store\/\d+/.test(url)) { + url = url.replace(/store\/\d+/, "store/" + tree.storeId); + } + else { + url+= "store/" + tree.storeId + "/"; + } + url+= 'parent/'+tree.currentNodeId; updateContent(url); } diff --git a/app/design/adminhtml/default/default/template/catalog/form/renderer/fieldset/element.phtml b/app/design/adminhtml/default/default/template/catalog/form/renderer/fieldset/element.phtml index b0d49509..a5a4b89d 100644 --- a/app/design/adminhtml/default/default/template/catalog/form/renderer/fieldset/element.phtml +++ b/app/design/adminhtml/default/default/template/catalog/form/renderer/fieldset/element.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getElement() ?> @@ -32,7 +32,7 @@
      getElementLabelHtml()) ?> getElementHtml()) ?> getScopeLabel() ?>
      + + + /> +   
      + + +   
      + + + /> + __('Please copy and paste this value to experiment edit form') ?>  
      diff --git a/app/design/adminhtml/default/default/template/sales/order/create/data.phtml b/app/design/adminhtml/default/default/template/sales/order/create/data.phtml index 5d320a5c..45dc30b8 100644 --- a/app/design/adminhtml/default/default/template/sales/order/create/data.phtml +++ b/app/design/adminhtml/default/default/template/sales/order/create/data.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category Mage * @package default_default * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
      diff --git a/app/design/adminhtml/default/default/template/sales/order/create/form.phtml b/app/design/adminhtml/default/default/template/sales/order/create/form.phtml index 15754a51..306b934d 100644 --- a/app/design/adminhtml/default/default/template/sales/order/create/form.phtml +++ b/app/design/adminhtml/default/default/template/sales/order/create/form.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
      \ No newline at end of file diff --git a/app/design/adminhtml/default/default/template/widget/tabs.phtml b/app/design/adminhtml/default/default/template/widget/tabs.phtml index d400027e..c6ef141a 100644 --- a/app/design/adminhtml/default/default/template/widget/tabs.phtml +++ b/app/design/adminhtml/default/default/template/widget/tabs.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getTitle()): ?> diff --git a/app/design/adminhtml/default/default/template/widget/tabshoriz.phtml b/app/design/adminhtml/default/default/template/widget/tabshoriz.phtml index efe4033b..c113d517 100644 --- a/app/design/adminhtml/default/default/template/widget/tabshoriz.phtml +++ b/app/design/adminhtml/default/default/template/widget/tabshoriz.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> @@ -140,6 +140,9 @@ Shopping cart item renderer bundlebundle/checkout_cart_item_renderer + + bundlebundle/catalog_product_price + diff --git a/app/design/frontend/default/blank/layout/checkout.xml b/app/design/frontend/default/blank/layout/checkout.xml index 352e130e..e2075b77 100644 --- a/app/design/frontend/default/blank/layout/checkout.xml +++ b/app/design/frontend/default/blank/layout/checkout.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/blank/layout/chronopay.xml b/app/design/frontend/default/blank/layout/chronopay.xml index 8d3acb00..cd0df88a 100644 --- a/app/design/frontend/default/blank/layout/chronopay.xml +++ b/app/design/frontend/default/blank/layout/chronopay.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage_Chronopay * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/blank/layout/cms.xml b/app/design/frontend/default/blank/layout/cms.xml index ebbe685d..cc14ded9 100644 --- a/app/design/frontend/default/blank/layout/cms.xml +++ b/app/design/frontend/default/blank/layout/cms.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/blank/layout/contacts.xml b/app/design/frontend/default/blank/layout/contacts.xml index ed59c483..123d61e4 100644 --- a/app/design/frontend/default/blank/layout/contacts.xml +++ b/app/design/frontend/default/blank/layout/contacts.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/blank/layout/core.xml b/app/design/frontend/default/blank/layout/core.xml index beb0e356..592ec8dd 100644 --- a/app/design/frontend/default/blank/layout/core.xml +++ b/app/design/frontend/default/blank/layout/core.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/blank/layout/customer.xml b/app/design/frontend/default/blank/layout/customer.xml index f8e5d03d..45dac91b 100644 --- a/app/design/frontend/default/blank/layout/customer.xml +++ b/app/design/frontend/default/blank/layout/customer.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ Supported layout update handles (action): diff --git a/app/design/frontend/default/blank/layout/cybermut.xml b/app/design/frontend/default/blank/layout/cybermut.xml index 60c3ad0c..4ff5d146 100644 --- a/app/design/frontend/default/blank/layout/cybermut.xml +++ b/app/design/frontend/default/blank/layout/cybermut.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage_Cybermut * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/blank/layout/directory.xml b/app/design/frontend/default/blank/layout/directory.xml index 38f9922e..60a549f6 100644 --- a/app/design/frontend/default/blank/layout/directory.xml +++ b/app/design/frontend/default/blank/layout/directory.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/blank/layout/eway.xml b/app/design/frontend/default/blank/layout/eway.xml index aca6609b..1b8ddc96 100644 --- a/app/design/frontend/default/blank/layout/eway.xml +++ b/app/design/frontend/default/blank/layout/eway.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage_Eway * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/blank/layout/giftmessage.xml b/app/design/frontend/default/blank/layout/giftmessage.xml index 39590b32..ff81a066 100644 --- a/app/design/frontend/default/blank/layout/giftmessage.xml +++ b/app/design/frontend/default/blank/layout/giftmessage.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/blank/layout/googleanalytics.xml b/app/design/frontend/default/blank/layout/googleanalytics.xml index 4ff23fc6..edb53a23 100644 --- a/app/design/frontend/default/blank/layout/googleanalytics.xml +++ b/app/design/frontend/default/blank/layout/googleanalytics.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/blank/layout/googlecheckout.xml b/app/design/frontend/default/blank/layout/googlecheckout.xml index 2193ae00..ff7ddaba 100644 --- a/app/design/frontend/default/blank/layout/googlecheckout.xml +++ b/app/design/frontend/default/blank/layout/googlecheckout.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/blank/layout/ideal.xml b/app/design/frontend/default/blank/layout/ideal.xml index 581088f1..30caf0fd 100644 --- a/app/design/frontend/default/blank/layout/ideal.xml +++ b/app/design/frontend/default/blank/layout/ideal.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage_Ideal * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/blank/layout/newsletter.xml b/app/design/frontend/default/blank/layout/newsletter.xml index e6f313c8..5e20d6ed 100644 --- a/app/design/frontend/default/blank/layout/newsletter.xml +++ b/app/design/frontend/default/blank/layout/newsletter.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/blank/layout/oscommerce.xml b/app/design/frontend/default/blank/layout/oscommerce.xml index aa26bef4..d6c695dc 100644 --- a/app/design/frontend/default/blank/layout/oscommerce.xml +++ b/app/design/frontend/default/blank/layout/oscommerce.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/blank/layout/page.xml b/app/design/frontend/default/blank/layout/page.xml index 3eb8a45a..a5718ef7 100644 --- a/app/design/frontend/default/blank/layout/page.xml +++ b/app/design/frontend/default/blank/layout/page.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/blank/layout/paybox.xml b/app/design/frontend/default/blank/layout/paybox.xml index 70ff6dd3..f0076f16 100644 --- a/app/design/frontend/default/blank/layout/paybox.xml +++ b/app/design/frontend/default/blank/layout/paybox.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage_Paybox * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/blank/layout/paypal.xml b/app/design/frontend/default/blank/layout/paypal.xml index 9e6e2eef..389f399a 100644 --- a/app/design/frontend/default/blank/layout/paypal.xml +++ b/app/design/frontend/default/blank/layout/paypal.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/blank/layout/paypaluk.xml b/app/design/frontend/default/blank/layout/paypaluk.xml index d27a953d..23b1e6f3 100644 --- a/app/design/frontend/default/blank/layout/paypaluk.xml +++ b/app/design/frontend/default/blank/layout/paypaluk.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/blank/layout/poll.xml b/app/design/frontend/default/blank/layout/poll.xml index a515c1f6..ffb11c3d 100644 --- a/app/design/frontend/default/blank/layout/poll.xml +++ b/app/design/frontend/default/blank/layout/poll.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/blank/layout/productalert.xml b/app/design/frontend/default/blank/layout/productalert.xml index 3665824a..9ece2ec3 100644 --- a/app/design/frontend/default/blank/layout/productalert.xml +++ b/app/design/frontend/default/blank/layout/productalert.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/blank/layout/protx.xml b/app/design/frontend/default/blank/layout/protx.xml index 7d7ec988..fd7d3573 100644 --- a/app/design/frontend/default/blank/layout/protx.xml +++ b/app/design/frontend/default/blank/layout/protx.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage_Protx * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/blank/layout/reports.xml b/app/design/frontend/default/blank/layout/reports.xml index 736382e9..c9a8d60a 100644 --- a/app/design/frontend/default/blank/layout/reports.xml +++ b/app/design/frontend/default/blank/layout/reports.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/blank/layout/review.xml b/app/design/frontend/default/blank/layout/review.xml index 212a6bdd..3010443c 100644 --- a/app/design/frontend/default/blank/layout/review.xml +++ b/app/design/frontend/default/blank/layout/review.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/blank/layout/rss.xml b/app/design/frontend/default/blank/layout/rss.xml index 079190da..759b6442 100644 --- a/app/design/frontend/default/blank/layout/rss.xml +++ b/app/design/frontend/default/blank/layout/rss.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/blank/layout/sales.xml b/app/design/frontend/default/blank/layout/sales.xml index 66238822..c35e1f09 100644 --- a/app/design/frontend/default/blank/layout/sales.xml +++ b/app/design/frontend/default/blank/layout/sales.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/blank/layout/sendfriend.xml b/app/design/frontend/default/blank/layout/sendfriend.xml index 5cd3b873..012dbc1d 100644 --- a/app/design/frontend/default/blank/layout/sendfriend.xml +++ b/app/design/frontend/default/blank/layout/sendfriend.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/blank/layout/shipping.xml b/app/design/frontend/default/blank/layout/shipping.xml index 4c3dffb8..289628fe 100644 --- a/app/design/frontend/default/blank/layout/shipping.xml +++ b/app/design/frontend/default/blank/layout/shipping.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/blank/layout/tag.xml b/app/design/frontend/default/blank/layout/tag.xml index 9fada3b9..0df3a93c 100644 --- a/app/design/frontend/default/blank/layout/tag.xml +++ b/app/design/frontend/default/blank/layout/tag.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> @@ -35,9 +35,7 @@ Default layout, loads most of the pages - - - + diff --git a/app/design/frontend/default/blank/layout/wishlist.xml b/app/design/frontend/default/blank/layout/wishlist.xml index 5d153a86..8bac2778 100644 --- a/app/design/frontend/default/blank/layout/wishlist.xml +++ b/app/design/frontend/default/blank/layout/wishlist.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/blank/template/bundle/catalog/product/list/partof.phtml b/app/design/frontend/default/blank/template/bundle/catalog/product/list/partof.phtml index 345293ad..40125662 100644 --- a/app/design/frontend/default/blank/template/bundle/catalog/product/list/partof.phtml +++ b/app/design/frontend/default/blank/template/bundle/catalog/product/list/partof.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage_Bundle * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getItemCollection()->getSize()): ?> diff --git a/app/design/frontend/default/blank/template/bundle/catalog/product/price.phtml b/app/design/frontend/default/blank/template/bundle/catalog/product/price.phtml index 969fa218..6118fcdc 100644 --- a/app/design/frontend/default/blank/template/bundle/catalog/product/price.phtml +++ b/app/design/frontend/default/blank/template/bundle/catalog/product/price.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,10 +21,9 @@ * @category design_blank * @package Mage_Bundle * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> - getProduct() ?> getPriceModel()->getPrices($_product) ?> getId() ?> diff --git a/app/design/frontend/default/blank/template/bundle/catalog/product/view/price.phtml b/app/design/frontend/default/blank/template/bundle/catalog/product/view/price.phtml index 5149aadb..26e3a29a 100644 --- a/app/design/frontend/default/blank/template/bundle/catalog/product/view/price.phtml +++ b/app/design/frontend/default/blank/template/bundle/catalog/product/view/price.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getProduct() ?> diff --git a/app/design/frontend/default/blank/template/bundle/catalog/product/view/tierprices.phtml b/app/design/frontend/default/blank/template/bundle/catalog/product/view/tierprices.phtml index 7b465237..0f7db5e4 100644 --- a/app/design/frontend/default/blank/template/bundle/catalog/product/view/tierprices.phtml +++ b/app/design/frontend/default/blank/template/bundle/catalog/product/view/tierprices.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/blank/template/bundle/catalog/product/view/type/bundle.phtml b/app/design/frontend/default/blank/template/bundle/catalog/product/view/type/bundle.phtml index 9a6c2ab7..92be0b07 100644 --- a/app/design/frontend/default/blank/template/bundle/catalog/product/view/type/bundle.phtml +++ b/app/design/frontend/default/blank/template/bundle/catalog/product/view/type/bundle.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage_Bundle * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/blank/template/bundle/catalog/product/view/type/bundle/option/checkbox.phtml b/app/design/frontend/default/blank/template/bundle/catalog/product/view/type/bundle/option/checkbox.phtml index 9e7ae7ed..d3872ff0 100644 --- a/app/design/frontend/default/blank/template/bundle/catalog/product/view/type/bundle/option/checkbox.phtml +++ b/app/design/frontend/default/blank/template/bundle/catalog/product/view/type/bundle/option/checkbox.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,11 +21,10 @@ * @category design_blank * @package Mage_Bundle * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> - getOption() ?> getSelections() ?>
      diff --git a/app/design/frontend/default/blank/template/bundle/catalog/product/view/type/bundle/option/multi.phtml b/app/design/frontend/default/blank/template/bundle/catalog/product/view/type/bundle/option/multi.phtml index 01a45fe2..596d22d4 100644 --- a/app/design/frontend/default/blank/template/bundle/catalog/product/view/type/bundle/option/multi.phtml +++ b/app/design/frontend/default/blank/template/bundle/catalog/product/view/type/bundle/option/multi.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage_Bundle * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/blank/template/bundle/catalog/product/view/type/bundle/option/radio.phtml b/app/design/frontend/default/blank/template/bundle/catalog/product/view/type/bundle/option/radio.phtml index 12a9c2e2..5654b94a 100644 --- a/app/design/frontend/default/blank/template/bundle/catalog/product/view/type/bundle/option/radio.phtml +++ b/app/design/frontend/default/blank/template/bundle/catalog/product/view/type/bundle/option/radio.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage_Bundle * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/blank/template/bundle/catalog/product/view/type/bundle/option/select.phtml b/app/design/frontend/default/blank/template/bundle/catalog/product/view/type/bundle/option/select.phtml index 6d44e7df..1541e78f 100644 --- a/app/design/frontend/default/blank/template/bundle/catalog/product/view/type/bundle/option/select.phtml +++ b/app/design/frontend/default/blank/template/bundle/catalog/product/view/type/bundle/option/select.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage_Bundle * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/blank/template/bundle/catalog/product/view/type/bundle/options.phtml b/app/design/frontend/default/blank/template/bundle/catalog/product/view/type/bundle/options.phtml index e061df72..d2d16745 100644 --- a/app/design/frontend/default/blank/template/bundle/catalog/product/view/type/bundle/options.phtml +++ b/app/design/frontend/default/blank/template/bundle/catalog/product/view/type/bundle/options.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage_Bundle * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/blank/template/bundle/email/order/items/creditmemo/default.phtml b/app/design/frontend/default/blank/template/bundle/email/order/items/creditmemo/default.phtml index 0abeb75d..af43161b 100644 --- a/app/design/frontend/default/blank/template/bundle/email/order/items/creditmemo/default.phtml +++ b/app/design/frontend/default/blank/template/bundle/email/order/items/creditmemo/default.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage_Bundle * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getItem() ?> diff --git a/app/design/frontend/default/blank/template/bundle/email/order/items/invoice/default.phtml b/app/design/frontend/default/blank/template/bundle/email/order/items/invoice/default.phtml index a955e49c..ed0ecbfc 100644 --- a/app/design/frontend/default/blank/template/bundle/email/order/items/invoice/default.phtml +++ b/app/design/frontend/default/blank/template/bundle/email/order/items/invoice/default.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/blank/template/bundle/email/order/items/order/default.phtml b/app/design/frontend/default/blank/template/bundle/email/order/items/order/default.phtml index 352ea315..9bdeb7ee 100644 --- a/app/design/frontend/default/blank/template/bundle/email/order/items/order/default.phtml +++ b/app/design/frontend/default/blank/template/bundle/email/order/items/order/default.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getItem() ?> diff --git a/app/design/frontend/default/blank/template/bundle/email/order/items/shipment/default.phtml b/app/design/frontend/default/blank/template/bundle/email/order/items/shipment/default.phtml index de98cfe4..bd40ddf9 100644 --- a/app/design/frontend/default/blank/template/bundle/email/order/items/shipment/default.phtml +++ b/app/design/frontend/default/blank/template/bundle/email/order/items/shipment/default.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage_Bundle * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getItem() ?> diff --git a/app/design/frontend/default/blank/template/bundle/sales/order/creditmemo/items/renderer.phtml b/app/design/frontend/default/blank/template/bundle/sales/order/creditmemo/items/renderer.phtml index 1e2db774..08aa4fab 100644 --- a/app/design/frontend/default/blank/template/bundle/sales/order/creditmemo/items/renderer.phtml +++ b/app/design/frontend/default/blank/template/bundle/sales/order/creditmemo/items/renderer.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage_Bundle * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getItem() ?> diff --git a/app/design/frontend/default/blank/template/bundle/sales/order/invoice/items/renderer.phtml b/app/design/frontend/default/blank/template/bundle/sales/order/invoice/items/renderer.phtml index f03a2065..645a7ab0 100644 --- a/app/design/frontend/default/blank/template/bundle/sales/order/invoice/items/renderer.phtml +++ b/app/design/frontend/default/blank/template/bundle/sales/order/invoice/items/renderer.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage_Bundle * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getItem() ?> diff --git a/app/design/frontend/default/blank/template/bundle/sales/order/items/renderer.phtml b/app/design/frontend/default/blank/template/bundle/sales/order/items/renderer.phtml index a300af5c..aef791e4 100644 --- a/app/design/frontend/default/blank/template/bundle/sales/order/items/renderer.phtml +++ b/app/design/frontend/default/blank/template/bundle/sales/order/items/renderer.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage_Bundle * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getItem() ?> diff --git a/app/design/frontend/default/blank/template/bundle/sales/order/shipment/items/renderer.phtml b/app/design/frontend/default/blank/template/bundle/sales/order/shipment/items/renderer.phtml index 610c1b0e..61cc256f 100644 --- a/app/design/frontend/default/blank/template/bundle/sales/order/shipment/items/renderer.phtml +++ b/app/design/frontend/default/blank/template/bundle/sales/order/shipment/items/renderer.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage_Bundle * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getItem() ?> diff --git a/app/design/frontend/default/blank/template/callouts/left_col.phtml b/app/design/frontend/default/blank/template/callouts/left_col.phtml index 34e3358a..9ef47144 100644 --- a/app/design/frontend/default/blank/template/callouts/left_col.phtml +++ b/app/design/frontend/default/blank/template/callouts/left_col.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,10 +21,9 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -
      getLinkUrl(),0,4))==='http'): ?> diff --git a/app/design/frontend/default/blank/template/callouts/right_col.phtml b/app/design/frontend/default/blank/template/callouts/right_col.phtml index deef2aef..6a8a0d75 100644 --- a/app/design/frontend/default/blank/template/callouts/right_col.phtml +++ b/app/design/frontend/default/blank/template/callouts/right_col.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
      diff --git a/app/design/frontend/default/blank/template/catalog/category/page.phtml b/app/design/frontend/default/blank/template/catalog/category/page.phtml index cedfd624..992a0682 100644 --- a/app/design/frontend/default/blank/template/catalog/category/page.phtml +++ b/app/design/frontend/default/blank/template/catalog/category/page.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
      diff --git a/app/design/frontend/default/blank/template/catalog/category/view.phtml b/app/design/frontend/default/blank/template/catalog/category/view.phtml index 6dddfc91..cfa0d930 100644 --- a/app/design/frontend/default/blank/template/catalog/category/view.phtml +++ b/app/design/frontend/default/blank/template/catalog/category/view.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> +helper('catalog/output'); + $_category = $this->getCurrentCategory(); + $_imgHtml = ''; + if ($_imgUrl = $_category->getImageUrl()) { + $_imgHtml = ''.$this->htmlEscape($_category->getName()).''; + $_imgHtml = $_helper->categoryAttribute($_category, $_imgHtml, 'image'); + } +?> getMessagesBlock()->getGroupedHtml() ?> isContentMode()): ?>
      IsRssCatalogEnable() && $this->IsTopCategory()): ?> __('Subscribe to RSS Feed') ?> -

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

      +

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

      - getCurrentCategory()->getImageUrl()): ?> - <?php echo $this->htmlEscape($this->getCurrentCategory()->getName()) ?> + + getCurrentCategory()->getDescription()): ?> -

      +

      categoryAttribute($_category, $_description, 'description') ?>

      getCmsBlockHtml() ?> isMixedMode()): ?> @@ -51,13 +60,13 @@ IsRssCatalogEnable() && $this->IsTopCategory()): ?> __('Subscribe to RSS Feed') ?> -

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

      +

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

      - getCurrentCategory()->getImageUrl()): ?> - <?php echo $this->htmlEscape($this->getCurrentCategory()->getName()) ?> + + getCurrentCategory()->getDescription()): ?> -

      +

      categoryAttribute($_category, $_description, 'description'); ?>

      IsRssCatalogEnable() && $this->IsTopCategory()): ?> @@ -72,13 +81,13 @@ IsRssCatalogEnable() && $this->IsTopCategory()): ?> __('Subscribe to RSS Feed') ?> -

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

      +

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

      - getCurrentCategory()->getImageUrl()): ?> - <?php echo $this->htmlEscape($this->getCurrentCategory()->getName()) ?> + + getCurrentCategory()->getDescription()): ?> -

      +

      categoryAttribute($_category, $_description, 'description') ?>

      getProductListHtml() ?> diff --git a/app/design/frontend/default/blank/template/catalog/layer/filter.phtml b/app/design/frontend/default/blank/template/catalog/layer/filter.phtml index 30fa5044..a1e5c537 100644 --- a/app/design/frontend/default/blank/template/catalog/layer/filter.phtml +++ b/app/design/frontend/default/blank/template/catalog/layer/filter.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> - @@ -44,7 +44,7 @@ getFilters() ?> getItemsCount()): ?> -
      getName() ?>
      +
      __($_filter->getName()) ?>
      getHtml() ?>
      diff --git a/app/design/frontend/default/blank/template/catalog/navigation/left.phtml b/app/design/frontend/default/blank/template/catalog/navigation/left.phtml index 9b86b406..b40bedbf 100644 --- a/app/design/frontend/default/blank/template/catalog/navigation/left.phtml +++ b/app/design/frontend/default/blank/template/catalog/navigation/left.phtml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> count()): ?>
      -

      __('Browse By') ?>

      +

      __('Browse By') ?>

      diff --git a/app/design/frontend/default/blank/template/catalog/navigation/top.phtml b/app/design/frontend/default/blank/template/catalog/navigation/top.phtml index 9178696d..c22deabf 100644 --- a/app/design/frontend/default/blank/template/catalog/navigation/top.phtml +++ b/app/design/frontend/default/blank/template/catalog/navigation/top.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> - +getStoreCategories())>1): ?> + + diff --git a/app/design/frontend/default/blank/template/catalog/product/compare/list.phtml b/app/design/frontend/default/blank/template/catalog/product/compare/list.phtml index f7d722e6..c04c2834 100644 --- a/app/design/frontend/default/blank/template/catalog/product/compare/list.phtml +++ b/app/design/frontend/default/blank/template/catalog/product/compare/list.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,10 +21,10 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -
      +

      __('Compare Products') ?>

      __('Print This Page') ?>
      @@ -37,7 +37,7 @@ getItems() as $_item): ?> -
      + @@ -49,7 +49,7 @@ getItems() as $_item): ?> - + + +
         <?php echo $this->__('Remove Product') ?>    <?php echo $this->htmlEscape($_item->getName()) ?> @@ -74,7 +74,7 @@ getItems() as $_item): ?> - __($_attribute->getFrontendLabel()) ?>__($_attribute->getFrontendLabel()) ?> getAttributeCode()) { @@ -98,7 +98,7 @@ getItems() as $_item): ?> -    getPriceHtml($_item) ?> diff --git a/app/design/frontend/default/blank/template/catalog/product/compare/sidebar.phtml b/app/design/frontend/default/blank/template/catalog/product/compare/sidebar.phtml index f7477eaa..27a4c6ac 100644 --- a/app/design/frontend/default/blank/template/catalog/product/compare/sidebar.phtml +++ b/app/design/frontend/default/blank/template/catalog/product/compare/sidebar.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
      @@ -38,7 +38,7 @@ helper('catalog/product_compare')->getItemCollection() as $_index=>$_item): ?>
    • - <?php echo $this->__('Remove This Item') ?> + <?php echo $this->__('Remove This Item') ?> htmlEscape($_item->getName()) ?>
    • diff --git a/app/design/frontend/default/blank/template/catalog/product/gallery.phtml b/app/design/frontend/default/blank/template/catalog/product/gallery.phtml index 2889115e..96e33486 100644 --- a/app/design/frontend/default/blank/template/catalog/product/gallery.phtml +++ b/app/design/frontend/default/blank/template/catalog/product/gallery.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getImageWidth() ?> diff --git a/app/design/frontend/default/blank/template/catalog/product/list.phtml b/app/design/frontend/default/blank/template/catalog/product/list.phtml index a31b09da..6c1f2319 100644 --- a/app/design/frontend/default/blank/template/catalog/product/list.phtml +++ b/app/design/frontend/default/blank/template/catalog/product/list.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> last"> - <?php echo $this->htmlEscape($_product->getName()) ?> - + <?php echo $this->htmlEscape($_product->getName()) ?>
      @@ -61,10 +60,10 @@

      __('Out of stock') ?>

      -

      +

      getShortDescription()) ?> __('Learn More') ?> -

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

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

      getRatingSummary()): ?> getReviewsSummaryHtml($_product, 'short') ?> diff --git a/app/design/frontend/default/blank/template/catalog/product/list/related.phtml b/app/design/frontend/default/blank/template/catalog/product/list/related.phtml index a4cd20a2..011dd744 100644 --- a/app/design/frontend/default/blank/template/catalog/product/list/related.phtml +++ b/app/design/frontend/default/blank/template/catalog/product/list/related.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getItems()->getSize()): ?> @@ -30,7 +30,7 @@

      __('Related Products') ?>

      -

      __('Check items to add to the cart or ') ?>__('select all') ?>

      +

      __('Check items to add to the cart or') ?> __('select all') ?>

      + diff --git a/app/design/frontend/default/blank/template/catalog/product/price.phtml b/app/design/frontend/default/blank/template/catalog/product/price.phtml index c803c789..13cbf51b 100644 --- a/app/design/frontend/default/blank/template/catalog/product/price.phtml +++ b/app/design/frontend/default/blank/template/catalog/product/price.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,15 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +?> + + @@ -111,7 +119,7 @@ helper('tax')->displayCartPriceInclTax()) { + if (!$this->helper('tax')->displayPriceIncludingTax()) { $_showPrice = $_exclTax; } ?> diff --git a/app/design/frontend/default/blank/template/catalog/product/view.phtml b/app/design/frontend/default/blank/template/catalog/product/view.phtml index 6c07db23..aa7299fb 100644 --- a/app/design/frontend/default/blank/template/catalog/product/view.phtml +++ b/app/design/frontend/default/blank/template/catalog/product/view.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ /** @@ -31,11 +31,14 @@ * @see Mage_Review_Block_Product_View */ ?> +helper('catalog/output'); + $_product = $this->getProduct() +?>
      getMessagesBlock()->getGroupedHtml() ?>
      -getProduct() ?>
      @@ -50,7 +53,7 @@
      -

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

      +

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

      canEmailToFriend()): ?> @@ -79,7 +82,7 @@ getShortDescription()):?>

      __('Quick Overview') ?>

      - getShortDescription()) ?> + productAttribute($_product, nl2br($_product->getShortDescription()), 'short_description') ?>
      diff --git a/app/design/frontend/default/blank/template/catalog/product/view/additional.phtml b/app/design/frontend/default/blank/template/catalog/product/view/additional.phtml index f64064d5..f59da9e0 100644 --- a/app/design/frontend/default/blank/template/catalog/product/view/additional.phtml +++ b/app/design/frontend/default/blank/template/catalog/product/view/additional.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getChildHtmlList() as $_html): ?> diff --git a/app/design/frontend/default/blank/template/catalog/product/view/addto.phtml b/app/design/frontend/default/blank/template/catalog/product/view/addto.phtml index dabaaac1..50aaf2a2 100644 --- a/app/design/frontend/default/blank/template/catalog/product/view/addto.phtml +++ b/app/design/frontend/default/blank/template/catalog/product/view/addto.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/blank/template/catalog/product/view/addtocart.phtml b/app/design/frontend/default/blank/template/catalog/product/view/addtocart.phtml index 2761f3a1..918d340c 100644 --- a/app/design/frontend/default/blank/template/catalog/product/view/addtocart.phtml +++ b/app/design/frontend/default/blank/template/catalog/product/view/addtocart.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/blank/template/catalog/product/view/attributes.phtml b/app/design/frontend/default/blank/template/catalog/product/view/attributes.phtml index 299ce4b2..a7de39a8 100644 --- a/app/design/frontend/default/blank/template/catalog/product/view/attributes.phtml +++ b/app/design/frontend/default/blank/template/catalog/product/view/attributes.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ /** @@ -30,6 +30,10 @@ * @see Mage_Catalog_Block_Product_View_Attributes */ ?> +helper('catalog/output'); + $_product = $this->getProduct() +?> getAdditionalData()): ?> @@ -37,7 +41,7 @@ - +
      __($_data['label']) ?>productAttribute($_product, $_data['value'], $_data['code']) ?>
      diff --git a/app/design/frontend/default/blank/template/catalog/product/view/description.phtml b/app/design/frontend/default/blank/template/catalog/product/view/description.phtml index 229d9b5a..5aadec34 100644 --- a/app/design/frontend/default/blank/template/catalog/product/view/description.phtml +++ b/app/design/frontend/default/blank/template/catalog/product/view/description.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ /** @@ -31,5 +31,5 @@ */ ?>
      - getProduct()->getDescription()) ?> + helper('catalog/output')->productAttribute($this->getProduct(), nl2br($this->getProduct()->getDescription()), 'description') ?>
      diff --git a/app/design/frontend/default/blank/template/catalog/product/view/media.phtml b/app/design/frontend/default/blank/template/catalog/product/view/media.phtml index 02ed80bc..69dd7509 100644 --- a/app/design/frontend/default/blank/template/catalog/product/view/media.phtml +++ b/app/design/frontend/default/blank/template/catalog/product/view/media.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ /** @@ -30,10 +30,16 @@ * @see Mage_Catalog_Block_Product_View_Media */ ?> -getProduct() ?> +getProduct(); + $_helper = $this->helper('catalog/output'); +?> getImage() != 'no_selection' && $_product->getImage()): ?>

      - <?php echo $this->htmlEscape($_product->getName()) ?> + helper('catalog/image')->init($_product, 'image').'" alt="'.$this->htmlEscape($_product->getName()).'" title="'.$this->htmlEscape($_product->getName()).'" />'; + echo $_helper->productAttribute($_product, $_img, 'image'); + ?>

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

      @@ -52,7 +58,10 @@

      - <?php echo $this->htmlEscape($_product->getName()) ?> + helper('catalog/image')->init($_product, 'image')->resize(265).'" alt="'.$this->htmlEscape($_product->getName()).'" title="'.$this->htmlEscape($_product->getName()).'" />'; + echo $_helper->productAttribute($_product, $_img, 'image'); + ?>

      getGalleryImages()) > 0): ?> @@ -61,7 +70,7 @@
        getGalleryImages() as $_image): ?>
      • - <?php echo $this->htmlEscape($_image->getLabel()) ?> + <?php echo $this->htmlEscape($_image->getLabel()) ?>
      diff --git a/app/design/frontend/default/blank/template/catalog/product/view/options.phtml b/app/design/frontend/default/blank/template/catalog/product/view/options.phtml index fef16788..eb94aeb3 100644 --- a/app/design/frontend/default/blank/template/catalog/product/view/options.phtml +++ b/app/design/frontend/default/blank/template/catalog/product/view/options.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/blank/template/catalog/product/view/options/type/date.phtml b/app/design/frontend/default/blank/template/catalog/product/view/options/type/date.phtml index bc26d784..42ec25ad 100644 --- a/app/design/frontend/default/blank/template/catalog/product/view/options/type/date.phtml +++ b/app/design/frontend/default/blank/template/catalog/product/view/options/type/date.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getOption() ?> diff --git a/app/design/frontend/default/blank/template/catalog/product/view/options/type/default.phtml b/app/design/frontend/default/blank/template/catalog/product/view/options/type/default.phtml index 714dcf05..422a6b44 100644 --- a/app/design/frontend/default/blank/template/catalog/product/view/options/type/default.phtml +++ b/app/design/frontend/default/blank/template/catalog/product/view/options/type/default.phtml @@ -1,2 +1,30 @@ + getOption() ?> -
      \ No newline at end of file +
      + +
      diff --git a/app/design/frontend/default/blank/template/catalog/product/view/options/type/file.phtml b/app/design/frontend/default/blank/template/catalog/product/view/options/type/file.phtml index b07225cf..6f63dc70 100644 --- a/app/design/frontend/default/blank/template/catalog/product/view/options/type/file.phtml +++ b/app/design/frontend/default/blank/template/catalog/product/view/options/type/file.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getOption() ?> diff --git a/app/design/frontend/default/blank/template/catalog/product/view/options/type/select.phtml b/app/design/frontend/default/blank/template/catalog/product/view/options/type/select.phtml index 18d1b2c7..33a8d539 100644 --- a/app/design/frontend/default/blank/template/catalog/product/view/options/type/select.phtml +++ b/app/design/frontend/default/blank/template/catalog/product/view/options/type/select.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/blank/template/catalog/product/view/options/type/text.phtml b/app/design/frontend/default/blank/template/catalog/product/view/options/type/text.phtml index 9ec83e7b..de538a59 100644 --- a/app/design/frontend/default/blank/template/catalog/product/view/options/type/text.phtml +++ b/app/design/frontend/default/blank/template/catalog/product/view/options/type/text.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getOption() ?> @@ -34,6 +34,6 @@ getMaxCharacters()): ?> -

      __('Maximum number of characters')?>: getMaxCharacters() ?>

      +

      __('Maximum number of characters')?>: getMaxCharacters() ?>

      diff --git a/app/design/frontend/default/blank/template/catalog/product/view/options/wrapper.phtml b/app/design/frontend/default/blank/template/catalog/product/view/options/wrapper.phtml index dfd062e0..85b715c6 100644 --- a/app/design/frontend/default/blank/template/catalog/product/view/options/wrapper.phtml +++ b/app/design/frontend/default/blank/template/catalog/product/view/options/wrapper.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,14 +21,13 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -
      getChildHtml('', true, true);?> hasRequiredOptions()):?>

      __('* Required Fields') ?>

      -
      - \ No newline at end of file + + diff --git a/app/design/frontend/default/blank/template/catalog/product/view/options/wrapper/bottom.phtml b/app/design/frontend/default/blank/template/catalog/product/view/options/wrapper/bottom.phtml index 5f99aba3..6f201379 100644 --- a/app/design/frontend/default/blank/template/catalog/product/view/options/wrapper/bottom.phtml +++ b/app/design/frontend/default/blank/template/catalog/product/view/options/wrapper/bottom.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,10 +21,9 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -
      getChildHtml('', true, true);?>
      diff --git a/app/design/frontend/default/blank/template/catalog/product/view/price.phtml b/app/design/frontend/default/blank/template/catalog/product/view/price.phtml index d5bfb17b..41cd1fab 100644 --- a/app/design/frontend/default/blank/template/catalog/product/view/price.phtml +++ b/app/design/frontend/default/blank/template/catalog/product/view/price.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
      diff --git a/app/design/frontend/default/blank/template/catalog/product/view/price_clone.phtml b/app/design/frontend/default/blank/template/catalog/product/view/price_clone.phtml index 229bf7d8..fe85bcbe 100644 --- a/app/design/frontend/default/blank/template/catalog/product/view/price_clone.phtml +++ b/app/design/frontend/default/blank/template/catalog/product/view/price_clone.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getProduct() ?> diff --git a/app/design/frontend/default/blank/template/catalog/product/view/tierprices.phtml b/app/design/frontend/default/blank/template/catalog/product/view/tierprices.phtml index 542069b9..223e23bb 100644 --- a/app/design/frontend/default/blank/template/catalog/product/view/tierprices.phtml +++ b/app/design/frontend/default/blank/template/catalog/product/view/tierprices.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/blank/template/catalog/product/view/type/configurable.phtml b/app/design/frontend/default/blank/template/catalog/product/view/type/configurable.phtml index c7ca87a8..c7e4b13e 100644 --- a/app/design/frontend/default/blank/template/catalog/product/view/type/configurable.phtml +++ b/app/design/frontend/default/blank/template/catalog/product/view/type/configurable.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ /** diff --git a/app/design/frontend/default/blank/template/catalog/product/view/type/grouped.phtml b/app/design/frontend/default/blank/template/catalog/product/view/type/grouped.phtml index 402fd329..26d846d9 100644 --- a/app/design/frontend/default/blank/template/catalog/product/view/type/grouped.phtml +++ b/app/design/frontend/default/blank/template/catalog/product/view/type/grouped.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,13 +21,14 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ /** * Grouped product data template * * @see Mage_Catalog_Block_Product_View_Media + * @see Mage_Catalog_Block_Product_View_Type_Grouped */ ?> getProduct() ?> @@ -56,67 +57,7 @@ htmlEscape($_item->getName()) ?> - helper('tax')->displayPriceIncludingTax() || $this->helper('tax')->displayBothPrices()); ?> - helper('tax')->getPrice($_item, $_item->getPrice(), $simplePricesTax) ?> - helper('tax')->getPrice($_item, $_item->getPrice(), $simplePricesTax) ?> - helper('tax')->getPrice($_item, $_item->getFinalPrice()) ?> - helper('tax')->getPrice($_item, $_item->getFinalPrice(), true) ?> - - helper('tax')->displayBothPrices() && $_finalPriceInclTax != $_finalPrice): ?> - - __('Excl. Tax:') ?> - - currency($_price) ?> - - - - __('Incl. Tax:') ?> - - currency($_finalPriceInclTax,true,false) ?> - - - - currency($_price) ?> - - -

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

      - - helper('tax')->displayBothPrices() && $_finalPriceInclTax != $_finalPrice): ?> -

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

      - -

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

      - - - getTierPriceCount()): ?> -
        - getTierPrices($_item) as $_tierPrice): ?> - - helper('tax')->displayBothPrices() && $_tierPrice['formated_price'] != $_tierPrice['formated_price_incl_tax']): ?> -
      • __('Buy %s for %s each', $_tierPrice['price_qty'], $_tierPrice['formated_price']) ?> - ( __('Incl. Tax') ?>)
      • - -
      • __('Buy %s for %s', $_tierPrice['price_qty']*1, $_tierPrice['formated_price']) ?>
      • - - - -
      - + getPriceHtml($_item, true) ?> isSaleable()): ?> diff --git a/app/design/frontend/default/blank/template/catalog/product/view/type/options/configurable.phtml b/app/design/frontend/default/blank/template/catalog/product/view/type/options/configurable.phtml index 539562d6..824ec812 100644 --- a/app/design/frontend/default/blank/template/catalog/product/view/type/options/configurable.phtml +++ b/app/design/frontend/default/blank/template/catalog/product/view/type/options/configurable.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/blank/template/catalog/product/view/type/simple.phtml b/app/design/frontend/default/blank/template/catalog/product/view/type/simple.phtml index a449dd37..1c83f669 100644 --- a/app/design/frontend/default/blank/template/catalog/product/view/type/simple.phtml +++ b/app/design/frontend/default/blank/template/catalog/product/view/type/simple.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ /** diff --git a/app/design/frontend/default/blank/template/catalog/product/view/type/virtual.phtml b/app/design/frontend/default/blank/template/catalog/product/view/type/virtual.phtml index a449dd37..1c83f669 100644 --- a/app/design/frontend/default/blank/template/catalog/product/view/type/virtual.phtml +++ b/app/design/frontend/default/blank/template/catalog/product/view/type/virtual.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ /** diff --git a/app/design/frontend/default/blank/template/catalog/seo/sitemap.phtml b/app/design/frontend/default/blank/template/catalog/seo/sitemap.phtml index 2db50bcd..f1b8f8d6 100644 --- a/app/design/frontend/default/blank/template/catalog/seo/sitemap.phtml +++ b/app/design/frontend/default/blank/template/catalog/seo/sitemap.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
      diff --git a/app/design/frontend/default/blank/template/catalogsearch/advanced/form.phtml b/app/design/frontend/default/blank/template/catalogsearch/advanced/form.phtml index 33355767..e797471b 100644 --- a/app/design/frontend/default/blank/template/catalogsearch/advanced/form.phtml +++ b/app/design/frontend/default/blank/template/catalogsearch/advanced/form.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -
      +
      - (getCurrency($_attribute); ?>) +
      getAttributeSelectElement($_attribute) ?> diff --git a/app/design/frontend/default/blank/template/catalogsearch/advanced/result.phtml b/app/design/frontend/default/blank/template/catalogsearch/advanced/result.phtml index 7e337c51..32ffddf2 100644 --- a/app/design/frontend/default/blank/template/catalogsearch/advanced/result.phtml +++ b/app/design/frontend/default/blank/template/catalogsearch/advanced/result.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
      @@ -50,10 +50,10 @@
      getResultCount()): ?> -

      - helper('catalogsearch')->__("Don't see what you're looking for?"); ?> - helper('catalogsearch')->__('Modify your search'); ?> -

      +

      + helper('catalogsearch')->__("Don't see what you're looking for?"); ?> + helper('catalogsearch')->__('Modify your search'); ?> +

      getResultCount()): ?> getProductListHtml() ?> diff --git a/app/design/frontend/default/blank/template/catalogsearch/form.mini.phtml b/app/design/frontend/default/blank/template/catalogsearch/form.mini.phtml index bf6e7c71..dc434be7 100644 --- a/app/design/frontend/default/blank/template/catalogsearch/form.mini.phtml +++ b/app/design/frontend/default/blank/template/catalogsearch/form.mini.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/blank/template/catalogsearch/result.phtml b/app/design/frontend/default/blank/template/catalogsearch/result.phtml index 0418d5ba..93d4e89f 100644 --- a/app/design/frontend/default/blank/template/catalogsearch/result.phtml +++ b/app/design/frontend/default/blank/template/catalogsearch/result.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getResultCount()): ?> diff --git a/app/design/frontend/default/blank/template/catalogsearch/term.phtml b/app/design/frontend/default/blank/template/catalogsearch/term.phtml index 4ced3a15..3f5e6834 100644 --- a/app/design/frontend/default/blank/template/catalogsearch/term.phtml +++ b/app/design/frontend/default/blank/template/catalogsearch/term.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
      diff --git a/app/design/frontend/default/blank/template/checkout/cart.phtml b/app/design/frontend/default/blank/template/checkout/cart.phtml index c043b826..80790af5 100644 --- a/app/design/frontend/default/blank/template/checkout/cart.phtml +++ b/app/design/frontend/default/blank/template/checkout/cart.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getContinueShoppingUrl()): ?> - + diff --git a/app/design/frontend/default/blank/template/checkout/cart/coupon.phtml b/app/design/frontend/default/blank/template/checkout/cart/coupon.phtml index 37bbf28a..674825a6 100644 --- a/app/design/frontend/default/blank/template/checkout/cart/coupon.phtml +++ b/app/design/frontend/default/blank/template/checkout/cart/coupon.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
      diff --git a/app/design/frontend/default/blank/template/checkout/cart/crosssell.phtml b/app/design/frontend/default/blank/template/checkout/cart/crosssell.phtml index 504f216f..cb2fea69 100644 --- a/app/design/frontend/default/blank/template/checkout/cart/crosssell.phtml +++ b/app/design/frontend/default/blank/template/checkout/cart/crosssell.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,10 +21,10 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -getProductUrl() ?>"><?php echo $this->htmlEscape($_item->getName()) ?>

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

      - getPriceHtml($_item) ?> + getPriceHtml($_item, true) ?>

      +
    diff --git a/app/design/frontend/default/blank/template/checkout/cart/item/default.phtml b/app/design/frontend/default/blank/template/checkout/cart/item/default.phtml index 3f6907f5..427efca5 100644 --- a/app/design/frontend/default/blank/template/checkout/cart/item/default.phtml +++ b/app/design/frontend/default/blank/template/checkout/cart/item/default.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,13 +21,13 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getItem()?> <?php echo $this->__('Remove item')?> - <?php echo $this->htmlEscape($this->getProductName()) ?> + <?php echo $this->htmlEscape($this->getProductName()) ?>

    getProductName() ?>

    getOptionList()):?> diff --git a/app/design/frontend/default/blank/template/checkout/cart/noItems.phtml b/app/design/frontend/default/blank/template/checkout/cart/noItems.phtml index 3bdcf459..0e049fb0 100644 --- a/app/design/frontend/default/blank/template/checkout/cart/noItems.phtml +++ b/app/design/frontend/default/blank/template/checkout/cart/noItems.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
    diff --git a/app/design/frontend/default/blank/template/checkout/cart/render/default.phtml b/app/design/frontend/default/blank/template/checkout/cart/render/default.phtml index 0c75c4d4..f659a0e6 100644 --- a/app/design/frontend/default/blank/template/checkout/cart/render/default.phtml +++ b/app/design/frontend/default/blank/template/checkout/cart/render/default.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,13 +21,13 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getItem() ?> <?php echo $this->__('Remove item')?> - <?php echo $this->htmlEscape($this->getItemName($_item)) ?> + <?php echo $this->htmlEscape($this->getItemName($_item)) ?>

    getItemName($_item) ?>

    getItemDescription($_item) ?> diff --git a/app/design/frontend/default/blank/template/checkout/cart/render/simple.phtml b/app/design/frontend/default/blank/template/checkout/cart/render/simple.phtml index 04e42b1d..4261ba6e 100644 --- a/app/design/frontend/default/blank/template/checkout/cart/render/simple.phtml +++ b/app/design/frontend/default/blank/template/checkout/cart/render/simple.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,13 +21,13 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getItem() ?> <?php echo $this->__('Remove item')?> - <?php echo $this->htmlEscape($this->getItemName($_item)) ?> + <?php echo $this->htmlEscape($this->getItemName($_item)) ?>

    getItemName($_item) ?>

    getItemDescription($_item) ?> diff --git a/app/design/frontend/default/blank/template/checkout/cart/shipping.phtml b/app/design/frontend/default/blank/template/checkout/cart/shipping.phtml index b0cb0e13..00b1c809 100644 --- a/app/design/frontend/default/blank/template/checkout/cart/shipping.phtml +++ b/app/design/frontend/default/blank/template/checkout/cart/shipping.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getEstimateRates())): ?> -
    - $_rates): ?> -
    getCarrierName($code) ?>
    -
    -
      - - getErrorMessage()) echo ' class="error-msg"';?>> - getErrorMessage()): ?> - getErrorMessage() ?> - - getCode()===$this->getAddressShippingMethod()) echo ' checked="checked"' ?> class="radio" /> - - - - -
    -
    - -
    -
    - -
    +
    +
    + $_rates): ?> +
    getCarrierName($code) ?>
    +
    +
      + + getErrorMessage()) echo ' class="error-msg"';?>> + getErrorMessage()): ?> + getErrorMessage() ?> + + getCode()===$this->getAddressShippingMethod()) echo ' checked="checked"' ?> class="radio" /> + + + + +
    +
    + +
    +
    + +
    +
    -
    -

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

    +
    +

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

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

    __('Payment Method') ?>

    -
    +
    getMethods(); $_methodsCount = count($_methods); @@ -64,16 +64,18 @@ + getChildHtml('payment.method.'.$_code)) : ?>
    - getChildHtml('payment.method.'.$_code) ?> +
    +
    getChildHtml('checkout_billing_items') ?>
    @@ -82,10 +84,10 @@ var payment = new paymentForm('multishipping-billing-form'); function toggleToolTip(event){ if($('payment-tool-tip')){ - $('payment-tool-tip').setStyle({ - top: (Event.pointerY(event)-500)+'px', + /*$('payment-tool-tip').setStyle({ + top: (Event.pointerY(event)-510)+'px', left: (Event.pointerX(event)-800)+'px' - }) + })*/ $('payment-tool-tip').toggle(); } Event.stop(event); diff --git a/app/design/frontend/default/blank/template/checkout/multishipping/billing/items.phtml b/app/design/frontend/default/blank/template/checkout/multishipping/billing/items.phtml index 9f2724a7..c4a5476a 100644 --- a/app/design/frontend/default/blank/template/checkout/multishipping/billing/items.phtml +++ b/app/design/frontend/default/blank/template/checkout/multishipping/billing/items.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getQuote()->hasVirtualItems()): ?> diff --git a/app/design/frontend/default/blank/template/checkout/multishipping/item/default.phtml b/app/design/frontend/default/blank/template/checkout/multishipping/item/default.phtml index 6ac5c519..0627589c 100644 --- a/app/design/frontend/default/blank/template/checkout/multishipping/item/default.phtml +++ b/app/design/frontend/default/blank/template/checkout/multishipping/item/default.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>

    getProductName() ?>

    diff --git a/app/design/frontend/default/blank/template/checkout/multishipping/link.phtml b/app/design/frontend/default/blank/template/checkout/multishipping/link.phtml index 1b8082db..24aaf3ff 100644 --- a/app/design/frontend/default/blank/template/checkout/multishipping/link.phtml +++ b/app/design/frontend/default/blank/template/checkout/multishipping/link.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
  • __('Checkout with Multiple Addresses');?>
  • diff --git a/app/design/frontend/default/blank/template/checkout/multishipping/overview.phtml b/app/design/frontend/default/blank/template/checkout/multishipping/overview.phtml index d0f28d5b..91205e3c 100644 --- a/app/design/frontend/default/blank/template/checkout/multishipping/overview.phtml +++ b/app/design/frontend/default/blank/template/checkout/multishipping/overview.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
    @@ -34,13 +34,13 @@

    __('Billing Information') ?>

    getBillingAddress() ?> -

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

    +

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

    format('html') ?>
    -

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

    +

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

    getPaymentHtml() ?> @@ -52,11 +52,11 @@

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

    -
    __('Shipping to') ?> | __('Change Shipping Address') ?>
    +
    __('Shipping to') ?> | __('Edit') ?>
    format('html') ?>
    -
    __('Shipping Method') ?> | __('Change Shipping Method') ?>
    +
    __('Shipping Method') ?> | __('Edit') ?>
    getShippingAddressRate($_address)): ?>

    getCarrierTitle() ?> (getMethodTitle() ?>) diff --git a/app/design/frontend/default/blank/template/checkout/multishipping/shipping.phtml b/app/design/frontend/default/blank/template/checkout/multishipping/shipping.phtml index 90fb1aff..5b6d6723 100644 --- a/app/design/frontend/default/blank/template/checkout/multishipping/shipping.phtml +++ b/app/design/frontend/default/blank/template/checkout/multishipping/shipping.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> __('Address %s of %s', ($_index+1), $this->getAddressCount()) ?>

    -

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

    +

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

    format('html') ?>

    __('Shipping Method') ?>

    getShippingRates($_address))): ?>

    __('Sorry, no quotes are available for this order at this time.') ?>

    -
    +
    $_rates): ?>
    getCarrierName($code) ?>
    diff --git a/app/design/frontend/default/blank/template/checkout/multishipping/state.phtml b/app/design/frontend/default/blank/template/checkout/multishipping/state.phtml index d666c632..9ca78147 100644 --- a/app/design/frontend/default/blank/template/checkout/multishipping/state.phtml +++ b/app/design/frontend/default/blank/template/checkout/multishipping/state.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>

    __('Order Success') ?>

    -
    -

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

    -

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

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

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

    +

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

    +getOrderIds()): ?> + + __('Your order number is ') ?> + $incrementId): ?> + + + + + + +
    diff --git a/app/design/frontend/default/blank/template/checkout/onepage.phtml b/app/design/frontend/default/blank/template/checkout/onepage.phtml index 7e0bf472..8e3e4dfb 100644 --- a/app/design/frontend/default/blank/template/checkout/onepage.phtml +++ b/app/design/frontend/default/blank/template/checkout/onepage.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
    @@ -30,7 +30,7 @@ -
      +
        getSteps() as $_stepId => $_stepInfo): ?> getChild($_stepId) || !$this->getChild($_stepId)->isShow()): continue; endif; $i++ ?>
      1. diff --git a/app/design/frontend/default/blank/template/checkout/onepage/agreements.phtml b/app/design/frontend/default/blank/template/checkout/onepage/agreements.phtml index 964d8c0c..1dfeca28 100644 --- a/app/design/frontend/default/blank/template/checkout/onepage/agreements.phtml +++ b/app/design/frontend/default/blank/template/checkout/onepage/agreements.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,16 +21,26 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> + + getAgreements()) return; ?>
          getAgreements() as $_a): ?>
        1. getContentHeight() ? ' style="height:' . $_a->getContentHeight() . '"' : '')?>> - htmlEscape($_a->getContent())) ?> + getIsHtml()):?> + getContent() ?> + + htmlEscape($_a->getContent())) ?> +

          diff --git a/app/design/frontend/default/blank/template/checkout/onepage/billing.phtml b/app/design/frontend/default/blank/template/checkout/onepage/billing.phtml index a7048f2d..692ae64f 100644 --- a/app/design/frontend/default/blank/template/checkout/onepage/billing.phtml +++ b/app/design/frontend/default/blank/template/checkout/onepage/billing.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> @@ -60,7 +60,7 @@

    -
    +
    @@ -85,7 +85,7 @@
    isCustomerLoggedIn()): ?> - + getLayout()->createBlock('customer/widget_dob') ?> isEnabled()): ?>
  • @@ -93,7 +93,15 @@ ->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?>
  • - + + getLayout()->createBlock('customer/widget_taxvat') ?> + isEnabled()): ?> +
  • + setTaxvat($this->getQuote()->getCustomerTaxvat()) + ->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?> +
  • + +

  • diff --git a/app/design/frontend/default/blank/template/checkout/onepage/failure.phtml b/app/design/frontend/default/blank/template/checkout/onepage/failure.phtml index 519c8cb7..c41dd632 100644 --- a/app/design/frontend/default/blank/template/checkout/onepage/failure.phtml +++ b/app/design/frontend/default/blank/template/checkout/onepage/failure.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
    diff --git a/app/design/frontend/default/blank/template/checkout/onepage/link.phtml b/app/design/frontend/default/blank/template/checkout/onepage/link.phtml index 09a2e8d6..7c245a84 100644 --- a/app/design/frontend/default/blank/template/checkout/onepage/link.phtml +++ b/app/design/frontend/default/blank/template/checkout/onepage/link.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,11 +21,11 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> isPossibleOnepageCheckout()):?>
  • - +
  • diff --git a/app/design/frontend/default/blank/template/checkout/onepage/login.phtml b/app/design/frontend/default/blank/template/checkout/onepage/login.phtml index fa62e964..b273d6d7 100644 --- a/app/design/frontend/default/blank/template/checkout/onepage/login.phtml +++ b/app/design/frontend/default/blank/template/checkout/onepage/login.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,13 +21,13 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>

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

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

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

    @@ -61,11 +61,11 @@
    - +
    -

    Login

    +

    __('Login') ?>

    getMessagesBlock()->getGroupedHtml() ?>
    diff --git a/app/design/frontend/default/blank/template/checkout/onepage/payment.phtml b/app/design/frontend/default/blank/template/checkout/onepage/payment.phtml index b69883e4..8219d8ca 100644 --- a/app/design/frontend/default/blank/template/checkout/onepage/payment.phtml +++ b/app/design/frontend/default/blank/template/checkout/onepage/payment.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,19 +21,23 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> - getChildHtml('methods') ?> - +
    + getChildHtml('methods') ?> +
    +

    __('* Required Fields') ?>

    « __('Back') ?> @@ -47,8 +51,8 @@ var payment = new Payment('co-payment-form', 'getUrl('checkout function toggleToolTip(event){ if($('payment-tool-tip')){ $('payment-tool-tip').setStyle({ - top: (Event.pointerY(event)-400)+'px', - left: (Event.pointerX(event)+100)+'px' + top: (Event.pointerY(event)-550)+'px'//, + //left: (Event.pointerX(event)+100)+'px' }) $('payment-tool-tip').toggle(); } @@ -57,10 +61,6 @@ var payment = new Payment('co-payment-form', 'getUrl('checkout if($('payment-tool-tip-close')){ Event.observe($('payment-tool-tip-close'), 'click', toggleToolTip); } - - $$('.cvv-what-is-this').each(function(element){ - Event.observe(element, 'click', toggleToolTip); - }); //]]> diff --git a/app/design/frontend/default/blank/template/checkout/onepage/progress.phtml b/app/design/frontend/default/blank/template/checkout/onepage/progress.phtml index 86117b1a..eada0faa 100644 --- a/app/design/frontend/default/blank/template/checkout/onepage/progress.phtml +++ b/app/design/frontend/default/blank/template/checkout/onepage/progress.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
    @@ -33,7 +33,7 @@ getCheckout()->getStepData('billing', 'is_show')): ?> getCheckout()->getStepData('billing', 'complete')): ?>
    - __('Billing Address') ?> | __('Change Billing Address') ?> + __('Billing Address') ?> | __('Edit') ?>
    getBilling()->format('html') ?>
    @@ -44,11 +44,11 @@ - + getCheckout()->getStepData('shipping', 'is_show')): ?> getCheckout()->getStepData('shipping', 'complete')): ?>
    - __('Shipping Address') ?> | __('Change Shipping Address') ?> + __('Shipping Address') ?> | __('Edit') ?>
    getShipping()->format('html') ?>
    @@ -59,22 +59,27 @@ - + getCheckout()->getStepData('shipping_method', 'is_show')): ?> getCheckout()->getStepData('shipping_method', 'complete')): ?>
    - __('Shipping Method') ?> | __('Change Shipping Method') ?> + __('Shipping Method') ?> | __('Edit') ?>
    getShippingMethod()): ?> getShippingDescription() ?> + getShippingPriceExclTax(); ?> getShippingPriceInclTax(); ?> - - + helper('tax')->displayShippingPriceIncludingTax()): ?> + + + + helper('tax')->displayShippingBothPrices() && $_incl != $_excl): ?> (__('Incl. Tax'); ?> ) + __('Shipping method has not been selected yet') ?> @@ -85,11 +90,11 @@ - + getCheckout()->getStepData('payment', 'is_show')): ?> getCheckout()->getStepData('payment', 'complete')): ?>
    - __('Payment Method') ?> | __('Change Payment Method') ?> + __('Payment Method') ?> | __('Edit') ?>
    getPaymentHtml() ?> diff --git a/app/design/frontend/default/blank/template/checkout/onepage/review.phtml b/app/design/frontend/default/blank/template/checkout/onepage/review.phtml index ea3d58c1..c663fcaa 100644 --- a/app/design/frontend/default/blank/template/checkout/onepage/review.phtml +++ b/app/design/frontend/default/blank/template/checkout/onepage/review.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
    diff --git a/app/design/frontend/default/blank/template/checkout/onepage/review/info.phtml b/app/design/frontend/default/blank/template/checkout/onepage/review/info.phtml index 045909d0..36343faf 100644 --- a/app/design/frontend/default/blank/template/checkout/onepage/review/info.phtml +++ b/app/design/frontend/default/blank/template/checkout/onepage/review/info.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/blank/template/checkout/onepage/review/item.phtml b/app/design/frontend/default/blank/template/checkout/onepage/review/item.phtml index 693db0a7..41bdef85 100644 --- a/app/design/frontend/default/blank/template/checkout/onepage/review/item.phtml +++ b/app/design/frontend/default/blank/template/checkout/onepage/review/item.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getItem()?> diff --git a/app/design/frontend/default/blank/template/checkout/onepage/review/totals.phtml b/app/design/frontend/default/blank/template/checkout/onepage/review/totals.phtml index 2312a226..7c9760c8 100644 --- a/app/design/frontend/default/blank/template/checkout/onepage/review/totals.phtml +++ b/app/design/frontend/default/blank/template/checkout/onepage/review/totals.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getTotals()): ?> diff --git a/app/design/frontend/default/blank/template/checkout/onepage/shipping.phtml b/app/design/frontend/default/blank/template/checkout/onepage/shipping.phtml index 8d031ca8..1a9b95f7 100644 --- a/app/design/frontend/default/blank/template/checkout/onepage/shipping.phtml +++ b/app/design/frontend/default/blank/template/checkout/onepage/shipping.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/blank/template/checkout/onepage/shipping_method.phtml b/app/design/frontend/default/blank/template/checkout/onepage/shipping_method.phtml index 4f5439cd..0deb4031 100644 --- a/app/design/frontend/default/blank/template/checkout/onepage/shipping_method.phtml +++ b/app/design/frontend/default/blank/template/checkout/onepage/shipping_method.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/blank/template/checkout/onepage/shipping_method/additional.phtml b/app/design/frontend/default/blank/template/checkout/onepage/shipping_method/additional.phtml index 1e37df82..778bb9d8 100644 --- a/app/design/frontend/default/blank/template/checkout/onepage/shipping_method/additional.phtml +++ b/app/design/frontend/default/blank/template/checkout/onepage/shipping_method/additional.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> helper('giftmessage/message')->getInline('onepage_checkout', $this->getQuote(), $this->getDontDisplayContainer()) ?> \ No newline at end of file diff --git a/app/design/frontend/default/blank/template/checkout/onepage/shipping_method/available.phtml b/app/design/frontend/default/blank/template/checkout/onepage/shipping_method/available.phtml index 702b215b..3b2b99e2 100644 --- a/app/design/frontend/default/blank/template/checkout/onepage/shipping_method/available.phtml +++ b/app/design/frontend/default/blank/template/checkout/onepage/shipping_method/available.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,13 +21,13 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getShippingRates())): ?>

    __('Sorry, no quotes are available for this order at this time.') ?>

    -
    +
    $_rates): ?>
    getCarrierName($code) ?>
    diff --git a/app/design/frontend/default/blank/template/checkout/success.phtml b/app/design/frontend/default/blank/template/checkout/success.phtml index 62800853..90e060ad 100644 --- a/app/design/frontend/default/blank/template/checkout/success.phtml +++ b/app/design/frontend/default/blank/template/checkout/success.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
    diff --git a/app/design/frontend/default/blank/template/checkout/total/default.phtml b/app/design/frontend/default/blank/template/checkout/total/default.phtml index 654e446c..5aa7a667 100644 --- a/app/design/frontend/default/blank/template/checkout/total/default.phtml +++ b/app/design/frontend/default/blank/template/checkout/total/default.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
    diff --git a/app/design/frontend/default/blank/template/checkout/total/tax.phtml b/app/design/frontend/default/blank/template/checkout/total/tax.phtml index 2ec3f83f..b8e9ad83 100644 --- a/app/design/frontend/default/blank/template/checkout/total/tax.phtml +++ b/app/design/frontend/default/blank/template/checkout/total/tax.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> @@ -57,7 +57,7 @@ getTotal()->getTitle() ?> - \ No newline at end of file diff --git a/app/design/frontend/default/blank/template/chronopay/form.phtml b/app/design/frontend/default/blank/template/chronopay/form.phtml index 868c268e..a962f0fe 100644 --- a/app/design/frontend/default/blank/template/chronopay/form.phtml +++ b/app/design/frontend/default/blank/template/chronopay/form.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,69 +21,70 @@ * @category design_blank * @package Mage_Chronopay * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -
    - getMethodCode() ?> - -
    \ No newline at end of file + __('What is this?') ?> + + + diff --git a/app/design/frontend/default/blank/template/chronopay/info.phtml b/app/design/frontend/default/blank/template/chronopay/info.phtml index 0b779748..d566bab3 100644 --- a/app/design/frontend/default/blank/template/chronopay/info.phtml +++ b/app/design/frontend/default/blank/template/chronopay/info.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage_Chronopay * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getInfo()): ?> diff --git a/app/design/frontend/default/blank/template/chronopay/standard/failure.phtml b/app/design/frontend/default/blank/template/chronopay/standard/failure.phtml index 4772a85a..25b8bfbf 100644 --- a/app/design/frontend/default/blank/template/chronopay/standard/failure.phtml +++ b/app/design/frontend/default/blank/template/chronopay/standard/failure.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage_Chronopay * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
    diff --git a/app/design/frontend/default/blank/template/chronopay/standard/form.phtml b/app/design/frontend/default/blank/template/chronopay/standard/form.phtml index aae64acf..c3849082 100644 --- a/app/design/frontend/default/blank/template/chronopay/standard/form.phtml +++ b/app/design/frontend/default/blank/template/chronopay/standard/form.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,12 +21,10 @@ * @category design_blank * @package Mage_Chronopay * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -
    - getMethodCode() ?> - -
    \ No newline at end of file +getMethodCode() ?> + diff --git a/app/design/frontend/default/blank/template/cms/content.phtml b/app/design/frontend/default/blank/template/cms/content.phtml index c9c76c8b..5c873206 100644 --- a/app/design/frontend/default/blank/template/cms/content.phtml +++ b/app/design/frontend/default/blank/template/cms/content.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getPageContent(); ?> diff --git a/app/design/frontend/default/blank/template/cms/default/home.phtml b/app/design/frontend/default/blank/template/cms/default/home.phtml index f2cbcd69..8c7695fe 100644 --- a/app/design/frontend/default/blank/template/cms/default/home.phtml +++ b/app/design/frontend/default/blank/template/cms/default/home.phtml @@ -1 +1,27 @@ + There was no Home CMS page configured or found. \ No newline at end of file diff --git a/app/design/frontend/default/blank/template/cms/default/no-route.phtml b/app/design/frontend/default/blank/template/cms/default/no-route.phtml index b7533d20..30669493 100644 --- a/app/design/frontend/default/blank/template/cms/default/no-route.phtml +++ b/app/design/frontend/default/blank/template/cms/default/no-route.phtml @@ -1 +1,27 @@ + There was no 404 CMS page configured or found. \ No newline at end of file diff --git a/app/design/frontend/default/blank/template/cms/meta.phtml b/app/design/frontend/default/blank/template/cms/meta.phtml index b3be8bec..fbf6bd97 100644 --- a/app/design/frontend/default/blank/template/cms/meta.phtml +++ b/app/design/frontend/default/blank/template/cms/meta.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getPageMetaKeywords()): ?> diff --git a/app/design/frontend/default/blank/template/contacts/form.phtml b/app/design/frontend/default/blank/template/contacts/form.phtml index c4b107d0..accf665a 100644 --- a/app/design/frontend/default/blank/template/contacts/form.phtml +++ b/app/design/frontend/default/blank/template/contacts/form.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
    getMessagesBlock()->getGroupedHtml() ?>
    @@ -35,29 +35,29 @@

  • - +

    - +

  • - +

  • - +
  • -

    __('* Required Fields') ?>

    +

    __('* Required Fields') ?>

    - +
    diff --git a/app/design/frontend/default/blank/template/customer/form/changepassword.phtml b/app/design/frontend/default/blank/template/customer/form/changepassword.phtml index 8c5c9ed7..31a11e01 100644 --- a/app/design/frontend/default/blank/template/customer/form/changepassword.phtml +++ b/app/design/frontend/default/blank/template/customer/form/changepassword.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getMessagesBlock()->getGroupedHtml() ?> diff --git a/app/design/frontend/default/blank/template/customer/form/confirmation.phtml b/app/design/frontend/default/blank/template/customer/form/confirmation.phtml index a6bdb4c4..99191b48 100644 --- a/app/design/frontend/default/blank/template/customer/form/confirmation.phtml +++ b/app/design/frontend/default/blank/template/customer/form/confirmation.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
    diff --git a/app/design/frontend/default/blank/template/customer/form/edit.phtml b/app/design/frontend/default/blank/template/customer/form/edit.phtml index 47068432..7b09cc7d 100644 --- a/app/design/frontend/default/blank/template/customer/form/edit.phtml +++ b/app/design/frontend/default/blank/template/customer/form/edit.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
    diff --git a/app/design/frontend/default/blank/template/customer/form/forgotpassword.phtml b/app/design/frontend/default/blank/template/customer/form/forgotpassword.phtml index b356b569..621a6b93 100644 --- a/app/design/frontend/default/blank/template/customer/form/forgotpassword.phtml +++ b/app/design/frontend/default/blank/template/customer/form/forgotpassword.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
    diff --git a/app/design/frontend/default/blank/template/customer/form/login.phtml b/app/design/frontend/default/blank/template/customer/form/login.phtml index 7a0f86e7..d241c76d 100644 --- a/app/design/frontend/default/blank/template/customer/form/login.phtml +++ b/app/design/frontend/default/blank/template/customer/form/login.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
    diff --git a/app/design/frontend/default/blank/template/customer/form/newsletter.phtml b/app/design/frontend/default/blank/template/customer/form/newsletter.phtml index d56453b6..91087bcf 100644 --- a/app/design/frontend/default/blank/template/customer/form/newsletter.phtml +++ b/app/design/frontend/default/blank/template/customer/form/newsletter.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
    diff --git a/app/design/frontend/default/blank/template/customer/form/register.phtml b/app/design/frontend/default/blank/template/customer/form/register.phtml index 84357d73..2eebbf79 100644 --- a/app/design/frontend/default/blank/template/customer/form/register.phtml +++ b/app/design/frontend/default/blank/template/customer/form/register.phtml @@ -1,13 +1,13 @@ - htmlEscape($this->getFormData()->getEmail()) ?>" title="__('Email Address') ?>" class="input-text validate-email required-entry" />
    + isNewsletterEnabled()): ?>
  • getFormData()->getIsSubscribed()): ?> checked="checked" class="checkbox" />
  • + getLayout()->createBlock('customer/widget_dob') ?> isEnabled()): ?>
  • setDate($this->getFormData()->getDob())->toHtml() ?>
  • @@ -65,8 +67,8 @@ getShowAddressFields()): ?> - -
    +
    +

    __('Address Information') ?>

    • @@ -115,11 +117,11 @@
    + + - - -
    +

    __('Login Information') ?>

    • diff --git a/app/design/frontend/default/blank/template/customer/logout.phtml b/app/design/frontend/default/blank/template/customer/logout.phtml index b941551d..df1fa398 100644 --- a/app/design/frontend/default/blank/template/customer/logout.phtml +++ b/app/design/frontend/default/blank/template/customer/logout.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
      diff --git a/app/design/frontend/default/blank/template/customer/order/view.phtml b/app/design/frontend/default/blank/template/customer/order/view.phtml index 3c556d26..2f1691b4 100644 --- a/app/design/frontend/default/blank/template/customer/order/view.phtml +++ b/app/design/frontend/default/blank/template/customer/order/view.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
      diff --git a/app/design/frontend/default/blank/template/customer/orders.phtml b/app/design/frontend/default/blank/template/customer/orders.phtml index 6faa45d8..dd6ce2cc 100644 --- a/app/design/frontend/default/blank/template/customer/orders.phtml +++ b/app/design/frontend/default/blank/template/customer/orders.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
      diff --git a/app/design/frontend/default/blank/template/customer/widget/dob.phtml b/app/design/frontend/default/blank/template/customer/widget/dob.phtml index 51c9d618..d5253388 100644 --- a/app/design/frontend/default/blank/template/customer/widget/dob.phtml +++ b/app/design/frontend/default/blank/template/customer/widget/dob.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ /** diff --git a/app/design/frontend/default/blank/template/customer/widget/name.phtml b/app/design/frontend/default/blank/template/customer/widget/name.phtml index d6e22bbf..3b51ee31 100644 --- a/app/design/frontend/default/blank/template/customer/widget/name.phtml +++ b/app/design/frontend/default/blank/template/customer/widget/name.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ /** diff --git a/app/design/frontend/default/blank/template/customer/widget/taxvat.phtml b/app/design/frontend/default/blank/template/customer/widget/taxvat.phtml index 8645c5e2..5e6f9b83 100644 --- a/app/design/frontend/default/blank/template/customer/widget/taxvat.phtml +++ b/app/design/frontend/default/blank/template/customer/widget/taxvat.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
      diff --git a/app/design/frontend/default/blank/template/customer/wishlist.phtml b/app/design/frontend/default/blank/template/customer/wishlist.phtml index 7858df23..85b28aec 100644 --- a/app/design/frontend/default/blank/template/customer/wishlist.phtml +++ b/app/design/frontend/default/blank/template/customer/wishlist.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
      diff --git a/app/design/frontend/default/blank/template/cybermut/error.phtml b/app/design/frontend/default/blank/template/cybermut/error.phtml index 44741964..f11eb3a6 100644 --- a/app/design/frontend/default/blank/template/cybermut/error.phtml +++ b/app/design/frontend/default/blank/template/cybermut/error.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,10 +21,10 @@ * @category design_blank * @package Mage_Cybermut * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>

      __('Error occured') ?>

      -

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

      \ No newline at end of file +

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

      diff --git a/app/design/frontend/default/blank/template/cybermut/form.phtml b/app/design/frontend/default/blank/template/cybermut/form.phtml index a4dc2aef..df20f3d1 100644 --- a/app/design/frontend/default/blank/template/cybermut/form.phtml +++ b/app/design/frontend/default/blank/template/cybermut/form.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,12 +21,10 @@ * @category design_blank * @package Mage_Cybermut * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -
      - getMethodCode() ?> - -
      +getMethodCode() ?> + diff --git a/app/design/frontend/default/blank/template/cybersource/form.phtml b/app/design/frontend/default/blank/template/cybersource/form.phtml index 24ba387a..ca554f0c 100644 --- a/app/design/frontend/default/blank/template/cybersource/form.phtml +++ b/app/design/frontend/default/blank/template/cybersource/form.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,110 +21,119 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -
      - getMethodCode() ?> - - +
      + +
    • + + hasVerification()): ?> +
    • +
      +
      +
      +
      -
    • - -
    -
    + __('What is this?') ?> +
    + + + -
    - getMethodCode() ?> - -
    + __('What is this?') ?> +
    + + + diff --git a/app/design/frontend/default/blank/template/eway/info.phtml b/app/design/frontend/default/blank/template/eway/info.phtml index 4351dc8a..a4e13d29 100644 --- a/app/design/frontend/default/blank/template/eway/info.phtml +++ b/app/design/frontend/default/blank/template/eway/info.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage_Eway * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getInfo()): ?> diff --git a/app/design/frontend/default/blank/template/eway/secure/failure.phtml b/app/design/frontend/default/blank/template/eway/secure/failure.phtml index 88fecebf..e4b6c996 100644 --- a/app/design/frontend/default/blank/template/eway/secure/failure.phtml +++ b/app/design/frontend/default/blank/template/eway/secure/failure.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage_Eway * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
    diff --git a/app/design/frontend/default/blank/template/eway/secure/form.phtml b/app/design/frontend/default/blank/template/eway/secure/form.phtml index 4fe8278b..067ab9a9 100644 --- a/app/design/frontend/default/blank/template/eway/secure/form.phtml +++ b/app/design/frontend/default/blank/template/eway/secure/form.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,12 +21,10 @@ * @category design_blank * @package Mage_Eway * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -
    - getMethodCode() ?> - -
    +getMethodCode() ?> + diff --git a/app/design/frontend/default/blank/template/eway/shared/failure.phtml b/app/design/frontend/default/blank/template/eway/shared/failure.phtml index 1f26877a..bead8836 100644 --- a/app/design/frontend/default/blank/template/eway/shared/failure.phtml +++ b/app/design/frontend/default/blank/template/eway/shared/failure.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage_Eway * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
    diff --git a/app/design/frontend/default/blank/template/eway/shared/form.phtml b/app/design/frontend/default/blank/template/eway/shared/form.phtml index 75ca50f3..de771aca 100644 --- a/app/design/frontend/default/blank/template/eway/shared/form.phtml +++ b/app/design/frontend/default/blank/template/eway/shared/form.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,12 +21,10 @@ * @category design_blank * @package Mage_Eway * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -
    - getMethodCode() ?> - -
    +getMethodCode() ?> + diff --git a/app/design/frontend/default/blank/template/flo2cash/form.phtml b/app/design/frontend/default/blank/template/flo2cash/form.phtml index 501b24db..2f25bfa6 100644 --- a/app/design/frontend/default/blank/template/flo2cash/form.phtml +++ b/app/design/frontend/default/blank/template/flo2cash/form.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,69 +21,70 @@ * @category design_blank * @package Mage_Flo2Cash * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -
    - getMethodCode() ?> - -
    \ No newline at end of file + __('What is this?') ?> +
    + + + diff --git a/app/design/frontend/default/blank/template/flo2cash/info.phtml b/app/design/frontend/default/blank/template/flo2cash/info.phtml index 63529c07..72f9a2b3 100644 --- a/app/design/frontend/default/blank/template/flo2cash/info.phtml +++ b/app/design/frontend/default/blank/template/flo2cash/info.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage_Flo2Cash * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getInfo()): ?> diff --git a/app/design/frontend/default/blank/template/giftmessage/form.phtml b/app/design/frontend/default/blank/template/giftmessage/form.phtml index 0e87646d..251501d9 100644 --- a/app/design/frontend/default/blank/template/giftmessage/form.phtml +++ b/app/design/frontend/default/blank/template/giftmessage/form.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/blank/template/giftmessage/helper.phtml b/app/design/frontend/default/blank/template/giftmessage/helper.phtml index 14a90395..28939342 100644 --- a/app/design/frontend/default/blank/template/giftmessage/helper.phtml +++ b/app/design/frontend/default/blank/template/giftmessage/helper.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getScriptIncluded() && $this->getCanDisplayContainer()): ?> diff --git a/app/design/frontend/default/blank/template/giftmessage/inline.phtml b/app/design/frontend/default/blank/template/giftmessage/inline.phtml index 89f7b746..fc658aa6 100644 --- a/app/design/frontend/default/blank/template/giftmessage/inline.phtml +++ b/app/design/frontend/default/blank/template/giftmessage/inline.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getDontDisplayContainer()): ?> diff --git a/app/design/frontend/default/blank/template/googlecheckout/form.phtml b/app/design/frontend/default/blank/template/googlecheckout/form.phtml index d948b523..443ce854 100644 --- a/app/design/frontend/default/blank/template/googlecheckout/form.phtml +++ b/app/design/frontend/default/blank/template/googlecheckout/form.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,12 +21,10 @@ * @category design_blank * @package Mage_GoogleCheckout * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -
    - getMethodCode() ?> - -
    +getMethodCode() ?> + diff --git a/app/design/frontend/default/blank/template/googlecheckout/link.phtml b/app/design/frontend/default/blank/template/googlecheckout/link.phtml index fea03c78..9f458be6 100644 --- a/app/design/frontend/default/blank/template/googlecheckout/link.phtml +++ b/app/design/frontend/default/blank/template/googlecheckout/link.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,14 +21,14 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
  • -getIsActiveAanalytics()):?> onsubmit="setUrchinInputCode(pageTracker)"> -
    - - -
    - +
    getIsActiveAanalytics()):?> onsubmit="setUrchinInputCode(pageTracker)"> +
    + + +
    +
  • diff --git a/app/design/frontend/default/blank/template/ideal/advanced/failure.phtml b/app/design/frontend/default/blank/template/ideal/advanced/failure.phtml index 85d64e87..629f4770 100644 --- a/app/design/frontend/default/blank/template/ideal/advanced/failure.phtml +++ b/app/design/frontend/default/blank/template/ideal/advanced/failure.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage_Ideal * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
    diff --git a/app/design/frontend/default/blank/template/ideal/advanced/form.phtml b/app/design/frontend/default/blank/template/ideal/advanced/form.phtml index cb9bbab4..411a5cb4 100755 --- a/app/design/frontend/default/blank/template/ideal/advanced/form.phtml +++ b/app/design/frontend/default/blank/template/ideal/advanced/form.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,24 +21,22 @@ * @category design_blank * @package Mage_Ideal * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getMethodCode() ?> getIssuerList()):?> -
    - -
    - \ No newline at end of file + + diff --git a/app/design/frontend/default/blank/template/ideal/advanced/info.phtml b/app/design/frontend/default/blank/template/ideal/advanced/info.phtml index b635cac3..e5879f72 100644 --- a/app/design/frontend/default/blank/template/ideal/advanced/info.phtml +++ b/app/design/frontend/default/blank/template/ideal/advanced/info.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage_Ideal * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getInfo()): ?> diff --git a/app/design/frontend/default/blank/template/ideal/basic/failure.phtml b/app/design/frontend/default/blank/template/ideal/basic/failure.phtml index f8ecee6b..c2ef40ca 100644 --- a/app/design/frontend/default/blank/template/ideal/basic/failure.phtml +++ b/app/design/frontend/default/blank/template/ideal/basic/failure.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage_Ideal * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
    diff --git a/app/design/frontend/default/blank/template/ideal/basic/form.phtml b/app/design/frontend/default/blank/template/ideal/basic/form.phtml index 81704504..a0a7e4f4 100755 --- a/app/design/frontend/default/blank/template/ideal/basic/form.phtml +++ b/app/design/frontend/default/blank/template/ideal/basic/form.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,12 +21,10 @@ * @category design_blank * @package Mage_Ideal * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -
    - getMethodCode() ?> - -
    +getMethodCode() ?> + diff --git a/app/design/frontend/default/blank/template/newsletter/subscribe.phtml b/app/design/frontend/default/blank/template/newsletter/subscribe.phtml index c6c7918c..858df03f 100644 --- a/app/design/frontend/default/blank/template/newsletter/subscribe.phtml +++ b/app/design/frontend/default/blank/template/newsletter/subscribe.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
    diff --git a/app/design/frontend/default/blank/template/oscommerce/order/list.phtml b/app/design/frontend/default/blank/template/oscommerce/order/list.phtml index 19a25a76..29b5164a 100644 --- a/app/design/frontend/default/blank/template/oscommerce/order/list.phtml +++ b/app/design/frontend/default/blank/template/oscommerce/order/list.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage_Ideal * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getOsCommerceOrders(); ?> diff --git a/app/design/frontend/default/blank/template/oscommerce/order/view.phtml b/app/design/frontend/default/blank/template/oscommerce/order/view.phtml index 74d000c4..718b81e3 100644 --- a/app/design/frontend/default/blank/template/oscommerce/order/view.phtml +++ b/app/design/frontend/default/blank/template/oscommerce/order/view.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getOrder() ?> diff --git a/app/design/frontend/default/blank/template/page/1column.phtml b/app/design/frontend/default/blank/template/page/1column.phtml index f0497414..2fd6661c 100644 --- a/app/design/frontend/default/blank/template/page/1column.phtml +++ b/app/design/frontend/default/blank/template/page/1column.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/blank/template/page/html/footer.phtml b/app/design/frontend/default/blank/template/page/html/footer.phtml index ce8a74e9..7e889f0a 100644 --- a/app/design/frontend/default/blank/template/page/html/footer.phtml +++ b/app/design/frontend/default/blank/template/page/html/footer.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getChildHtml() ?> diff --git a/app/design/frontend/default/blank/template/page/html/head.phtml b/app/design/frontend/default/blank/template/page/html/head.phtml index b9f350c1..6be31367 100644 --- a/app/design/frontend/default/blank/template/page/html/head.phtml +++ b/app/design/frontend/default/blank/template/page/html/head.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> <?php echo $this->getTitle() ?> diff --git a/app/design/frontend/default/blank/template/page/html/header.phtml b/app/design/frontend/default/blank/template/page/html/header.phtml index ef46ca5f..b729bdf2 100644 --- a/app/design/frontend/default/blank/template/page/html/header.phtml +++ b/app/design/frontend/default/blank/template/page/html/header.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,11 +21,11 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
    -

    Magento - Open Source eCommerce

    +

    getLogoAlt() ?>

    getWelcome()?>

    getChildHtml('topLinks') ?> getChildHtml('topSearch') ?> diff --git a/app/design/frontend/default/blank/template/page/html/pager.phtml b/app/design/frontend/default/blank/template/page/html/pager.phtml index 48a1327c..d0a5da2b 100644 --- a/app/design/frontend/default/blank/template/page/html/pager.phtml +++ b/app/design/frontend/default/blank/template/page/html/pager.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/blank/template/page/html/wrapper.phtml b/app/design/frontend/default/blank/template/page/html/wrapper.phtml index 688165fe..296ff6c5 100644 --- a/app/design/frontend/default/blank/template/page/html/wrapper.phtml +++ b/app/design/frontend/default/blank/template/page/html/wrapper.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getChildHtml('head') ?> -getBodyClass()?' class="'.$this->getBodyClass().'"':'' ?>> -
    + +
    getChildHtml('content') ?> getChildHtml('before_body_end') ?>
    diff --git a/app/design/frontend/default/blank/template/page/print.phtml b/app/design/frontend/default/blank/template/page/print.phtml index be03ccdb..72bcbb64 100644 --- a/app/design/frontend/default/blank/template/page/print.phtml +++ b/app/design/frontend/default/blank/template/page/print.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getChildHtml('head') ?> -getBodyClass()?' class="'.$this->getBodyClass().'"':'' ?>> -
    + +
    + + hasVerification()): ?> +
  • +
    +
    +
    + __('What is this?') ?> +
    +
  • + + diff --git a/app/design/frontend/default/blank/template/payment/form/checkmo.phtml b/app/design/frontend/default/blank/template/payment/form/checkmo.phtml index 37ddd5aa..391d97d5 100644 --- a/app/design/frontend/default/blank/template/payment/form/checkmo.phtml +++ b/app/design/frontend/default/blank/template/payment/form/checkmo.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,12 +21,11 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -
    getMethod()->getMailingAddress() || $this->getMethod()->getPayableTo()): ?> -
    diff --git a/app/design/frontend/default/blank/template/payment/form/purchaseorder.phtml b/app/design/frontend/default/blank/template/payment/form/purchaseorder.phtml index 13177ae7..9ac029b5 100644 --- a/app/design/frontend/default/blank/template/payment/form/purchaseorder.phtml +++ b/app/design/frontend/default/blank/template/payment/form/purchaseorder.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,16 +21,14 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -
    - -
    + diff --git a/app/design/frontend/default/blank/template/payment/info/cc.phtml b/app/design/frontend/default/blank/template/payment/info/cc.phtml index b6d210f7..8c619f73 100644 --- a/app/design/frontend/default/blank/template/payment/info/cc.phtml +++ b/app/design/frontend/default/blank/template/payment/info/cc.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getInfo()): ?> diff --git a/app/design/frontend/default/blank/template/payment/info/ccsave.phtml b/app/design/frontend/default/blank/template/payment/info/ccsave.phtml index cfebade0..3ef7be67 100644 --- a/app/design/frontend/default/blank/template/payment/info/ccsave.phtml +++ b/app/design/frontend/default/blank/template/payment/info/ccsave.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> __('Name on the Card: %s', $this->htmlEscape($this->getInfo()->getCcOwner())) ?>
    diff --git a/app/design/frontend/default/blank/template/payment/info/checkmo.phtml b/app/design/frontend/default/blank/template/payment/info/checkmo.phtml index e69159bb..588fce15 100644 --- a/app/design/frontend/default/blank/template/payment/info/checkmo.phtml +++ b/app/design/frontend/default/blank/template/payment/info/checkmo.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>

    getMethod()->getTitle() ?> diff --git a/app/design/frontend/default/blank/template/payment/info/default.phtml b/app/design/frontend/default/blank/template/payment/info/default.phtml index f961ef48..db8b2204 100644 --- a/app/design/frontend/default/blank/template/payment/info/default.phtml +++ b/app/design/frontend/default/blank/template/payment/info/default.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>

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

    diff --git a/app/design/frontend/default/blank/template/payment/info/purchaseorder.phtml b/app/design/frontend/default/blank/template/payment/info/purchaseorder.phtml index e190ff06..23449c2e 100644 --- a/app/design/frontend/default/blank/template/payment/info/purchaseorder.phtml +++ b/app/design/frontend/default/blank/template/payment/info/purchaseorder.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>

    getMethod()->getTitle() ?>

    diff --git a/app/design/frontend/default/blank/template/paypal/express/form.phtml b/app/design/frontend/default/blank/template/paypal/express/form.phtml index 90747ecd..39430db6 100644 --- a/app/design/frontend/default/blank/template/paypal/express/form.phtml +++ b/app/design/frontend/default/blank/template/paypal/express/form.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,12 +21,10 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -
    - getMethodCode() ?> - -
    +getMethodCode() ?> + diff --git a/app/design/frontend/default/blank/template/paypal/express/info.phtml b/app/design/frontend/default/blank/template/paypal/express/info.phtml index 84c10a79..1efdc9ca 100644 --- a/app/design/frontend/default/blank/template/paypal/express/info.phtml +++ b/app/design/frontend/default/blank/template/paypal/express/info.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>

    getMethod()->getTitle() ?>
    diff --git a/app/design/frontend/default/blank/template/paypal/express/review.phtml b/app/design/frontend/default/blank/template/paypal/express/review.phtml index 641d0dc8..61ab71d3 100644 --- a/app/design/frontend/default/blank/template/paypal/express/review.phtml +++ b/app/design/frontend/default/blank/template/paypal/express/review.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>

    diff --git a/app/design/frontend/default/blank/template/paypal/express/review/details.phtml b/app/design/frontend/default/blank/template/paypal/express/review/details.phtml index c75870cc..fee0298d 100644 --- a/app/design/frontend/default/blank/template/paypal/express/review/details.phtml +++ b/app/design/frontend/default/blank/template/paypal/express/review/details.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
    + helper('checkout')->formatPrice($this->getTotal()->getValue()) ?>
    diff --git a/app/design/frontend/default/blank/template/paypal/link.phtml b/app/design/frontend/default/blank/template/paypal/link.phtml index 9efe018d..f3f1e89f 100644 --- a/app/design/frontend/default/blank/template/paypal/link.phtml +++ b/app/design/frontend/default/blank/template/paypal/link.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,9 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -
  • <?php echo Mage::helper('paypal')->__('Paypal Checkout');?>
  • +
  • + <?php echo Mage::helper('paypal')->__('Paypal Checkout');?> +
  • diff --git a/app/design/frontend/default/blank/template/paypal/standard/form.phtml b/app/design/frontend/default/blank/template/paypal/standard/form.phtml index a5987c96..8643097e 100644 --- a/app/design/frontend/default/blank/template/paypal/standard/form.phtml +++ b/app/design/frontend/default/blank/template/paypal/standard/form.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,12 +21,10 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -
    - getMethodCode() ?> - -
    +getMethodCode() ?> + diff --git a/app/design/frontend/default/blank/template/paypaluk/direct/form.phtml b/app/design/frontend/default/blank/template/paypaluk/direct/form.phtml index b7ffa6c5..2aaffd2c 100644 --- a/app/design/frontend/default/blank/template/paypaluk/direct/form.phtml +++ b/app/design/frontend/default/blank/template/paypaluk/direct/form.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,103 +21,113 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -
    - getMethodCode() ?> - + + + + + hasVerification()): ?> +
  • +
    +
    +
    +
    -
  • - - -
    + __('What is this?') ?> + + + + +
    +
    +

    __('Recently Compared Products') ?>

    +
    +
    +
      + +
    1. htmlEscape($_item->getName()) ?>
    2. + +
    + +
    diff --git a/app/design/frontend/default/blank/template/reports/product_viewed.phtml b/app/design/frontend/default/blank/template/reports/product_viewed.phtml index b513a270..69bcabf7 100644 --- a/app/design/frontend/default/blank/template/reports/product_viewed.phtml +++ b/app/design/frontend/default/blank/template/reports/product_viewed.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getRecentlyViewedProducts()): ?> diff --git a/app/design/frontend/default/blank/template/review/customer/list.phtml b/app/design/frontend/default/blank/template/review/customer/list.phtml index c818b1f0..4874dcca 100644 --- a/app/design/frontend/default/blank/template/review/customer/list.phtml +++ b/app/design/frontend/default/blank/template/review/customer/list.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getMessagesBlock()->getGroupedHtml() ?> @@ -59,4 +59,6 @@

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

    - + diff --git a/app/design/frontend/default/blank/template/review/customer/recent.phtml b/app/design/frontend/default/blank/template/review/customer/recent.phtml index 091ade16..b9e40635 100644 --- a/app/design/frontend/default/blank/template/review/customer/recent.phtml +++ b/app/design/frontend/default/blank/template/review/customer/recent.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getCollection() && $this->count()): ?> diff --git a/app/design/frontend/default/blank/template/review/customer/view.phtml b/app/design/frontend/default/blank/template/review/customer/view.phtml index 33370127..a438100a 100644 --- a/app/design/frontend/default/blank/template/review/customer/view.phtml +++ b/app/design/frontend/default/blank/template/review/customer/view.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getProductData()->getId()): ?> diff --git a/app/design/frontend/default/blank/template/review/form.phtml b/app/design/frontend/default/blank/template/review/form.phtml index b33d91c7..5f3af85f 100644 --- a/app/design/frontend/default/blank/template/review/form.phtml +++ b/app/design/frontend/default/blank/template/review/form.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/blank/template/review/helper/summary.phtml b/app/design/frontend/default/blank/template/review/helper/summary.phtml index cf007d4b..0d0e5629 100644 --- a/app/design/frontend/default/blank/template/review/helper/summary.phtml +++ b/app/design/frontend/default/blank/template/review/helper/summary.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getReviewsCount()): ?> diff --git a/app/design/frontend/default/blank/template/review/helper/summary_short.phtml b/app/design/frontend/default/blank/template/review/helper/summary_short.phtml index d98efb35..a51d50e5 100644 --- a/app/design/frontend/default/blank/template/review/helper/summary_short.phtml +++ b/app/design/frontend/default/blank/template/review/helper/summary_short.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getReviewsCount()): ?> diff --git a/app/design/frontend/default/blank/template/review/product/view/count.phtml b/app/design/frontend/default/blank/template/review/product/view/count.phtml index 1910dcbb..c3fe700f 100644 --- a/app/design/frontend/default/blank/template/review/product/view/count.phtml +++ b/app/design/frontend/default/blank/template/review/product/view/count.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/blank/template/review/product/view/list.phtml b/app/design/frontend/default/blank/template/review/product/view/list.phtml index b3bf6e2a..4c997048 100644 --- a/app/design/frontend/default/blank/template/review/product/view/list.phtml +++ b/app/design/frontend/default/blank/template/review/product/view/list.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/blank/template/review/product/view/other.phtml b/app/design/frontend/default/blank/template/review/product/view/other.phtml index 6c2ce14d..5cb8a789 100644 --- a/app/design/frontend/default/blank/template/review/product/view/other.phtml +++ b/app/design/frontend/default/blank/template/review/product/view/other.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/blank/template/review/view.phtml b/app/design/frontend/default/blank/template/review/view.phtml index c29b78f7..d9a0dccf 100644 --- a/app/design/frontend/default/blank/template/review/view.phtml +++ b/app/design/frontend/default/blank/template/review/view.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getProductData()->getId()): ?> diff --git a/app/design/frontend/default/blank/template/rss/list.phtml b/app/design/frontend/default/blank/template/rss/list.phtml index 8b4a5f13..afbb753a 100644 --- a/app/design/frontend/default/blank/template/rss/list.phtml +++ b/app/design/frontend/default/blank/template/rss/list.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage_Rss * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
    diff --git a/app/design/frontend/default/blank/template/rss/nofeed.phtml b/app/design/frontend/default/blank/template/rss/nofeed.phtml index 26b7a891..f2a4a38b 100644 --- a/app/design/frontend/default/blank/template/rss/nofeed.phtml +++ b/app/design/frontend/default/blank/template/rss/nofeed.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>

    There was no RSS feed enabled.

    diff --git a/app/design/frontend/default/blank/template/rss/order/details.phtml b/app/design/frontend/default/blank/template/rss/order/details.phtml index e22dd132..64e1c2a8 100644 --- a/app/design/frontend/default/blank/template/rss/order/details.phtml +++ b/app/design/frontend/default/blank/template/rss/order/details.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ /* store view name = $_order->getStore()->getName() diff --git a/app/design/frontend/default/blank/template/sales/order/creditmemo.phtml b/app/design/frontend/default/blank/template/sales/order/creditmemo.phtml index 4f9613da..597a1398 100644 --- a/app/design/frontend/default/blank/template/sales/order/creditmemo.phtml +++ b/app/design/frontend/default/blank/template/sales/order/creditmemo.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> helper('giftmessage/message')->getIsMessagesAvailable('order', $this->getOrder())): ?> diff --git a/app/design/frontend/default/blank/template/sales/order/creditmemo/items.phtml b/app/design/frontend/default/blank/template/sales/order/creditmemo/items.phtml index 9660c9de..40c9b404 100644 --- a/app/design/frontend/default/blank/template/sales/order/creditmemo/items.phtml +++ b/app/design/frontend/default/blank/template/sales/order/creditmemo/items.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getOrder() ?> diff --git a/app/design/frontend/default/blank/template/sales/order/creditmemo/items/renderer/default.phtml b/app/design/frontend/default/blank/template/sales/order/creditmemo/items/renderer/default.phtml index 79c7a0da..40182971 100644 --- a/app/design/frontend/default/blank/template/sales/order/creditmemo/items/renderer/default.phtml +++ b/app/design/frontend/default/blank/template/sales/order/creditmemo/items/renderer/default.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getItem() ?> diff --git a/app/design/frontend/default/blank/template/sales/order/details.phtml b/app/design/frontend/default/blank/template/sales/order/details.phtml index 62da51c8..7b73195a 100644 --- a/app/design/frontend/default/blank/template/sales/order/details.phtml +++ b/app/design/frontend/default/blank/template/sales/order/details.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getOrder() ?> diff --git a/app/design/frontend/default/blank/template/sales/order/history.phtml b/app/design/frontend/default/blank/template/sales/order/history.phtml index e4584065..b8985e48 100644 --- a/app/design/frontend/default/blank/template/sales/order/history.phtml +++ b/app/design/frontend/default/blank/template/sales/order/history.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getMessagesBlock()->getGroupedHtml() ?> diff --git a/app/design/frontend/default/blank/template/sales/order/info.phtml b/app/design/frontend/default/blank/template/sales/order/info.phtml index ff3d1861..9ae7bf47 100644 --- a/app/design/frontend/default/blank/template/sales/order/info.phtml +++ b/app/design/frontend/default/blank/template/sales/order/info.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getOrder() ?> @@ -56,7 +56,7 @@

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

    getIsVirtual()): ?> -
    +

    __('Shipping Address') ?>

    getShippingAddress()->format('html') ?>
    @@ -71,7 +71,7 @@
    -
    +

    __('Billing Address') ?>

    getBillingAddress()->format('html') ?>
    diff --git a/app/design/frontend/default/blank/template/sales/order/invoice.phtml b/app/design/frontend/default/blank/template/sales/order/invoice.phtml index 284442d5..9ad0ac12 100644 --- a/app/design/frontend/default/blank/template/sales/order/invoice.phtml +++ b/app/design/frontend/default/blank/template/sales/order/invoice.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> helper('giftmessage/message')->getIsMessagesAvailable('order', $this->getOrder())): ?> diff --git a/app/design/frontend/default/blank/template/sales/order/invoice/items.phtml b/app/design/frontend/default/blank/template/sales/order/invoice/items.phtml index 6ed4d467..4923b406 100644 --- a/app/design/frontend/default/blank/template/sales/order/invoice/items.phtml +++ b/app/design/frontend/default/blank/template/sales/order/invoice/items.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getOrder() ?> @@ -71,8 +71,8 @@
    - - + + getAllItems(); ?> diff --git a/app/design/frontend/default/blank/template/sales/order/invoice/items/renderer/default.phtml b/app/design/frontend/default/blank/template/sales/order/invoice/items/renderer/default.phtml index eddf6eb7..30848fa4 100644 --- a/app/design/frontend/default/blank/template/sales/order/invoice/items/renderer/default.phtml +++ b/app/design/frontend/default/blank/template/sales/order/invoice/items/renderer/default.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getItem() ?> diff --git a/app/design/frontend/default/blank/template/sales/order/items.phtml b/app/design/frontend/default/blank/template/sales/order/items.phtml index b9e10a2c..4f629b48 100644 --- a/app/design/frontend/default/blank/template/sales/order/items.phtml +++ b/app/design/frontend/default/blank/template/sales/order/items.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getOrder() ?> @@ -80,13 +80,13 @@ - - + + isCurrencyDifferent()): ?> - - + + @@ -101,10 +101,10 @@ helper('giftmessage/message')->getGiftMessageForEntity($_item); ?> diff --git a/app/design/frontend/default/blank/template/sales/order/items/renderer/default.phtml b/app/design/frontend/default/blank/template/sales/order/items/renderer/default.phtml index 1f23164c..2d5f86ef 100644 --- a/app/design/frontend/default/blank/template/sales/order/items/renderer/default.phtml +++ b/app/design/frontend/default/blank/template/sales/order/items/renderer/default.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getItem() ?> diff --git a/app/design/frontend/default/blank/template/sales/order/print.phtml b/app/design/frontend/default/blank/template/sales/order/print.phtml index 47bea983..6ab7c8a6 100644 --- a/app/design/frontend/default/blank/template/sales/order/print.phtml +++ b/app/design/frontend/default/blank/template/sales/order/print.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getOrder() ?> @@ -91,8 +91,8 @@ - - + + getItemsCollection(); ?> diff --git a/app/design/frontend/default/blank/template/sales/order/print/creditmemo.phtml b/app/design/frontend/default/blank/template/sales/order/print/creditmemo.phtml index bae3d844..8e1237be 100644 --- a/app/design/frontend/default/blank/template/sales/order/print/creditmemo.phtml +++ b/app/design/frontend/default/blank/template/sales/order/print/creditmemo.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getOrder() ?> @@ -63,6 +63,7 @@ getPaymentInfoHtml() ?> +

    __('Items Refunded') ?>

    __('Grand Total') ?>formatPrice($_invoice->getGrandTotal()) ?>__('Grand Total') ?>formatPrice($_invoice->getGrandTotal()) ?>
    __('Grand Total') ?>formatPrice($_order->getGrandTotal()) ?>__('Grand Total') ?>formatPrice($_order->getGrandTotal()) ?>
    __('Grand Total to be charged') ?>formatBasePrice($_order->getBaseGrandTotal()) ?>__('Grand Total to be charged') ?>formatBasePrice($_order->getBaseGrandTotal()) ?>
    __('Grand Total') ?>formatPrice($_order->getGrandTotal()) ?>__('Grand Total') ?>formatPrice($_order->getGrandTotal()) ?>
    diff --git a/app/design/frontend/default/blank/template/sales/order/print/invoice.phtml b/app/design/frontend/default/blank/template/sales/order/print/invoice.phtml index f8205ebb..67928170 100644 --- a/app/design/frontend/default/blank/template/sales/order/print/invoice.phtml +++ b/app/design/frontend/default/blank/template/sales/order/print/invoice.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getOrder() ?> @@ -64,6 +64,7 @@ getPaymentInfoHtml() ?> +

    __('Items Invoiced') ?>

    @@ -107,8 +108,8 @@ - - + + getItemsCollection(); ?> diff --git a/app/design/frontend/default/blank/template/sales/order/print/shipment.phtml b/app/design/frontend/default/blank/template/sales/order/print/shipment.phtml index 371e67cf..ca6a891b 100644 --- a/app/design/frontend/default/blank/template/sales/order/print/shipment.phtml +++ b/app/design/frontend/default/blank/template/sales/order/print/shipment.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getOrder() ?> @@ -61,6 +61,7 @@ getPaymentInfoHtml() ?> +

    __('Items Shipped') ?>

    __('Grand Total') ?>formatPrice($_invoice->getGrandTotal()) ?>__('Grand Total') ?>formatPrice($_invoice->getGrandTotal()) ?>
    diff --git a/app/design/frontend/default/blank/template/sales/order/print/tax.phtml b/app/design/frontend/default/blank/template/sales/order/print/tax.phtml index f4b1f82c..ce924fb7 100644 --- a/app/design/frontend/default/blank/template/sales/order/print/tax.phtml +++ b/app/design/frontend/default/blank/template/sales/order/print/tax.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getOrder(); ?> diff --git a/app/design/frontend/default/blank/template/sales/order/recent.phtml b/app/design/frontend/default/blank/template/sales/order/recent.phtml index 612b8ace..3c96d50f 100644 --- a/app/design/frontend/default/blank/template/sales/order/recent.phtml +++ b/app/design/frontend/default/blank/template/sales/order/recent.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
    diff --git a/app/design/frontend/default/blank/template/sales/order/shipment.phtml b/app/design/frontend/default/blank/template/sales/order/shipment.phtml index 750e69d4..5dd93587 100644 --- a/app/design/frontend/default/blank/template/sales/order/shipment.phtml +++ b/app/design/frontend/default/blank/template/sales/order/shipment.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> helper('giftmessage/message')->getIsMessagesAvailable('order', $this->getOrder())): ?> diff --git a/app/design/frontend/default/blank/template/sales/order/shipment/items.phtml b/app/design/frontend/default/blank/template/sales/order/shipment/items.phtml index d90d58df..18985c22 100644 --- a/app/design/frontend/default/blank/template/sales/order/shipment/items.phtml +++ b/app/design/frontend/default/blank/template/sales/order/shipment/items.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,16 +21,16 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getOrder() ?> getTracksCollection()->count()) : ?> - +

    + __('Track all shipments') ?> +

    -

    __('Print All Shipments') ?>

    +

    __('Print All Shipments') ?>

    getShipmentsCollection() as $_shipment): ?>

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

    @@ -41,7 +41,7 @@
    @@ -54,7 +54,7 @@ isCustom()): ?> getNumber() ?> - getNumber() ?> + getNumber() ?>, getItem() ?> diff --git a/app/design/frontend/default/blank/template/sales/order/tax.phtml b/app/design/frontend/default/blank/template/sales/order/tax.phtml index 375b80be..0717cef2 100644 --- a/app/design/frontend/default/blank/template/sales/order/tax.phtml +++ b/app/design/frontend/default/blank/template/sales/order/tax.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getOrder(); ?> diff --git a/app/design/frontend/default/blank/template/sales/order/trackinginfo.phtml b/app/design/frontend/default/blank/template/sales/order/trackinginfo.phtml index 6f02136d..a877f02a 100644 --- a/app/design/frontend/default/blank/template/sales/order/trackinginfo.phtml +++ b/app/design/frontend/default/blank/template/sales/order/trackinginfo.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,14 +21,14 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> trackingInfo): ?> - trackingInfo->getCarrierTitle() ?> - trackingInfo->getTracking() ?> + trackingInfo->getCarrierTitle() ?> - trackingInfo->getTracking() ?>
    trackingInfo->getErrorMessage()): ?> trackingInfo->getErrorMessage() ?> diff --git a/app/design/frontend/default/blank/template/sales/order/view.phtml b/app/design/frontend/default/blank/template/sales/order/view.phtml index 62f8a1ee..b18a8fe0 100644 --- a/app/design/frontend/default/blank/template/sales/order/view.phtml +++ b/app/design/frontend/default/blank/template/sales/order/view.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> helper('giftmessage/message')->getIsMessagesAvailable('items', $this->getOrder())): ?> @@ -56,8 +56,7 @@ function giftMessageToogle(giftMessageIdentifier) getOrder() ?>

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

    @@ -67,22 +66,20 @@ function giftMessageToogle(giftMessageIdentifier)

    __('Gift Message for this Order') ?>

    helper('giftmessage/message')->getGiftMessageForEntity($_order); ?>
    -
    __('From') ?> htmlEscape($_giftMessage->getSender()) ?>
    -
    __('To') ?> htmlEscape($_giftMessage->getRecipient()) ?>
    +
    __('From') ?> htmlEscape($_giftMessage->getSender()) ?>
    +
    __('To') ?> htmlEscape($_giftMessage->getRecipient()) ?>
    helper('giftmessage/message')->getEscapedGiftMessage($_order) ?>
    getOrder()->getVisibleStatusHistory() ?>

    __('About Your Order') ?>

    -
    -
    - -
    formatDate($_historyItem->getCreatedAt(), 'medium', true) ?>
    -
    getComment() ?>
    - -
    -
    +
    + +
    formatDate($_historyItem->getCreatedAt(), 'medium', true) ?>
    +
    getComment() ?>
    + +
    « __('Back to My Orders') ?> diff --git a/app/design/frontend/default/blank/template/sales/reorder/sidebar.phtml b/app/design/frontend/default/blank/template/sales/reorder/sidebar.phtml index 02d0ef78..461bb118 100644 --- a/app/design/frontend/default/blank/template/sales/reorder/sidebar.phtml +++ b/app/design/frontend/default/blank/template/sales/reorder/sidebar.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getLastOrder()): ?>
    -

    __('My Orders') ?> | View All

    +

    __('My Orders') ?> | View All

    __('Last ordered items') ?>

    @@ -59,15 +59,15 @@ + +
    + +
    + +
    + - -
    - -
    - -
    -
    getPagerHtml(); ?> diff --git a/app/design/frontend/default/blank/template/sendfriend/send.phtml b/app/design/frontend/default/blank/template/sendfriend/send.phtml index 763f0b51..40733958 100644 --- a/app/design/frontend/default/blank/template/sendfriend/send.phtml +++ b/app/design/frontend/default/blank/template/sendfriend/send.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ /** @@ -50,8 +50,8 @@ var li_mail = Element.extend(document.createElement("LI")); li_mail.addClassName('add-row'); li_mail.innerHTML = '<?php echo $this->__('Remove Email') ?><\/a>' - li_mail.innerHTML += '
    <\/div>'; - li_mail.innerHTML += '
    <\/div>'; + li_mail.innerHTML += '
    -
    +

    __('Sender:') ?>

    -
      -
    • -
      -
      - -
      -
      -
      -
      -
    • -
    • -
      - -
    • - -
    +
      +
    • +
      +
      + +
      +
      +
      +
      +
    • +
    • + *
      + +
    • +
    - -
    +

    __('Recipient:') ?>

    -
      -
    • -
      -
      - -
      -
      -
      - -
      -
    • -
    - - getMaxRecipients()): ?> -

    - -

    - +
      +
    • +
      +
      + +
      +
      +
      + +
      +
    • +
    +
    + + + getMaxRecipients()): ?> +

    + +

    + +
    -
    - -
    getToolbarHtml() ?>
    diff --git a/app/design/frontend/default/blank/template/tag/list.phtml b/app/design/frontend/default/blank/template/tag/list.phtml index e8977166..b236c2c1 100644 --- a/app/design/frontend/default/blank/template/tag/list.phtml +++ b/app/design/frontend/default/blank/template/tag/list.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
    @@ -39,7 +39,7 @@
    - +

    __("Use spaces to separate tags. Use single quotes (') for phrases.") ?>

    diff --git a/app/design/frontend/default/blank/template/tag/mytags.phtml b/app/design/frontend/default/blank/template/tag/mytags.phtml index 0a50e025..9fc1f7a1 100644 --- a/app/design/frontend/default/blank/template/tag/mytags.phtml +++ b/app/design/frontend/default/blank/template/tag/mytags.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> css/reset.css css/boxes.css - css/clears.css css/menu.css + css/clears.css skin_csscss/iestyles.cssIE - skin_csscss/ie7.cssIE 7 skin_csscss/ie7minus.csslt IE 7 jslib/ds-sleight.jslt IE 7 @@ -102,11 +101,10 @@ Default layout, loads most of the pages css/reset.css css/boxes.css - css/clears.css css/menu.css + css/clears.css skin_csscss/iestyles.cssIE - skin_csscss/ie7.cssIE 7 skin_csscss/ie7minus.csslt IE 7 jslib/ds-sleight.jslt IE 7 diff --git a/app/design/frontend/default/default/layout/paybox.xml b/app/design/frontend/default/default/layout/paybox.xml index 70ff6dd3..f0076f16 100644 --- a/app/design/frontend/default/default/layout/paybox.xml +++ b/app/design/frontend/default/default/layout/paybox.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage_Paybox * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/default/layout/paypal.xml b/app/design/frontend/default/default/layout/paypal.xml index 9e6e2eef..389f399a 100644 --- a/app/design/frontend/default/default/layout/paypal.xml +++ b/app/design/frontend/default/default/layout/paypal.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/default/layout/paypaluk.xml b/app/design/frontend/default/default/layout/paypaluk.xml index d27a953d..23b1e6f3 100644 --- a/app/design/frontend/default/default/layout/paypaluk.xml +++ b/app/design/frontend/default/default/layout/paypaluk.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/default/layout/poll.xml b/app/design/frontend/default/default/layout/poll.xml index a515c1f6..ffb11c3d 100644 --- a/app/design/frontend/default/default/layout/poll.xml +++ b/app/design/frontend/default/default/layout/poll.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/default/layout/productalert.xml b/app/design/frontend/default/default/layout/productalert.xml index 3665824a..9ece2ec3 100644 --- a/app/design/frontend/default/default/layout/productalert.xml +++ b/app/design/frontend/default/default/layout/productalert.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/default/layout/protx.xml b/app/design/frontend/default/default/layout/protx.xml index 7d7ec988..fd7d3573 100644 --- a/app/design/frontend/default/default/layout/protx.xml +++ b/app/design/frontend/default/default/layout/protx.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage_Protx * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/default/layout/reports.xml b/app/design/frontend/default/default/layout/reports.xml index 736382e9..c9a8d60a 100644 --- a/app/design/frontend/default/default/layout/reports.xml +++ b/app/design/frontend/default/default/layout/reports.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/default/layout/review.xml b/app/design/frontend/default/default/layout/review.xml index 212a6bdd..3010443c 100644 --- a/app/design/frontend/default/default/layout/review.xml +++ b/app/design/frontend/default/default/layout/review.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/default/layout/rss.xml b/app/design/frontend/default/default/layout/rss.xml index 079190da..759b6442 100644 --- a/app/design/frontend/default/default/layout/rss.xml +++ b/app/design/frontend/default/default/layout/rss.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/default/layout/sales.xml b/app/design/frontend/default/default/layout/sales.xml index 66238822..c35e1f09 100644 --- a/app/design/frontend/default/default/layout/sales.xml +++ b/app/design/frontend/default/default/layout/sales.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/default/layout/sendfriend.xml b/app/design/frontend/default/default/layout/sendfriend.xml index 5cd3b873..012dbc1d 100644 --- a/app/design/frontend/default/default/layout/sendfriend.xml +++ b/app/design/frontend/default/default/layout/sendfriend.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/default/layout/shipping.xml b/app/design/frontend/default/default/layout/shipping.xml index ab52748a..8765f28c 100644 --- a/app/design/frontend/default/default/layout/shipping.xml +++ b/app/design/frontend/default/default/layout/shipping.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/default/layout/tag.xml b/app/design/frontend/default/default/layout/tag.xml index 9fada3b9..e5e9b047 100644 --- a/app/design/frontend/default/default/layout/tag.xml +++ b/app/design/frontend/default/default/layout/tag.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/default/layout/wishlist.xml b/app/design/frontend/default/default/layout/wishlist.xml index 5d153a86..8bac2778 100644 --- a/app/design/frontend/default/default/layout/wishlist.xml +++ b/app/design/frontend/default/default/layout/wishlist.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/default/template/bundle/catalog/product/list/partof.phtml b/app/design/frontend/default/default/template/bundle/catalog/product/list/partof.phtml index e1de8c9f..7723a86d 100644 --- a/app/design/frontend/default/default/template/bundle/catalog/product/list/partof.phtml +++ b/app/design/frontend/default/default/template/bundle/catalog/product/list/partof.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage_Bundle * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getItemCollection()->getSize()): ?> diff --git a/app/design/frontend/default/default/template/bundle/catalog/product/price.phtml b/app/design/frontend/default/default/template/bundle/catalog/product/price.phtml index 266b642f..e7c69b6a 100644 --- a/app/design/frontend/default/default/template/bundle/catalog/product/price.phtml +++ b/app/design/frontend/default/default/template/bundle/catalog/product/price.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage_Bundle * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/default/template/bundle/catalog/product/view/price.phtml b/app/design/frontend/default/default/template/bundle/catalog/product/view/price.phtml index b5d70fab..dcaf4d5f 100644 --- a/app/design/frontend/default/default/template/bundle/catalog/product/view/price.phtml +++ b/app/design/frontend/default/default/template/bundle/catalog/product/view/price.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getProduct() ?> diff --git a/app/design/frontend/default/default/template/bundle/catalog/product/view/tierprices.phtml b/app/design/frontend/default/default/template/bundle/catalog/product/view/tierprices.phtml index 56de5cc5..e8da7e7a 100644 --- a/app/design/frontend/default/default/template/bundle/catalog/product/view/tierprices.phtml +++ b/app/design/frontend/default/default/template/bundle/catalog/product/view/tierprices.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/default/template/bundle/catalog/product/view/type/bundle.phtml b/app/design/frontend/default/default/template/bundle/catalog/product/view/type/bundle.phtml index e4eb58a9..aee58d44 100644 --- a/app/design/frontend/default/default/template/bundle/catalog/product/view/type/bundle.phtml +++ b/app/design/frontend/default/default/template/bundle/catalog/product/view/type/bundle.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage_Bundle * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/default/template/bundle/catalog/product/view/type/bundle/option/checkbox.phtml b/app/design/frontend/default/default/template/bundle/catalog/product/view/type/bundle/option/checkbox.phtml index a5262cac..7ec43f77 100644 --- a/app/design/frontend/default/default/template/bundle/catalog/product/view/type/bundle/option/checkbox.phtml +++ b/app/design/frontend/default/default/template/bundle/catalog/product/view/type/bundle/option/checkbox.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage_Bundle * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/default/template/bundle/catalog/product/view/type/bundle/option/multi.phtml b/app/design/frontend/default/default/template/bundle/catalog/product/view/type/bundle/option/multi.phtml index 52055fdd..3aed0011 100644 --- a/app/design/frontend/default/default/template/bundle/catalog/product/view/type/bundle/option/multi.phtml +++ b/app/design/frontend/default/default/template/bundle/catalog/product/view/type/bundle/option/multi.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage_Bundle * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/default/template/bundle/catalog/product/view/type/bundle/option/radio.phtml b/app/design/frontend/default/default/template/bundle/catalog/product/view/type/bundle/option/radio.phtml index 849c70bf..f11086d3 100644 --- a/app/design/frontend/default/default/template/bundle/catalog/product/view/type/bundle/option/radio.phtml +++ b/app/design/frontend/default/default/template/bundle/catalog/product/view/type/bundle/option/radio.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage_Bundle * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/default/template/bundle/catalog/product/view/type/bundle/option/select.phtml b/app/design/frontend/default/default/template/bundle/catalog/product/view/type/bundle/option/select.phtml index 82a7a004..60f5c177 100644 --- a/app/design/frontend/default/default/template/bundle/catalog/product/view/type/bundle/option/select.phtml +++ b/app/design/frontend/default/default/template/bundle/catalog/product/view/type/bundle/option/select.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage_Bundle * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/default/template/bundle/catalog/product/view/type/bundle/options.phtml b/app/design/frontend/default/default/template/bundle/catalog/product/view/type/bundle/options.phtml index 41253afc..c35f2f2c 100644 --- a/app/design/frontend/default/default/template/bundle/catalog/product/view/type/bundle/options.phtml +++ b/app/design/frontend/default/default/template/bundle/catalog/product/view/type/bundle/options.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage_Bundle * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/default/template/bundle/email/order/items/creditmemo/default.phtml b/app/design/frontend/default/default/template/bundle/email/order/items/creditmemo/default.phtml index acdb5b5b..71964ebb 100644 --- a/app/design/frontend/default/default/template/bundle/email/order/items/creditmemo/default.phtml +++ b/app/design/frontend/default/default/template/bundle/email/order/items/creditmemo/default.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage_Bundle * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getItem() ?> diff --git a/app/design/frontend/default/default/template/bundle/email/order/items/invoice/default.phtml b/app/design/frontend/default/default/template/bundle/email/order/items/invoice/default.phtml index 8fd5ef7e..f01fe1a9 100644 --- a/app/design/frontend/default/default/template/bundle/email/order/items/invoice/default.phtml +++ b/app/design/frontend/default/default/template/bundle/email/order/items/invoice/default.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/default/template/bundle/email/order/items/order/default.phtml b/app/design/frontend/default/default/template/bundle/email/order/items/order/default.phtml index efe5f833..450716bb 100644 --- a/app/design/frontend/default/default/template/bundle/email/order/items/order/default.phtml +++ b/app/design/frontend/default/default/template/bundle/email/order/items/order/default.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getItem() ?> diff --git a/app/design/frontend/default/default/template/bundle/email/order/items/shipment/default.phtml b/app/design/frontend/default/default/template/bundle/email/order/items/shipment/default.phtml index 6d7bc859..4b0f907f 100644 --- a/app/design/frontend/default/default/template/bundle/email/order/items/shipment/default.phtml +++ b/app/design/frontend/default/default/template/bundle/email/order/items/shipment/default.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage_Bundle * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getItem() ?> diff --git a/app/design/frontend/default/default/template/bundle/sales/order/creditmemo/items/renderer.phtml b/app/design/frontend/default/default/template/bundle/sales/order/creditmemo/items/renderer.phtml index ba24e645..6e955475 100644 --- a/app/design/frontend/default/default/template/bundle/sales/order/creditmemo/items/renderer.phtml +++ b/app/design/frontend/default/default/template/bundle/sales/order/creditmemo/items/renderer.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage_Bundle * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getItem() ?> diff --git a/app/design/frontend/default/default/template/bundle/sales/order/invoice/items/renderer.phtml b/app/design/frontend/default/default/template/bundle/sales/order/invoice/items/renderer.phtml index 81b55616..2df4477e 100644 --- a/app/design/frontend/default/default/template/bundle/sales/order/invoice/items/renderer.phtml +++ b/app/design/frontend/default/default/template/bundle/sales/order/invoice/items/renderer.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage_Bundle * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getItem() ?> diff --git a/app/design/frontend/default/default/template/bundle/sales/order/items/renderer.phtml b/app/design/frontend/default/default/template/bundle/sales/order/items/renderer.phtml index 6220d62d..d9574585 100644 --- a/app/design/frontend/default/default/template/bundle/sales/order/items/renderer.phtml +++ b/app/design/frontend/default/default/template/bundle/sales/order/items/renderer.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage_Bundle * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getItem() ?> diff --git a/app/design/frontend/default/default/template/bundle/sales/order/shipment/items/renderer.phtml b/app/design/frontend/default/default/template/bundle/sales/order/shipment/items/renderer.phtml index 31f05df9..c3e37829 100644 --- a/app/design/frontend/default/default/template/bundle/sales/order/shipment/items/renderer.phtml +++ b/app/design/frontend/default/default/template/bundle/sales/order/shipment/items/renderer.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage_Bundle * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getItem() ?> diff --git a/app/design/frontend/default/default/template/callouts/left_col.phtml b/app/design/frontend/default/default/template/callouts/left_col.phtml index 42f4c388..1443e739 100644 --- a/app/design/frontend/default/default/template/callouts/left_col.phtml +++ b/app/design/frontend/default/default/template/callouts/left_col.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/default/template/callouts/right_col.phtml b/app/design/frontend/default/default/template/callouts/right_col.phtml index 1810500e..d812eed9 100644 --- a/app/design/frontend/default/default/template/callouts/right_col.phtml +++ b/app/design/frontend/default/default/template/callouts/right_col.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/default/template/catalog/category/page.phtml b/app/design/frontend/default/default/template/catalog/category/page.phtml index a7f69501..5ce350c0 100644 --- a/app/design/frontend/default/default/template/catalog/category/page.phtml +++ b/app/design/frontend/default/default/template/catalog/category/page.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
    diff --git a/app/design/frontend/default/default/template/catalog/category/view.phtml b/app/design/frontend/default/default/template/catalog/category/view.phtml index bdd166fa..b854141b 100644 --- a/app/design/frontend/default/default/template/catalog/category/view.phtml +++ b/app/design/frontend/default/default/template/catalog/category/view.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> +helper('catalog/output'); + $_category = $this->getCurrentCategory(); + $_imgHtml = ''; + if ($_imageUrl = $_category->getImageUrl()) { + $_imgHtml = ''.$this->htmlEscape($_category->getName()).''; + $_imgHtml = $_helper->categoryAttribute($_category, $_imgHtml, 'image'); + } +?> getMessagesBlock()->getGroupedHtml() ?> isContentMode()): ?>
    IsRssCatalogEnable() && $this->IsTopCategory()): ?> __('Subscribe to RSS Feed') ?> -

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

    +

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

    - getCurrentCategory()->getImageUrl()): ?> -

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

    + +

    - getCurrentCategory()->getDescription()): ?> -

    + getDescription()): ?> +

    categoryAttribute($_category, $_description, 'description') ?>

    getCmsBlockHtml() ?> isMixedMode()): ?> @@ -51,13 +60,13 @@ IsRssCatalogEnable() && $this->IsTopCategory()): ?> __('Subscribe to RSS Feed') ?> -

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

    +

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

    - getCurrentCategory()->getImageUrl()): ?> -

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

    + +

    - getCurrentCategory()->getDescription()): ?> -

    + getDescription()): ?> +

    categoryAttribute($_category, $_description, 'description') ?>

    IsRssCatalogEnable() && $this->IsTopCategory()): ?> @@ -72,13 +81,13 @@ IsRssCatalogEnable() && $this->IsTopCategory()): ?> __('Subscribe to RSS Feed') ?> -

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

    +

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

    - getCurrentCategory()->getImageUrl()): ?> -

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

    + +

    - getCurrentCategory()->getDescription()): ?> -

    + getDescription()): ?> +

    categoryAttribute($_category, $_description, 'description') ?>

    getProductListHtml() ?> \ No newline at end of file diff --git a/app/design/frontend/default/default/template/catalog/layer/filter.phtml b/app/design/frontend/default/default/template/catalog/layer/filter.phtml index 1eee6ce3..a8b16d0e 100644 --- a/app/design/frontend/default/default/template/catalog/layer/filter.phtml +++ b/app/design/frontend/default/default/template/catalog/layer/filter.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
    diff --git a/app/design/frontend/default/default/template/catalog/product/compare/sidebar.phtml b/app/design/frontend/default/default/template/catalog/product/compare/sidebar.phtml index a7d30329..05eecda0 100644 --- a/app/design/frontend/default/default/template/catalog/product/compare/sidebar.phtml +++ b/app/design/frontend/default/default/template/catalog/product/compare/sidebar.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,10 +21,10 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -
    +
    helper('catalog/product_compare')->getItemCount()>0): ?>

    __('Compare Products - %d Items', $this->helper('catalog/product_compare')->getItemCount()) ?>

    diff --git a/app/design/frontend/default/default/template/catalog/product/gallery.phtml b/app/design/frontend/default/default/template/catalog/product/gallery.phtml index 88b8c572..3dcd6156 100644 --- a/app/design/frontend/default/default/template/catalog/product/gallery.phtml +++ b/app/design/frontend/default/default/template/catalog/product/gallery.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getImageWidth() ?> diff --git a/app/design/frontend/default/default/template/catalog/product/list.phtml b/app/design/frontend/default/default/template/catalog/product/list.phtml index a4bf5dab..7726c756 100644 --- a/app/design/frontend/default/default/template/catalog/product/list.phtml +++ b/app/design/frontend/default/default/template/catalog/product/list.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getItems()->getSize()): ?> @@ -30,7 +30,7 @@

    __('Related Products') ?>

    -

    __('Check items to add to the cart or ') ?>__('select all') ?>

    +

    __('Check items to add to the cart or') ?> __('select all') ?>

      getItems() as $_item): ?> isComposite() || !$_item->isSaleable()): ?> class="super-products"> @@ -48,7 +48,7 @@
    htmlEscape($_item->getName()) ?> - getPriceHtml($_item) ?> + getPriceHtml($_item, true) ?> helper('wishlist')->isAllow()) : ?> __('Add to Wishlist') ?> diff --git a/app/design/frontend/default/default/template/catalog/product/list/toolbar.phtml b/app/design/frontend/default/default/template/catalog/product/list/toolbar.phtml index 3fb0a38a..2909ce97 100644 --- a/app/design/frontend/default/default/template/catalog/product/list/toolbar.phtml +++ b/app/design/frontend/default/default/template/catalog/product/list/toolbar.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getItemCollection()->getItems())): ?> diff --git a/app/design/frontend/default/default/template/catalog/product/new.phtml b/app/design/frontend/default/default/template/catalog/product/new.phtml index 4f238700..b1c305e3 100644 --- a/app/design/frontend/default/default/template/catalog/product/new.phtml +++ b/app/design/frontend/default/default/template/catalog/product/new.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,13 +21,13 @@ * @category default_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getProductCollection()) && $_products->getSize()): ?>

    __('New Products') ?>

    -
    - __('Track this shipment') ?> + __('Track this shipment') ?>
    +
    getItems() as $_product): ?> 5): continue; endif; ?> @@ -39,7 +39,7 @@

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

    getReviewsSummaryHtml($_product, 'short') ?> - getPriceHtml($_product) ?> + getPriceHtml($_product, true, '-new') ?> isSaleable()): ?> diff --git a/app/design/frontend/default/default/template/catalog/product/price.phtml b/app/design/frontend/default/default/template/catalog/product/price.phtml index 5155c03e..b0053ff9 100644 --- a/app/design/frontend/default/default/template/catalog/product/price.phtml +++ b/app/design/frontend/default/default/template/catalog/product/price.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,15 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +?> + + @@ -111,7 +119,7 @@ helper('tax')->displayCartPriceInclTax()) { + if (!$this->helper('tax')->displayPriceIncludingTax()) { $_showPrice = $_exclTax; } ?> diff --git a/app/design/frontend/default/default/template/catalog/product/view.phtml b/app/design/frontend/default/default/template/catalog/product/view.phtml index eab11f2b..bde2bdda 100644 --- a/app/design/frontend/default/default/template/catalog/product/view.phtml +++ b/app/design/frontend/default/default/template/catalog/product/view.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ /** @@ -31,11 +31,14 @@ * @see Mage_Review_Block_Product_View */ ?> +helper('catalog/output'); + $_product = $this->getProduct() +?>
    getMessagesBlock()->getGroupedHtml() ?>
    -getProduct() ?>
    @@ -45,7 +48,9 @@
    -

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

    +

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

    canEmailToFriend()): ?> __('Email to a Friend') ?>
    @@ -80,7 +85,7 @@ getShortDescription()):?>

    __('Quick Overview') ?>

    -
    getShortDescription()) ?>
    +
    productAttribute($_product, nl2br($_product->getShortDescription()), 'short_description') ?>
    getChildHtml('other');?> diff --git a/app/design/frontend/default/default/template/catalog/product/view/additional.phtml b/app/design/frontend/default/default/template/catalog/product/view/additional.phtml index a3eedcf2..ab52efe3 100644 --- a/app/design/frontend/default/default/template/catalog/product/view/additional.phtml +++ b/app/design/frontend/default/default/template/catalog/product/view/additional.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getChildHtmlList() as $_html): ?> diff --git a/app/design/frontend/default/default/template/catalog/product/view/addto.phtml b/app/design/frontend/default/default/template/catalog/product/view/addto.phtml index 5650f462..3882c3d7 100644 --- a/app/design/frontend/default/default/template/catalog/product/view/addto.phtml +++ b/app/design/frontend/default/default/template/catalog/product/view/addto.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/default/template/catalog/product/view/addtocart.phtml b/app/design/frontend/default/default/template/catalog/product/view/addtocart.phtml index 47db176a..501cc5d6 100644 --- a/app/design/frontend/default/default/template/catalog/product/view/addtocart.phtml +++ b/app/design/frontend/default/default/template/catalog/product/view/addtocart.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/default/template/catalog/product/view/attributes.phtml b/app/design/frontend/default/default/template/catalog/product/view/attributes.phtml index adc64b20..65cce7de 100644 --- a/app/design/frontend/default/default/template/catalog/product/view/attributes.phtml +++ b/app/design/frontend/default/default/template/catalog/product/view/attributes.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ /** @@ -30,13 +30,17 @@ * @see Mage_Catalog_Block_Product_View_Attributes */ ?> +helper('catalog/output'); + $_product = $this->getProduct() +?> getAdditionalData()): ?>
    - +
    __($_data['label']) ?>productAttribute($_product, $_data['value'], $_data['code']) ?>
    diff --git a/app/design/frontend/default/default/template/catalog/product/view/description.phtml b/app/design/frontend/default/default/template/catalog/product/view/description.phtml index 1ce2885b..31b822c7 100644 --- a/app/design/frontend/default/default/template/catalog/product/view/description.phtml +++ b/app/design/frontend/default/default/template/catalog/product/view/description.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ /** @@ -31,5 +31,5 @@ */ ?>
    -getProduct()->getDescription()) ?> +helper('catalog/output')->productAttribute($this->getProduct(), nl2br($this->getProduct()->getDescription()), 'description') ?>
    \ No newline at end of file diff --git a/app/design/frontend/default/default/template/catalog/product/view/media.phtml b/app/design/frontend/default/default/template/catalog/product/view/media.phtml index 366ccae3..a860f697 100644 --- a/app/design/frontend/default/default/template/catalog/product/view/media.phtml +++ b/app/design/frontend/default/default/template/catalog/product/view/media.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ /** @@ -30,9 +30,19 @@ * @see Mage_Catalog_Block_Product_View_Media */ ?> -getProduct() ?> + +getProduct(); + $_helper = $this->helper('catalog/output'); +?> + getImage() != 'no_selection' && $_product->getImage()): ?> -

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

    +

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

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

    @@ -48,7 +58,10 @@ }); - <?php echo $this->htmlEscape($_product->getName()) ?> + helper('catalog/image')->init($_product, 'image')->resize(265).'" alt="'.$this->htmlEscape($_product->getName()).'" />'; + echo $_helper->productAttribute($_product, $_img, 'image') + ?> getGalleryImages()) > 0): ?>
    @@ -56,7 +69,7 @@
      getGalleryImages() as $_image): ?>
    • - <?php echo $this->htmlEscape($_image->getLabel()) ?> + <?php echo $this->htmlEscape($_image->getLabel()) ?>
    diff --git a/app/design/frontend/default/default/template/catalog/product/view/options.phtml b/app/design/frontend/default/default/template/catalog/product/view/options.phtml index 5a9c9a73..19663b49 100644 --- a/app/design/frontend/default/default/template/catalog/product/view/options.phtml +++ b/app/design/frontend/default/default/template/catalog/product/view/options.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/default/template/catalog/product/view/options/type/date.phtml b/app/design/frontend/default/default/template/catalog/product/view/options/type/date.phtml index e4cdc01b..ce21fb12 100644 --- a/app/design/frontend/default/default/template/catalog/product/view/options/type/date.phtml +++ b/app/design/frontend/default/default/template/catalog/product/view/options/type/date.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getOption() ?> diff --git a/app/design/frontend/default/default/template/catalog/product/view/options/type/file.phtml b/app/design/frontend/default/default/template/catalog/product/view/options/type/file.phtml index e5bf1bd3..45a45159 100644 --- a/app/design/frontend/default/default/template/catalog/product/view/options/type/file.phtml +++ b/app/design/frontend/default/default/template/catalog/product/view/options/type/file.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getOption() ?> diff --git a/app/design/frontend/default/default/template/catalog/product/view/options/type/select.phtml b/app/design/frontend/default/default/template/catalog/product/view/options/type/select.phtml index 26487da4..72858cc4 100644 --- a/app/design/frontend/default/default/template/catalog/product/view/options/type/select.phtml +++ b/app/design/frontend/default/default/template/catalog/product/view/options/type/select.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/default/template/catalog/product/view/options/type/text.phtml b/app/design/frontend/default/default/template/catalog/product/view/options/type/text.phtml index f034e9c4..64c9851d 100644 --- a/app/design/frontend/default/default/template/catalog/product/view/options/type/text.phtml +++ b/app/design/frontend/default/default/template/catalog/product/view/options/type/text.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getOption() ?> diff --git a/app/design/frontend/default/default/template/catalog/product/view/options/wrapper.phtml b/app/design/frontend/default/default/template/catalog/product/view/options/wrapper.phtml index 25c82ab9..5baa8a23 100644 --- a/app/design/frontend/default/default/template/catalog/product/view/options/wrapper.phtml +++ b/app/design/frontend/default/default/template/catalog/product/view/options/wrapper.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/default/template/catalog/product/view/options/wrapper/bottom.phtml b/app/design/frontend/default/default/template/catalog/product/view/options/wrapper/bottom.phtml index bc97bf70..16b904be 100644 --- a/app/design/frontend/default/default/template/catalog/product/view/options/wrapper/bottom.phtml +++ b/app/design/frontend/default/default/template/catalog/product/view/options/wrapper/bottom.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/default/template/catalog/product/view/price.phtml b/app/design/frontend/default/default/template/catalog/product/view/price.phtml index 49df684b..e76419aa 100644 --- a/app/design/frontend/default/default/template/catalog/product/view/price.phtml +++ b/app/design/frontend/default/default/template/catalog/product/view/price.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
    diff --git a/app/design/frontend/default/default/template/catalog/product/view/price_clone.phtml b/app/design/frontend/default/default/template/catalog/product/view/price_clone.phtml index 87d1d61d..44755774 100644 --- a/app/design/frontend/default/default/template/catalog/product/view/price_clone.phtml +++ b/app/design/frontend/default/default/template/catalog/product/view/price_clone.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getProduct() ?> diff --git a/app/design/frontend/default/default/template/catalog/product/view/tierprices.phtml b/app/design/frontend/default/default/template/catalog/product/view/tierprices.phtml index 5c426f61..cfb720e6 100644 --- a/app/design/frontend/default/default/template/catalog/product/view/tierprices.phtml +++ b/app/design/frontend/default/default/template/catalog/product/view/tierprices.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/default/template/catalog/product/view/type/configurable.phtml b/app/design/frontend/default/default/template/catalog/product/view/type/configurable.phtml index 175f0d93..83095635 100644 --- a/app/design/frontend/default/default/template/catalog/product/view/type/configurable.phtml +++ b/app/design/frontend/default/default/template/catalog/product/view/type/configurable.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/design/frontend/default/default/template/catalog/product/view/type/grouped.phtml b/app/design/frontend/default/default/template/catalog/product/view/type/grouped.phtml index 26485963..56b17608 100644 --- a/app/design/frontend/default/default/template/catalog/product/view/type/grouped.phtml +++ b/app/design/frontend/default/default/template/catalog/product/view/type/grouped.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,13 +21,14 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ /** * Grouped product data template * * @see Mage_Catalog_Block_Product_View_Media + * @see Mage_Catalog_Block_Product_View_Type_Grouped */ ?> getProduct() ?> @@ -56,67 +57,7 @@ htmlEscape($_item->getName()) ?> - helper('tax')->displayPriceIncludingTax() || $this->helper('tax')->displayBothPrices()); ?> - helper('tax')->getPrice($_item, $_item->getPrice(), $simplePricesTax) ?> - helper('tax')->getPrice($_item, $_item->getPrice(), $simplePricesTax) ?> - helper('tax')->getPrice($_item, $_item->getFinalPrice()) ?> - helper('tax')->getPrice($_item, $_item->getFinalPrice(), true) ?> - - helper('tax')->displayBothPrices() && $_finalPriceInclTax != $_finalPrice): ?> - - __('Excl. Tax:') ?> - - currency($_price) ?> - - - - __('Incl. Tax:') ?> - - currency($_finalPriceInclTax,true,false) ?> - - - - currency($_price) ?> - - -

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

    - - helper('tax')->displayBothPrices() && $_finalPriceInclTax != $_finalPrice): ?> -

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

    - -

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

    - - - getTierPriceCount()): ?> -
      - getTierPrices($_item) as $_tierPrice): ?> - - helper('tax')->displayBothPrices() && $_tierPrice['formated_price'] != $_tierPrice['formated_price_incl_tax']): ?> -
    • __('Buy %s for %s each', $_tierPrice['price_qty'], $_tierPrice['formated_price']) ?> - ( __('Incl. Tax') ?>)
    • - -
    • __('Buy %s for %s', $_tierPrice['price_qty']*1, $_tierPrice['formated_price']) ?>
    • - - - -
    - + getPriceHtml($_item, true) ?> isSaleable()): ?> diff --git a/app/design/frontend/default/default/template/catalog/product/view/type/options/configurable.phtml b/app/design/frontend/default/default/template/catalog/product/view/type/options/configurable.phtml index 40622779..9f80e99a 100644 --- a/app/design/frontend/default/default/template/catalog/product/view/type/options/configurable.phtml +++ b/app/design/frontend/default/default/template/catalog/product/view/type/options/configurable.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/default/template/catalog/product/view/type/simple.phtml b/app/design/frontend/default/default/template/catalog/product/view/type/simple.phtml index ff53a854..87b8f713 100644 --- a/app/design/frontend/default/default/template/catalog/product/view/type/simple.phtml +++ b/app/design/frontend/default/default/template/catalog/product/view/type/simple.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ /** diff --git a/app/design/frontend/default/default/template/catalog/product/view/type/virtual.phtml b/app/design/frontend/default/default/template/catalog/product/view/type/virtual.phtml index f5381591..bb1bf8d3 100644 --- a/app/design/frontend/default/default/template/catalog/product/view/type/virtual.phtml +++ b/app/design/frontend/default/default/template/catalog/product/view/type/virtual.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ /** diff --git a/app/design/frontend/default/default/template/catalog/seo/sitemap.phtml b/app/design/frontend/default/default/template/catalog/seo/sitemap.phtml index b66be478..3c1c4363 100644 --- a/app/design/frontend/default/default/template/catalog/seo/sitemap.phtml +++ b/app/design/frontend/default/default/template/catalog/seo/sitemap.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
    diff --git a/app/design/frontend/default/default/template/catalogsearch/advanced/form.phtml b/app/design/frontend/default/default/template/catalogsearch/advanced/form.phtml index 16f29f78..d80ded8d 100644 --- a/app/design/frontend/default/default/template/catalogsearch/advanced/form.phtml +++ b/app/design/frontend/default/default/template/catalogsearch/advanced/form.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
    diff --git a/app/design/frontend/default/default/template/catalogsearch/form.mini.phtml b/app/design/frontend/default/default/template/catalogsearch/form.mini.phtml index d3112a23..ca876178 100644 --- a/app/design/frontend/default/default/template/catalogsearch/form.mini.phtml +++ b/app/design/frontend/default/default/template/catalogsearch/form.mini.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,22 +21,22 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
    - __('Search Site') ?> - + __('Search Site') ?> +
    - - diff --git a/app/design/frontend/default/default/template/catalogsearch/result.phtml b/app/design/frontend/default/default/template/catalogsearch/result.phtml index e89f41ae..2095af69 100644 --- a/app/design/frontend/default/default/template/catalogsearch/result.phtml +++ b/app/design/frontend/default/default/template/catalogsearch/result.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getResultCount()): ?> diff --git a/app/design/frontend/default/default/template/catalogsearch/term.phtml b/app/design/frontend/default/default/template/catalogsearch/term.phtml index 057a59e8..4c0276c2 100644 --- a/app/design/frontend/default/default/template/catalogsearch/term.phtml +++ b/app/design/frontend/default/default/template/catalogsearch/term.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
    diff --git a/app/design/frontend/default/default/template/checkout/cart.phtml b/app/design/frontend/default/default/template/checkout/cart.phtml index e86b35ae..e919e7ab 100644 --- a/app/design/frontend/default/default/template/checkout/cart.phtml +++ b/app/design/frontend/default/default/template/checkout/cart.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
    diff --git a/app/design/frontend/default/default/template/checkout/cart/crosssell.phtml b/app/design/frontend/default/default/template/checkout/cart/crosssell.phtml index d6694643..2d86b256 100644 --- a/app/design/frontend/default/default/template/checkout/cart/crosssell.phtml +++ b/app/design/frontend/default/default/template/checkout/cart/crosssell.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,10 +21,10 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -getProductUrl() ?>"><?php echo $this->htmlEscape($_item->getName()) ?>
    htmlEscape($_item->getName()) ?>
    - getPriceHtml($_item) ?> + getPriceHtml($_item, true) ?>
    helper('wishlist')->isAllow()) : ?> __('Add to Wishlist') ?> diff --git a/app/design/frontend/default/default/template/checkout/cart/item/default.phtml b/app/design/frontend/default/default/template/checkout/cart/item/default.phtml index 183dcfe5..32908f17 100644 --- a/app/design/frontend/default/default/template/checkout/cart/item/default.phtml +++ b/app/design/frontend/default/default/template/checkout/cart/item/default.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getItem()?> diff --git a/app/design/frontend/default/default/template/checkout/cart/noItems.phtml b/app/design/frontend/default/default/template/checkout/cart/noItems.phtml index 2a6e83ae..eef76f67 100644 --- a/app/design/frontend/default/default/template/checkout/cart/noItems.phtml +++ b/app/design/frontend/default/default/template/checkout/cart/noItems.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
    diff --git a/app/design/frontend/default/default/template/checkout/cart/render/default.phtml b/app/design/frontend/default/default/template/checkout/cart/render/default.phtml index c4c273c3..8b116882 100644 --- a/app/design/frontend/default/default/template/checkout/cart/render/default.phtml +++ b/app/design/frontend/default/default/template/checkout/cart/render/default.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getItem() ?> diff --git a/app/design/frontend/default/default/template/checkout/cart/render/simple.phtml b/app/design/frontend/default/default/template/checkout/cart/render/simple.phtml index 9214f664..1eaf4570 100644 --- a/app/design/frontend/default/default/template/checkout/cart/render/simple.phtml +++ b/app/design/frontend/default/default/template/checkout/cart/render/simple.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getItem() ?> diff --git a/app/design/frontend/default/default/template/checkout/cart/shipping.phtml b/app/design/frontend/default/default/template/checkout/cart/shipping.phtml index 3a23be3a..9aadbaba 100644 --- a/app/design/frontend/default/default/template/checkout/cart/shipping.phtml +++ b/app/design/frontend/default/default/template/checkout/cart/shipping.phtml @@ -4,17 +4,18 @@ * * 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. + * 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/osl-3.0.php * If you did not receive a copy of the license and are unable to + * 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. * * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getItem() ?> diff --git a/app/design/frontend/default/default/template/checkout/cart/totals.phtml b/app/design/frontend/default/default/template/checkout/cart/totals.phtml index bc161c31..30a94915 100644 --- a/app/design/frontend/default/default/template/checkout/cart/totals.phtml +++ b/app/design/frontend/default/default/template/checkout/cart/totals.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,14 +21,14 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/default/template/checkout/links.phtml b/app/design/frontend/default/default/template/checkout/links.phtml index d8e35b38..f4b8da43 100644 --- a/app/design/frontend/default/default/template/checkout/links.phtml +++ b/app/design/frontend/default/default/template/checkout/links.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,6 +21,6 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/default/template/checkout/multishipping/address/select.phtml b/app/design/frontend/default/default/template/checkout/multishipping/address/select.phtml index a0924fb8..2991d3e1 100644 --- a/app/design/frontend/default/default/template/checkout/multishipping/address/select.phtml +++ b/app/design/frontend/default/default/template/checkout/multishipping/address/select.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
    diff --git a/app/design/frontend/default/default/template/checkout/multishipping/addresses.phtml b/app/design/frontend/default/default/template/checkout/multishipping/addresses.phtml index c730c59f..d2a85f9f 100644 --- a/app/design/frontend/default/default/template/checkout/multishipping/addresses.phtml +++ b/app/design/frontend/default/default/template/checkout/multishipping/addresses.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> + + getAgreements()) return; ?>
      getAgreements() as $_a): ?>
    1. getContentHeight() ? ' style="height:' . $_a->getContentHeight() . '"' : '')?>> - htmlEscape($_a->getContent())) ?> + getIsHtml()):?> + getContent() ?> + + htmlEscape($_a->getContent())) ?> +

        diff --git a/app/design/frontend/default/default/template/checkout/multishipping/billing.phtml b/app/design/frontend/default/default/template/checkout/multishipping/billing.phtml index 9d460e86..c9fbcd26 100644 --- a/app/design/frontend/default/default/template/checkout/multishipping/billing.phtml +++ b/app/design/frontend/default/default/template/checkout/multishipping/billing.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>

      __('Payment Method') ?>
    -
    diff --git a/app/design/frontend/default/default/template/checkout/onepage/review/item.phtml b/app/design/frontend/default/default/template/checkout/onepage/review/item.phtml index e9548d09..b51a4370 100644 --- a/app/design/frontend/default/default/template/checkout/onepage/review/item.phtml +++ b/app/design/frontend/default/default/template/checkout/onepage/review/item.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getItem()?> diff --git a/app/design/frontend/default/default/template/checkout/onepage/shipping.phtml b/app/design/frontend/default/default/template/checkout/onepage/shipping.phtml index 5204a020..469c15bc 100644 --- a/app/design/frontend/default/default/template/checkout/onepage/shipping.phtml +++ b/app/design/frontend/default/default/template/checkout/onepage/shipping.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> @@ -53,7 +53,7 @@
    -
    +
    diff --git a/app/design/frontend/default/default/template/checkout/onepage/shipping_method.phtml b/app/design/frontend/default/default/template/checkout/onepage/shipping_method.phtml index 34d00664..52d553d4 100644 --- a/app/design/frontend/default/default/template/checkout/onepage/shipping_method.phtml +++ b/app/design/frontend/default/default/template/checkout/onepage/shipping_method.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,12 +21,12 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
    -
    +
    getChildHtml('available') ?>
    diff --git a/app/design/frontend/default/default/template/checkout/onepage/shipping_method/additional.phtml b/app/design/frontend/default/default/template/checkout/onepage/shipping_method/additional.phtml index 4b41a8b8..09d335de 100644 --- a/app/design/frontend/default/default/template/checkout/onepage/shipping_method/additional.phtml +++ b/app/design/frontend/default/default/template/checkout/onepage/shipping_method/additional.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> helper('giftmessage/message')->getInline('onepage_checkout', $this->getQuote(), $this->getDontDisplayContainer()) ?> \ No newline at end of file diff --git a/app/design/frontend/default/default/template/checkout/onepage/shipping_method/available.phtml b/app/design/frontend/default/default/template/checkout/onepage/shipping_method/available.phtml index 9554c1b0..2b5682dc 100644 --- a/app/design/frontend/default/default/template/checkout/onepage/shipping_method/available.phtml +++ b/app/design/frontend/default/default/template/checkout/onepage/shipping_method/available.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getShippingRates())): ?> diff --git a/app/design/frontend/default/default/template/checkout/success.phtml b/app/design/frontend/default/default/template/checkout/success.phtml index 9e321e23..5d7f2d6d 100644 --- a/app/design/frontend/default/default/template/checkout/success.phtml +++ b/app/design/frontend/default/default/template/checkout/success.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/default/template/chronopay/form.phtml b/app/design/frontend/default/default/template/chronopay/form.phtml index ea089ad4..a51ce466 100644 --- a/app/design/frontend/default/default/template/chronopay/form.phtml +++ b/app/design/frontend/default/default/template/chronopay/form.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage_Chronopay * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/default/template/customer/form/changepassword.phtml b/app/design/frontend/default/default/template/customer/form/changepassword.phtml index f84b5237..479a3346 100644 --- a/app/design/frontend/default/default/template/customer/form/changepassword.phtml +++ b/app/design/frontend/default/default/template/customer/form/changepassword.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getMessagesBlock()->getGroupedHtml() ?> diff --git a/app/design/frontend/default/default/template/customer/form/confirmation.phtml b/app/design/frontend/default/default/template/customer/form/confirmation.phtml index d680b7f3..707620a9 100644 --- a/app/design/frontend/default/default/template/customer/form/confirmation.phtml +++ b/app/design/frontend/default/default/template/customer/form/confirmation.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
    diff --git a/app/design/frontend/default/default/template/customer/form/edit.phtml b/app/design/frontend/default/default/template/customer/form/edit.phtml index 70f69c9b..b6b4a056 100644 --- a/app/design/frontend/default/default/template/customer/form/edit.phtml +++ b/app/design/frontend/default/default/template/customer/form/edit.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
    diff --git a/app/design/frontend/default/default/template/customer/form/forgotpassword.phtml b/app/design/frontend/default/default/template/customer/form/forgotpassword.phtml index 987ed927..a667fb9b 100644 --- a/app/design/frontend/default/default/template/customer/form/forgotpassword.phtml +++ b/app/design/frontend/default/default/template/customer/form/forgotpassword.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
    diff --git a/app/design/frontend/default/default/template/customer/form/login.phtml b/app/design/frontend/default/default/template/customer/form/login.phtml index c43e8948..1bea5885 100644 --- a/app/design/frontend/default/default/template/customer/form/login.phtml +++ b/app/design/frontend/default/default/template/customer/form/login.phtml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/default/template/customer/form/mini.newsletter.phtml b/app/design/frontend/default/default/template/customer/form/mini.newsletter.phtml index c8d30509..6a3d087a 100644 --- a/app/design/frontend/default/default/template/customer/form/mini.newsletter.phtml +++ b/app/design/frontend/default/default/template/customer/form/mini.newsletter.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
    + isNewsletterEnabled()): ?>
  • getFormData()->getIsSubscribed()): ?> checked="checked" />
  • + getLayout()->createBlock('customer/widget_dob') ?> isEnabled()): ?>
  • setDate($this->getFormData()->getDob())->toHtml() ?>
  • diff --git a/app/design/frontend/default/default/template/customer/logout.phtml b/app/design/frontend/default/default/template/customer/logout.phtml index 5263c296..0351f49c 100644 --- a/app/design/frontend/default/default/template/customer/logout.phtml +++ b/app/design/frontend/default/default/template/customer/logout.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,13 +21,13 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
    -

    __("You're now Logged Out") ?>

    +

    __("You're now Logged Out") ?>

    -

    __('You have been successfully logged out and will be redirected to our homepage in 5 seconds.') ?>

    +

    __('You have been successfully logged out and will be redirected to our homepage in 5 seconds.') ?>

    diff --git a/app/design/frontend/default/default/template/customer/order/view.phtml b/app/design/frontend/default/default/template/customer/order/view.phtml index d962d1a8..84e5228f 100644 --- a/app/design/frontend/default/default/template/customer/order/view.phtml +++ b/app/design/frontend/default/default/template/customer/order/view.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
    diff --git a/app/design/frontend/default/default/template/customer/orders.phtml b/app/design/frontend/default/default/template/customer/orders.phtml index 6ec2ee0d..b7c1578b 100644 --- a/app/design/frontend/default/default/template/customer/orders.phtml +++ b/app/design/frontend/default/default/template/customer/orders.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/default/template/customer/widget/dob.phtml b/app/design/frontend/default/default/template/customer/widget/dob.phtml index 690abd7c..afaba6af 100644 --- a/app/design/frontend/default/default/template/customer/widget/dob.phtml +++ b/app/design/frontend/default/default/template/customer/widget/dob.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ /** diff --git a/app/design/frontend/default/default/template/customer/widget/name.phtml b/app/design/frontend/default/default/template/customer/widget/name.phtml index 607971e1..d45b68ac 100644 --- a/app/design/frontend/default/default/template/customer/widget/name.phtml +++ b/app/design/frontend/default/default/template/customer/widget/name.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ /** diff --git a/app/design/frontend/default/default/template/customer/widget/taxvat.phtml b/app/design/frontend/default/default/template/customer/widget/taxvat.phtml index 03c82c73..5290e05c 100644 --- a/app/design/frontend/default/default/template/customer/widget/taxvat.phtml +++ b/app/design/frontend/default/default/template/customer/widget/taxvat.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/default/template/customer/wishlist.phtml b/app/design/frontend/default/default/template/customer/wishlist.phtml index ec2e90c2..46cd82e0 100644 --- a/app/design/frontend/default/default/template/customer/wishlist.phtml +++ b/app/design/frontend/default/default/template/customer/wishlist.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/default/template/cybermut/error.phtml b/app/design/frontend/default/default/template/cybermut/error.phtml index 105a6f8b..106b7a4e 100644 --- a/app/design/frontend/default/default/template/cybermut/error.phtml +++ b/app/design/frontend/default/default/template/cybermut/error.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage_Cybermut * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
    diff --git a/app/design/frontend/default/default/template/cybermut/form.phtml b/app/design/frontend/default/default/template/cybermut/form.phtml index ed5cd470..28c3984a 100644 --- a/app/design/frontend/default/default/template/cybermut/form.phtml +++ b/app/design/frontend/default/default/template/cybermut/form.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage_Cybermut * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
    diff --git a/app/design/frontend/default/default/template/cybersource/form.phtml b/app/design/frontend/default/default/template/cybersource/form.phtml index a00b9d64..5399e03d 100644 --- a/app/design/frontend/default/default/template/cybersource/form.phtml +++ b/app/design/frontend/default/default/template/cybersource/form.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
    @@ -61,18 +61,22 @@

  • - - getInfoData('cc_exp_year') ?> - +
    + +
    +
    + getInfoData('cc_exp_year') ?> + +
  • hasSsCardType()): ?> @@ -80,25 +84,33 @@

      -
    • __('Issue Number') ?>: -
    • -
    • __('Start Date') ?>: - - -
    • +
    • +
      + +
    • +
    • +
      +
      + +
      +
      + +
      +
    @@ -117,7 +130,9 @@

  • - +
    + +
      __('What is this?') ?>
    diff --git a/app/design/frontend/default/default/template/cybersource/info.phtml b/app/design/frontend/default/default/template/cybersource/info.phtml index ef4817a5..09c61b10 100644 --- a/app/design/frontend/default/default/template/cybersource/info.phtml +++ b/app/design/frontend/default/default/template/cybersource/info.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getInfo()): ?> diff --git a/app/design/frontend/default/default/template/directory/currency.phtml b/app/design/frontend/default/default/template/directory/currency.phtml index 4b11857f..c91616a4 100644 --- a/app/design/frontend/default/default/template/directory/currency.phtml +++ b/app/design/frontend/default/default/template/directory/currency.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>

    __('Currency') ?>

    diff --git a/app/design/frontend/default/default/template/email/order/creditmemo/items.phtml b/app/design/frontend/default/default/template/email/order/creditmemo/items.phtml index e49f810a..571686ea 100644 --- a/app/design/frontend/default/default/template/email/order/creditmemo/items.phtml +++ b/app/design/frontend/default/default/template/email/order/creditmemo/items.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getCreditmemo() ?> @@ -51,7 +51,7 @@ getDiscountAmount() > 0): ?>
  • - + diff --git a/app/design/frontend/default/default/template/email/order/invoice/items.phtml b/app/design/frontend/default/default/template/email/order/invoice/items.phtml index ce518c13..5cbc0ea0 100644 --- a/app/design/frontend/default/default/template/email/order/invoice/items.phtml +++ b/app/design/frontend/default/default/template/email/order/invoice/items.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getInvoice() ?> @@ -51,7 +51,7 @@ getDiscountAmount() > 0): ?> - + diff --git a/app/design/frontend/default/default/template/email/order/items.phtml b/app/design/frontend/default/default/template/email/order/items.phtml index 31d62d92..746e4e62 100644 --- a/app/design/frontend/default/default/template/email/order/items.phtml +++ b/app/design/frontend/default/default/template/email/order/items.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getOrder() ?> diff --git a/app/design/frontend/default/default/template/email/order/items/creditmemo/default.phtml b/app/design/frontend/default/default/template/email/order/items/creditmemo/default.phtml index 80f5db11..bd1d644a 100644 --- a/app/design/frontend/default/default/template/email/order/items/creditmemo/default.phtml +++ b/app/design/frontend/default/default/template/email/order/items/creditmemo/default.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getItem() ?> diff --git a/app/design/frontend/default/default/template/email/order/items/invoice/default.phtml b/app/design/frontend/default/default/template/email/order/items/invoice/default.phtml index 80f5db11..bd1d644a 100644 --- a/app/design/frontend/default/default/template/email/order/items/invoice/default.phtml +++ b/app/design/frontend/default/default/template/email/order/items/invoice/default.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getItem() ?> diff --git a/app/design/frontend/default/default/template/email/order/items/order/default.phtml b/app/design/frontend/default/default/template/email/order/items/order/default.phtml index 3bec714f..9e460eb6 100644 --- a/app/design/frontend/default/default/template/email/order/items/order/default.phtml +++ b/app/design/frontend/default/default/template/email/order/items/order/default.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getItem() ?> diff --git a/app/design/frontend/default/default/template/email/order/items/shipment/default.phtml b/app/design/frontend/default/default/template/email/order/items/shipment/default.phtml index 833eeb68..e8a4de27 100644 --- a/app/design/frontend/default/default/template/email/order/items/shipment/default.phtml +++ b/app/design/frontend/default/default/template/email/order/items/shipment/default.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getItem() ?> diff --git a/app/design/frontend/default/default/template/email/order/shipment/items.phtml b/app/design/frontend/default/default/template/email/order/shipment/items.phtml index 6f84894f..d6174861 100644 --- a/app/design/frontend/default/default/template/email/order/shipment/items.phtml +++ b/app/design/frontend/default/default/template/email/order/shipment/items.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getShipment() ?> diff --git a/app/design/frontend/default/default/template/email/order/shipment/track.phtml b/app/design/frontend/default/default/template/email/order/shipment/track.phtml index bda8e5fb..bc75dc3e 100644 --- a/app/design/frontend/default/default/template/email/order/shipment/track.phtml +++ b/app/design/frontend/default/default/template/email/order/shipment/track.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getShipment() ?> diff --git a/app/design/frontend/default/default/template/email/productalert/price.phtml b/app/design/frontend/default/default/template/email/productalert/price.phtml index b2addb8a..5125b55d 100644 --- a/app/design/frontend/default/default/template/email/productalert/price.phtml +++ b/app/design/frontend/default/default/template/email/productalert/price.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category default_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getProducts()): ?> diff --git a/app/design/frontend/default/default/template/email/productalert/stock.phtml b/app/design/frontend/default/default/template/email/productalert/stock.phtml index 212fcdcf..7feb4d73 100644 --- a/app/design/frontend/default/default/template/email/productalert/stock.phtml +++ b/app/design/frontend/default/default/template/email/productalert/stock.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category default_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getProducts()): ?> diff --git a/app/design/frontend/default/default/template/eway/form.phtml b/app/design/frontend/default/default/template/eway/form.phtml index 2148c993..b09c3508 100644 --- a/app/design/frontend/default/default/template/eway/form.phtml +++ b/app/design/frontend/default/default/template/eway/form.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage_Eway * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/default/template/giftmessage/helper.phtml b/app/design/frontend/default/default/template/giftmessage/helper.phtml index e5e48cb1..7cc71504 100644 --- a/app/design/frontend/default/default/template/giftmessage/helper.phtml +++ b/app/design/frontend/default/default/template/giftmessage/helper.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getScriptIncluded() && $this->getCanDisplayContainer()): ?> diff --git a/app/design/frontend/default/default/template/giftmessage/inline.phtml b/app/design/frontend/default/default/template/giftmessage/inline.phtml index bde6f2a8..bc6fbcae 100644 --- a/app/design/frontend/default/default/template/giftmessage/inline.phtml +++ b/app/design/frontend/default/default/template/giftmessage/inline.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getDontDisplayContainer()): ?> diff --git a/app/design/frontend/default/default/template/googlecheckout/form.phtml b/app/design/frontend/default/default/template/googlecheckout/form.phtml index 3a40d21b..d846e063 100644 --- a/app/design/frontend/default/default/template/googlecheckout/form.phtml +++ b/app/design/frontend/default/default/template/googlecheckout/form.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage_GoogleCheckout * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
    diff --git a/app/design/frontend/default/default/template/googlecheckout/link.phtml b/app/design/frontend/default/default/template/googlecheckout/link.phtml index 5f87348e..dd9802db 100644 --- a/app/design/frontend/default/default/template/googlecheckout/link.phtml +++ b/app/design/frontend/default/default/template/googlecheckout/link.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
  • getIsActiveAanalytics()):?> onsubmit="setUrchinInputCode(pageTracker)"> diff --git a/app/design/frontend/default/default/template/ideal/advanced/failure.phtml b/app/design/frontend/default/default/template/ideal/advanced/failure.phtml index c0bf3895..37028aa2 100644 --- a/app/design/frontend/default/default/template/ideal/advanced/failure.phtml +++ b/app/design/frontend/default/default/template/ideal/advanced/failure.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage_Ideal * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
    diff --git a/app/design/frontend/default/default/template/ideal/advanced/form.phtml b/app/design/frontend/default/default/template/ideal/advanced/form.phtml index 93b5f1e8..0aaba774 100755 --- a/app/design/frontend/default/default/template/ideal/advanced/form.phtml +++ b/app/design/frontend/default/default/template/ideal/advanced/form.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage_Ideal * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getMethodCode() ?> diff --git a/app/design/frontend/default/default/template/ideal/advanced/info.phtml b/app/design/frontend/default/default/template/ideal/advanced/info.phtml index dfb49acb..77c2c483 100644 --- a/app/design/frontend/default/default/template/ideal/advanced/info.phtml +++ b/app/design/frontend/default/default/template/ideal/advanced/info.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage_Ideal * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getInfo()): ?> diff --git a/app/design/frontend/default/default/template/ideal/basic/failure.phtml b/app/design/frontend/default/default/template/ideal/basic/failure.phtml index c0bf3895..37028aa2 100644 --- a/app/design/frontend/default/default/template/ideal/basic/failure.phtml +++ b/app/design/frontend/default/default/template/ideal/basic/failure.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage_Ideal * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
    diff --git a/app/design/frontend/default/default/template/ideal/basic/form.phtml b/app/design/frontend/default/default/template/ideal/basic/form.phtml index 6388a59d..c1508a57 100755 --- a/app/design/frontend/default/default/template/ideal/basic/form.phtml +++ b/app/design/frontend/default/default/template/ideal/basic/form.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage_Ideal * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
    diff --git a/app/design/frontend/default/default/template/newsletter/subscribe.phtml b/app/design/frontend/default/default/template/newsletter/subscribe.phtml index 9c684cbb..883bb4e2 100644 --- a/app/design/frontend/default/default/template/newsletter/subscribe.phtml +++ b/app/design/frontend/default/default/template/newsletter/subscribe.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
    diff --git a/app/design/frontend/default/default/template/oscommerce/order/list.phtml b/app/design/frontend/default/default/template/oscommerce/order/list.phtml index e2147175..6a420f4a 100644 --- a/app/design/frontend/default/default/template/oscommerce/order/list.phtml +++ b/app/design/frontend/default/default/template/oscommerce/order/list.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_blank * @package Mage_Ideal * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getOsCommerceOrders(); ?> diff --git a/app/design/frontend/default/default/template/oscommerce/order/view.phtml b/app/design/frontend/default/default/template/oscommerce/order/view.phtml index b75f8856..a8d3b985 100644 --- a/app/design/frontend/default/default/template/oscommerce/order/view.phtml +++ b/app/design/frontend/default/default/template/oscommerce/order/view.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getOrder() ?> diff --git a/app/design/frontend/default/default/template/page/1column.phtml b/app/design/frontend/default/default/template/page/1column.phtml index d537624f..2c604787 100644 --- a/app/design/frontend/default/default/template/page/1column.phtml +++ b/app/design/frontend/default/default/template/page/1column.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getBodyClass()?'class="'.$this->getBodyClass().'"':'' ?>>
    - +
    getChildHtml('header') ?>
    - + - +
    getChildHtml('breadcrumbs') ?> - +
    - + getChildHtml('content') ?> - +
    - +
    - + - + - + getChildHtml('before_body_end') ?>
    getAbsoluteFooter() ?> diff --git a/app/design/frontend/default/default/template/page/2columns-left.phtml b/app/design/frontend/default/default/template/page/2columns-left.phtml index 40aaa17a..c069d6c2 100644 --- a/app/design/frontend/default/default/template/page/2columns-left.phtml +++ b/app/design/frontend/default/default/template/page/2columns-left.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getBodyClass()?'class="'.$this->getBodyClass().'"':'' ?>>
    __('This is a demo store. Any orders placed through this store will not be honored or fulfilled.') ?>

    */ ?> - +
    getChildHtml('header') ?>
    - + - +
    getChildHtml('breadcrumbs') ?> - +
    - getChildHtml('left') ?> -   + getChildHtml('left') ?> 
    - + getChildHtml('global_messages') ?> - - + + getChildHtml('content') ?> - +
    - +
    - + - + - + getChildHtml('before_body_end') ?>
    diff --git a/app/design/frontend/default/default/template/page/2columns-right.phtml b/app/design/frontend/default/default/template/page/2columns-right.phtml index ee4d9686..f58ae0d6 100644 --- a/app/design/frontend/default/default/template/page/2columns-right.phtml +++ b/app/design/frontend/default/default/template/page/2columns-right.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ /** @@ -36,47 +36,45 @@ getBodyClass()?'class="'.$this->getBodyClass().'"':'' ?>>
    __('This is a demo store. Any orders placed through this store will not be honored or fulfilled.') ?>

    */ ?> - +
    getChildHtml('header') ?>
    - + - +
    getChildHtml('breadcrumbs') ?> - +
    - + getChildHtml('global_messages') ?> - + - - getChildHtml('content') ?> - -   + + getChildHtml('content') ?>  +
    - + - +
    - getChildHtml('right') ?> -   + getChildHtml('right') ?> 
    - +
    - + - + - + getChildHtml('before_body_end') ?>
    diff --git a/app/design/frontend/default/default/template/page/3columns.phtml b/app/design/frontend/default/default/template/page/3columns.phtml index 8cf0c443..9dbb183d 100644 --- a/app/design/frontend/default/default/template/page/3columns.phtml +++ b/app/design/frontend/default/default/template/page/3columns.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getBodyClass()?'class="'.$this->getBodyClass().'"':'' ?>>
    __('This is a demo store. Any orders placed through this store will not be honored or fulfilled.') ?>

    */ ?> - +
    getChildHtml('header') ?> -
    -
    - getChildHtml('breadcrumbs') ?> - -
    - getChildHtml('left') ?> -   -
    - +
    + - -
    - - getChildHtml('global_messages') ?> - + +
    +
    + getChildHtml('breadcrumbs') ?> + +
    + getChildHtml('left') ?>  +
    + - - getChildHtml('content') ?> - -   -
    - + +
    + + getChildHtml('global_messages') ?> + - -
    - getChildHtml('right') ?> -   -
    - + + getChildHtml('content') ?>  + +
    + -
    + +
    + getChildHtml('right') ?> 
    - + - -
    - + + + + getChildHtml('before_body_end') ?>
    getAbsoluteFooter() ?> diff --git a/app/design/frontend/default/default/template/page/dashboard.phtml b/app/design/frontend/default/default/template/page/dashboard.phtml index 5ab1c21f..69bbf174 100644 --- a/app/design/frontend/default/default/template/page/dashboard.phtml +++ b/app/design/frontend/default/default/template/page/dashboard.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getBodyClass()?'class="'.$this->getBodyClass().'"':'' ?>>
    __('This is a demo store. Any orders placed through this store will not be honored or fulfilled.') ?>

    */ ?> - +
    getChildHtml('header') ?>
    - + - +
    - + - + - + - +
    - + - + - - + getChildHtml('before_body_end') ?>
    getAbsoluteFooter() ?> diff --git a/app/design/frontend/default/default/template/page/html/breadcrumbs.phtml b/app/design/frontend/default/default/template/page/html/breadcrumbs.phtml index 24548465..ecd76818 100644 --- a/app/design/frontend/default/default/template/page/html/breadcrumbs.phtml +++ b/app/design/frontend/default/default/template/page/html/breadcrumbs.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/default/template/page/html/footer.phtml b/app/design/frontend/default/default/template/page/html/footer.phtml index 328736a1..be30800e 100644 --- a/app/design/frontend/default/default/template/page/html/footer.phtml +++ b/app/design/frontend/default/default/template/page/html/footer.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
    diff --git a/app/design/frontend/default/default/template/page/html/head.phtml b/app/design/frontend/default/default/template/page/html/head.phtml index b686357e..bd96b581 100644 --- a/app/design/frontend/default/default/template/page/html/head.phtml +++ b/app/design/frontend/default/default/template/page/html/head.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> <?php echo $this->getTitle() ?> @@ -30,6 +30,8 @@ +getChildHtml() ?> + @@ -41,5 +43,4 @@ getCssJsHtml() ?> -getChildHtml() ?> helper('core/js')->getTranslatorScript() ?> diff --git a/app/design/frontend/default/default/template/page/html/header.phtml b/app/design/frontend/default/default/template/page/html/header.phtml index 34cf2c5b..43708b69 100644 --- a/app/design/frontend/default/default/template/page/html/header.phtml +++ b/app/design/frontend/default/default/template/page/html/header.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/default/template/page/html/pager.phtml b/app/design/frontend/default/default/template/page/html/pager.phtml index 28c490c1..72166e88 100644 --- a/app/design/frontend/default/default/template/page/html/pager.phtml +++ b/app/design/frontend/default/default/template/page/html/pager.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
      getChildHtml() ?> - class="first last " > > + class="first last " > >
    - - \ No newline at end of file + diff --git a/app/design/frontend/default/default/template/page/html/wrapper.phtml b/app/design/frontend/default/default/template/page/html/wrapper.phtml index e4c2fbbd..db412f5b 100644 --- a/app/design/frontend/default/default/template/page/html/wrapper.phtml +++ b/app/design/frontend/default/default/template/page/html/wrapper.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ /** diff --git a/app/design/frontend/default/default/template/page/one-column.phtml b/app/design/frontend/default/default/template/page/one-column.phtml index 0a4c16e4..7d6bb407 100644 --- a/app/design/frontend/default/default/template/page/one-column.phtml +++ b/app/design/frontend/default/default/template/page/one-column.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getChildHtml('head') ?> - -getChildHtml('content') ?> - -getChildHtml('before_body_end') ?> -getAbsoluteFooter() ?> + getChildHtml('content') ?> + getChildHtml('before_body_end') ?> + getAbsoluteFooter() ?> \ No newline at end of file diff --git a/app/design/frontend/default/default/template/page/print.phtml b/app/design/frontend/default/default/template/page/print.phtml index 0d61d72c..ce51101c 100644 --- a/app/design/frontend/default/default/template/page/print.phtml +++ b/app/design/frontend/default/default/template/page/print.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
    @@ -35,5 +35,5 @@ getRedirectOutput() ?> isHtmlFormRedirect()): ?> -

    __('Click here if nothing has happened', $this->getTargetURL()) ?>

    +

    __('Click here if nothing has happened', $this->getTargetURL()) ?>

    \ No newline at end of file diff --git a/app/design/frontend/default/default/template/page/switch/flags.phtml b/app/design/frontend/default/default/template/page/switch/flags.phtml index a5809f34..883252db 100644 --- a/app/design/frontend/default/default/template/page/switch/flags.phtml +++ b/app/design/frontend/default/default/template/page/switch/flags.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getStores())>1): ?> diff --git a/app/design/frontend/default/default/template/page/switch/languages.phtml b/app/design/frontend/default/default/template/page/switch/languages.phtml index d8793e85..c8d43401 100644 --- a/app/design/frontend/default/default/template/page/switch/languages.phtml +++ b/app/design/frontend/default/default/template/page/switch/languages.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> - - - - - - - - - - - catalog_compare_sidebar - - - - - - - - - - - - - - - - - - - - - - - 4 - upsell4 - - - - - - - - - - - textcatalog/product_view_options_type_text - filecatalog/product_view_options_type_file - selectcatalog/product_view_options_type_select - datecatalog/product_view_options_type_date - - - - product.tierprices - - product.info.addtocart - - - - alias_in_layoutcontainer1 - options_containerproduct - product.info.options.wrapper - product.info.options.wrapper.bottom - - - alias_in_layoutcontainer2 - options_containerproduct - product.info.options.wrapper - product.info.options.wrapper.bottom - - container1ifEquals0alias_in_layoutoptions_container - container2ifEquals0alias_in_layoutoptions_container - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Categories - - seo.sitemap.pager.top - seo.sitemap.pager.bottom - categories - - - - Products Sitemap - - - - - - - Products - - seo.sitemap.pager.top - seo.sitemap.pager.bottom - products - - - - Categories Sitemap - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + images/media/col_left_callout.jpg + Our customer service is available 24/7. Call us at (800) DEMO-NUMBER. + checkout/cart + + + + + + + + Site Map + + + + + + + + + + + + + + + + + + list5 + + product_list_toolbar + + + + + + + + + + + + + + + + + + list5 + + product_list_toolbar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + catalog_compare_sidebar + + + + + + + + + + + + + + + + + + + + + + + 4 + upsell4 + + + + + + + + + + + textcatalog/product_view_options_type_text + filecatalog/product_view_options_type_file + selectcatalog/product_view_options_type_select + datecatalog/product_view_options_type_date + + + + product.tierprices + + product.info.addtocart + + + + alias_in_layoutcontainer1 + options_containerproduct + product.info.options.wrapper + product.info.options.wrapper.bottom + + + alias_in_layoutcontainer2 + options_containerproduct + product.info.options.wrapper + product.info.options.wrapper.bottom + + container1ifEquals0alias_in_layoutoptions_container + container2ifEquals0alias_in_layoutoptions_container + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Categories + + seo.sitemap.pager.top + seo.sitemap.pager.bottom + categories + + + + Products Sitemap + + + + + + + Products + + seo.sitemap.pager.top + seo.sitemap.pager.bottom + products + + + + Categories Sitemap + + + + + + + + + + + + + + + + + + diff --git a/app/design/frontend/default/iphone/layout/catalogsearch.xml b/app/design/frontend/default/iphone/layout/catalogsearch.xml index 96ec19f6..014d6ea8 100644 --- a/app/design/frontend/default/iphone/layout/catalogsearch.xml +++ b/app/design/frontend/default/iphone/layout/catalogsearch.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/iphone/layout/checkout.xml b/app/design/frontend/default/iphone/layout/checkout.xml index 05633691..ac89ca96 100644 --- a/app/design/frontend/default/iphone/layout/checkout.xml +++ b/app/design/frontend/default/iphone/layout/checkout.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2004-2007 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/iphone/layout/chronopay.xml b/app/design/frontend/default/iphone/layout/chronopay.xml index 8d3acb00..cd0df88a 100644 --- a/app/design/frontend/default/iphone/layout/chronopay.xml +++ b/app/design/frontend/default/iphone/layout/chronopay.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage_Chronopay * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/iphone/layout/cms.xml b/app/design/frontend/default/iphone/layout/cms.xml index cadc35eb..fff6b3f2 100644 --- a/app/design/frontend/default/iphone/layout/cms.xml +++ b/app/design/frontend/default/iphone/layout/cms.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/iphone/layout/contacts.xml b/app/design/frontend/default/iphone/layout/contacts.xml index 8a34258f..33a2b599 100644 --- a/app/design/frontend/default/iphone/layout/contacts.xml +++ b/app/design/frontend/default/iphone/layout/contacts.xml @@ -1,44 +1,44 @@ - - - - - - - - - - - Contact Us - - - - - - + + + + + + contactsContact Ustrue + + + + + + + Contact Us + + + + + + diff --git a/app/design/frontend/default/iphone/layout/core.xml b/app/design/frontend/default/iphone/layout/core.xml index beb0e356..592ec8dd 100644 --- a/app/design/frontend/default/iphone/layout/core.xml +++ b/app/design/frontend/default/iphone/layout/core.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/iphone/layout/customer.xml b/app/design/frontend/default/iphone/layout/customer.xml index 2d532c61..1daea04c 100644 --- a/app/design/frontend/default/iphone/layout/customer.xml +++ b/app/design/frontend/default/iphone/layout/customer.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ Supported layout update handles (action): diff --git a/app/design/frontend/default/iphone/layout/cybermut.xml b/app/design/frontend/default/iphone/layout/cybermut.xml index 60c3ad0c..4ff5d146 100644 --- a/app/design/frontend/default/iphone/layout/cybermut.xml +++ b/app/design/frontend/default/iphone/layout/cybermut.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage_Cybermut * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/iphone/layout/directory.xml b/app/design/frontend/default/iphone/layout/directory.xml index 38f9922e..60a549f6 100644 --- a/app/design/frontend/default/iphone/layout/directory.xml +++ b/app/design/frontend/default/iphone/layout/directory.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/iphone/layout/eway.xml b/app/design/frontend/default/iphone/layout/eway.xml index aca6609b..1b8ddc96 100644 --- a/app/design/frontend/default/iphone/layout/eway.xml +++ b/app/design/frontend/default/iphone/layout/eway.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage_Eway * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/iphone/layout/giftmessage.xml b/app/design/frontend/default/iphone/layout/giftmessage.xml index 09b7fe30..f2120fd2 100644 --- a/app/design/frontend/default/iphone/layout/giftmessage.xml +++ b/app/design/frontend/default/iphone/layout/giftmessage.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/iphone/layout/googleanalytics.xml b/app/design/frontend/default/iphone/layout/googleanalytics.xml index 4ff23fc6..edb53a23 100644 --- a/app/design/frontend/default/iphone/layout/googleanalytics.xml +++ b/app/design/frontend/default/iphone/layout/googleanalytics.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/iphone/layout/googlecheckout.xml b/app/design/frontend/default/iphone/layout/googlecheckout.xml index fc7efa3e..de2239ed 100644 --- a/app/design/frontend/default/iphone/layout/googlecheckout.xml +++ b/app/design/frontend/default/iphone/layout/googlecheckout.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/iphone/layout/ideal.xml b/app/design/frontend/default/iphone/layout/ideal.xml index 581088f1..30caf0fd 100644 --- a/app/design/frontend/default/iphone/layout/ideal.xml +++ b/app/design/frontend/default/iphone/layout/ideal.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage_Ideal * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/iphone/layout/newsletter.xml b/app/design/frontend/default/iphone/layout/newsletter.xml index c86ef183..8b819fb9 100644 --- a/app/design/frontend/default/iphone/layout/newsletter.xml +++ b/app/design/frontend/default/iphone/layout/newsletter.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/iphone/layout/oscommerce.xml b/app/design/frontend/default/iphone/layout/oscommerce.xml index aa26bef4..d6c695dc 100644 --- a/app/design/frontend/default/iphone/layout/oscommerce.xml +++ b/app/design/frontend/default/iphone/layout/oscommerce.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/iphone/layout/page.xml b/app/design/frontend/default/iphone/layout/page.xml index 7abb3c88..666881c5 100644 --- a/app/design/frontend/default/iphone/layout/page.xml +++ b/app/design/frontend/default/iphone/layout/page.xml @@ -1,107 +1,107 @@ - - - - - - - - - - - - - - - - - - - - - css/iphone.css - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - css/reset.css - css/boxes.css - css/clears.css - css/menu.css - - skin_csscss/iestyles.cssIE - skin_csscss/ie7.cssIE 7 - skin_csscss/ie7minus.csslt IE 7 - - jslib/ds-sleight.jslt IE 7 - jsvarien/iehover-fix.jslt IE 7 - - css/print.cssmedia="print" - - - - - - + + + + + + + + + + + + + + + + + + + + + css/iphone.css + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + css/reset.css + css/boxes.css + css/clears.css + css/menu.css + + skin_csscss/iestyles.cssIE + skin_csscss/ie7.cssIE 7 + skin_csscss/ie7minus.csslt IE 7 + + jslib/ds-sleight.jslt IE 7 + jsvarien/iehover-fix.jslt IE 7 + + css/print.cssmedia="print" + + + + + + \ No newline at end of file diff --git a/app/design/frontend/default/iphone/layout/paybox.xml b/app/design/frontend/default/iphone/layout/paybox.xml index 70ff6dd3..f0076f16 100644 --- a/app/design/frontend/default/iphone/layout/paybox.xml +++ b/app/design/frontend/default/iphone/layout/paybox.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage_Paybox * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/iphone/layout/paypal.xml b/app/design/frontend/default/iphone/layout/paypal.xml index 9e6e2eef..389f399a 100644 --- a/app/design/frontend/default/iphone/layout/paypal.xml +++ b/app/design/frontend/default/iphone/layout/paypal.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/iphone/layout/paypaluk.xml b/app/design/frontend/default/iphone/layout/paypaluk.xml index d27a953d..23b1e6f3 100644 --- a/app/design/frontend/default/iphone/layout/paypaluk.xml +++ b/app/design/frontend/default/iphone/layout/paypaluk.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/iphone/layout/poll.xml b/app/design/frontend/default/iphone/layout/poll.xml index f2c0ce03..8396e243 100644 --- a/app/design/frontend/default/iphone/layout/poll.xml +++ b/app/design/frontend/default/iphone/layout/poll.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/iphone/layout/productalert.xml b/app/design/frontend/default/iphone/layout/productalert.xml index 3665824a..9ece2ec3 100644 --- a/app/design/frontend/default/iphone/layout/productalert.xml +++ b/app/design/frontend/default/iphone/layout/productalert.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/iphone/layout/protx.xml b/app/design/frontend/default/iphone/layout/protx.xml index 7d7ec988..fd7d3573 100644 --- a/app/design/frontend/default/iphone/layout/protx.xml +++ b/app/design/frontend/default/iphone/layout/protx.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage_Protx * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/iphone/layout/reports.xml b/app/design/frontend/default/iphone/layout/reports.xml index 736382e9..c9a8d60a 100644 --- a/app/design/frontend/default/iphone/layout/reports.xml +++ b/app/design/frontend/default/iphone/layout/reports.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/iphone/layout/review.xml b/app/design/frontend/default/iphone/layout/review.xml index 9f95b15a..b6699720 100644 --- a/app/design/frontend/default/iphone/layout/review.xml +++ b/app/design/frontend/default/iphone/layout/review.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/iphone/layout/rss.xml b/app/design/frontend/default/iphone/layout/rss.xml index d45d9f0a..fd4c72bc 100644 --- a/app/design/frontend/default/iphone/layout/rss.xml +++ b/app/design/frontend/default/iphone/layout/rss.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/iphone/layout/sales.xml b/app/design/frontend/default/iphone/layout/sales.xml index 9264b565..ed0d4e8a 100644 --- a/app/design/frontend/default/iphone/layout/sales.xml +++ b/app/design/frontend/default/iphone/layout/sales.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/iphone/layout/sendfriend.xml b/app/design/frontend/default/iphone/layout/sendfriend.xml index cfaf0679..d1c997e3 100644 --- a/app/design/frontend/default/iphone/layout/sendfriend.xml +++ b/app/design/frontend/default/iphone/layout/sendfriend.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/iphone/layout/shipping.xml b/app/design/frontend/default/iphone/layout/shipping.xml index ab52748a..8765f28c 100644 --- a/app/design/frontend/default/iphone/layout/shipping.xml +++ b/app/design/frontend/default/iphone/layout/shipping.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/iphone/layout/tag.xml b/app/design/frontend/default/iphone/layout/tag.xml index a38b0a9f..2029293d 100644 --- a/app/design/frontend/default/iphone/layout/tag.xml +++ b/app/design/frontend/default/iphone/layout/tag.xml @@ -1,127 +1,130 @@ - - - - - - - - - - - - - - - - - - - - - - tagstag/customer/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - My Account - - - - - - - - - - My Account - - - - - - - - - - My Account - - - - - + + + + + + + + + + + + + + + + + + + + + + tagstag/customer/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + My Account + + + + + + + + + + My Account + + + + + + + + + + My Account + + + + + \ No newline at end of file diff --git a/app/design/frontend/default/iphone/layout/wishlist.xml b/app/design/frontend/default/iphone/layout/wishlist.xml index 9dc824c2..cbeb7b84 100644 --- a/app/design/frontend/default/iphone/layout/wishlist.xml +++ b/app/design/frontend/default/iphone/layout/wishlist.xml @@ -5,10 +5,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -22,7 +22,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/iphone/template/bundle/catalog/product/list/partof.phtml b/app/design/frontend/default/iphone/template/bundle/catalog/product/list/partof.phtml index e1de8c9f..7723a86d 100644 --- a/app/design/frontend/default/iphone/template/bundle/catalog/product/list/partof.phtml +++ b/app/design/frontend/default/iphone/template/bundle/catalog/product/list/partof.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage_Bundle * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getItemCollection()->getSize()): ?> diff --git a/app/design/frontend/default/iphone/template/bundle/catalog/product/price.phtml b/app/design/frontend/default/iphone/template/bundle/catalog/product/price.phtml index 08ba55bb..70884b98 100644 --- a/app/design/frontend/default/iphone/template/bundle/catalog/product/price.phtml +++ b/app/design/frontend/default/iphone/template/bundle/catalog/product/price.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage_Bundle * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/iphone/template/bundle/catalog/product/view/price.phtml b/app/design/frontend/default/iphone/template/bundle/catalog/product/view/price.phtml index f998d636..7dbe1cc2 100644 --- a/app/design/frontend/default/iphone/template/bundle/catalog/product/view/price.phtml +++ b/app/design/frontend/default/iphone/template/bundle/catalog/product/view/price.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getProduct() ?> diff --git a/app/design/frontend/default/iphone/template/bundle/catalog/product/view/tierprices.phtml b/app/design/frontend/default/iphone/template/bundle/catalog/product/view/tierprices.phtml index 56de5cc5..e8da7e7a 100644 --- a/app/design/frontend/default/iphone/template/bundle/catalog/product/view/tierprices.phtml +++ b/app/design/frontend/default/iphone/template/bundle/catalog/product/view/tierprices.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/iphone/template/bundle/catalog/product/view/type/bundle.phtml b/app/design/frontend/default/iphone/template/bundle/catalog/product/view/type/bundle.phtml index 97a86a31..3209de80 100644 --- a/app/design/frontend/default/iphone/template/bundle/catalog/product/view/type/bundle.phtml +++ b/app/design/frontend/default/iphone/template/bundle/catalog/product/view/type/bundle.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage_Bundle * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/iphone/template/bundle/catalog/product/view/type/bundle/option/checkbox.phtml b/app/design/frontend/default/iphone/template/bundle/catalog/product/view/type/bundle/option/checkbox.phtml index a5262cac..7ec43f77 100644 --- a/app/design/frontend/default/iphone/template/bundle/catalog/product/view/type/bundle/option/checkbox.phtml +++ b/app/design/frontend/default/iphone/template/bundle/catalog/product/view/type/bundle/option/checkbox.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage_Bundle * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/iphone/template/bundle/catalog/product/view/type/bundle/option/multi.phtml b/app/design/frontend/default/iphone/template/bundle/catalog/product/view/type/bundle/option/multi.phtml index 52055fdd..3aed0011 100644 --- a/app/design/frontend/default/iphone/template/bundle/catalog/product/view/type/bundle/option/multi.phtml +++ b/app/design/frontend/default/iphone/template/bundle/catalog/product/view/type/bundle/option/multi.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage_Bundle * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/iphone/template/bundle/catalog/product/view/type/bundle/option/radio.phtml b/app/design/frontend/default/iphone/template/bundle/catalog/product/view/type/bundle/option/radio.phtml index 998552ff..e195b93f 100644 --- a/app/design/frontend/default/iphone/template/bundle/catalog/product/view/type/bundle/option/radio.phtml +++ b/app/design/frontend/default/iphone/template/bundle/catalog/product/view/type/bundle/option/radio.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage_Bundle * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/iphone/template/bundle/catalog/product/view/type/bundle/option/select.phtml b/app/design/frontend/default/iphone/template/bundle/catalog/product/view/type/bundle/option/select.phtml index d87553f3..4b616816 100644 --- a/app/design/frontend/default/iphone/template/bundle/catalog/product/view/type/bundle/option/select.phtml +++ b/app/design/frontend/default/iphone/template/bundle/catalog/product/view/type/bundle/option/select.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage_Bundle * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/iphone/template/bundle/catalog/product/view/type/bundle/options.phtml b/app/design/frontend/default/iphone/template/bundle/catalog/product/view/type/bundle/options.phtml index 625a92af..1ca2b519 100644 --- a/app/design/frontend/default/iphone/template/bundle/catalog/product/view/type/bundle/options.phtml +++ b/app/design/frontend/default/iphone/template/bundle/catalog/product/view/type/bundle/options.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage_Bundle * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/iphone/template/bundle/email/order/items/creditmemo/default.phtml b/app/design/frontend/default/iphone/template/bundle/email/order/items/creditmemo/default.phtml index eef135c4..01f9fcdc 100644 --- a/app/design/frontend/default/iphone/template/bundle/email/order/items/creditmemo/default.phtml +++ b/app/design/frontend/default/iphone/template/bundle/email/order/items/creditmemo/default.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage_Bundle * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getItem() ?> diff --git a/app/design/frontend/default/iphone/template/bundle/email/order/items/invoice/default.phtml b/app/design/frontend/default/iphone/template/bundle/email/order/items/invoice/default.phtml index 8739e16a..781edd01 100644 --- a/app/design/frontend/default/iphone/template/bundle/email/order/items/invoice/default.phtml +++ b/app/design/frontend/default/iphone/template/bundle/email/order/items/invoice/default.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/iphone/template/bundle/email/order/items/order/default.phtml b/app/design/frontend/default/iphone/template/bundle/email/order/items/order/default.phtml index a7922385..d743dae6 100644 --- a/app/design/frontend/default/iphone/template/bundle/email/order/items/order/default.phtml +++ b/app/design/frontend/default/iphone/template/bundle/email/order/items/order/default.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getItem() ?> diff --git a/app/design/frontend/default/iphone/template/bundle/email/order/items/shipment/default.phtml b/app/design/frontend/default/iphone/template/bundle/email/order/items/shipment/default.phtml index aa552e3e..ea45149e 100644 --- a/app/design/frontend/default/iphone/template/bundle/email/order/items/shipment/default.phtml +++ b/app/design/frontend/default/iphone/template/bundle/email/order/items/shipment/default.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage_Bundle * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getItem() ?> diff --git a/app/design/frontend/default/iphone/template/bundle/sales/order/creditmemo/items/renderer.phtml b/app/design/frontend/default/iphone/template/bundle/sales/order/creditmemo/items/renderer.phtml index ba24e645..6e955475 100644 --- a/app/design/frontend/default/iphone/template/bundle/sales/order/creditmemo/items/renderer.phtml +++ b/app/design/frontend/default/iphone/template/bundle/sales/order/creditmemo/items/renderer.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage_Bundle * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getItem() ?> diff --git a/app/design/frontend/default/iphone/template/bundle/sales/order/invoice/items/renderer.phtml b/app/design/frontend/default/iphone/template/bundle/sales/order/invoice/items/renderer.phtml index 81b55616..2df4477e 100644 --- a/app/design/frontend/default/iphone/template/bundle/sales/order/invoice/items/renderer.phtml +++ b/app/design/frontend/default/iphone/template/bundle/sales/order/invoice/items/renderer.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage_Bundle * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getItem() ?> diff --git a/app/design/frontend/default/iphone/template/bundle/sales/order/items/renderer.phtml b/app/design/frontend/default/iphone/template/bundle/sales/order/items/renderer.phtml index 5e9dcfb6..cd5dc294 100644 --- a/app/design/frontend/default/iphone/template/bundle/sales/order/items/renderer.phtml +++ b/app/design/frontend/default/iphone/template/bundle/sales/order/items/renderer.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage_Bundle * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getItem() ?> diff --git a/app/design/frontend/default/iphone/template/bundle/sales/order/shipment/items/renderer.phtml b/app/design/frontend/default/iphone/template/bundle/sales/order/shipment/items/renderer.phtml index 31f05df9..c3e37829 100644 --- a/app/design/frontend/default/iphone/template/bundle/sales/order/shipment/items/renderer.phtml +++ b/app/design/frontend/default/iphone/template/bundle/sales/order/shipment/items/renderer.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage_Bundle * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getItem() ?> diff --git a/app/design/frontend/default/iphone/template/callouts/left_col.phtml b/app/design/frontend/default/iphone/template/callouts/left_col.phtml index 90871c04..a4938e04 100644 --- a/app/design/frontend/default/iphone/template/callouts/left_col.phtml +++ b/app/design/frontend/default/iphone/template/callouts/left_col.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/iphone/template/callouts/right_col.phtml b/app/design/frontend/default/iphone/template/callouts/right_col.phtml index d7a0bc8e..a90bb5e6 100644 --- a/app/design/frontend/default/iphone/template/callouts/right_col.phtml +++ b/app/design/frontend/default/iphone/template/callouts/right_col.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/iphone/template/catalog/category/page.phtml b/app/design/frontend/default/iphone/template/catalog/category/page.phtml index a7f69501..5ce350c0 100644 --- a/app/design/frontend/default/iphone/template/catalog/category/page.phtml +++ b/app/design/frontend/default/iphone/template/catalog/category/page.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
    diff --git a/app/design/frontend/default/iphone/template/catalog/category/view.phtml b/app/design/frontend/default/iphone/template/catalog/category/view.phtml index 359a5b32..9dd8fe42 100644 --- a/app/design/frontend/default/iphone/template/catalog/category/view.phtml +++ b/app/design/frontend/default/iphone/template/catalog/category/view.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
    diff --git a/app/design/frontend/default/iphone/template/catalog/product/compare/sidebar.phtml b/app/design/frontend/default/iphone/template/catalog/product/compare/sidebar.phtml index 951395e5..88d92131 100644 --- a/app/design/frontend/default/iphone/template/catalog/product/compare/sidebar.phtml +++ b/app/design/frontend/default/iphone/template/catalog/product/compare/sidebar.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
    diff --git a/app/design/frontend/default/iphone/template/catalog/product/gallery.phtml b/app/design/frontend/default/iphone/template/catalog/product/gallery.phtml index de5c36bc..3508039d 100644 --- a/app/design/frontend/default/iphone/template/catalog/product/gallery.phtml +++ b/app/design/frontend/default/iphone/template/catalog/product/gallery.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/iphone/template/catalog/product/list.phtml b/app/design/frontend/default/iphone/template/catalog/product/list.phtml index d9bbf346..595932a6 100644 --- a/app/design/frontend/default/iphone/template/catalog/product/list.phtml +++ b/app/design/frontend/default/iphone/template/catalog/product/list.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getItems()->getSize()): ?> diff --git a/app/design/frontend/default/iphone/template/catalog/product/list/related.phtml b/app/design/frontend/default/iphone/template/catalog/product/list/related.phtml index 91080757..3f13d08c 100644 --- a/app/design/frontend/default/iphone/template/catalog/product/list/related.phtml +++ b/app/design/frontend/default/iphone/template/catalog/product/list/related.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getItems()->getSize()): ?> @@ -30,7 +30,7 @@

    __('Related Products') ?>

    -

    __('Check items to add to the cart or ') ?>__('select all') ?>

    +

    __('Check items to add to the cart or') ?> __('select all') ?>

      getItems() as $_item): ?> isSuper() || !$_item->isSaleable()): ?> class="super-products"> @@ -46,7 +46,7 @@
    htmlEscape($_item->getName()) ?> - helper('catalog/product')->getPriceHtml($_item) ?> + helper('catalog/product')->getPriceHtml($_item, true) ?> isSuper()): ?> __('View Details') ?>
    diff --git a/app/design/frontend/default/iphone/template/catalog/product/list/toolbar.phtml b/app/design/frontend/default/iphone/template/catalog/product/list/toolbar.phtml index 577ab337..98155446 100644 --- a/app/design/frontend/default/iphone/template/catalog/product/list/toolbar.phtml +++ b/app/design/frontend/default/iphone/template/catalog/product/list/toolbar.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getItemCollection()->getSize()): ?> diff --git a/app/design/frontend/default/iphone/template/catalog/product/new.phtml b/app/design/frontend/default/iphone/template/catalog/product/new.phtml index 187761d9..0fa45cdc 100644 --- a/app/design/frontend/default/iphone/template/catalog/product/new.phtml +++ b/app/design/frontend/default/iphone/template/catalog/product/new.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,13 +21,13 @@ * @category default_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getProductCollection()) && $_products->getSize()): ?>

    __('New Products') ?>

    -
  • __('Discount '.($_order->getCouponCode()?'('.$_order->getCouponCode().')':'')) ?>__('Discount%s', $_order->getCouponCode() ? ' ('.$_order->getCouponCode().')' : '') ?> formatPrice(0.00 - $_creditmemo->getDiscountAmount()) ?>
    __('Discount '.($_order->getCouponCode()?'('.$_order->getCouponCode().')':'')) ?>__('Discount%s', $_order->getCouponCode() ? ' ('.$_order->getCouponCode().')' : '') ?> formatPrice(0.00 - $_invoice->getDiscountAmount()) ?>
    +
    getItems() as $_product): ?> 5): continue; endif; ?> @@ -40,7 +40,7 @@

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

    getReviewsSummaryHtml($_product, 'short') ?> - getPriceHtml($_product) ?> + getPriceHtml($_product, true, '-new') ?> isSaleable()): ?> diff --git a/app/design/frontend/default/iphone/template/catalog/product/price.phtml b/app/design/frontend/default/iphone/template/catalog/product/price.phtml index 0e449a75..3cfaea05 100644 --- a/app/design/frontend/default/iphone/template/catalog/product/price.phtml +++ b/app/design/frontend/default/iphone/template/catalog/product/price.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,53 +21,80 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ +?> + +getProduct() ?> -getMinimalPrice() ?> -getMinimalPrice() ?> getId() ?> +helper('tax')->displayPriceIncludingTax() || $this->helper('tax')->displayBothPrices()); ?> +getMinimalPrice() ?> +helper('tax')->getPrice($_product, $_minimalPriceValue, $simplePricesTax) ?> isGrouped()): ?>
    - getPrice() ?> - getFinalPrice() ?> + helper('tax')->getPrice($_product, $_product->getPrice()) ?> + helper('tax')->getPrice($_product, $_product->getPrice(), $simplePricesTax) ?> + helper('tax')->getPrice($_product, $_product->getFinalPrice()) ?> + helper('tax')->getPrice($_product, $_product->getFinalPrice(), true) ?> - - currency($_price) ?> - -
    - - - __('Regular Price:') ?> - - currency($_price) ?> + + helper('tax')->displayBothPrices() && $_finalPriceInclTax != $_finalPrice): ?> + + __('Excl. Tax:') ?> + currency($_price,true,false) ?> - -
    - - __('Special Price:') ?> - - currency($_finalPrice) ?> + + __('Incl. Tax:') ?> + currency($_finalPriceInclTax,true,false) ?> - -
    + + currency($_price,true,true) ?> + + + +

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

    + + helper('tax')->displayBothPrices() && $_finalPriceInclTax != $_finalPrice): ?> +

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

    + +

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

    + + - getDisplayMinimalPrice() && $_minimalPrice && $_minimalPrice < $_finalPrice): ?> - + getDisplayMinimalPrice() && $_minimalPriceValue && $_minimalPriceValue < $_product->getFinalPrice()): ?> + __('As low as:') ?> - - currency($_minimalPrice) ?> - - -
    + currency($_minimalPrice,true,false) ?> +
    getDisplayMinimalPrice() && $_minimalPrice && $_minimalPrice < $_finalPrice): */ ?> -
    isGrouped()): */ ?> @@ -91,7 +118,7 @@ helper('tax')->displayCartPriceInclTax()) { + if (!$this->helper('tax')->displayPriceIncludingTax()) { $_showPrice = $_exclTax; } ?> diff --git a/app/design/frontend/default/iphone/template/catalog/product/send.phtml b/app/design/frontend/default/iphone/template/catalog/product/send.phtml index 90e9610f..43a98e0b 100644 --- a/app/design/frontend/default/iphone/template/catalog/product/send.phtml +++ b/app/design/frontend/default/iphone/template/catalog/product/send.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ /** diff --git a/app/design/frontend/default/iphone/template/catalog/product/view.phtml b/app/design/frontend/default/iphone/template/catalog/product/view.phtml index 4dddb41a..56c82650 100644 --- a/app/design/frontend/default/iphone/template/catalog/product/view.phtml +++ b/app/design/frontend/default/iphone/template/catalog/product/view.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ /** diff --git a/app/design/frontend/default/iphone/template/catalog/product/view/additional.phtml b/app/design/frontend/default/iphone/template/catalog/product/view/additional.phtml index a3eedcf2..ab52efe3 100644 --- a/app/design/frontend/default/iphone/template/catalog/product/view/additional.phtml +++ b/app/design/frontend/default/iphone/template/catalog/product/view/additional.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getChildHtmlList() as $_html): ?> diff --git a/app/design/frontend/default/iphone/template/catalog/product/view/addto.phtml b/app/design/frontend/default/iphone/template/catalog/product/view/addto.phtml index 5650f462..3882c3d7 100644 --- a/app/design/frontend/default/iphone/template/catalog/product/view/addto.phtml +++ b/app/design/frontend/default/iphone/template/catalog/product/view/addto.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/iphone/template/catalog/product/view/addtocart.phtml b/app/design/frontend/default/iphone/template/catalog/product/view/addtocart.phtml index 47db176a..501cc5d6 100644 --- a/app/design/frontend/default/iphone/template/catalog/product/view/addtocart.phtml +++ b/app/design/frontend/default/iphone/template/catalog/product/view/addtocart.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/iphone/template/catalog/product/view/attributes.phtml b/app/design/frontend/default/iphone/template/catalog/product/view/attributes.phtml index 08ceac34..1ad2f396 100644 --- a/app/design/frontend/default/iphone/template/catalog/product/view/attributes.phtml +++ b/app/design/frontend/default/iphone/template/catalog/product/view/attributes.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ /** diff --git a/app/design/frontend/default/iphone/template/catalog/product/view/bundle.phtml b/app/design/frontend/default/iphone/template/catalog/product/view/bundle.phtml index d23c946a..08b76b1e 100644 --- a/app/design/frontend/default/iphone/template/catalog/product/view/bundle.phtml +++ b/app/design/frontend/default/iphone/template/catalog/product/view/bundle.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/iphone/template/catalog/product/view/options/type/date.phtml b/app/design/frontend/default/iphone/template/catalog/product/view/options/type/date.phtml index e4cdc01b..ce21fb12 100644 --- a/app/design/frontend/default/iphone/template/catalog/product/view/options/type/date.phtml +++ b/app/design/frontend/default/iphone/template/catalog/product/view/options/type/date.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getOption() ?> diff --git a/app/design/frontend/default/iphone/template/catalog/product/view/options/type/default.phtml b/app/design/frontend/default/iphone/template/catalog/product/view/options/type/default.phtml index 04cede94..f0c7abc0 100644 --- a/app/design/frontend/default/iphone/template/catalog/product/view/options/type/default.phtml +++ b/app/design/frontend/default/iphone/template/catalog/product/view/options/type/default.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getOption() ?> diff --git a/app/design/frontend/default/iphone/template/catalog/product/view/options/type/file.phtml b/app/design/frontend/default/iphone/template/catalog/product/view/options/type/file.phtml index e5bf1bd3..45a45159 100644 --- a/app/design/frontend/default/iphone/template/catalog/product/view/options/type/file.phtml +++ b/app/design/frontend/default/iphone/template/catalog/product/view/options/type/file.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getOption() ?> diff --git a/app/design/frontend/default/iphone/template/catalog/product/view/options/type/select.phtml b/app/design/frontend/default/iphone/template/catalog/product/view/options/type/select.phtml index 065bca18..7616e22f 100644 --- a/app/design/frontend/default/iphone/template/catalog/product/view/options/type/select.phtml +++ b/app/design/frontend/default/iphone/template/catalog/product/view/options/type/select.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/iphone/template/catalog/product/view/options/type/text.phtml b/app/design/frontend/default/iphone/template/catalog/product/view/options/type/text.phtml index f034e9c4..64c9851d 100644 --- a/app/design/frontend/default/iphone/template/catalog/product/view/options/type/text.phtml +++ b/app/design/frontend/default/iphone/template/catalog/product/view/options/type/text.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getOption() ?> diff --git a/app/design/frontend/default/iphone/template/catalog/product/view/options/wrapper.phtml b/app/design/frontend/default/iphone/template/catalog/product/view/options/wrapper.phtml index 0242f84d..1b53abd8 100644 --- a/app/design/frontend/default/iphone/template/catalog/product/view/options/wrapper.phtml +++ b/app/design/frontend/default/iphone/template/catalog/product/view/options/wrapper.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/iphone/template/catalog/product/view/options/wrapper/bottom.phtml b/app/design/frontend/default/iphone/template/catalog/product/view/options/wrapper/bottom.phtml index c086f6d4..4d5b8b73 100644 --- a/app/design/frontend/default/iphone/template/catalog/product/view/options/wrapper/bottom.phtml +++ b/app/design/frontend/default/iphone/template/catalog/product/view/options/wrapper/bottom.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/iphone/template/catalog/product/view/price.phtml b/app/design/frontend/default/iphone/template/catalog/product/view/price.phtml index 49df684b..e76419aa 100644 --- a/app/design/frontend/default/iphone/template/catalog/product/view/price.phtml +++ b/app/design/frontend/default/iphone/template/catalog/product/view/price.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
    diff --git a/app/design/frontend/default/iphone/template/catalog/product/view/price_clone.phtml b/app/design/frontend/default/iphone/template/catalog/product/view/price_clone.phtml index 87d1d61d..44755774 100644 --- a/app/design/frontend/default/iphone/template/catalog/product/view/price_clone.phtml +++ b/app/design/frontend/default/iphone/template/catalog/product/view/price_clone.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getProduct() ?> diff --git a/app/design/frontend/default/iphone/template/catalog/product/view/tierprices.phtml b/app/design/frontend/default/iphone/template/catalog/product/view/tierprices.phtml index 5c426f61..cfb720e6 100644 --- a/app/design/frontend/default/iphone/template/catalog/product/view/tierprices.phtml +++ b/app/design/frontend/default/iphone/template/catalog/product/view/tierprices.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/iphone/template/catalog/product/view/type/configurable.phtml b/app/design/frontend/default/iphone/template/catalog/product/view/type/configurable.phtml index 7f754a76..031e9f4b 100644 --- a/app/design/frontend/default/iphone/template/catalog/product/view/type/configurable.phtml +++ b/app/design/frontend/default/iphone/template/catalog/product/view/type/configurable.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/design/frontend/default/iphone/template/catalog/product/view/type/grouped.phtml b/app/design/frontend/default/iphone/template/catalog/product/view/type/grouped.phtml index f6035695..97cce1ed 100644 --- a/app/design/frontend/default/iphone/template/catalog/product/view/type/grouped.phtml +++ b/app/design/frontend/default/iphone/template/catalog/product/view/type/grouped.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,13 +21,14 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ /** * Grouped product data template * * @see Mage_Catalog_Block_Product_View_Media + * @see Mage_Catalog_Block_Product_View_Type_Grouped */ ?> getProduct() ?> @@ -56,67 +57,7 @@
    isSaleable()): ?> diff --git a/app/locale/en_US/template/email/sales/creditmemo_update_guest.html b/app/locale/en_US/template/email/sales/creditmemo_update_guest.html index 74e2e5d8..9f0f1a67 100644 --- a/app/locale/en_US/template/email/sales/creditmemo_update_guest.html +++ b/app/locale/en_US/template/email/sales/creditmemo_update_guest.html @@ -1,4 +1,4 @@ - +
    htmlEscape($_item->getName()) ?> - helper('tax')->displayPriceIncludingTax() || $this->helper('tax')->displayBothPrices()); ?> - helper('tax')->getPrice($_item, $_item->getPrice(), $simplePricesTax) ?> - helper('tax')->getPrice($_item, $_item->getPrice(), $simplePricesTax) ?> - helper('tax')->getPrice($_item, $_item->getFinalPrice()) ?> - helper('tax')->getPrice($_item, $_item->getFinalPrice(), true) ?> - - helper('tax')->displayBothPrices() && $_finalPriceInclTax != $_finalPrice): ?> - - __('Excl. Tax:') ?> - - currency($_price) ?> - - - - __('Incl. Tax:') ?> - - currency($_finalPriceInclTax,true,false) ?> - - - - currency($_price) ?> - - -

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

    - - helper('tax')->displayBothPrices() && $_finalPriceInclTax != $_finalPrice): ?> -

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

    - -

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

    - - - getTierPriceCount()): ?> -
      - getTierPrices($_item) as $_tierPrice): ?> - - helper('tax')->displayBothPrices() && $_tierPrice['formated_price'] != $_tierPrice['formated_price_incl_tax']): ?> -
    • __('Buy %s for %s each', $_tierPrice['price_qty'], $_tierPrice['formated_price']) ?> - ( __('Incl. Tax') ?>)
    • - -
    • __('Buy %s for %s', $_tierPrice['price_qty']*1, $_tierPrice['formated_price']) ?>
    • - - - -
    - + getPriceHtml($_item, true) ?>
    diff --git a/app/design/frontend/default/iphone/template/catalog/product/view/type/options/configurable.phtml b/app/design/frontend/default/iphone/template/catalog/product/view/type/options/configurable.phtml index 5a512485..567662c0 100644 --- a/app/design/frontend/default/iphone/template/catalog/product/view/type/options/configurable.phtml +++ b/app/design/frontend/default/iphone/template/catalog/product/view/type/options/configurable.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/iphone/template/catalog/product/view/type/simple.phtml b/app/design/frontend/default/iphone/template/catalog/product/view/type/simple.phtml index fa9d7351..8191a2f6 100644 --- a/app/design/frontend/default/iphone/template/catalog/product/view/type/simple.phtml +++ b/app/design/frontend/default/iphone/template/catalog/product/view/type/simple.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ /** diff --git a/app/design/frontend/default/iphone/template/catalog/product/view/type/virtual.phtml b/app/design/frontend/default/iphone/template/catalog/product/view/type/virtual.phtml index fa9d7351..8191a2f6 100644 --- a/app/design/frontend/default/iphone/template/catalog/product/view/type/virtual.phtml +++ b/app/design/frontend/default/iphone/template/catalog/product/view/type/virtual.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ /** diff --git a/app/design/frontend/default/iphone/template/catalog/seo/sitemap.phtml b/app/design/frontend/default/iphone/template/catalog/seo/sitemap.phtml index b66be478..3c1c4363 100644 --- a/app/design/frontend/default/iphone/template/catalog/seo/sitemap.phtml +++ b/app/design/frontend/default/iphone/template/catalog/seo/sitemap.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
    diff --git a/app/design/frontend/default/iphone/template/catalogsearch/advanced/form.phtml b/app/design/frontend/default/iphone/template/catalogsearch/advanced/form.phtml index 16f29f78..d80ded8d 100644 --- a/app/design/frontend/default/iphone/template/catalogsearch/advanced/form.phtml +++ b/app/design/frontend/default/iphone/template/catalogsearch/advanced/form.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
    diff --git a/app/design/frontend/default/iphone/template/catalogsearch/form.mini.phtml b/app/design/frontend/default/iphone/template/catalogsearch/form.mini.phtml index 17684102..ac4bfbf6 100644 --- a/app/design/frontend/default/iphone/template/catalogsearch/form.mini.phtml +++ b/app/design/frontend/default/iphone/template/catalogsearch/form.mini.phtml @@ -4,10 +4,10 @@ * * 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. + * 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/osl-3.0.php + * 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. @@ -21,7 +21,7 @@ * @category design_default * @package Mage * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
    @@ -23,8 +23,8 @@

    {{var comment}}

    If you have any questions, please feel free to contact us at - dummyemail@magentocommerce.com - or by phone at (800) DEMO-STORE. + dummyemail@magentocommerce.com + or by phone at (555) 555-0123.

    Thank you again,
    {{var order.getStoreGroupName()}}

    diff --git a/app/locale/en_US/template/email/sales/invoice_new.html b/app/locale/en_US/template/email/sales/invoice_new.html index 3315ef4a..14c9b6a2 100644 --- a/app/locale/en_US/template/email/sales/invoice_new.html +++ b/app/locale/en_US/template/email/sales/invoice_new.html @@ -1,87 +1,87 @@ - - - - -
    -
    - - - -
    - - - - - -
    Magento
    - - - - - -
    -

    - Hello {{var order.getCustomerName()}},
    - Thank you for your order from {{var order.getStoreGroupName()}}. - You can check the status of your order by logging into your account. - If you have any questions about your order please contact us at dummyemail@magentocommerce.com or call us at (800) DEMO-NUMBER Monday - Friday, 8am - 5pm PST. -

    -

    - Your Invoice #{{var invoice.increment_id}} for Order #{{var order.increment_id}} -

    - - - - - - - - - - - - - - - -
    Billing Information:Payment Method:
    - {{var order.billing_address.format('html')}} -   - {{var payment_html}} -
    -
    - {{depend order.getIsNotVirtual()}} - - - - - - - - - - - - - - - -
    Shipping Information:Shipping Method:
    - {{var order.shipping_address.format('html')}} -   -   - {{var order.shipping_description}}  -
    -
    - {{/depend}} - - {{layout area="frontend" handle="sales_email_order_invoice_items" invoice=$invoice order=$order}} -

    {{var comment}}

    -

    - Thank you again,
    {{var order.getStoreGroupName()}} -

    -
    -
    + + + + +
    + + + + +
    + + + + + +
    Magento
    + + + + + +
    +

    + Hello {{var order.getCustomerName()}},
    + Thank you for your order from {{var order.getStoreGroupName()}}. + You can check the status of your order by logging into your account. + If you have any questions about your order please contact us at dummyemail@magentocommerce.com or call us at (555) 555-0123 Monday - Friday, 8am - 5pm PST. +

    +

    + Your Invoice #{{var invoice.increment_id}} for Order #{{var order.increment_id}} +

    + + + + + + + + + + + + + + + +
    Billing Information:Payment Method:
    + {{var order.billing_address.format('html')}} +   + {{var payment_html}} +
    +
    + {{depend order.getIsNotVirtual()}} + + + + + + + + + + + + + + + +
    Shipping Information:Shipping Method:
    + {{var order.shipping_address.format('html')}} +   +   + {{var order.shipping_description}}  +
    +
    + {{/depend}} + + {{layout area="frontend" handle="sales_email_order_invoice_items" invoice=$invoice order=$order}} +

    {{var comment}}

    +

    + Thank you again,
    {{var order.getStoreGroupName()}} +

    +
    +
    \ No newline at end of file diff --git a/app/locale/en_US/template/email/sales/invoice_new_guest.html b/app/locale/en_US/template/email/sales/invoice_new_guest.html index f0266532..069dc8f0 100644 --- a/app/locale/en_US/template/email/sales/invoice_new_guest.html +++ b/app/locale/en_US/template/email/sales/invoice_new_guest.html @@ -1,88 +1,88 @@ - - - - -
    - - - - -
    - - - - - -
    Magento
    - - - - - -
    -

    - Hello {{var billing.getName()}},
    - Thank you for your order from {{var order.getStoreGroupName()}}. - If you have any questions about your order please contact us at dummyemail@magentocommerce.com or call us at (800) DEMO-NUMBER Monday - Friday, 8am - 5pm PST. -

    -

    - Your Invoice #{{var invoice.increment_id}} for Order #{{var order.increment_id}} -

    - - - - - - - - - - - - - - - -
    Billing Information:Payment Method:
    - {{var order.billing_address.format('html')}} -   - {{var payment_html}} -
    -
    - {{depend order.getIsNotVirtual()}} - - - - - - - - - - - - - - - -
    Shipping Information:Shipping Method:
    - {{var order.shipping_address.format('html')}} -   -   - {{var order.shipping_description}} -   -
    -
    - {{/depend}} - - {{layout handle="sales_email_order_invoice_items" invoice=$invoice order=$order}} - -

    {{var comment}}

    -

    - Thank you again,
    {{var order.getStoreGroupName()}} -

    -
    -
    + + + + +
    + + + + +
    + + + + + +
    Magento
    + + + + + +
    +

    + Hello {{var billing.getName()}},
    + Thank you for your order from {{var order.getStoreGroupName()}}. + If you have any questions about your order please contact us at dummyemail@magentocommerce.com or call us at (555) 555-0123 Monday - Friday, 8am - 5pm PST. +

    +

    + Your Invoice #{{var invoice.increment_id}} for Order #{{var order.increment_id}} +

    + + + + + + + + + + + + + + + +
    Billing Information:Payment Method:
    + {{var order.billing_address.format('html')}} +   + {{var payment_html}} +
    +
    + {{depend order.getIsNotVirtual()}} + + + + + + + + + + + + + + + +
    Shipping Information:Shipping Method:
    + {{var order.shipping_address.format('html')}} +   +   + {{var order.shipping_description}} +   +
    +
    + {{/depend}} + + {{layout handle="sales_email_order_invoice_items" invoice=$invoice order=$order}} + +

    {{var comment}}

    +

    + Thank you again,
    {{var order.getStoreGroupName()}} +

    +
    +
    \ No newline at end of file diff --git a/app/locale/en_US/template/email/sales/invoice_update.html b/app/locale/en_US/template/email/sales/invoice_update.html index ea028266..d2d9fe80 100644 --- a/app/locale/en_US/template/email/sales/invoice_update.html +++ b/app/locale/en_US/template/email/sales/invoice_update.html @@ -25,7 +25,7 @@

    If you have any questions, please feel free to contact us at dummyemail@magentocommerce.com - or by phone at (800) DEMO-STORE. + or by phone at (555) 555-0123.

    Thank you again,
    {{var order.getStoreGroupName()}}

    diff --git a/app/locale/en_US/template/email/sales/invoice_update_guest.html b/app/locale/en_US/template/email/sales/invoice_update_guest.html index e0da1d2a..71f45678 100644 --- a/app/locale/en_US/template/email/sales/invoice_update_guest.html +++ b/app/locale/en_US/template/email/sales/invoice_update_guest.html @@ -24,7 +24,7 @@

    If you have any questions, please feel free to contact us at dummyemail@magentocommerce.com - or by phone at (800) DEMO-STORE. + or by phone at (555) 555-0123.

    Thank you again,
    {{var order.getStoreGroupName()}}

    diff --git a/app/locale/en_US/template/email/sales/order_new.html b/app/locale/en_US/template/email/sales/order_new.html index 7081dc7e..6c964333 100644 --- a/app/locale/en_US/template/email/sales/order_new.html +++ b/app/locale/en_US/template/email/sales/order_new.html @@ -1,89 +1,89 @@ - - - - -
    - - - - -
    - - - - - -
    Magento
    - - - - - -
    -

    - Hello {{var order.getCustomerName()}},
    - Thank you for your order from {{var order.getStoreGroupName()}}. - Once your package ships we will send an email with a link to track your order. - You can check the status of your order by logging into your account. - If you have any questions about your order please contact us at dummyemail@magentocommerce.com or call us at (800) DEMO-NUMBER Monday - Friday, 8am - 5pm PST. -

    -

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

    - -

    Your Order #{{var order.increment_id}} (placed on {{var order.getCreatedAtFormated('long')}})

    - - - - - - - - - - - - - - - -
    Billing Information:Payment Method:
    - {{var order.getBillingAddress().format('html')}} -   - {{var payment_html}} -
    -
    - {{depend order.getIsNotVirtual()}} - - - - - - - - - - - - - - - -
    Shipping Information:Shipping Method:
    - {{var order.getShippingAddress().format('html')}} -   -   - {{var order.getShippingDescription()}} -   -
    -
    - {{/depend}} - {{layout handle="sales_email_order_items" order=$order}} - - {{var items_html}} -
    - {{var order.getEmailCustomerNote()}} -

    Thank you again,
    {{var order.getStoreGroupName()}}

    -
    -
    + + + + +
    + + + + +
    + + + + + +
    Magento
    + + + + + +
    +

    + Hello {{var order.getCustomerName()}},
    + Thank you for your order from {{var order.getStoreGroupName()}}. + Once your package ships we will send an email with a link to track your order. + You can check the status of your order by logging into your account. + If you have any questions about your order please contact us at dummyemail@magentocommerce.com or call us at (555) 555-0123 Monday - Friday, 8am - 5pm PST. +

    +

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

    + +

    Your Order #{{var order.increment_id}} (placed on {{var order.getCreatedAtFormated('long')}})

    + + + + + + + + + + + + + + + +
    Billing Information:Payment Method:
    + {{var order.getBillingAddress().format('html')}} +   + {{var payment_html}} +
    +
    + {{depend order.getIsNotVirtual()}} + + + + + + + + + + + + + + + +
    Shipping Information:Shipping Method:
    + {{var order.getShippingAddress().format('html')}} +   +   + {{var order.getShippingDescription()}} +   +
    +
    + {{/depend}} + {{layout handle="sales_email_order_items" order=$order}} + + {{var items_html}} +
    + {{var order.getEmailCustomerNote()}} +

    Thank you again,
    {{var order.getStoreGroupName()}}

    +
    +
    \ No newline at end of file diff --git a/app/locale/en_US/template/email/sales/order_new_guest.html b/app/locale/en_US/template/email/sales/order_new_guest.html index 40d703b4..68129212 100644 --- a/app/locale/en_US/template/email/sales/order_new_guest.html +++ b/app/locale/en_US/template/email/sales/order_new_guest.html @@ -1,86 +1,86 @@ - - - - -
    - - - - -
    - - - - - -
    Magento
    - - - - - -
    -

    - Hello {{var order.getBillingAddress().getName()}},
    - Thank you for your order from {{var order.getStoreGroupName()}}. - Once your package ships we will send an email with a link to track your order. - If you have any questions about your order please contact us at dummyemail@magentocommerce.com or call us at (800) DEMO-NUMBER Monday - Friday, 8am - 5pm PST. -

    -

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

    - -

    Your Order #{{var order.increment_id}} (placed on {{var order.getCreatedAtFormated('long')}})

    - - - - - - - - - - - - - - - -
    Billing Information:Payment Method:
    - {{var order.getBillingAddress().format('html')}} -   - {{var payment_html}} -
    -
    - {{depend order.getIsNotVirtual()}} - - - - - - - - - - - - - - - -
    Shipping Information:Shipping Method:
    - {{var order.getShippingAddress().format('html')}} -   -   - {{var order.getShippingDescription()}} -   -
    -
    - {{/depend}} - {{layout handle="sales_email_order_items" order=$order}} -
    - {{var order.getEmailCustomerNote()}} -

    Thank you again,
    {{var order.getStoreGroupName()}}

    -
    -
    + + + + +
    + + + + +
    + + + + + +
    Magento
    + + + + + +
    +

    + Hello {{var order.getBillingAddress().getName()}},
    + Thank you for your order from {{var order.getStoreGroupName()}}. + Once your package ships we will send an email with a link to track your order. + If you have any questions about your order please contact us at dummyemail@magentocommerce.com or call us at (555) 555-0123 Monday - Friday, 8am - 5pm PST. +

    +

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

    + +

    Your Order #{{var order.increment_id}} (placed on {{var order.getCreatedAtFormated('long')}})

    + + + + + + + + + + + + + + + +
    Billing Information:Payment Method:
    + {{var order.getBillingAddress().format('html')}} +   + {{var payment_html}} +
    +
    + {{depend order.getIsNotVirtual()}} + + + + + + + + + + + + + + + +
    Shipping Information:Shipping Method:
    + {{var order.getShippingAddress().format('html')}} +   +   + {{var order.getShippingDescription()}} +   +
    +
    + {{/depend}} + {{layout handle="sales_email_order_items" order=$order}} +
    + {{var order.getEmailCustomerNote()}} +

    Thank you again,
    {{var order.getStoreGroupName()}}

    +
    +
    \ No newline at end of file diff --git a/app/locale/en_US/template/email/sales/order_update.html b/app/locale/en_US/template/email/sales/order_update.html index 72f93f30..7dc130fd 100644 --- a/app/locale/en_US/template/email/sales/order_update.html +++ b/app/locale/en_US/template/email/sales/order_update.html @@ -1,37 +1,37 @@ - - -
    - - - + +
    - - - - - -
    Magento
    - - - - - + +
    + + +
    + + + - -
    + + + + + +
    Magento
    + + + + + - -

    - Dear {{var order.getCustomerName()}},
    + Dear {{var order.getCustomerName()}},
    Your order # {{var order.increment_id}} has been
    - {{var order.getStatusLabel()}}. -

    -

    You can check the status of your order by logging into your account.

    -

    {{var comment}}

    + {{var order.getStatusLabel()}}. +

    +

    You can check the status of your order by logging into your account.

    +

    {{var comment}}

    - If you have any questions, please feel free to contact us at + If you have any questions, please feel free to contact us at dummyemail@magentocommerce.com - or by phone at (800) DEMO-STORE. -

    -

    Thank you again,
    {{var order.getStoreGroupName()}}

    -
    -
    + or by phone at (555) 555-0123. +

    +

    Thank you again,
    {{var order.getStoreGroupName()}}

    +
    +
    \ No newline at end of file diff --git a/app/locale/en_US/template/email/sales/order_update_guest.html b/app/locale/en_US/template/email/sales/order_update_guest.html index 919d9bb4..d6b373d3 100644 --- a/app/locale/en_US/template/email/sales/order_update_guest.html +++ b/app/locale/en_US/template/email/sales/order_update_guest.html @@ -24,7 +24,7 @@

    If you have any questions, please feel free to contact us at dummyemail@magentocommerce.com - or by phone at (800) DEMO-STORE. + or by phone at (555) 555-0123.

    Thank you again,
    {{var order.getStoreGroupName()}}

    diff --git a/app/locale/en_US/template/email/sales/shipment_new.html b/app/locale/en_US/template/email/sales/shipment_new.html index e9ecb2d0..6cfbece5 100644 --- a/app/locale/en_US/template/email/sales/shipment_new.html +++ b/app/locale/en_US/template/email/sales/shipment_new.html @@ -1,93 +1,93 @@ - - - - -
    - - - - -
    - - - - - -
    Magento
    - - - - - -
    -

    - Hello {{var order.getCustomerName()}},
    - Thank you for your order from {{var order.getStoreGroupName()}}. - You can check the status of your order by logging into your account. - If you have any questions about your order please contact us at dummyemail@magentocommerce.com or call us at (800) DEMO-NUMBER Monday - Friday, 8am - 5pm PST. -

    -

    - Your shipping confirmation is below. Thank you again for your business. -

    - -

    - Your Shipment #{{var shipment.increment_id}} for Order #{{var order.increment_id}} -

    - - - - - - - - - - - - - - - -
    Billing Information:Payment Method:
    - {{var order.billing_address.format('html')}} -   - {{var payment_html}} -
    -
    - - - - - - - - - - - - - - - -
    Shipping Information:Shipping Method:
    - {{var order.shipping_address.format('html')}} -   -   - {{var order.shipping_description}} -   -
    -
    - - {{layout handle="sales_email_order_shipment_items" shipment=$shipment order=$order}} - -
    - {{block type='core/template' area='frontend' template='email/order/shipment/track.phtml' shipment=$shipment order=$order}} -

    {{var comment}}

    -

    - Thank you again,
    {{var order.getStoreGroupName()}} -

    -
    -
    + + + + +
    + + + + +
    + + + + + +
    Magento
    + + + + + +
    +

    + Hello {{var order.getCustomerName()}},
    + Thank you for your order from {{var order.getStoreGroupName()}}. + You can check the status of your order by logging into your account. + If you have any questions about your order please contact us at dummyemail@magentocommerce.com or call us at (555) 555-0123 Monday - Friday, 8am - 5pm PST. +

    +

    + Your shipping confirmation is below. Thank you again for your business. +

    + +

    + Your Shipment #{{var shipment.increment_id}} for Order #{{var order.increment_id}} +

    + + + + + + + + + + + + + + + +
    Billing Information:Payment Method:
    + {{var order.billing_address.format('html')}} +   + {{var payment_html}} +
    +
    + + + + + + + + + + + + + + + +
    Shipping Information:Shipping Method:
    + {{var order.shipping_address.format('html')}} +   +   + {{var order.shipping_description}} +   +
    +
    + + {{layout handle="sales_email_order_shipment_items" shipment=$shipment order=$order}} + +
    + {{block type='core/template' area='frontend' template='email/order/shipment/track.phtml' shipment=$shipment order=$order}} +

    {{var comment}}

    +

    + Thank you again,
    {{var order.getStoreGroupName()}} +

    +
    +
    \ No newline at end of file diff --git a/app/locale/en_US/template/email/sales/shipment_new_guest.html b/app/locale/en_US/template/email/sales/shipment_new_guest.html index 00da9e91..6482b7a1 100644 --- a/app/locale/en_US/template/email/sales/shipment_new_guest.html +++ b/app/locale/en_US/template/email/sales/shipment_new_guest.html @@ -1,92 +1,92 @@ - - - - -
    - - - - -
    - - - - - -
    Magento
    - - - - - -
    -

    - Hello {{var billing.getName()}},
    - Thank you for your order from {{var order.getStoreGroupName()}}. - If you have any questions about your order please contact us at dummyemail@magentocommerce.com or call us at (800) DEMO-NUMBER Monday - Friday, 8am - 5pm PST. -

    -

    - Your shipping confirmation is below. Thank you again for your business. -

    - -

    - Your Shipment #{{var shipment.increment_id}} for Order #{{var order.increment_id}} -

    - - - - - - - - - - - - - - - -
    Billing Information:Payment Method:
    - {{var order.billing_address.format('html')}} -   - {{var payment_html}} -
    -
    - - - - - - - - - - - - - - - -
    Shipping Information:Shipping Method:
    - {{var order.shipping_address.format('html')}} -   -   - {{var order.shipping_description}} -   -
    -
    - - {{layout handle="sales_email_order_shipment_items" shipment=$shipment order=$order}} - -
    - {{block type='core/template' area='frontend' template='email/order/shipment/track.phtml' shipment=$shipment order=$order}} -

    {{var comment}}

    -

    - Thank you again,
    {{var order.getStoreGroupName()}} -

    -
    -
    + + + + +
    + + + + +
    + + + + + +
    Magento
    + + + + + +
    +

    + Hello {{var billing.getName()}},
    + Thank you for your order from {{var order.getStoreGroupName()}}. + If you have any questions about your order please contact us at dummyemail@magentocommerce.com or call us at (555) 555-0123 Monday - Friday, 8am - 5pm PST. +

    +

    + Your shipping confirmation is below. Thank you again for your business. +

    + +

    + Your Shipment #{{var shipment.increment_id}} for Order #{{var order.increment_id}} +

    + + + + + + + + + + + + + + + +
    Billing Information:Payment Method:
    + {{var order.billing_address.format('html')}} +   + {{var payment_html}} +
    +
    + + + + + + + + + + + + + + + +
    Shipping Information:Shipping Method:
    + {{var order.shipping_address.format('html')}} +   +   + {{var order.shipping_description}} +   +
    +
    + + {{layout handle="sales_email_order_shipment_items" shipment=$shipment order=$order}} + +
    + {{block type='core/template' area='frontend' template='email/order/shipment/track.phtml' shipment=$shipment order=$order}} +

    {{var comment}}

    +

    + Thank you again,
    {{var order.getStoreGroupName()}} +

    +
    +
    \ No newline at end of file diff --git a/app/locale/en_US/template/email/sales/shipment_update.html b/app/locale/en_US/template/email/sales/shipment_update.html index a1d679d8..769c10d5 100644 --- a/app/locale/en_US/template/email/sales/shipment_update.html +++ b/app/locale/en_US/template/email/sales/shipment_update.html @@ -25,7 +25,7 @@

    If you have any questions, please feel free to contact us at dummyemail@magentocommerce.com - or by phone at (800) DEMO-STORE. + or by phone at (555) 555-0123.

    Thank you again,
    {{var order.getStoreGroupName()}}

    diff --git a/app/locale/en_US/template/email/sales/shipment_update_guest.html b/app/locale/en_US/template/email/sales/shipment_update_guest.html index 1ed75ff4..d04b29de 100644 --- a/app/locale/en_US/template/email/sales/shipment_update_guest.html +++ b/app/locale/en_US/template/email/sales/shipment_update_guest.html @@ -24,7 +24,7 @@

    If you have any questions, please feel free to contact us at dummyemail@magentocommerce.com - or by phone at (800) DEMO-STORE. + or by phone at (555) 555-0123.

    Thank you again,
    {{var order.getStoreGroupName()}}

    diff --git a/downloader/Maged/Pear.php b/downloader/Maged/Pear.php index 98faff2d..7eb7c19f 100755 --- a/downloader/Maged/Pear.php +++ b/downloader/Maged/Pear.php @@ -125,7 +125,7 @@ public function getConfig() if (!(substr($key, 0, 5)==='mage_' && substr($key, -4)==='_dir')) { continue; } - $config->set($key, preg_replace('#^\.#', $this->getBaseDir(), $config->get($key))); + $config->set($key, preg_replace('#^\.#', addslashes($this->getBaseDir()), $config->get($key))); //echo $key.' : '.$config->get($key).'
    '; } @@ -265,7 +265,7 @@ public function runHtmlConsole($runParams) } else { throw Maged_Exception("Invalid run parameters"); } - + if (!$run->get('no-header')) { ?>